You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ud...@apache.org on 2016/06/02 00:07:47 UTC
[01/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Repository: incubator-geode
Updated Branches:
refs/heads/develop 1e97dbb68 -> b42d6e991
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
index c92d18c..8af63ed 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStartDUnitTest.java
@@ -16,18 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
@@ -35,6 +24,17 @@ import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.pause;
@Category(DistributedTest.class)
public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase {
@@ -52,8 +52,8 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -85,8 +85,8 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -131,8 +131,8 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -177,8 +177,8 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -228,8 +228,8 @@ public class WanCommandGatewayReceiverStartDUnitTest extends WANCommandTestBase
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
index 9f13f74..3a86f0f 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewayReceiverStopDUnitTest.java
@@ -16,18 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
@@ -35,6 +24,17 @@ import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.pause;
@Category(DistributedTest.class)
public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
@@ -52,8 +52,8 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -86,8 +86,8 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -134,8 +134,8 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -181,8 +181,8 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -233,8 +233,8 @@ public class WanCommandGatewayReceiverStopDUnitTest extends WANCommandTestBase {
int punePort = (Integer) puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
index ccea2a3..5cccdbb 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
@@ -30,6 +30,8 @@ import org.junit.experimental.categories.Category;
import java.util.List;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.pause;
@@ -49,9 +51,9 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -94,9 +96,9 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -155,9 +157,9 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -199,9 +201,9 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -265,9 +267,9 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -346,9 +348,9 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
index bdb35bc..7abb3a9 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
@@ -16,16 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
@@ -34,6 +24,17 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.pause;
@Category(DistributedTest.class)
public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
@@ -53,9 +54,9 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -88,9 +89,9 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -154,9 +155,9 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -200,9 +201,9 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -272,9 +273,9 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
index 79ad8a8..20977c7 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
@@ -30,6 +30,8 @@ import org.junit.experimental.categories.Category;
import java.util.List;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.pause;
@@ -45,9 +47,9 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -74,9 +76,9 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -127,9 +129,9 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
@@ -177,9 +179,9 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
@@ -239,9 +241,9 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
index a4e843c..a95ae17 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
@@ -16,13 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.List;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
@@ -30,10 +23,18 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.pause;
+
@Category(DistributedTest.class)
public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
@@ -45,9 +46,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -84,9 +85,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -126,9 +127,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -192,9 +193,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -263,9 +264,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -347,9 +348,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -383,9 +384,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -460,9 +461,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -511,9 +512,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -592,9 +593,9 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
index 82c28ee..e2d813c 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandStatusDUnitTest.java
@@ -16,24 +16,24 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.pause;
@Category(DistributedTest.class)
public class WanCommandStatusDUnitTest extends WANCommandTestBase{
@@ -46,8 +46,8 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
@@ -136,8 +136,8 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
@@ -237,8 +237,8 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
@@ -331,8 +331,8 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
@@ -408,8 +408,8 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
@@ -482,8 +482,8 @@ public class WanCommandStatusDUnitTest extends WANCommandTestBase{
Integer lnPort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + lnPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, lnPort ));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/management/internal/configuration/ClusterConfigurationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/management/internal/configuration/ClusterConfigurationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/management/internal/configuration/ClusterConfigurationDUnitTest.java
index 53c54ab..7243add 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/management/internal/configuration/ClusterConfigurationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/management/internal/configuration/ClusterConfigurationDUnitTest.java
@@ -16,30 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.configuration;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
-import static com.gemstone.gemfire.internal.FileUtil.*;
-import static com.gemstone.gemfire.internal.lang.StringUtils.*;
-import static com.gemstone.gemfire.management.internal.cli.CliUtil.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.IgnoredException.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-import static org.apache.commons.io.FileUtils.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
@@ -75,11 +51,29 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.Map.Entry;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static com.gemstone.gemfire.internal.FileUtil.delete;
+import static com.gemstone.gemfire.internal.FileUtil.deleteMatching;
+import static com.gemstone.gemfire.internal.lang.StringUtils.isBlank;
+import static com.gemstone.gemfire.management.internal.cli.CliUtil.getAllNormalMembers;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+import static org.apache.commons.io.FileUtils.*;
+
@Category(DistributedTest.class)
public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
@@ -186,10 +180,10 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
File workingDir = new File(newMemberWorkingDir);
workingDir.mkdirs();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
- localProps.setProperty(NAME_NAME, ClusterConfigurationDUnitTest.newMember);
- localProps.setProperty(USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
+ localProps.setProperty(NAME, ClusterConfigurationDUnitTest.newMember);
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
localProps.setProperty(DEPLOY_WORKING_DIR, workingDir.getCanonicalPath());
getSystem(localProps);
@@ -293,10 +287,10 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
File workingDir = new File(newMemberWorkDir);
workingDir.mkdirs();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
- localProps.setProperty(NAME_NAME, ClusterConfigurationDUnitTest.newMember);
- localProps.setProperty(USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
+ localProps.setProperty(NAME, ClusterConfigurationDUnitTest.newMember);
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
localProps.setProperty(DEPLOY_WORKING_DIR, workingDir.getCanonicalPath());
getSystem(localProps);
@@ -363,10 +357,10 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
File workingDir = new File(newMemberWorkingDir);
workingDir.mkdirs();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
- localProps.setProperty(NAME_NAME, ClusterConfigurationDUnitTest.newMember);
- localProps.setProperty(USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
+ localProps.setProperty(NAME, ClusterConfigurationDUnitTest.newMember);
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
localProps.setProperty(DEPLOY_WORKING_DIR, workingDir.getCanonicalPath());
getSystem(localProps);
@@ -469,10 +463,10 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
File workingDir = new File(newMemberWorkingDir);
workingDir.mkdirs();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
- localProps.setProperty(NAME_NAME, ClusterConfigurationDUnitTest.newMember);
- localProps.setProperty(USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
+ localProps.setProperty(NAME, ClusterConfigurationDUnitTest.newMember);
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
localProps.setProperty(DEPLOY_WORKING_DIR, workingDir.getCanonicalPath());
getSystem(localProps);
@@ -558,20 +552,20 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorLogPath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, locator1Name);
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "config");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_START_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(jmxHost));
- locatorProps.setProperty(JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
+ locatorProps.setProperty(NAME, locator1Name);
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "config");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
+ locatorProps.setProperty(JMX_MANAGER, "true");
+ locatorProps.setProperty(JMX_MANAGER_START, "true");
+ locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS, String.valueOf(jmxHost));
+ locatorProps.setProperty(JMX_MANAGER_PORT, String.valueOf(jmxPort));
File clusterConfigDir = new File(clusterConfigPath);
assertTrue(clusterConfigDir.mkdir());
locatorProps.setProperty(CLUSTER_CONFIGURATION_DIR, clusterConfigDir.getCanonicalPath());
- locatorProps.setProperty(HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+ locatorProps.setProperty(HTTP_SERVICE_PORT, String.valueOf(httpPort));
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator1Port, locatorLogFile, null, locatorProps);
@@ -627,15 +621,15 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorLogPath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, locator1Name);
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "config");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_START_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(jmxHost));
- locatorProps.setProperty(JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
- locatorProps.setProperty(HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+ locatorProps.setProperty(NAME, locator1Name);
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "config");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
+ locatorProps.setProperty(JMX_MANAGER, "true");
+ locatorProps.setProperty(JMX_MANAGER_START, "true");
+ locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS, String.valueOf(jmxHost));
+ locatorProps.setProperty(JMX_MANAGER_PORT, String.valueOf(jmxPort));
+ locatorProps.setProperty(HTTP_SERVICE_PORT, String.valueOf(httpPort));
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator1Port, locatorLogFile, null, locatorProps);
@@ -678,10 +672,10 @@ public class ClusterConfigurationDUnitTest extends CliCommandTestBase {
File workingDir = new File(dataMemberWorkingDir);
workingDir.mkdirs();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locator1Port);
- localProps.setProperty(NAME_NAME, ClusterConfigurationDUnitTest.dataMember);
- localProps.setProperty(USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locator1Port);
+ localProps.setProperty(NAME, ClusterConfigurationDUnitTest.dataMember);
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
localProps.setProperty(DEPLOY_WORKING_DIR, workingDir.getCanonicalPath());
getSystem(localProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
----------------------------------------------------------------------
diff --git a/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java b/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
index 47316ed..b35dce9 100644
--- a/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
+++ b/geode-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
@@ -16,19 +16,16 @@
*/
package com.gemstone.gemfire.rest.internal.web.swagger.config;
-import javax.servlet.ServletContext;
-
-import com.gemstone.gemfire.admin.internal.InetAddressUtil;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.mangofactory.swagger.core.SwaggerPathProvider;
-
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.Assert;
import org.springframework.web.util.UriComponentsBuilder;
+import javax.servlet.ServletContext;
import java.net.UnknownHostException;
@SuppressWarnings("unused")
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
index 3f7e19b..7b20343 100644
--- a/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
+++ b/geode-web/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConnectCommandWithHttpAndSSLDUnitTest.java
@@ -16,27 +16,26 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.management.internal.cli.i18n.CliStrings.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.util.test.TestUtil.*;
-
-import java.io.File;
-import java.util.Properties;
-import javax.net.ssl.HostnameVerifier;
-import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.SSLSession;
-
import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
-
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.management.internal.cli.i18n.CliStrings.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.util.test.TestUtil.getResourcePath;
+
/**
* @since GemFire 8.1
*/
@@ -67,14 +66,14 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testMutualAuthentication() throws Exception {
Properties serverProps = new Properties();
- serverProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, "JKS");
- serverProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME, "SSL");
- serverProps.setProperty(HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME, "true");
- serverProps.setProperty(HTTP_SERVICE_SSL_TRUSTSTORE_NAME, jks.getCanonicalPath());
- serverProps.setProperty(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ serverProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_TYPE, "JKS");
+ serverProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "SSL");
+ serverProps.setProperty(HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION, "true");
+ serverProps.setProperty(HTTP_SERVICE_SSL_TRUSTSTORE, jks.getCanonicalPath());
+ serverProps.setProperty(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD, "password");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__KEY_STORE, jks.getCanonicalPath());
@@ -90,10 +89,10 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testSimpleSSL() throws Exception {
Properties serverProps = new Properties();
- serverProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, "JKS");
+ serverProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ serverProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_TYPE, "JKS");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -106,9 +105,9 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testSSLWithoutKeyStoreType() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -121,10 +120,10 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testSSLWithSSLProtocol() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME,"SSL");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "SSL");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -137,10 +136,10 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testSSLWithTLSProtocol() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME,"TLS");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLS");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -153,10 +152,10 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testSSLWithTLSv11Protocol() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME,"TLSv1.1");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.1");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -169,10 +168,10 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testSSLWithTLSv12Protocol() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME,"TLSv1.2");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.2");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -185,10 +184,10 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testWithMultipleProtocol() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME,"SSL,TLSv1.2");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "SSL,TLSv1.2");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -202,10 +201,10 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
@Test
public void testSSLWithCipherSuite() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME, "TLSv1.2");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.2");
//Its bad to hard code here. But using SocketFactory.getDefaultCiphers() somehow is not working with the option
//"https.cipherSuites" which is required to restrict cipher suite with HttpsURLConnection
@@ -215,8 +214,8 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
sslContext.init(null, null, new java.security.SecureRandom());
String[] cipherSuites = sslContext.getSocketFactory().getSupportedCipherSuites();*/
-
- localProps.setProperty(HTTP_SERVICE_SSL_CIPHERS_NAME,"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256");
+
+ localProps.setProperty(HTTP_SERVICE_SSL_CIPHERS, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
@@ -234,11 +233,11 @@ public class ConnectCommandWithHttpAndSSLDUnitTest extends CliCommandTestBase {
System.setProperty("javax.net.debug", "ssl,handshake,failure");
Properties localProps = new Properties();
- localProps.setProperty(HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS_NAME,"TLSv1.2");
- localProps.setProperty(HTTP_SERVICE_SSL_CIPHERS_NAME,"TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_EMPTY_RENEGOTIATION_INFO_SCSV");
+ localProps.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.2");
+ localProps.setProperty(HTTP_SERVICE_SSL_CIPHERS, "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,TLS_EMPTY_RENEGOTIATION_INFO_SCSV");
Properties clientProps = new Properties();
clientProps.setProperty(CONNECT__TRUST_STORE, jks.getCanonicalPath());
[48/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index ea1df6a..ed5a60f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -168,7 +168,7 @@ public class InternalDistributedSystemJUnitTest
public void testMemberTimeout() {
Properties props = new Properties();
int memberTimeout = 100;
- props.put(DistributionConfig.MEMBER_TIMEOUT_NAME, String.valueOf(memberTimeout));
+ props.put(MEMBER_TIMEOUT, String.valueOf(memberTimeout));
props.put(MCAST_PORT, "0");
DistributionConfig config = createSystem(props).getOriginalConfig();
@@ -301,7 +301,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.LOG_LEVEL_NAME, logLevel.toString());
+ props.put(LOG_LEVEL, logLevel.toString());
DistributionConfig config = createSystem(props).getConfig();
assertEquals(logLevel.intValue(), config.getLogLevel());
@@ -311,7 +311,7 @@ public class InternalDistributedSystemJUnitTest
public void testInvalidLogLevel() {
try {
Properties props = new Properties();
- props.put(DistributionConfig.LOG_LEVEL_NAME, "blah blah blah");
+ props.put(LOG_LEVEL, "blah blah blah");
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -326,7 +326,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.put(STATISTIC_SAMPLING_ENABLED, "true");
DistributionConfig config = createSystem(props).getConfig();
assertEquals(true, config.getStatisticSamplingEnabled());
}
@@ -338,7 +338,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, rate);
+ props.put(STATISTIC_SAMPLE_RATE, rate);
DistributionConfig config = createSystem(props).getConfig();
// The fix for 48228 causes the rate to be 1000 even if we try to set it less
assertEquals(1000, config.getStatisticSampleRate());
@@ -349,7 +349,7 @@ public class InternalDistributedSystemJUnitTest
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, "5100-5200");
+ props.setProperty(MEMBERSHIP_PORT_RANGE, "5100-5200");
DistributionConfig config = createSystem(props).getConfig();
assertEquals(5100, config.getMembershipPortRange()[0]);
assertEquals(5200, config.getMembershipPortRange()[1]);
@@ -360,7 +360,7 @@ public class InternalDistributedSystemJUnitTest
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, "5200-5100");
+ props.setProperty(MEMBERSHIP_PORT_RANGE, "5200-5100");
Object exception = null;
try {
createSystem(props).getConfig();
@@ -377,7 +377,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, fileName);
+ props.put(STATISTIC_ARCHIVE_FILE, fileName);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(fileName, config.getStatisticArchiveFile().getName());
}
@@ -393,7 +393,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, time);
+ props.put(ACK_WAIT_THRESHOLD, time);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(time), config.getAckWaitThreshold());
}
@@ -405,7 +405,7 @@ public class InternalDistributedSystemJUnitTest
*/
public void _testInvalidAckWaitThreshold() {
Properties props = new Properties();
- props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "blah");
+ props.put(ACK_WAIT_THRESHOLD, "blah");
try {
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -422,7 +422,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.CACHE_XML_FILE_NAME, fileName);
+ props.put(CACHE_XML_FILE, fileName);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(fileName, config.getCacheXmlFile().getPath());
}
@@ -434,7 +434,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, value);
+ props.put(ARCHIVE_DISK_SPACE_LIMIT, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getArchiveDiskSpaceLimit());
}
@@ -442,7 +442,7 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testInvalidArchiveDiskSpaceLimit() {
Properties props = new Properties();
- props.put(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, "blah");
+ props.put(ARCHIVE_DISK_SPACE_LIMIT, "blah");
try {
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -459,7 +459,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, value);
+ props.put(ARCHIVE_FILE_SIZE_LIMIT, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getArchiveFileSizeLimit());
}
@@ -467,7 +467,7 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testInvalidArchiveFileSizeLimit() {
Properties props = new Properties();
- props.put(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, "blah");
+ props.put(ARCHIVE_FILE_SIZE_LIMIT, "blah");
try {
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -484,7 +484,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, value);
+ props.put(LOG_DISK_SPACE_LIMIT, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getLogDiskSpaceLimit());
}
@@ -492,7 +492,7 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testInvalidLogDiskSpaceLimit() {
Properties props = new Properties();
- props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, "blah");
+ props.put(LOG_DISK_SPACE_LIMIT, "blah");
try {
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -509,7 +509,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, value);
+ props.put(LOG_FILE_SIZE_LIMIT, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getLogFileSizeLimit());
}
@@ -517,7 +517,7 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testInvalidLogFileSizeLimit() {
Properties props = new Properties();
- props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "blah");
+ props.put(LOG_FILE_SIZE_LIMIT, "blah");
try {
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -566,7 +566,7 @@ public class InternalDistributedSystemJUnitTest
File spropFile = new File("gfsecurity.properties");
boolean spropFileExisted = spropFile.exists();
try {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, "finest");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, "finest");
Properties apiProps = new Properties();
apiProps.setProperty(DistributionConfig.GROUPS_NAME, "foo, bar");
{
@@ -584,7 +584,7 @@ public class InternalDistributedSystemJUnitTest
spropFile.renameTo(new File("gfsecurity.properties.sav"));
}
Properties fileProps = new Properties();
- fileProps.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "999");
+ fileProps.setProperty(STATISTIC_SAMPLE_RATE, "999");
FileWriter fw = new FileWriter("gfsecurity.properties");
fileProps.store(fw, null);
fw.close();
@@ -592,9 +592,9 @@ public class InternalDistributedSystemJUnitTest
DistributionConfigImpl dci = new DistributionConfigImpl(apiProps);
assertEquals(null, dci.getAttributeSource(MCAST_PORT));
assertEquals(ConfigSource.api(), dci.getAttributeSource(DistributionConfig.GROUPS_NAME));
- assertEquals(ConfigSource.sysprop(), dci.getAttributeSource(DistributionConfig.LOG_LEVEL_NAME));
+ assertEquals(ConfigSource.sysprop(), dci.getAttributeSource(LOG_LEVEL));
assertEquals(ConfigSource.Type.FILE, dci.getAttributeSource("name").getType());
- assertEquals(ConfigSource.Type.SECURE_FILE, dci.getAttributeSource(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME).getType());
+ assertEquals(ConfigSource.Type.SECURE_FILE, dci.getAttributeSource(STATISTIC_SAMPLE_RATE).getType());
} finally {
System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "log-level");
propFile.delete();
@@ -629,7 +629,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.put(DistributionConfig.LOG_LEVEL_NAME, level.toString());
+ props.put(LOG_LEVEL, level.toString());
InternalDistributedSystem system = createSystem(props);
assertEquals(level.intValue(), system.getConfig().getLogLevel());
assertEquals(level.intValue(), ((InternalLogWriter) system.getLogWriter()).getLogWriterLevel());
@@ -688,7 +688,7 @@ public class InternalDistributedSystemJUnitTest
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
+ props.setProperty(SSL_ENABLED, "true");
Config config1 = new DistributionConfigImpl(props, false);
Properties props1 = config1.toProperties();
// For the deprecated ssl-* properties a decision was made
@@ -697,12 +697,12 @@ public class InternalDistributedSystemJUnitTest
// and its use in toProperties.
// The other thing that is done is the ssl-* props are copied to cluster-ssl-*.
// The following two assertions demonstrate this.
- assertEquals(null, props1.getProperty(DistributionConfig.SSL_ENABLED_NAME));
- assertEquals("true", props1.getProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME));
+ assertEquals(null, props1.getProperty(SSL_ENABLED));
+ assertEquals("true", props1.getProperty(CLUSTER_SSL_ENABLED));
Config config2 = new DistributionConfigImpl(props1, false);
assertEquals(true, config1.sameAs(config2));
Properties props3 = new Properties(props1);
- props3.setProperty(DistributionConfig.SSL_ENABLED_NAME, "false");
+ props3.setProperty(SSL_ENABLED, "false");
Config config3 = new DistributionConfigImpl(props3, false);
assertEquals(false, config1.sameAs(config3));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
index 0185e03..e7b225b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
@@ -34,7 +34,7 @@ import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class ProductUseLogDUnitTest extends CacheTestCase {
@@ -51,7 +51,7 @@ public class ProductUseLogDUnitTest extends CacheTestCase {
@Override
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
+ p.put(USE_CLUSTER_CONFIGURATION, "false");
return p;
}
@@ -64,7 +64,7 @@ public class ProductUseLogDUnitTest extends CacheTestCase {
int locatorPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
Properties p = new Properties();
p.put(START_LOCATOR, "localhost[" + locatorPort + "],peer=false");
- p.put(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
+ p.put(USE_CLUSTER_CONFIGURATION, "false");
InternalDistributedSystem system = getSystem(p);
InternalLocator locator = (InternalLocator)Locator.getLocator();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
index 05f498e..da8e8de 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
@@ -40,8 +40,7 @@ import java.io.File;
import java.net.InetAddress;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
import static org.mockito.Matchers.isA;
import static org.mockito.Mockito.*;
@@ -100,12 +99,12 @@ public class MembershipJUnitTest {
// create configuration objects
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ nonDefault.put(DISABLE_TCP, "true");
nonDefault.put(MCAST_PORT, String.valueOf(mcastPort));
- nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
- nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ nonDefault.put(LOG_FILE, "");
+ nonDefault.put(LOG_LEVEL, "fine");
nonDefault.put(DistributionConfig.GROUPS_NAME, "red, blue");
- nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
+ nonDefault.put(MEMBER_TIMEOUT, "2000");
nonDefault.put(LOCATORS, localHost.getHostName() + '[' + port + ']');
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig transport = new RemoteTransportConfig(config,
@@ -205,7 +204,7 @@ public class MembershipJUnitTest {
public void testJoinTimeoutSetting() throws Exception {
long timeout = 30000;
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, ""+timeout);
+ nonDefault.put(MEMBER_TIMEOUT, ""+timeout);
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig transport = new RemoteTransportConfig(config,
DistributionManager.NORMAL_DM_TYPE);
@@ -246,10 +245,10 @@ public class MembershipJUnitTest {
@Test
public void testMulticastDiscoveryNotAllowed() {
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ nonDefault.put(DISABLE_TCP, "true");
nonDefault.put(MCAST_PORT, "12345");
- nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
- nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ nonDefault.put(LOG_FILE, "");
+ nonDefault.put(LOG_LEVEL, "fine");
nonDefault.put(LOCATORS, "");
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig transport = new RemoteTransportConfig(config,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
index 2786508..5ac830b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
@@ -87,14 +87,14 @@ public class GMSHealthMonitorJUnitTest {
Stopper stopper = mock(Stopper.class);
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "1");
- nonDefault.put(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "10");
- nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ nonDefault.put(ACK_WAIT_THRESHOLD, "1");
+ nonDefault.put(ACK_SEVERE_ALERT_THRESHOLD, "10");
+ nonDefault.put(DISABLE_TCP, "true");
nonDefault.put(MCAST_PORT, "0");
nonDefault.put(MCAST_TTL, "0");
- nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
- nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
- nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
+ nonDefault.put(LOG_FILE, "");
+ nonDefault.put(LOG_LEVEL, "fine");
+ nonDefault.put(MEMBER_TIMEOUT, "2000");
nonDefault.put(LOCATORS, "localhost[10344]");
DM dm = mock(DM.class);
InternalDistributedSystem system = InternalDistributedSystem.newInstanceForTesting(dm, nonDefault);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
index 806b8cb..7d2ab74 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
@@ -141,10 +141,10 @@ public class GMSLocatorRecoveryJUnitTest {
// create configuration objects
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ nonDefault.put(DISABLE_TCP, "true");
nonDefault.put(MCAST_PORT, "0");
- nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
- nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ nonDefault.put(LOG_FILE, "");
+ nonDefault.put(LOG_LEVEL, "fine");
nonDefault.put(LOCATORS, localHost.getHostAddress() + '[' + port + ']');
nonDefault.put(BIND_ADDRESS, localHost.getHostAddress());
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
index c3239b2..aff0e1e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
@@ -85,13 +85,13 @@ public class JGroupsMessengerJUnitTest {
messenger = null;
}
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ nonDefault.put(DISABLE_TCP, "true");
nonDefault.put(MCAST_PORT, enableMcast ? "" + AvailablePortHelper.getRandomAvailableUDPPort() : "0");
nonDefault.put(MCAST_TTL, "0");
- nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
- nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ nonDefault.put(LOG_FILE, "");
+ nonDefault.put(LOG_LEVEL, "fine");
nonDefault.put(LOCATORS, "localhost[10344]");
- nonDefault.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "1");
+ nonDefault.put(ACK_WAIT_THRESHOLD, "1");
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig tconfig = new RemoteTransportConfig(config,
DistributionManager.NORMAL_DM_TYPE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
index 1bc4ed2..fdfb46e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
@@ -75,14 +75,14 @@ public class GMSMembershipManagerJUnitTest {
@Before
public void initMocks() throws Exception {
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "1");
- nonDefault.put(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "10");
- nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ nonDefault.put(ACK_WAIT_THRESHOLD, "1");
+ nonDefault.put(ACK_SEVERE_ALERT_THRESHOLD, "10");
+ nonDefault.put(DISABLE_TCP, "true");
nonDefault.put(MCAST_PORT, "0");
nonDefault.put(MCAST_TTL, "0");
- nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
- nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
- nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
+ nonDefault.put(LOG_FILE, "");
+ nonDefault.put(LOG_LEVEL, "fine");
+ nonDefault.put(MEMBER_TIMEOUT, "2000");
nonDefault.put(LOCATORS, "localhost[10344]");
distConfig = new DistributionConfigImpl(nonDefault);
distProperties = nonDefault;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
index 897fafd..f312d3c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
@@ -38,8 +38,7 @@ import java.io.File;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This tests the rolling upgrade for locators with
@@ -110,8 +109,8 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
final Properties props = new Properties();
props.setProperty(LOCATORS, locators);
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "finest");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+ props.setProperty(LOG_LEVEL, "finest");
// Start locator0 with props.
//props.setProperty(DistributionConfig.START_LOCATOR_NAME, host.getHostName() + "["+port0+"]");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
index f0ea16d..217ebf8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/CacheMapDistTXDUnitTest.java
@@ -17,10 +17,11 @@
package com.gemstone.gemfire.disttx;
import com.gemstone.gemfire.cache30.CacheMapTxnDUnitTest;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Same tests as that of {@link CacheMapTxnDUnitTest} after setting
@@ -59,8 +60,8 @@ public class CacheMapDistTXDUnitTest extends CacheMapTxnDUnitTest {
}
public static void setDistributedTX() {
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
-// props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
+// props.setProperty(LOG_LEVEL, "fine");
}
public static void checkIsDistributedTX() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
index ead27d1..7f1a37a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
@@ -50,7 +50,7 @@ public class DistTXJUnitTest extends TXJUnitTest {
Properties p = new Properties();
p.setProperty(MCAST_PORT, "0"); // loner
p.setProperty(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
- // p.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ // p.setProperty(LOG_LEVEL, "fine");
this.cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(p));
createRegion();
this.txMgr = this.cache.getCacheTransactionManager();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
index 71d82a9..a6a8a0f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
@@ -18,8 +18,8 @@ package com.gemstone.gemfire.disttx;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache30.TXOrderDUnitTest;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import java.util.Properties;
@@ -36,8 +36,8 @@ public class DistTXOrderDUnitTest extends TXOrderDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
-// props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
+// props.setProperty(LOG_LEVEL, "fine");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
index a935950..78a648a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
@@ -17,8 +17,7 @@
package com.gemstone.gemfire.disttx;
import com.gemstone.gemfire.cache30.TXRestrictionsDUnitTest;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import java.util.Properties;
/**
@@ -35,8 +34,8 @@ public class DistTXRestrictionsDUnitTest extends TXRestrictionsDUnitTest {
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
// props.put("distributed-transactions", "true");
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
-// props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
+// props.setProperty(LOG_LEVEL, "fine");
return props;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
index befeca7..b22d37e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
@@ -16,10 +16,9 @@
*/
package com.gemstone.gemfire.disttx;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.TransactionsWithDeltaDUnitTest;
-
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class DistTXWithDeltaDUnitTest extends TransactionsWithDeltaDUnitTest {
@@ -30,8 +29,8 @@ public class DistTXWithDeltaDUnitTest extends TransactionsWithDeltaDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
+ // props.setProperty(LOG_LEVEL, "fine");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
index 9b40e48..8aecf6b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
@@ -151,7 +151,7 @@ public class DistributedTransactionDUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
//props.put("distributed-transactions", "true");
-// props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+// props.setProperty(LOG_LEVEL, "fine");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
index 7f75cae..66535bb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
@@ -16,9 +16,8 @@
*/
package com.gemstone.gemfire.disttx;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.execute.PRTransactionDUnitTest;
-
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import java.util.Properties;
public class PRDistTXDUnitTest extends PRTransactionDUnitTest {
@@ -30,8 +29,8 @@ public class PRDistTXDUnitTest extends PRTransactionDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
-// props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
+// props.setProperty(LOG_LEVEL, "fine");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
index 2e539e3..e50755e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
@@ -48,7 +48,7 @@ public class PRDistTXJUnitTest extends PRTXJUnitTest {
Properties p = new Properties();
p.setProperty(MCAST_PORT, "0"); // loner
p.setProperty(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
- // p.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ // p.setProperty(LOG_LEVEL, "fine");
this.cache = (GemFireCacheImpl) CacheFactory.create(DistributedSystem
.connect(p));
createRegion();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
index f02ade9..934aef2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
@@ -16,11 +16,12 @@
*/
package com.gemstone.gemfire.disttx;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.execute.PRTransactionWithVersionsDUnitTest;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class PRDistTXWithVersionsDUnitTest extends
PRTransactionWithVersionsDUnitTest {
@@ -31,8 +32,8 @@ public class PRDistTXWithVersionsDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
-// props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
+// props.setProperty(LOG_LEVEL, "fine");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
index d9b8ed7..c514b60 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
@@ -16,9 +16,8 @@
*/
package com.gemstone.gemfire.disttx;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.partitioned.PersistentPartitionedRegionWithTransactionDUnitTest;
-
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import java.util.Properties;
@@ -33,8 +32,8 @@ public class PersistentPartitionedRegionWithDistTXDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.DISTRIBUTED_TRANSACTIONS_NAME, "true");
-// props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DISTRIBUTED_TRANSACTIONS, "true");
+// props.setProperty(LOG_LEVEL, "fine");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
index 48fa764..287ab86 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
@@ -24,69 +24,70 @@ import org.junit.experimental.categories.Category;
import java.lang.reflect.Method;
import java.util.Map;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
@Category(UnitTest.class)
public class AbstractConfigJUnitTest {
- @Test
- public void testDisplayPropertyValue() throws Exception {
- AbstractConfigTestClass actc = new AbstractConfigTestClass();
- Method method = actc.getClass().getSuperclass().getDeclaredMethod("okToDisplayPropertyValue", String.class);
- method.setAccessible(true);
- assertFalse((Boolean) method.invoke(actc, "password"));
- assertFalse((Boolean) method.invoke(actc, DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
- assertTrue((Boolean) method.invoke(actc, DistributionConfig.CLUSTER_SSL_ENABLED_NAME));
- assertFalse((Boolean) method.invoke(actc, DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME));
- assertFalse((Boolean) method.invoke(actc, DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME));
- assertTrue((Boolean) method.invoke(actc, DistributionConfig.SSL_ENABLED_NAME));
- assertTrue((Boolean) method.invoke(actc, DistributionConfig.CONSERVE_SOCKETS_NAME));
- assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStorePassword"));
- assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStoreType"));
- assertFalse((Boolean) method.invoke(actc, "sysprop-value"));
- }
+ @Test
+ public void testDisplayPropertyValue() throws Exception {
+ AbstractConfigTestClass actc = new AbstractConfigTestClass();
+ Method method = actc.getClass().getSuperclass().getDeclaredMethod("okToDisplayPropertyValue", String.class);
+ method.setAccessible(true);
+ assertFalse((Boolean) method.invoke(actc, "password"));
+ assertFalse((Boolean) method.invoke(actc,CLUSTER_SSL_TRUSTSTORE_PASSWORD));
+ assertTrue((Boolean) method.invoke(actc, CLUSTER_SSL_ENABLED));
+ assertFalse((Boolean) method.invoke(actc, GATEWAY_SSL_TRUSTSTORE_PASSWORD));
+ assertFalse((Boolean) method.invoke(actc, SERVER_SSL_KEYSTORE_PASSWORD));
+ assertTrue((Boolean) method.invoke(actc, SSL_ENABLED));
+ assertTrue((Boolean) method.invoke(actc, CONSERVE_SOCKETS));
+ assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStorePassword"));
+ assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStoreType"));
+ assertFalse((Boolean) method.invoke(actc, "sysprop-value"));
+ }
- private static class AbstractConfigTestClass extends AbstractConfig {
+ private static class AbstractConfigTestClass extends AbstractConfig {
- @Override
- protected Map getAttDescMap() {
- return null;
- }
+ @Override
+ protected Map getAttDescMap() {
+ return null;
+ }
- @Override
- protected Map<String, ConfigSource> getAttSourceMap() {
- return null;
- }
+ @Override
+ protected Map<String, ConfigSource> getAttSourceMap() {
+ return null;
+ }
- @Override
- public Object getAttributeObject(String attName) {
- return null;
- }
+ @Override
+ public Object getAttributeObject(String attName) {
+ return null;
+ }
- @Override
- public void setAttributeObject(String attName, Object attValue, ConfigSource source) {
+ @Override
+ public void setAttributeObject(String attName, Object attValue, ConfigSource source) {
- }
+ }
- @Override
- public boolean isAttributeModifiable(String attName) {
- return false;
- }
+ @Override
+ public boolean isAttributeModifiable(String attName) {
+ return false;
+ }
- @Override
- public Class getAttributeType(String attName) {
- return null;
- }
+ @Override
+ public Class getAttributeType(String attName) {
+ return null;
+ }
- @Override
- public String[] getAttributeNames() {
- return new String[0];
- }
+ @Override
+ public String[] getAttributeNames() {
+ return new String[0];
+ }
- @Override
- public String[] getSpecificAttributeNames() {
- return new String[0];
- }
- }
+ @Override
+ public String[] getSpecificAttributeNames() {
+ return new String[0];
+ }
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
index 9d50cc5..c53a3d1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
@@ -43,8 +43,7 @@ import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
import static org.junit.Assume.assumeFalse;
@@ -181,7 +180,7 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
final File archiveFile1 = new File(dir + File.separator + this.testName + ".gfs");
Properties props = createGemFireProperties();
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, archiveFileName);
+ props.setProperty(STATISTIC_ARCHIVE_FILE, archiveFileName);
connect(props);
GemFireStatSampler statSampler = getGemFireStatSampler();
@@ -360,9 +359,9 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
// set the system property to use KB instead of MB for file size
System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
Properties props = createGemFireProperties();
- props.setProperty(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, "1");
- props.setProperty(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, "0");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, archiveFileName);
+ props.setProperty(ARCHIVE_FILE_SIZE_LIMIT, "1");
+ props.setProperty(ARCHIVE_DISK_SPACE_LIMIT, "0");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, archiveFileName);
connect(props);
assertTrue(getGemFireStatSampler().waitForInitialization(5000));
@@ -408,10 +407,10 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
// set the system property to use KB instead of MB for file size
System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
Properties props = createGemFireProperties();
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, archiveFileName);
- props.setProperty(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, "1");
- props.setProperty(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, "12");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, String.valueOf(sampleRate));
+ props.setProperty(STATISTIC_ARCHIVE_FILE, archiveFileName);
+ props.setProperty(ARCHIVE_FILE_SIZE_LIMIT, "1");
+ props.setProperty(ARCHIVE_DISK_SPACE_LIMIT, "12");
+ props.setProperty(STATISTIC_SAMPLE_RATE, String.valueOf(sampleRate));
connect(props);
assertTrue(getGemFireStatSampler().waitForInitialization(5000));
@@ -534,11 +533,11 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
private Properties createGemFireProperties() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true"); // TODO: test true/false
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true"); // TODO: test true/false
- props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, String.valueOf(STAT_SAMPLE_RATE));
- props.setProperty(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, "0");
- props.setProperty(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, "0");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true"); // TODO: test true/false
+ props.setProperty(ENABLE_TIME_STATISTICS, "true"); // TODO: test true/false
+ props.setProperty(STATISTIC_SAMPLE_RATE, String.valueOf(STAT_SAMPLE_RATE));
+ props.setProperty(ARCHIVE_FILE_SIZE_LIMIT, "0");
+ props.setProperty(ARCHIVE_DISK_SPACE_LIMIT, "0");
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
index fc9fef5..fc1e40d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
@@ -42,7 +42,7 @@ import java.net.ServerSocket;
import java.net.Socket;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -101,10 +101,10 @@ public class JSSESocketJUnitTest {
LogService.setBaseLogLevel(Level.DEBUG);
{
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_ENABLED_NAME, "true");
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_CIPHERS_NAME, "any");
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_PROTOCOLS_NAME, "TLSv1.2");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SSL_ENABLED, "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SSL_REQUIRE_AUTHENTICATION, "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SSL_CIPHERS, "any");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SSL_PROTOCOLS, "TLSv1.2");
File jks = findTestJKS();
System.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath());
@@ -164,7 +164,7 @@ public class JSSESocketJUnitTest {
public void testClientSocketFactory() {
System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "clientSocketFactory",
TSocketFactory.class.getName());
- System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_ENABLED_NAME);
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + SSL_ENABLED);
SocketCreator.getDefaultInstance(new Properties());
factoryInvoked = false;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
index 84a72b0..02bb437 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
@@ -21,6 +21,7 @@ import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.cache.execute.ResultCollector;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.test.dunit.Assert;
@@ -456,7 +457,7 @@ public class JarDeployerDUnitTest extends CacheTestCase {
// Add the alternate directory to the distributed system, get it back out, and then create
// a JarDeployer object with it.
Properties properties = new Properties();
- properties.put(DistributionConfig.DEPLOY_WORKING_DIR, alternateDir.getAbsolutePath());
+ properties.put(SystemConfigurationProperties.DEPLOY_WORKING_DIR, alternateDir.getAbsolutePath());
InternalDistributedSystem distributedSystem = getSystem(properties);
final JarDeployer jarDeployer = new JarDeployer(distributedSystem.getConfig().getDeployWorkingDir());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
index 5e179f2..a2e7414 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
@@ -55,7 +55,7 @@ public class PdxDeleteFieldDUnitTest extends CacheTestCase{
final int[] locatorPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locatorPorts[0] + "],localhost[" + locatorPorts[1] + "]");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
final File f = new File(DS_NAME);
f.mkdir();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
index ede5e16..6e63465 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
@@ -62,7 +62,7 @@ public class PdxRenameDUnitTest extends CacheTestCase{
final Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locatorPorts[0] + "],localhost[" + locatorPorts[1] + "]");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
Host host = Host.getHost(0);
VM vm1 = host.getVM(0);
[19/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index f19b09f..ea1df6a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -16,37 +16,30 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Properties;
-import java.util.logging.Level;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.Config;
import com.gemstone.gemfire.internal.ConfigSource;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.net.*;
+import java.util.Collection;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
/**
* Tests the functionality of the {@link InternalDistributedSystem}
@@ -109,8 +102,8 @@ public class InternalDistributedSystemJUnitTest
public void testDefaultProperties() {
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributionConfig config = createSystem(props).getConfig();
assertEquals(DistributionConfig.DEFAULT_NAME, config.getName());
@@ -120,10 +113,10 @@ public class InternalDistributedSystemJUnitTest
assertEquals(DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[0], config.getMembershipPortRange()[0]);
assertEquals(DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE[1], config.getMembershipPortRange()[1]);
- if (System.getProperty("gemfire.mcast-address") == null) {
+ if (System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "mcast-address") == null) {
assertEquals(DistributionConfig.DEFAULT_MCAST_ADDRESS, config.getMcastAddress());
}
- if (System.getProperty("gemfire.bind-address") == null) {
+ if (System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "bind-address") == null) {
assertEquals(DistributionConfig.DEFAULT_BIND_ADDRESS, config.getBindAddress());
}
@@ -162,10 +155,10 @@ public class InternalDistributedSystemJUnitTest
String name = "testGetName";
Properties props = new Properties();
- props.put(DistributionConfig.NAME_NAME, name);
+ props.put(SystemConfigurationProperties.NAME, name);
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributionConfig config = createSystem(props).getOriginalConfig();
assertEquals(name, config.getName());
@@ -175,8 +168,8 @@ public class InternalDistributedSystemJUnitTest
public void testMemberTimeout() {
Properties props = new Properties();
int memberTimeout = 100;
- props.put("member-timeout", String.valueOf(memberTimeout));
- props.put("mcast-port", "0");
+ props.put(DistributionConfig.MEMBER_TIMEOUT_NAME, String.valueOf(memberTimeout));
+ props.put(MCAST_PORT, "0");
DistributionConfig config = createSystem(props).getOriginalConfig();
assertEquals(memberTimeout, config.getMemberTimeout());
@@ -188,7 +181,7 @@ public class InternalDistributedSystemJUnitTest
try {
// Totally bogus locator
- props.put(DistributionConfig.LOCATORS_NAME, "14lasfk^5234");
+ props.put(LOCATORS, "14lasfk^5234");
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -198,7 +191,7 @@ public class InternalDistributedSystemJUnitTest
try {
// missing port
- props.put(DistributionConfig.LOCATORS_NAME, "localhost[");
+ props.put(LOCATORS, "localhost[");
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -208,7 +201,7 @@ public class InternalDistributedSystemJUnitTest
try {
// Missing ]
- props.put(DistributionConfig.LOCATORS_NAME, "localhost[234ty");
+ props.put(LOCATORS, "localhost[234ty");
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -218,7 +211,7 @@ public class InternalDistributedSystemJUnitTest
try {
// Malformed port
- props.put(DistributionConfig.LOCATORS_NAME, "localhost[234ty]");
+ props.put(LOCATORS, "localhost[234ty]");
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -228,7 +221,7 @@ public class InternalDistributedSystemJUnitTest
try {
// Malformed port in second locator
- props.put(DistributionConfig.LOCATORS_NAME, "localhost[12345],localhost[sdf3");
+ props.put(LOCATORS, "localhost[12345],localhost[sdf3");
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -248,7 +241,7 @@ public class InternalDistributedSystemJUnitTest
*/
private void checkLocator(String locator) {
Properties props = new Properties();
- props.put(DistributionConfig.LOCATORS_NAME, locator);
+ props.put(LOCATORS, locator);
new DistributionConfigImpl(props);
}
@@ -287,8 +280,8 @@ public class InternalDistributedSystemJUnitTest
*/
public void _testEmptyLocators() {
Properties props = new Properties();
- props.put(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- props.put(DistributionConfig.LOCATORS_NAME, "");
+ props.put(MCAST_PORT, String.valueOf(0));
+ props.put(LOCATORS, "");
try {
createSystem(props);
fail("Should have thrown an IllegalArgumentException");
@@ -306,8 +299,8 @@ public class InternalDistributedSystemJUnitTest
Level logLevel = Level.FINER;
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.LOG_LEVEL_NAME, logLevel.toString());
DistributionConfig config = createSystem(props).getConfig();
@@ -331,8 +324,8 @@ public class InternalDistributedSystemJUnitTest
public void testGetStatisticSamplingEnabled() {
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
DistributionConfig config = createSystem(props).getConfig();
assertEquals(true, config.getStatisticSamplingEnabled());
@@ -343,8 +336,8 @@ public class InternalDistributedSystemJUnitTest
String rate = String.valueOf(DistributionConfig.MIN_STATISTIC_SAMPLE_RATE);
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, rate);
DistributionConfig config = createSystem(props).getConfig();
// The fix for 48228 causes the rate to be 1000 even if we try to set it less
@@ -354,8 +347,8 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testMembershipPortRange() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, "5100-5200");
DistributionConfig config = createSystem(props).getConfig();
assertEquals(5100, config.getMembershipPortRange()[0]);
@@ -365,8 +358,8 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testBadMembershipPortRange() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, "5200-5100");
Object exception = null;
try {
@@ -382,8 +375,8 @@ public class InternalDistributedSystemJUnitTest
String fileName = "testGetStatisticArchiveFile";
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, fileName);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(fileName, config.getStatisticArchiveFile().getName());
@@ -398,8 +391,8 @@ public class InternalDistributedSystemJUnitTest
String time = String.valueOf(DistributionConfig.MIN_ACK_WAIT_THRESHOLD);
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, time);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(time), config.getAckWaitThreshold());
@@ -427,8 +420,8 @@ public class InternalDistributedSystemJUnitTest
String fileName = "blah";
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.CACHE_XML_FILE_NAME, fileName);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(fileName, config.getCacheXmlFile().getPath());
@@ -439,8 +432,8 @@ public class InternalDistributedSystemJUnitTest
String value = String.valueOf(DistributionConfig.MIN_ARCHIVE_DISK_SPACE_LIMIT);
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getArchiveDiskSpaceLimit());
@@ -464,8 +457,8 @@ public class InternalDistributedSystemJUnitTest
String value = String.valueOf(DistributionConfig.MIN_ARCHIVE_FILE_SIZE_LIMIT);
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getArchiveFileSizeLimit());
@@ -489,8 +482,8 @@ public class InternalDistributedSystemJUnitTest
String value = String.valueOf(DistributionConfig.MIN_LOG_DISK_SPACE_LIMIT);
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getLogDiskSpaceLimit());
@@ -514,8 +507,8 @@ public class InternalDistributedSystemJUnitTest
String value = String.valueOf(DistributionConfig.MIN_LOG_FILE_SIZE_LIMIT);
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, value);
DistributionConfig config = createSystem(props).getConfig();
assertEquals(Integer.parseInt(value), config.getLogFileSizeLimit());
@@ -539,8 +532,8 @@ public class InternalDistributedSystemJUnitTest
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
InternalDistributedSystem system = createSystem(props);
system.disconnect();
@@ -568,21 +561,21 @@ public class InternalDistributedSystemJUnitTest
return;
}
}
- File propFile = new File("gemfire.properties");
+ File propFile = new File(DistributionConfig.GEMFIRE_PREFIX + "properties");
boolean propFileExisted = propFile.exists();
File spropFile = new File("gfsecurity.properties");
boolean spropFileExisted = spropFile.exists();
try {
- System.setProperty("gemfire.log-level", "finest");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, "finest");
Properties apiProps = new Properties();
- apiProps.setProperty("groups", "foo, bar");
+ apiProps.setProperty(DistributionConfig.GROUPS_NAME, "foo, bar");
{
if (propFileExisted) {
- propFile.renameTo(new File("gemfire.properties.sav"));
+ propFile.renameTo(new File(DistributionConfig.GEMFIRE_PREFIX + "properties.sav"));
}
Properties fileProps = new Properties();
fileProps.setProperty("name", "myName");
- FileWriter fw = new FileWriter("gemfire.properties");
+ FileWriter fw = new FileWriter(DistributionConfig.GEMFIRE_PREFIX + "properties");
fileProps.store(fw, null);
fw.close();
}
@@ -591,22 +584,22 @@ public class InternalDistributedSystemJUnitTest
spropFile.renameTo(new File("gfsecurity.properties.sav"));
}
Properties fileProps = new Properties();
- fileProps.setProperty("statistic-sample-rate", "999");
+ fileProps.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "999");
FileWriter fw = new FileWriter("gfsecurity.properties");
fileProps.store(fw, null);
fw.close();
}
DistributionConfigImpl dci = new DistributionConfigImpl(apiProps);
- assertEquals(null, dci.getAttributeSource("mcast-port"));
- assertEquals(ConfigSource.api(), dci.getAttributeSource("groups"));
- assertEquals(ConfigSource.sysprop(), dci.getAttributeSource("log-level"));
+ assertEquals(null, dci.getAttributeSource(MCAST_PORT));
+ assertEquals(ConfigSource.api(), dci.getAttributeSource(DistributionConfig.GROUPS_NAME));
+ assertEquals(ConfigSource.sysprop(), dci.getAttributeSource(DistributionConfig.LOG_LEVEL_NAME));
assertEquals(ConfigSource.Type.FILE, dci.getAttributeSource("name").getType());
- assertEquals(ConfigSource.Type.SECURE_FILE, dci.getAttributeSource("statistic-sample-rate").getType());
+ assertEquals(ConfigSource.Type.SECURE_FILE, dci.getAttributeSource(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME).getType());
} finally {
- System.clearProperty("gemfire.log-level");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "log-level");
propFile.delete();
if (propFileExisted) {
- new File("gemfire.properties.sav").renameTo(propFile);
+ new File(DistributionConfig.GEMFIRE_PREFIX + "properties.sav").renameTo(propFile);
}
spropFile.delete();
if (spropFileExisted) {
@@ -622,9 +615,9 @@ public class InternalDistributedSystemJUnitTest
String name = "BLAH";
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty(DistributionConfig.NAME_NAME, name);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(SystemConfigurationProperties.NAME, name);
createSystem(props);
}
@@ -634,8 +627,8 @@ public class InternalDistributedSystemJUnitTest
Properties props = new Properties();
// a loner is all this test needs
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.put(DistributionConfig.LOG_LEVEL_NAME, level.toString());
InternalDistributedSystem system = createSystem(props);
assertEquals(level.intValue(), system.getConfig().getLogLevel());
@@ -646,8 +639,8 @@ public class InternalDistributedSystemJUnitTest
public void testStartLocator() {
Properties props = new Properties();
int unusedPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- props.setProperty("mcast-port", "0");
- props.setProperty("start-locator", "localhost[" + unusedPort + "],server=false,peer=true");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(START_LOCATOR, "localhost[" + unusedPort + "],server=false,peer=true");
deleteStateFile(unusedPort);
createSystem(props);
Collection locators = Locator.getLocators();
@@ -670,13 +663,13 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testValidateProps() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
Config config1 = new DistributionConfigImpl(props, false);
InternalDistributedSystem sys = InternalDistributedSystem.newInstance(config1.toProperties());
try {
- props.put("mcast-port", "1");
+ props.put(MCAST_PORT, "1");
Config config2 = new DistributionConfigImpl(props, false);
try {
@@ -693,9 +686,9 @@ public class InternalDistributedSystemJUnitTest
@Test
public void testDeprecatedSSLProps() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("ssl-enabled", "true");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
Config config1 = new DistributionConfigImpl(props, false);
Properties props1 = config1.toProperties();
// For the deprecated ssl-* properties a decision was made
@@ -704,12 +697,12 @@ public class InternalDistributedSystemJUnitTest
// and its use in toProperties.
// The other thing that is done is the ssl-* props are copied to cluster-ssl-*.
// The following two assertions demonstrate this.
- assertEquals(null, props1.getProperty("ssl-enabled"));
- assertEquals("true", props1.getProperty("cluster-ssl-enabled"));
+ assertEquals(null, props1.getProperty(DistributionConfig.SSL_ENABLED_NAME));
+ assertEquals("true", props1.getProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME));
Config config2 = new DistributionConfigImpl(props1, false);
assertEquals(true, config1.sameAs(config2));
Properties props3 = new Properties(props1);
- props3.setProperty("ssl-enabled", "false");
+ props3.setProperty(DistributionConfig.SSL_ENABLED_NAME, "false");
Config config3 = new DistributionConfigImpl(props3, false);
assertEquals(false, config1.sameAs(config3));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
index 1629628..b422d55 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/LDM.java
@@ -16,14 +16,14 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.logging.LogService;
import org.apache.logging.log4j.Logger;
-
import util.TestException;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.logging.LogService;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
* A little class for testing the local DistributionManager
@@ -34,7 +34,7 @@ public class LDM {
public static void main(String[] args) throws Exception {
Properties props = new Properties();
- props.setProperty("locators", "localhost[31576]");
+ props.setProperty(LOCATORS, "localhost[31576]");
props.setProperty("mcastPort", "0");
props.setProperty("logLevel", "config");
InternalDistributedSystem system = (InternalDistributedSystem)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
index 2cc8ce2..0185e03 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ProductUseLogDUnitTest.java
@@ -16,14 +16,7 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.client.ClientCache;
@@ -33,13 +26,16 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
+
public class ProductUseLogDUnitTest extends CacheTestCase {
@@ -67,7 +63,7 @@ public class ProductUseLogDUnitTest extends CacheTestCase {
// use a locator so we will monitor server load and record member->server mappings
int locatorPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
Properties p = new Properties();
- p.put(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPort+"],peer=false");
+ p.put(START_LOCATOR, "localhost[" + locatorPort + "],peer=false");
p.put(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
InternalDistributedSystem system = getSystem(p);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/locks/DLockReentrantLockJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/locks/DLockReentrantLockJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/locks/DLockReentrantLockJUnitTest.java
index 2dbd231..94b153b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/locks/DLockReentrantLockJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/locks/DLockReentrantLockJUnitTest.java
@@ -16,22 +16,20 @@
*/
package com.gemstone.gemfire.distributed.internal.locks;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Lock;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
@Category(IntegrationTest.class)
public class DLockReentrantLockJUnitTest {
final long id = 1213L;
@@ -41,7 +39,7 @@ public class DLockReentrantLockJUnitTest {
@Before
public void setup() {
- cache = new CacheFactory().set("mcast-port", "0").set("locators", "").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").set(LOCATORS, "").create();
final RegionFactory<Long, String> regionFactory = cache.createRegionFactory("REPLICATE");
regionFactory.setScope(Scope.GLOBAL);
region = regionFactory.create("ReentrantLockRegion");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
index 7a4971f..05f498e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
@@ -16,51 +16,35 @@
*/
package com.gemstone.gemfire.distributed.internal.membership;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.File;
-import java.net.InetAddress;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Level;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.GemFireConfigException;
import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.SerialAckedMessage;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil;
import com.gemstone.gemfire.distributed.internal.membership.gms.ServiceConfig;
import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.JoinLeave;
import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatRequestMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.InstallViewMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinRequestMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinResponseMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.LeaveRequestMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.RemoveMemberMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectMembersMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.ViewAckMessage;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.*;
import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.apache.logging.log4j.Level;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.net.InetAddress;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.*;
@Category(IntegrationTest.class)
public class MembershipJUnitTest {
@@ -117,12 +101,12 @@ public class MembershipJUnitTest {
// create configuration objects
Properties nonDefault = new Properties();
nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, String.valueOf(mcastPort));
+ nonDefault.put(MCAST_PORT, String.valueOf(mcastPort));
nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
nonDefault.put(DistributionConfig.GROUPS_NAME, "red, blue");
nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostName()+'['+port+']');
+ nonDefault.put(LOCATORS, localHost.getHostName() + '[' + port + ']');
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig transport = new RemoteTransportConfig(config,
DistributionManager.NORMAL_DM_TYPE);
@@ -237,7 +221,7 @@ public class MembershipJUnitTest {
nonDefault.clear();
- nonDefault.put(DistributionConfig.LOCATORS_NAME, SocketCreator.getLocalHost().getHostAddress()+"["+12345+"]");
+ nonDefault.put(LOCATORS, SocketCreator.getLocalHost().getHostAddress() + "[" + 12345 + "]");
config = new DistributionConfigImpl(nonDefault);
transport = new RemoteTransportConfig(config,
DistributionManager.NORMAL_DM_TYPE);
@@ -263,10 +247,10 @@ public class MembershipJUnitTest {
public void testMulticastDiscoveryNotAllowed() {
Properties nonDefault = new Properties();
nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "12345");
+ nonDefault.put(MCAST_PORT, "12345");
nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
- nonDefault.put(DistributionConfig.LOCATORS_NAME, "");
+ nonDefault.put(LOCATORS, "");
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig transport = new RemoteTransportConfig(config,
DistributionManager.NORMAL_DM_TYPE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
index 022d1c7..8e6221a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
@@ -16,20 +16,9 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.auth;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
-
-import java.security.Principal;
-import java.util.Properties;
-
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.security.AuthInitialize;
@@ -38,6 +27,18 @@ import com.gemstone.gemfire.security.Authenticator;
import com.gemstone.gemfire.security.GemFireSecurityException;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.experimental.categories.Category;
+
+import java.security.Principal;
+import java.util.Properties;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
@Category({ UnitTest.class, SecurityTest.class })
public class GMSAuthenticatorJUnitTest {
@@ -68,19 +69,19 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testGetSecurityProps() throws Exception {
- props.setProperty("gemfire.sys.security-peer-auth-init", "dummy1");
- props.setProperty("gemfire.sys.security-peer-authenticator", "dummy2");
+ props.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sys.security-peer-auth-init", "dummy1");
+ props.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sys.security-peer-authenticator", "dummy2");
props.setProperty("security-auth-init", "dummy3");
System.setProperties(props);
Properties secProps = authenticator.getSecurityProps();
assertEquals("wrong size", 2, secProps.size());
- assertEquals("wrong value", "dummy1", secProps.getProperty("security-peer-auth-init"));
- assertEquals("wrong value", "dummy2", secProps.getProperty("security-peer-authenticator"));
+ assertEquals("wrong value", "dummy1", secProps.getProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME));
+ assertEquals("wrong value", "dummy2", secProps.getProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME));
}
@Test
public void testGetCredentialNormal() throws Exception {
- props.setProperty("security-peer-auth-init", prefix + "TestAuthInit2.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit2.create");
TestAuthInit2 auth = new TestAuthInit2();
assertFalse(auth.isClosed());
TestAuthInit2.setAuthInitialize(auth);
@@ -98,32 +99,32 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testGetCredentialWithEmptyAuth() throws Exception {
- props.setProperty("security-peer-auth-init", "");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, "");
Properties credential = authenticator.getCredentials(member, props);
assertNull(credential);
}
@Test
public void testGetCredentialWithNotExistAuth() throws Exception {
- props.setProperty("security-peer-auth-init", prefix + "NotExistAuth.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "NotExistAuth.create");
verifyNegativeGetCredential(props, "Failed to acquire AuthInitialize method");
}
@Test
public void testGetCredentialWithNullAuth() throws Exception {
- props.setProperty("security-peer-auth-init", prefix + "TestAuthInit1.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit1.create");
verifyNegativeGetCredential(props, "AuthInitialize instance could not be obtained");
}
@Test
public void testGetCredentialWithInitError() throws Exception {
- props.setProperty("security-peer-auth-init", prefix + "TestAuthInit3.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit3.create");
verifyNegativeGetCredential(props, "expected init error");
}
@Test
public void testGetCredentialWithError() throws Exception {
- props.setProperty("security-peer-auth-init", prefix + "TestAuthInit4.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit4.create");
verifyNegativeGetCredential(props, "expected get credential error");
}
@@ -138,7 +139,7 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testAuthenticatorNormal() throws Exception {
- props.setProperty("security-peer-authenticator", prefix + "TestAuthenticator4.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator4.create");
TestAuthenticator4 auth = new TestAuthenticator4();
assertFalse(auth.isClosed());
TestAuthenticator4.setAuthenticator(auth);
@@ -156,38 +157,38 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testAuthenticatorWithEmptyAuth() throws Exception {
- props.setProperty("security-peer-authenticator", "");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, "");
String result = authenticator.authenticate(member, props, props, member);
assertNull(result);
}
@Test
public void testAuthenticatorWithNotExistAuth() throws Exception {
- props.setProperty("security-peer-authenticator", prefix + "NotExistAuth.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "NotExistAuth.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
@Test
public void testAuthenticatorWithNullAuth() throws Exception {
- props.setProperty("security-peer-authenticator", prefix + "TestAuthenticator1.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator1.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
@Test
public void testAuthenticatorWithNullCredential() throws Exception {
- props.setProperty("security-peer-authenticator", prefix + "TestAuthenticator1.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator1.create");
verifyNegativeAuthenticate(null, props, "Failed to find credentials from");
}
@Test
public void testAuthenticatorWithAuthInitFailure() throws Exception {
- props.setProperty("security-peer-authenticator", prefix + "TestAuthenticator2.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator2.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
@Test
public void testAuthenticatorWithAuthFailure() throws Exception {
- props.setProperty("security-peer-authenticator", prefix + "TestAuthenticator3.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator3.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
index 9324783..2786508 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
@@ -16,39 +16,7 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.fd;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-
-import org.jgroups.util.UUID;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.NetView;
import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
@@ -66,6 +34,30 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messages.Suspect
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.jgroups.util.UUID;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import java.io.*;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.*;
@Category(IntegrationTest.class)
public class GMSHealthMonitorJUnitTest {
@@ -98,12 +90,12 @@ public class GMSHealthMonitorJUnitTest {
nonDefault.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "1");
nonDefault.put(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "10");
nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "0");
- nonDefault.put(DistributionConfig.MCAST_TTL_NAME, "0");
+ nonDefault.put(MCAST_PORT, "0");
+ nonDefault.put(MCAST_TTL, "0");
nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- nonDefault.put(DistributionConfig.LOCATORS_NAME, "localhost[10344]");
+ nonDefault.put(LOCATORS, "localhost[10344]");
DM dm = mock(DM.class);
InternalDistributedSystem system = InternalDistributedSystem.newInstanceForTesting(dm, nonDefault);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
index 00d9d05..806b8cb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
@@ -16,29 +16,10 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.locator;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.ObjectOutputStream;
-import java.net.InetAddress;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.LocatorStats;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
import com.gemstone.gemfire.distributed.internal.membership.MemberFactory;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
@@ -48,6 +29,20 @@ import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.ObjectOutputStream;
+import java.net.InetAddress;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
@Category(IntegrationTest.class)
public class GMSLocatorRecoveryJUnitTest {
@@ -147,11 +142,11 @@ public class GMSLocatorRecoveryJUnitTest {
// create configuration objects
Properties nonDefault = new Properties();
nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ nonDefault.put(MCAST_PORT, "0");
nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
- nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostAddress()+'['+port+']');
- nonDefault.put(DistributionConfig.BIND_ADDRESS_NAME, localHost.getHostAddress());
+ nonDefault.put(LOCATORS, localHost.getHostAddress() + '[' + port + ']');
+ nonDefault.put(BIND_ADDRESS, localHost.getHostAddress());
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig transport = new RemoteTransportConfig(config,
DistributionManager.NORMAL_DM_TYPE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index 1e1724d..732d7a1 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -16,32 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.*;
-
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.Timer;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.ArgumentCaptor;
-import org.mockito.internal.verification.Times;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-import org.mockito.verification.Timeout;
-
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -60,16 +34,28 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJo
import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave.TcpClientWrapper;
import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave.ViewCreator;
import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave.ViewReplyProcessor;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.InstallViewMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinRequestMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinResponseMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.LeaveRequestMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.NetworkPartitionMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.RemoveMemberMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.ViewAckMessage;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.*;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.internal.verification.Times;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+import org.mockito.verification.Timeout;
+
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.*;
@Category(IntegrationTest.class)
public class GMSJoinLeaveJUnitTest {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
index ed50a3a..5bebf99 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/StatRecorderJUnitTest.java
@@ -16,24 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
-
-import java.util.Properties;
-import java.util.concurrent.RejectedExecutionException;
-
-import org.jgroups.Event;
-import org.jgroups.Message;
-import org.jgroups.protocols.UNICAST3.Header;
-import org.jgroups.protocols.pbcast.NakAckHeader2;
-import org.jgroups.stack.Protocol;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.LonerDistributionManager.DummyDMStats;
@@ -44,6 +26,25 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroup
import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.StatRecorder;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.jgroups.Event;
+import org.jgroups.Message;
+import org.jgroups.protocols.UNICAST3.Header;
+import org.jgroups.protocols.pbcast.NakAckHeader2;
+import org.jgroups.stack.Protocol;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.*;
/**
* This class tests the GMS StatRecorder class, which records JGroups
@@ -179,8 +180,8 @@ public class StatRecorderJUnitTest {
// first test to see if the non-multicast stack has the recorder installed
Properties nonDefault = new Properties();
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "0");
- nonDefault.put(DistributionConfig.LOCATORS_NAME, "localhost[12345]");
+ nonDefault.put(MCAST_PORT, "0");
+ nonDefault.put(LOCATORS, "localhost[12345]");
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
when(mockConfig.getDistributionConfig()).thenReturn(config);
@@ -195,7 +196,7 @@ public class StatRecorderJUnitTest {
assertTrue(jgroupsConfig.contains("gms.messenger.StatRecorder"));
// now test to see if the multicast stack has the recorder installed
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "12345");
+ nonDefault.put(MCAST_PORT, "12345");
config = new DistributionConfigImpl(nonDefault);
transport = new RemoteTransportConfig(config, DistributionManager.NORMAL_DM_TYPE);
when(mockConfig.getDistributionConfig()).thenReturn(config);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
index 2ad970b..c3239b2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessengerJUnitTest.java
@@ -16,49 +16,10 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.*;
-import static org.mockito.Mockito.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.commons.lang.SerializationException;
-import org.jgroups.Address;
-import org.jgroups.Event;
-import org.jgroups.JChannel;
-import org.jgroups.Message;
-import org.jgroups.Message.Flag;
-import org.jgroups.conf.ClassConfigurator;
-import org.jgroups.protocols.UNICAST3;
-import org.jgroups.protocols.pbcast.NAKACK2;
-import org.jgroups.util.Digest;
-import org.jgroups.util.UUID;
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.ForcedDisconnectException;
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.SerialAckedMessage;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.NetView;
import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
@@ -73,17 +34,36 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinReq
import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinResponseMessage;
import com.gemstone.gemfire.distributed.internal.membership.gms.messages.LeaveRequestMessage;
import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroupsMessenger.JGroupsReceiver;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
import com.gemstone.gemfire.internal.cache.DistributedCacheOperation;
import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.apache.commons.lang.SerializationException;
+import org.jgroups.Address;
+import org.jgroups.Event;
+import org.jgroups.JChannel;
+import org.jgroups.Message;
+import org.jgroups.conf.ClassConfigurator;
+import org.jgroups.protocols.UNICAST3;
+import org.jgroups.protocols.pbcast.NAKACK2;
+import org.jgroups.util.Digest;
+import org.jgroups.util.UUID;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
-import junit.framework.Assert;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.*;
@Category(IntegrationTest.class)
public class JGroupsMessengerJUnitTest {
@@ -106,11 +86,11 @@ public class JGroupsMessengerJUnitTest {
}
Properties nonDefault = new Properties();
nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, enableMcast? ""+AvailablePortHelper.getRandomAvailableUDPPort() : "0");
- nonDefault.put(DistributionConfig.MCAST_TTL_NAME, "0");
+ nonDefault.put(MCAST_PORT, enableMcast ? "" + AvailablePortHelper.getRandomAvailableUDPPort() : "0");
+ nonDefault.put(MCAST_TTL, "0");
nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
- nonDefault.put(DistributionConfig.LOCATORS_NAME, "localhost[10344]");
+ nonDefault.put(LOCATORS, "localhost[10344]");
nonDefault.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "1");
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
RemoteTransportConfig tconfig = new RemoteTransportConfig(config,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
index a1d7a2d..1bc4ed2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
@@ -16,39 +16,8 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.mgr;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.*;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-import java.util.Timer;
-
-import org.jgroups.util.UUID;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.HighPriorityAckedMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.MembershipListener;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.direct.DirectChannel;
import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -67,6 +36,20 @@ import com.gemstone.gemfire.internal.admin.remote.AlertListenerMessage;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
import com.gemstone.gemfire.internal.tcp.ConnectExceptions;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.jgroups.util.UUID;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.anyInt;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.*;
@Category(UnitTest.class)
public class GMSMembershipManagerJUnitTest {
@@ -95,12 +78,12 @@ public class GMSMembershipManagerJUnitTest {
nonDefault.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "1");
nonDefault.put(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "10");
nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
- nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "0");
- nonDefault.put(DistributionConfig.MCAST_TTL_NAME, "0");
+ nonDefault.put(MCAST_PORT, "0");
+ nonDefault.put(MCAST_TTL, "0");
nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- nonDefault.put(DistributionConfig.LOCATORS_NAME, "localhost[10344]");
+ nonDefault.put(LOCATORS, "localhost[10344]");
distConfig = new DistributionConfigImpl(nonDefault);
distProperties = nonDefault;
RemoteTransportConfig tconfig = new RemoteTransportConfig(distConfig, DistributionManager.NORMAL_DM_TYPE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
index 5fd0f27..897fafd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServerBackwardCompatDUnitTest.java
@@ -16,17 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal.tcpserver;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.Properties;
-import java.util.Vector;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
-import junit.framework.Assert;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.Locator;
@@ -35,8 +24,6 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.gms.locator.FindCoordinatorRequest;
import com.gemstone.gemfire.distributed.internal.membership.gms.locator.FindCoordinatorResponse;
-import com.gemstone.gemfire.distributed.internal.tcpserver.TcpServer;
-import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.Version;
@@ -44,9 +31,15 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This tests the rolling upgrade for locators with
@@ -115,8 +108,8 @@ public class TcpServerBackwardCompatDUnitTest extends DistributedTestCase {
host.getHostName() + "[" + port1 + "]";
final Properties props = new Properties();
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "finest");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
index e2717bf..fb62980 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXExpiryJUnitTest.java
@@ -16,19 +16,21 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.TXExpiryJUnitTest;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Same tests as that of {@link TXExpiryJUnitTest} after setting
@@ -43,8 +45,8 @@ public class DistTXExpiryJUnitTest extends TXExpiryJUnitTest {
@Override
protected void createCache() throws CacheException {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
- p.setProperty("distributed-transactions", "true");
+ p.setProperty(MCAST_PORT, "0"); // loner
+ p.setProperty(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
this.cache = (GemFireCacheImpl) CacheFactory.create(DistributedSystem
.connect(p));
AttributesFactory af = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
index 7a8b6a2..ead27d1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXJUnitTest.java
@@ -16,21 +16,23 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.TXJUnitTest;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Run the basic transaction functionality tests in TXJUnitTest after setting
@@ -46,9 +48,9 @@ public class DistTXJUnitTest extends TXJUnitTest {
@Override
protected void createCache() throws Exception {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
- p.setProperty("distributed-transactions", "true");
-// p.setProperty("log-level", "fine");
+ p.setProperty(MCAST_PORT, "0"); // loner
+ p.setProperty(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
+ // p.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
this.cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(p));
createRegion();
this.txMgr = this.cache.getCacheTransactionManager();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
index e4db285..e7e5a1e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXManagerImplJUnitTest.java
@@ -16,18 +16,20 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.CacheTransactionManager;
import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.internal.cache.TXManagerImpl;
import com.gemstone.gemfire.internal.cache.TXManagerImplJUnitTest;
import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static junit.framework.TestCase.assertTrue;
/**
@@ -44,9 +46,9 @@ public class DistTXManagerImplJUnitTest extends TXManagerImplJUnitTest {
@Override
protected void createCache() {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("locators", "");
- props.put("distributed-transactions", "true");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
+ props.put(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
cache = new CacheFactory(props).create();
region = cache.createRegionFactory(RegionShortcut.REPLICATE).create("testRegion");
CacheTransactionManager txmgr = cache.getCacheTransactionManager();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
index e2f08a9..71d82a9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXOrderDUnitTest.java
@@ -16,12 +16,12 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache30.TXOrderDUnitTest;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import java.util.Properties;
+
/**
* Same tests as that of {@link TXOrderDUnitTest} after setting
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXReleasesOffHeapOnCloseJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXReleasesOffHeapOnCloseJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXReleasesOffHeapOnCloseJUnitTest.java
index 984ed15..539062a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXReleasesOffHeapOnCloseJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXReleasesOffHeapOnCloseJUnitTest.java
@@ -16,15 +16,18 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.CacheTransactionManager;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.offheap.TxReleasesOffHeapOnCloseJUnitTest;
import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
@@ -41,10 +44,10 @@ public class DistTXReleasesOffHeapOnCloseJUnitTest extends
@Override
protected void createCache() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("off-heap-memory-size", "1m");
- props.put("distributed-transactions", "true");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, "1m");
+ props.put(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
cache = new CacheFactory(props).create();
CacheTransactionManager txmgr = cache.getCacheTransactionManager();
assert(txmgr.isDistributed());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
index 28ae360..a935950 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXRestrictionsDUnitTest.java
@@ -16,14 +16,10 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache30.TXRestrictionsDUnitTest;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
+import java.util.Properties;
/**
* Same tests as that of {@link TXRestrictionsDUnitTest} after setting
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
index f6a3530..befeca7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWithDeltaDUnitTest.java
@@ -16,11 +16,11 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.TransactionsWithDeltaDUnitTest;
+import java.util.Properties;
+
public class DistTXWithDeltaDUnitTest extends TransactionsWithDeltaDUnitTest {
public DistTXWithDeltaDUnitTest(String name) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterJUnitTest.java
index 2c779f2..976d0e9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterJUnitTest.java
@@ -16,19 +16,21 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.TXWriterJUnitTest;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Same tests as that of {@link TXWriterJUnitTest} after setting
@@ -42,8 +44,8 @@ public class DistTXWriterJUnitTest extends TXWriterJUnitTest {
protected void createCache() throws CacheException {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
- p.setProperty("distributed-transactions", "true");
+ p.setProperty(MCAST_PORT, "0"); // loner
+ p.setProperty(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
this.cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(p));
AttributesFactory<?, ?> af = new AttributesFactory<String, String>();
af.setScope(Scope.DISTRIBUTED_NO_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterOOMEJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterOOMEJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterOOMEJUnitTest.java
index 8e3b985..755c462 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterOOMEJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistTXWriterOOMEJUnitTest.java
@@ -16,19 +16,21 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.TXWriterOOMEJUnitTest;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Same tests as that of {@link TXWriterOOMEJUnitTest} after setting
@@ -42,8 +44,8 @@ public class DistTXWriterOOMEJUnitTest extends TXWriterOOMEJUnitTest {
protected void createCache() throws CacheException {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
- p.setProperty("distributed-transactions", "true");
+ p.setProperty(MCAST_PORT, "0"); // loner
+ p.setProperty(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
this.cache = (GemFireCacheImpl) CacheFactory.create(DistributedSystem
.connect(p));
AttributesFactory<?, ?> af = new AttributesFactory<String, String>();
[42/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index 61a20d9..9a4aacd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result.Status;
@@ -54,9 +56,9 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
private Properties createProperties(Host host, String name, String groups) {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(SystemConfigurationProperties.NAME, name);
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
index ee80360..f97b21c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
@@ -16,6 +16,7 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassBuilder;
import com.gemstone.gemfire.internal.ClassPathLoader;
@@ -154,7 +155,7 @@ public class UserCommandsDUnitTest extends CliCommandTestBase {
});
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.USER_COMMAND_PACKAGES, "junit.ucdunit");
+ properties.setProperty(SystemConfigurationProperties.USER_COMMAND_PACKAGES, "junit.ucdunit");
setUpJmxManagerOnVm0ThenConnect(properties);
CommandResult cmdResult = executeCommand("ucdunitcmd");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
index 7227371..d54c68a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.operations.OperationContext;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.security.AccessControl;
import com.gemstone.gemfire.security.AuthenticationFailedException;
@@ -38,6 +37,8 @@ import java.io.StringWriter;
import java.security.Principal;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class ExampleJSONAuthorization implements AccessControl, Authenticator {
public static class Role {
@@ -94,7 +95,7 @@ public class ExampleJSONAuthorization implements AccessControl, Authenticator {
user.pwd = user.name;
}
- JSONArray ops = obj.getJSONArray(DistributionConfig.ROLES_NAME);
+ JSONArray ops = obj.getJSONArray(ROLES);
for (int j = 0; j < ops.length(); j++) {
String roleName = ops.getString(j);
user.roles.add(roleMap.get(roleName));
@@ -105,7 +106,7 @@ public class ExampleJSONAuthorization implements AccessControl, Authenticator {
private static Map<String, Role> readRoles(JSONObject jsonBean) throws JSONException {
Map<String, Role> roleMap = new HashMap<>();
- JSONArray array = jsonBean.getJSONArray(DistributionConfig.ROLES_NAME);
+ JSONArray array = jsonBean.getJSONArray(ROLES);
for (int i = 0; i < array.length(); i++) {
JSONObject obj = array.getJSONObject(i);
Role role = new Role();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
index ebbf7d9..2582bc1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
@@ -47,7 +47,6 @@ import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.operations.OperationContext;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.security.AccessControl;
import com.gemstone.gemfire.security.AuthenticationFailedException;
@@ -65,6 +64,8 @@ import java.io.IOException;
import java.security.Principal;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class JSONAuthorization implements AccessControl, Authenticator {
public static class Role {
@@ -115,8 +116,10 @@ public class JSONAuthorization implements AccessControl, Authenticator {
user.pwd = user.name;
}
- for (JsonNode r : u.get("roles")) {
- user.roles.add(roleMap.get(r.asText()));
+ JSONArray ops = obj.getJSONArray(ROLES);
+ for (int j = 0; j < ops.length(); j++) {
+ String roleName = ops.getString(j);
+ user.roles.add(roleMap.get(roleName));
}
acl.put(user.name, user);
}
@@ -124,7 +127,7 @@ public class JSONAuthorization implements AccessControl, Authenticator {
private static Map<String, Role> readRoles(JsonNode jsonNode) {
Map<String, Role> roleMap = new HashMap<>();
- for (JsonNode r : jsonNode.get("roles")) {
+ for (JsonNode r : jsonNode.get(ROLES)) {
Role role = new Role();
role.name = r.get("name").asText();
String regionNames = null;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
index 36012d4..4ae62da 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
@@ -38,6 +38,8 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*
*/
@@ -402,7 +404,7 @@ public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ p.put(CONSERVE_SOCKETS, "false");
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
index b8349d3..a1e8e04 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.redis;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -33,10 +32,8 @@ import redis.clients.jedis.exceptions.JedisDataException;
import java.io.IOException;
import java.util.Random;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class AuthJUnitTest {
@@ -64,7 +61,7 @@ public class AuthJUnitTest {
}
private void setupCacheWithPassword() {
CacheFactory cf = new CacheFactory();
- cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cf.set(SystemConfigurationProperties.REDIS_PASSWORD, PASSWORD);
@@ -98,7 +95,7 @@ public class AuthJUnitTest {
@Test
public void testAuthNoPwd() {
CacheFactory cf = new CacheFactory();
- cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
index fed4803..9c94abf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.redis;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -31,8 +30,7 @@ import redis.clients.jedis.Jedis;
import java.io.IOException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
@Category(IntegrationTest.class)
@@ -48,7 +46,7 @@ public class HashesJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
index 17a2c3f..6c9fcdc 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.redis;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -33,10 +32,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Random;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class ListsJUnitTest {
@@ -52,7 +49,7 @@ public class ListsJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
index 0ed99bd..2ed26cf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.redis;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.test.dunit.*;
@@ -28,8 +27,7 @@ import redis.clients.jedis.Jedis;
import java.util.Random;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class RedisDistDUnitTest extends DistributedTestCase {
@@ -81,7 +79,7 @@ public class RedisDistDUnitTest extends DistributedTestCase {
int port = ports[VM.getCurrentVMNum()];
CacheFactory cF = new CacheFactory();
String locator = SocketCreator.getLocalHost().getHostName() + "[" + locatorPort + "]";
- cF.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ cF.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
cF.set(SystemConfigurationProperties.REDIS_BIND_ADDRESS, localHost);
cF.set(SystemConfigurationProperties.REDIS_PORT, "" + port);
cF.set(MCAST_PORT, "0");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
index 28c35bf..850e68f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.redis;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -34,8 +33,7 @@ import java.util.HashSet;
import java.util.Random;
import java.util.Set;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@@ -53,7 +51,7 @@ public class SetsJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
index 90b2827..06c8596 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.redis;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -33,8 +32,7 @@ import java.io.IOException;
import java.util.*;
import java.util.Map.Entry;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
@Category(IntegrationTest.class)
@@ -50,7 +48,7 @@ public class SortedSetsJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
index 8939e0b..54eeeee 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.redis;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -31,8 +30,7 @@ import redis.clients.jedis.Jedis;
import java.io.IOException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
@Category(IntegrationTest.class)
@@ -49,7 +47,7 @@ public class StringsJunitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(LOG_LEVEL, "error");
cf.set(MCAST_PORT, "0");
cf.set(LOCATORS, "");
cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
index 14f1f80..ab8890b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
@@ -26,6 +26,8 @@ import java.io.IOException;
import java.security.Principal;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class SSLCredentialGenerator extends CredentialGenerator {
private static final Logger logger = LogService.getLogger();
@@ -113,10 +115,10 @@ public class SSLCredentialGenerator extends CredentialGenerator {
private Properties getSSLProperties() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
- props.setProperty(DistributionConfig.SSL_CIPHERS_NAME, "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
- props.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, "TLSv1");
+ props.setProperty(SSL_ENABLED, "true");
+ props.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
+ props.setProperty(SSL_CIPHERS, "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
+ props.setProperty(SSL_PROTOCOLS, "TLSv1");
return props;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
index 0a482d4..373797c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.test.dunit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
@@ -101,7 +103,7 @@ public class LogWriterUtils {
*/
public static String getDUnitLogLevel() {
Properties dsProperties = DUnitEnv.get().getDistributedSystemProperties();
- String result = dsProperties.getProperty(DistributionConfig.LOG_LEVEL_NAME);
+ String result = dsProperties.getProperty(LOG_LEVEL);
if (result == null) {
result = ManagerLogWriter.levelToString(DistributionConfig.DEFAULT_LOG_LEVEL);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index 06019b8..8bb9b78 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.test.dunit.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
@@ -156,11 +158,11 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
if (logPerTest) {
String testMethod = getTestMethodName();
String testName = lastSystemCreatedInTest.getName() + '-' + testMethod;
- String oldLogFile = p.getProperty(DistributionConfig.LOG_FILE_NAME);
- p.put(DistributionConfig.LOG_FILE_NAME,
+ String oldLogFile = p.getProperty(LOG_FILE);
+ p.put(LOG_FILE,
oldLogFile.replace("system.log", testName+".log"));
- String oldStatFile = p.getProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
- p.put(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME,
+ String oldStatFile = p.getProperty(STATISTIC_ARCHIVE_FILE);
+ p.put(STATISTIC_ARCHIVE_FILE,
oldStatFile.replace("statArchive.gfs", testName+".gfs"));
}
system = (InternalDistributedSystem)DistributedSystem.connect(p);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index 094095f..8f3cd28 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -50,8 +50,7 @@ import java.rmi.server.UnicastRemoteObject;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* A class to build a fake test configuration and launch some DUnit VMS.
@@ -212,9 +211,9 @@ public class DUnitLauncher {
Properties p = new Properties();
p.setProperty(LOCATORS, getLocatorString());
p.setProperty(MCAST_PORT, "0");
- p.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- p.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
- p.setProperty(DistributionConfig.LOG_LEVEL_NAME, LOG_LEVEL);
+ p.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+ p.setProperty(USE_CLUSTER_CONFIGURATION, "false");
+ p.setProperty(LOG_LEVEL, LOG_LEVEL);
return p;
}
@@ -254,7 +253,7 @@ public class DUnitLauncher {
p.setProperty(DistributionConfig.JMX_MANAGER_NAME, "false");
//Disable the shared configuration on this locator.
//Shared configuration tests create their own locator
- p.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ p.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
//Tell the locator it's the first in the system for
//faster boot-up
System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
index 674437e..deb3e76 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.test.golden;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.process.ProcessWrapper;
import org.apache.logging.log4j.core.config.ConfigurationFactory;
@@ -124,7 +126,7 @@ public abstract class GoldenTestCase {
protected final Properties createProperties() {
Properties properties = new Properties();
properties.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
- properties.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, "warning");
+ properties.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, "warning");
properties.setProperty("file.encoding", "UTF-8");
return editProperties(properties);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java b/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
index 0866ea2..02169be 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
@@ -16,7 +16,8 @@
*/
package com.gemstone.gemfire.test.process;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.internal.logging.LogService;
import org.apache.logging.log4j.Logger;
@@ -275,7 +276,7 @@ public class ProcessWrapper {
if (properties != null) {
for (Map.Entry<Object, Object> entry : properties.entrySet()) {
- if (!entry.getKey().equals(DistributionConfig.LOG_FILE_NAME)) {
+ if (!entry.getKey().equals(LOG_FILE)) {
jvmArgumentsList.add("-D" + entry.getKey() + "=" + entry.getValue());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
index 6403783..adc73bb 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
@@ -67,7 +67,7 @@ public class WANBootStrapping_Site1_Add {
START_LOCATOR,
"localhost[" + 10101
+ "],server=true,peer=true,hostname-for-clients=localhost").set(
- DistributionConfig.LOG_LEVEL_NAME, "warning").create();
+ LOG_LEVEL, "warning").create();
System.out.println("Cache Created");
// to create region and a gateway sender ask to run
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
index 506990e..c469b4f 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
@@ -16,6 +16,8 @@
*/
package com.main;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -49,7 +51,7 @@ public class WANBootStrapping_Site1_Remove {
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+ (-1));
properties.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 20202 + "]");
- properties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "warning");
+ properties.setProperty(LOG_LEVEL, "warning");
Locator locator = null;
try {
locator = Locator.startLocatorAndDS(40445, null, properties);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
index 21b071b..059aa99 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
@@ -65,7 +65,7 @@ public class WANBootStrapping_Site2_Add {
.set(LOCATORS, "localhost[" + 20202 + "]")
.set(START_LOCATOR, "localhost[" + 20202 + "],server=true,peer=true,hostname-for-clients=localhost")
.set(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 10101 + "]")
- .set(DistributionConfig.LOG_LEVEL_NAME, "warning")
+ .set(LOG_LEVEL, "warning")
.create();
System.out.println("Cache Created");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
index 02df335..751f13d 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
@@ -22,7 +22,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This is a stand alone locator with a distributed-system-id = -2
@@ -48,7 +48,7 @@ public class WANBootStrapping_Site2_Remove {
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+ (-2));
properties.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 10101 + "]");
- properties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "warning");
+ properties.setProperty(LOG_LEVEL, "warning");
Locator locator = null;
try {
locator = Locator.startLocatorAndDS(30445, null, properties);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
index 8ea8178..f71e51b 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
@@ -25,14 +25,13 @@ import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.QueryInvalidException;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import junit.framework.TestCase;
import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(IntegrationTest.class)
public class CQJUnitTest extends TestCase {
@@ -51,7 +50,7 @@ public class CQJUnitTest extends TestCase {
public void setUp() throws Exception {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.setProperty(LOG_LEVEL, "config");
this.ds = DistributedSystem.connect(props);
this.cache = CacheFactory.create(ds);
this.qs = cache.getQueryService();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
index e2b0f2a..15dbbf6 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
@@ -27,7 +27,6 @@ import com.gemstone.gemfire.cache.query.internal.cq.CqQueryImpl.TestHook;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
@@ -42,8 +41,7 @@ import java.util.Set;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This class tests the ContiunousQuery mechanism in GemFire.
@@ -1352,8 +1350,8 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
+ properties.setProperty(DURABLE_CLIENT_ID, durableClientId);
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT, String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
index a5eed2d..290660c 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
@@ -27,7 +27,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class CqStateDUnitTest extends HelperTestCase {
@@ -121,7 +121,7 @@ public class CqStateDUnitTest extends HelperTestCase {
public Properties getClientProperties() {
Properties props = new Properties();
- props.put(DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_AUTH_INIT, UserPasswordAuthInit.class.getName() + ".create");
props.put("security-username", "root");
props.put("security-password", "root");
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
index 389f412..3afa0a4 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
@@ -26,13 +26,15 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.dunit.*;
import hydra.Log;
import java.io.IOException;
import java.util.HashSet;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Test class for Partitioned Region and CQs
*
@@ -1734,7 +1736,7 @@ public class PartitionedRegionCqQueryDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer(serverHosts[0]/*getServerHostName(Host.getHost(0))*/, serverPorts[0]);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
// Create Client Cache.
getClientCache(ccf);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
index e91accc..9d6c3cb 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
@@ -31,7 +31,6 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache.util.CqListenerAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
@@ -41,6 +40,8 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
import java.io.File;
import java.util.concurrent.atomic.AtomicBoolean;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class ClientSnapshotDUnitTest extends CacheTestCase {
private transient Region<Integer, MyObject> region;
@@ -251,7 +252,7 @@ public class ClientSnapshotDUnitTest extends CacheTestCase {
@Override
public Object call() throws Exception {
ClientCacheFactory cf = new ClientCacheFactory()
- .set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel())
+ .set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel())
.setPdxSerializer(new MyPdxSerializer())
.addPoolServer(NetworkUtils.getServerHostName(host), port)
.setPoolSubscriptionEnabled(true)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
index 65a1a14..8e36e92 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
@@ -32,7 +32,6 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
import com.gemstone.gemfire.internal.cache.execute.data.CustId;
@@ -45,6 +44,8 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*
*/
@@ -707,7 +708,7 @@ public class RemoteCQTransactionDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
index 4111248..c1680f5 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
@@ -41,8 +41,7 @@ import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Class <code>DurableClientTestCase</code> tests durable client
@@ -1573,8 +1572,8 @@ public class DurableClientTestCase extends DistributedTestCase {
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
+ properties.setProperty(DURABLE_CLIENT_ID, durableClientId);
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT, String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
index 2a56dbf..c321b53 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
@@ -41,8 +41,7 @@ import java.net.UnknownHostException;
import java.util.Collections;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Cache Server related management test cases
@@ -241,9 +240,9 @@ public class CacheServerManagementDUnitTest extends LocatorTestBase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(0));
props.setProperty(LOCATORS, otherLocators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
File logFile = new File(getUniqueName() + "-locator" + locatorPort + ".log");
try {
InetAddress bindAddr = InetAddress.getByName(NetworkUtils.getServerHostName(vmHost));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
index ce230e2..453ef21 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -59,8 +58,7 @@ import java.util.Map.Entry;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.getDUnitLocatorPort;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
@@ -725,10 +723,10 @@ public class ClientCommandsDUnitTest extends CliCommandTestBase {
if (cache == null) {
Properties props = getNonDurableClientProps();
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "client_" + OSProcess.getId() + ".log");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId() + ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(LOG_FILE, "client_" + OSProcess.getId() + ".log");
+ props.setProperty(LOG_LEVEL, "fine");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "client_" + OSProcess.getId() + ".gfs");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
getSystem(props);
@@ -1063,10 +1061,10 @@ public class ClientCommandsDUnitTest extends CliCommandTestBase {
if (cache == null) {
Properties props = getNonDurableClientProps();
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "client_" + OSProcess.getId() + ".log");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId() + ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(LOG_FILE, "client_" + OSProcess.getId() + ".log");
+ props.setProperty(LOG_LEVEL, "fine");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "client_" + OSProcess.getId() + ".gfs");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
index e059b87..3042e76 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -42,8 +41,7 @@ import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.getDUnitLocatorPort;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
@@ -401,8 +399,8 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
Properties p = new Properties();
p.setProperty(MCAST_PORT, "0");
p.setProperty(LOCATORS, "");
- p.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- p.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
+ p.setProperty(DURABLE_CLIENT_ID, durableClientId);
+ p.setProperty(DURABLE_CLIENT_TIMEOUT, String.valueOf(durableClientTimeout));
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
index ad5b3a3..b7945b9 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
@@ -31,7 +31,6 @@ import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
index edeee3a..3205dd3 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
@@ -24,7 +24,6 @@ import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.lucene.LuceneIndex;
import com.gemstone.gemfire.cache.lucene.LuceneService;
import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.extension.Extension;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
@@ -48,7 +47,7 @@ import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
@@ -129,7 +128,7 @@ public class LuceneIndexXmlParserIntegrationJUnitTest {
public void createIndex() throws FileNotFoundException {
CacheFactory cf = new CacheFactory();
cf.set(MCAST_PORT, "0");
- cf.set(DistributionConfig.CACHE_XML_FILE_NAME, getXmlFileForTest());
+ cf.set(CACHE_XML_FILE, getXmlFileForTest());
Cache cache = cf.create();
LuceneService service = LuceneServiceProvider.get(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java b/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
index fd7dd50..1c6a5a2 100644
--- a/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
+++ b/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
@@ -58,7 +58,7 @@ public class JavaApiIntegrationTest extends JUnitSuite {
public static void setUpBeforeClass() throws Exception {
// start geode cluster, and spark context
Properties settings = new Properties();
- settings.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "src/it/resources/test-retrieve-regions.xml");
+ settings.setProperty(CACHE_XML_FILE, "src/it/resources/test-retrieve-regions.xml");
settings.setProperty("num-of-servers", Integer.toString(numServers));
int locatorPort = GeodeCluster$.MODULE$.start(settings);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
index 22f5df4..0fb0b3e 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
@@ -629,9 +629,9 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locPort + "]");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- props.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+ props.setProperty(USE_CLUSTER_CONFIGURATION, "false");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
IgnoredException ex = new IgnoredException("could not get remote locator information for remote site");
@@ -772,8 +772,8 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
- props.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(USE_CLUSTER_CONFIGURATION, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
test.getSystem(props);
return port;
}
@@ -930,8 +930,8 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- props.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+ props.setProperty(USE_CLUSTER_CONFIGURATION, "false");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
return port;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
index 9710549..2de6dd8 100755
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
@@ -36,8 +35,7 @@ import java.io.IOException;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class CacheClientNotifierDUnitTest extends WANTestBase {
private static final int NUM_KEYS = 10;
@@ -227,8 +225,8 @@ public class CacheClientNotifierDUnitTest extends WANTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
if (isDurable) {
- props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, clientId);
- props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + 200);
+ props.setProperty(DURABLE_CLIENT_ID, clientId);
+ props.setProperty(DURABLE_CLIENT_TIMEOUT, "" + 200);
}
InternalDistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index 6e70d92..0ae3739 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -246,7 +246,7 @@ public class WANTestBase extends DistributedTestCase{
public static void bringBackLocatorOnOldPort(int dsId, int remoteLocPort, int oldPort) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.put(LOG_LEVEL, "fine");
props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + oldPort + "]");
@@ -851,7 +851,7 @@ public class WANTestBase extends DistributedTestCase{
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locPort + "]");
- props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, conserveSockets.toString());
+ props.setProperty(CONSERVE_SOCKETS, conserveSockets.toString());
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
}
@@ -880,7 +880,7 @@ public class WANTestBase extends DistributedTestCase{
boolean gatewaySslRequireAuth = true;
Properties gemFireProps = test.getDistributedSystemProperties();
- gemFireProps.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ gemFireProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
@@ -1938,7 +1938,7 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
@@ -1974,7 +1974,7 @@ public class WANTestBase extends DistributedTestCase{
Properties gemFireProps = test.getDistributedSystemProperties();
- gemFireProps.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ gemFireProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
index 104223e..0721ed6 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
@@ -22,6 +22,8 @@ import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class DistTXWANDUnitTest extends WANTestBase {
private static final long serialVersionUID = 1L;
@@ -35,7 +37,7 @@ public class DistTXWANDUnitTest extends WANTestBase {
Invoke.invokeInEveryVM(new SerializableCallable() {
@Override
public Object call() throws Exception {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
return null;
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
index c4a0cea..a8776c3 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
@@ -33,8 +33,7 @@ import org.apache.logging.log4j.Logger;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class NewWanAuthenticationDUnitTest extends WANTestBase {
@@ -196,8 +195,7 @@ public class NewWanAuthenticationDUnitTest extends WANTestBase {
accessor);
}
if (clientAuthInit != null) {
- authProps.setProperty(DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME,
- clientAuthInit);
+ authProps.setProperty(SECURITY_CLIENT_AUTH_INIT, clientAuthInit);
}
if (extraAuthProps != null) {
authProps.putAll(extraAuthProps);
[41/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/70612010
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/70612010
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/70612010
Branch: refs/heads/develop
Commit: 706120101a93e120453bd2adf725f187eb4f61ee
Parents: 1e97dbb
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Fri May 27 10:32:28 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../modules/hibernate/GemFireCacheProvider.java | 8 +-
.../modules/hibernate/GemFireRegionFactory.java | 56 +-
.../ClientServerRegionFactoryDelegate.java | 23 +-
.../internal/RegionFactoryDelegate.java | 25 +-
.../gemfire/modules/HibernateJUnitTest.java | 105 +-
.../gemstone/gemfire/modules/SecondVMTest.java | 29 +-
.../internal/filter/GemfireSessionManager.java | 5 +-
.../session/filter/SessionCachingFilter.java | 19 +-
.../SessionReplicationIntegrationJUnitTest.java | 45 +-
.../filter/SessionReplicationJUnitTest.java | 3 +-
.../SessionReplicationLocalCacheJUnitTest.java | 5 +-
.../session/bootstrap/AbstractCache.java | 4 +-
.../modules/session/TestSessionsBase.java | 6 +-
.../LauncherLifecycleCommandsDUnitTest.java | 114 +-
.../LauncherLifecycleCommandsJUnitTest.java | 37 +-
.../SharedConfigurationEndToEndDUnitTest.java | 68 +-
.../internal/web/RestInterfaceJUnitTest.java | 55 +-
.../web/controllers/RestAPITestBase.java | 3 +-
.../RestAPIsAndInterOpsDUnitTest.java | 15 +-
...APIsOnMembersFunctionExecutionDUnitTest.java | 5 +-
.../RestAPIsQueryAndFEJUnitTest.java | 52 +-
.../controllers/RestAPIsWithSSLDUnitTest.java | 24 +-
.../com/gemstone/gemfire/SystemFailure.java | 11 +-
.../admin/AdminDistributedSystemFactory.java | 3 +-
.../gemfire/admin/DistributedSystemConfig.java | 125 +-
.../gemfire/admin/GemFireMemberStatus.java | 23 +-
.../internal/AdminDistributedSystemImpl.java | 68 +-
.../gemfire/admin/internal/CacheServerImpl.java | 4 +-
.../internal/DistributedSystemConfigImpl.java | 495 ++---
.../DistributedSystemHealthEvaluator.java | 11 +-
.../internal/DistributionLocatorConfigImpl.java | 5 +-
.../admin/internal/DistributionLocatorImpl.java | 130 +-
.../EnabledManagedEntityController.java | 15 +-
.../admin/internal/ManagedEntityConfigXml.java | 7 +-
.../admin/internal/ManagedSystemMemberImpl.java | 5 +-
.../admin/internal/SystemMemberImpl.java | 24 +-
.../gemstone/gemfire/admin/jmx/AgentConfig.java | 4 +-
.../internal/AdminDistributedSystemJmxImpl.java | 98 +-
.../admin/jmx/internal/AgentConfigImpl.java | 533 +++---
.../jmx/internal/MX4JServerSocketFactory.java | 11 +-
.../jmx/internal/MemberInfoWithStatsMBean.java | 134 +-
.../admin/jmx/internal/SystemMemberJmx.java | 53 +-
.../gemfire/cache/DiskStoreFactory.java | 4 +-
.../cache/client/ClientCacheFactory.java | 18 +-
.../client/internal/AuthenticateUserOp.java | 8 +-
.../client/internal/ClientMetadataService.java | 30 +-
.../client/internal/ConnectionFactoryImpl.java | 12 +-
.../internal/ExplicitConnectionSourceImpl.java | 17 +-
.../cache/client/internal/OpExecutorImpl.java | 45 +-
.../gemfire/cache/client/internal/PoolImpl.java | 68 +-
.../cache/client/internal/ServerBlackList.java | 20 +-
.../locator/wan/LocatorMembershipListener.java | 6 +-
.../internal/pooling/ConnectionManagerImpl.java | 38 +-
.../internal/FunctionServiceManager.java | 27 +-
.../internal/AbstractGroupOrRangeJunction.java | 19 +-
.../cache/query/internal/CompiledValue.java | 9 +-
.../cache/query/internal/DefaultQuery.java | 40 +-
.../query/internal/DefaultQueryService.java | 53 +-
.../query/internal/cq/CqServiceProvider.java | 11 +-
.../query/internal/index/IndexManager.java | 69 +-
.../gemfire/cache/wan/GatewayReceiver.java | 7 +-
.../gemfire/cache/wan/GatewaySender.java | 29 +-
.../gemfire/distributed/AbstractLauncher.java | 40 +-
.../gemfire/distributed/DistributedSystem.java | 21 +-
.../gemfire/distributed/LocatorLauncher.java | 60 +-
.../gemfire/distributed/ServerLauncher.java | 77 +-
.../SystemConfigurationProperties.java | 183 ++
.../internal/AbstractDistributionConfig.java | 88 +-
.../gemfire/distributed/internal/DSClock.java | 11 +-
.../internal/DistributionAdvisor.java | 33 +-
.../internal/DistributionConfig.java | 1422 +++++++-------
.../internal/DistributionConfigImpl.java | 52 +-
.../internal/DistributionManager.java | 68 +-
.../FunctionExecutionPooledExecutor.java | 18 +-
.../internal/InternalDistributedSystem.java | 82 +-
.../distributed/internal/InternalLocator.java | 51 +-
.../distributed/internal/LocatorStats.java | 17 +-
.../internal/LonerDistributionManager.java | 28 +-
.../internal/PooledExecutorWithDMStats.java | 14 +-
.../distributed/internal/ReplyProcessor21.java | 16 +-
.../distributed/internal/StartupMessage.java | 30 +-
.../internal/direct/DirectChannel.java | 49 +-
.../internal/locks/DLockGrantor.java | 23 +-
.../internal/locks/DLockService.java | 54 +-
.../internal/locks/LockGrantorId.java | 3 +-
.../membership/InternalDistributedMember.java | 32 +-
.../internal/membership/MemberFactory.java | 6 +-
.../internal/membership/MemberServices.java | 7 +-
.../internal/membership/gms/GMSMember.java | 18 +-
.../membership/gms/GMSMemberFactory.java | 14 +-
.../internal/membership/gms/ServiceConfig.java | 15 +-
.../internal/membership/gms/Services.java | 14 +-
.../membership/gms/auth/GMSAuthenticator.java | 22 +-
.../membership/gms/membership/GMSJoinLeave.java | 19 +-
.../membership/gms/messenger/JGAddress.java | 24 +-
.../gms/messenger/JGroupsMessenger.java | 91 +-
.../gms/mgr/GMSMembershipManager.java | 69 +-
.../internal/tcpserver/TcpServer.java | 61 +-
.../gemfire/internal/AbstractConfig.java | 24 +-
.../com/gemstone/gemfire/internal/Assert.java | 5 +-
.../gemfire/internal/AvailablePort.java | 10 +-
.../com/gemstone/gemfire/internal/Banner.java | 5 +-
.../gemfire/internal/ClassPathLoader.java | 30 +-
.../com/gemstone/gemfire/internal/Config.java | 30 +-
.../gemfire/internal/DistributionLocator.java | 20 +-
.../com/gemstone/gemfire/internal/FileUtil.java | 14 +-
.../gemfire/internal/HeapDataOutputStream.java | 24 +-
.../gemfire/internal/HostStatSampler.java | 20 +-
.../internal/InternalDataSerializer.java | 115 +-
.../gemfire/internal/LinuxProcFsStatistics.java | 17 +-
.../gemfire/internal/MigrationClient.java | 16 +-
.../gemfire/internal/MigrationServer.java | 24 +-
.../gemstone/gemfire/internal/OSProcess.java | 39 +-
.../gemstone/gemfire/internal/PureJavaMode.java | 6 +-
.../gemfire/internal/SharedLibrary.java | 3 +-
.../gemfire/internal/SocketCreator.java | 98 +-
.../gemfire/internal/StatArchiveWriter.java | 31 +-
.../gemstone/gemfire/internal/SystemAdmin.java | 85 +-
.../admin/remote/DistributionLocatorId.java | 12 +-
.../admin/remote/FetchHostResponse.java | 22 +-
.../internal/admin/remote/RemoteCacheInfo.java | 18 +-
.../admin/remote/RemoteGfManagerAgent.java | 41 +-
.../admin/remote/RemoteTransportConfig.java | 23 +-
.../admin/remote/RootRegionResponse.java | 29 +-
.../admin/remote/ShutdownAllRequest.java | 30 +-
.../internal/admin/remote/TailLogResponse.java | 18 +-
.../cache/AbstractBucketRegionQueue.java | 30 +-
.../internal/cache/AbstractCacheServer.java | 6 +-
.../gemfire/internal/cache/AbstractRegion.java | 72 +-
.../internal/cache/AbstractRegionEntry.java | 43 +-
.../internal/cache/AbstractRegionMap.java | 40 +-
.../gemfire/internal/cache/BucketAdvisor.java | 39 +-
.../gemfire/internal/cache/BucketRegion.java | 62 +-
.../gemfire/internal/cache/CacheServerImpl.java | 49 +-
.../internal/cache/CacheServerLauncher.java | 56 +-
.../cache/CachedDeserializableFactory.java | 9 +-
.../cache/ClusterConfigurationLoader.java | 23 +-
.../internal/cache/ColocationHelper.java | 24 +-
.../gemfire/internal/cache/DiskStoreImpl.java | 137 +-
.../internal/cache/DiskStoreMonitor.java | 31 +-
.../internal/cache/DiskWriteAttributesImpl.java | 11 +-
.../internal/cache/DistributedRegion.java | 82 +-
.../gemfire/internal/cache/EntryEventImpl.java | 52 +-
.../gemfire/internal/cache/EntryExpiryTask.java | 19 +-
.../gemfire/internal/cache/EventID.java | 24 +-
.../gemfire/internal/cache/EventTracker.java | 24 +-
.../internal/cache/ExpirationScheduler.java | 10 +-
.../gemfire/internal/cache/ExpiryTask.java | 23 +-
.../cache/FixedPartitionAttributesImpl.java | 11 +-
.../internal/cache/GemFireCacheImpl.java | 183 +-
.../internal/cache/InitialImageOperation.java | 73 +-
.../gemfire/internal/cache/InlineKeyHelper.java | 4 +-
.../gemfire/internal/cache/LocalRegion.java | 156 +-
.../gemstone/gemfire/internal/cache/Oplog.java | 101 +-
.../internal/cache/PRHARedundancyProvider.java | 68 +-
.../internal/cache/PRQueryProcessor.java | 42 +-
.../internal/cache/PartitionedRegion.java | 183 +-
.../cache/PartitionedRegionDataStore.java | 73 +-
.../internal/cache/PartitionedRegionHelper.java | 40 +-
.../cache/PartitionedRegionQueryEvaluator.java | 59 +-
.../gemfire/internal/cache/PoolFactoryImpl.java | 28 +-
.../gemfire/internal/cache/PoolStats.java | 12 +-
.../internal/cache/RegionEvictorTask.java | 14 +-
.../cache/SearchLoadAndWriteProcessor.java | 59 +-
.../gemfire/internal/cache/TXEntryState.java | 40 +-
.../gemfire/internal/cache/TXManagerImpl.java | 61 +-
.../internal/cache/TombstoneService.java | 181 +-
.../cache/control/HeapMemoryMonitor.java | 127 +-
.../cache/control/InternalResourceManager.java | 29 +-
.../cache/control/MemoryThresholds.java | 15 +-
.../cache/control/RebalanceOperationImpl.java | 26 +-
.../internal/cache/execute/FunctionStats.java | 9 +-
.../util/FindRestEnabledServersFunction.java | 1 -
.../internal/cache/ha/HARegionQueue.java | 82 +-
.../cache/ha/HARegionQueueAttributes.java | 4 +-
.../gemfire/internal/cache/lru/HeapEvictor.java | 44 +-
.../cache/lru/HeapLRUCapacityController.java | 13 +-
.../internal/cache/lru/NewLRUClockHand.java | 19 +-
.../internal/cache/lru/OffHeapEvictor.java | 5 +-
.../internal/cache/partitioned/GetMessage.java | 43 +-
.../cache/partitioned/PRSanityCheckMessage.java | 15 +-
.../PartitionedRegionRebalanceOp.java | 31 +-
.../cache/partitioned/RegionAdvisor.java | 51 +-
.../cache/partitioned/SizedBasedLoadProbe.java | 4 +-
.../cache/persistence/BackupManager.java | 21 +-
.../persistence/PersistenceAdvisorImpl.java | 27 +-
.../snapshot/RegionSnapshotServiceImpl.java | 47 +-
.../cache/snapshot/WindowedExporter.java | 39 +-
.../cache/tier/sockets/AcceptorImpl.java | 61 +-
.../cache/tier/sockets/BaseCommand.java | 57 +-
.../cache/tier/sockets/CacheClientNotifier.java | 13 +-
.../cache/tier/sockets/CacheClientProxy.java | 86 +-
.../cache/tier/sockets/CacheClientUpdater.java | 74 +-
.../cache/tier/sockets/ClientHealthMonitor.java | 29 +-
.../tier/sockets/ClientProxyMembershipID.java | 30 +-
.../internal/cache/tier/sockets/HandShake.java | 83 +-
.../internal/cache/tier/sockets/Message.java | 28 +-
.../cache/tier/sockets/ServerConnection.java | 42 +-
.../tier/sockets/command/TXFailoverCommand.java | 16 +-
.../internal/cache/tx/ClientTXStateStub.java | 17 +-
.../cache/versions/RegionVersionVector.java | 39 +-
.../AbstractGatewaySenderEventProcessor.java | 43 +-
.../wan/serial/SerialGatewaySenderQueue.java | 55 +-
.../internal/cache/xmlcache/CacheXml.java | 21 +-
.../gemfire/internal/concurrent/Atomics.java | 7 +-
.../gemfire/internal/jndi/JNDIInvoker.java | 29 +-
.../gemfire/internal/logging/LogConfig.java | 16 +-
.../internal/logging/LogWriterFactory.java | 1 -
.../internal/logging/ManagerLogWriter.java | 23 +-
.../internal/logging/SecurityLogConfig.java | 4 +-
.../internal/logging/SecurityLogWriter.java | 3 +-
.../logging/SecurityManagerLogWriter.java | 5 +-
.../internal/logging/log4j/AppenderContext.java | 6 +-
.../logging/log4j/LogWriterAppenders.java | 28 +-
.../internal/logging/log4j/LogWriterLogger.java | 20 +-
.../internal/offheap/FreeListManager.java | 30 +-
.../internal/offheap/MemoryAllocatorImpl.java | 30 +-
.../internal/offheap/OffHeapStorage.java | 15 +-
.../internal/offheap/ReferenceCountHelper.java | 8 +-
.../internal/process/FileProcessController.java | 16 +-
.../internal/process/LocalProcessLauncher.java | 4 +-
.../process/ProcessControllerFactory.java | 11 +-
.../process/ProcessLauncherContext.java | 13 +-
.../gemfire/internal/process/ProcessType.java | 4 +-
.../internal/security/GeodeSecurityUtil.java | 11 +-
.../security/shiro/CustomAuthRealm.java | 33 +-
.../internal/sequencelog/EntryLogger.java | 13 +-
.../sequencelog/SequenceLoggerImpl.java | 14 +-
.../gemfire/internal/size/ObjectGraphSizer.java | 10 +-
.../internal/statistics/StatMonitorHandler.java | 16 +-
.../gemfire/internal/stats50/VMStats50.java | 35 +-
.../gemfire/internal/tcp/Connection.java | 70 +-
.../gemfire/internal/tcp/MsgStreamer.java | 24 +-
.../gemfire/internal/tcp/TCPConduit.java | 44 +-
.../gemfire/internal/util/Breadcrumbs.java | 8 +-
.../internal/util/JavaCommandBuilder.java | 4 +-
.../concurrent/StoppableCountDownLatch.java | 9 +-
.../gemfire/management/JMXNotificationType.java | 50 +-
.../gemfire/management/internal/AgentUtil.java | 12 +-
.../management/internal/JmxManagerAdvisee.java | 10 +-
.../management/internal/ManagementAgent.java | 54 +-
.../internal/ManagementConstants.java | 7 +-
.../internal/beans/BeanUtilFuncs.java | 16 +-
.../internal/beans/MemberMBeanBridge.java | 85 +-
.../management/internal/cli/CommandManager.java | 45 +-
.../internal/cli/commands/ConfigCommands.java | 17 +-
.../cli/commands/LauncherLifecycleCommands.java | 1802 ++++++++----------
.../internal/cli/commands/ShellCommands.java | 19 +-
.../functions/AlterRuntimeConfigFunction.java | 8 +-
.../cli/functions/ChangeLogLevelFunction.java | 15 +-
.../GetMemberConfigInformationFunction.java | 21 +-
.../functions/GetMemberInformationFunction.java | 17 +-
.../internal/cli/help/utils/HelpUtils.java | 19 +-
.../internal/cli/i18n/CliStrings.java | 86 +-
.../internal/cli/shell/JmxOperationInvoker.java | 53 +-
.../configuration/utils/DtdResolver.java | 14 +-
.../DurableClientCommandsController.java | 18 +-
.../support/LoginHandlerInterceptor.java | 20 +-
.../pdx/internal/AutoSerializableManager.java | 50 +-
.../gemfire/pdx/internal/PdxWriterImpl.java | 22 +-
.../gemfire/pdx/internal/TypeRegistry.java | 16 +-
.../gemfire/redis/GemFireRedisServer.java | 46 +-
.../internal/i18n/StringIdResourceBundle_ja.txt | 2 +-
.../com/gemstone/gemfire/CopyJUnitTest.java | 14 +-
.../gemfire/DiskInstantiatorsJUnitTest.java | 26 +-
.../com/gemstone/gemfire/GemFireTestCase.java | 20 +-
.../gemfire/JtaNoninvolvementJUnitTest.java | 28 +-
.../gemfire/LocalStatisticsJUnitTest.java | 17 +-
.../com/gemstone/gemfire/LonerDMJUnitTest.java | 44 +-
.../com/gemstone/gemfire/TXExpiryJUnitTest.java | 47 +-
.../java/com/gemstone/gemfire/TXJUnitTest.java | 98 +-
.../com/gemstone/gemfire/TXWriterTestCase.java | 30 +-
.../BindDistributedSystemJUnitTest.java | 29 +-
.../internal/DistributedSystemTestCase.java | 15 +-
.../admin/internal/HealthEvaluatorTestCase.java | 13 +-
.../gemfire/cache/CacheListenerJUnitTest.java | 24 +-
.../cache/CacheRegionClearStatsDUnitTest.java | 22 +-
.../cache/ClientServerTimeSyncDUnitTest.java | 24 +-
.../cache/ConnectionPoolAndLoaderDUnitTest.java | 22 +-
.../cache/ConnectionPoolFactoryJUnitTest.java | 28 +-
.../gemfire/cache/PoolManagerJUnitTest.java | 24 +-
.../gemstone/gemfire/cache/ProxyJUnitTest.java | 25 +-
.../gemfire/cache/RegionFactoryJUnitTest.java | 56 +-
...ventQueueEvictionAndExpirationJUnitTest.java | 32 +-
.../SerialAsyncEventQueueImplJUnitTest.java | 14 +-
.../client/ClientCacheFactoryJUnitTest.java | 83 +-
.../client/ClientRegionFactoryJUnitTest.java | 46 +-
.../ClientServerRegisterInterestsDUnitTest.java | 34 +-
.../AutoConnectionSourceImplJUnitTest.java | 55 +-
.../CacheServerSSLConnectionDUnitTest.java | 24 +-
.../internal/ConnectionPoolImplJUnitTest.java | 27 +-
.../cache/client/internal/LocatorTestBase.java | 20 +-
.../client/internal/QueueManagerJUnitTest.java | 46 +-
.../internal/SSLNoClientAuthDUnitTest.java | 23 +-
.../pooling/ConnectionManagerJUnitTest.java | 59 +-
.../management/MXMemoryPoolListenerExample.java | 32 +-
.../management/MemoryThresholdsDUnitTest.java | 79 +-
.../MemoryThresholdsOffHeapDUnitTest.java | 70 +-
.../ExceptionHandlingJUnitTest.java | 28 +-
.../mapInterface/MapFunctionalJUnitTest.java | 28 +-
.../mapInterface/PutAllGlobalLockJUnitTest.java | 32 +-
.../PutOperationContextJUnitTest.java | 25 +-
.../GetOperationContextImplJUnitTest.java | 27 +-
.../query/Bug32947ValueConstraintJUnitTest.java | 29 +-
.../gemfire/cache/query/CacheUtils.java | 25 +-
.../cache/query/PdxStringQueryJUnitTest.java | 26 +-
.../gemfire/cache/query/QueryTestUtils.java | 33 +-
.../cache/query/dunit/HelperTestCase.java | 42 +-
...itionedRegionCompactRangeIndexDUnitTest.java | 31 +-
.../dunit/QueryIndexUsingXMLDUnitTest.java | 45 +-
.../QueryParamsAuthorizationDUnitTest.java | 11 +-
.../query/dunit/QueryUsingPoolDUnitTest.java | 4 +-
.../cache/query/dunit/RemoteQueryDUnitTest.java | 74 +-
...esourceManagerWithQueryMonitorDUnitTest.java | 72 +-
.../query/functional/CountStarJUnitTest.java | 29 +-
...ctResultsWithDupValuesInRegionJUnitTest.java | 29 +-
.../functional/IUMRSingleRegionJUnitTest.java | 46 +-
.../functional/IndexCreationJUnitTest.java | 97 +-
.../functional/IndexOnEntrySetJUnitTest.java | 33 +-
.../MultiRegionIndexUsageJUnitTest.java | 49 +-
.../NegativeNumberQueriesJUnitTest.java | 26 +-
.../query/functional/NumericQueryJUnitTest.java | 39 +-
.../functional/QueryUndefinedJUnitTest.java | 24 +-
.../query/functional/SelectToDateJUnitTest.java | 35 +-
...syncIndexUpdaterThreadShutdownJUnitTest.java | 22 +-
.../index/AsynchIndexMaintenanceJUnitTest.java | 35 +-
.../CompactRangeIndexIndexMapJUnitTest.java | 34 +-
.../index/CompactRangeIndexJUnitTest.java | 34 +-
...pdateWithInplaceObjectModFalseDUnitTest.java | 35 +-
...ConcurrentIndexUpdateWithoutWLDUnitTest.java | 34 +-
.../index/CopyOnReadIndexDUnitTest.java | 42 +-
.../index/CopyOnReadIndexJUnitTest.java | 24 +-
.../DeclarativeIndexCreationJUnitTest.java | 27 +-
.../internal/index/IndexHintJUnitTest.java | 33 +-
.../IndexTrackingQueryObserverJUnitTest.java | 33 +-
.../NewDeclarativeIndexCreationJUnitTest.java | 32 +-
.../index/PdxCopyOnReadQueryJUnitTest.java | 22 +-
...gRegionCreationIndexUpdateTypeJUnitTest.java | 23 +-
.../index/PutAllWithIndexPerfDUnitTest.java | 37 +-
.../cache/snapshot/RegionSnapshotJUnitTest.java | 41 +-
.../cache/snapshot/SnapshotTestCase.java | 22 +-
.../gemfire/cache30/Bug38741DUnitTest.java | 40 +-
.../gemfire/cache30/Bug40255JUnitTest.java | 32 +-
.../gemfire/cache30/Bug40662JUnitTest.java | 26 +-
.../gemfire/cache30/Bug44418JUnitTest.java | 31 +-
.../gemfire/cache30/CacheLogRollDUnitTest.java | 55 +-
.../gemfire/cache30/CacheMapTxnDUnitTest.java | 23 +-
...cheRegionsReliablityStatsCheckDUnitTest.java | 16 +-
.../gemfire/cache30/CacheXml30DUnitTest.java | 54 +-
.../gemfire/cache30/CacheXml45DUnitTest.java | 16 +-
.../cache30/CacheXmlGeode10DUnitTest.java | 14 +-
.../gemfire/cache30/CacheXmlTestCase.java | 17 +-
.../cache30/ClearMultiVmCallBkDUnitTest.java | 16 +-
.../cache30/ClientMembershipDUnitTest.java | 28 +-
.../ClientRegisterInterestDUnitTest.java | 27 +-
.../cache30/ClientServerCCEDUnitTest.java | 41 +-
.../cache30/DistAckMapMethodsDUnitTest.java | 30 +-
...tedAckOverflowRegionCCEOffHeapDUnitTest.java | 4 +-
...dAckPersistentRegionCCEOffHeapDUnitTest.java | 4 +-
.../DistributedAckRegionCCEDUnitTest.java | 49 +-
...DistributedAckRegionCCEOffHeapDUnitTest.java | 4 +-
.../cache30/DistributedAckRegionDUnitTest.java | 17 +-
.../DistributedAckRegionOffHeapDUnitTest.java | 4 +-
.../DistributedMulticastRegionDUnitTest.java | 43 +-
.../DistributedNoAckRegionCCEDUnitTest.java | 28 +-
...stributedNoAckRegionCCEOffHeapDUnitTest.java | 4 +-
.../DistributedNoAckRegionOffHeapDUnitTest.java | 4 +-
.../cache30/GlobalRegionCCEDUnitTest.java | 14 +-
.../GlobalRegionCCEOffHeapDUnitTest.java | 4 +-
.../cache30/GlobalRegionOffHeapDUnitTest.java | 4 +-
.../OffHeapLRUEvictionControllerDUnitTest.java | 8 +-
.../PartitionedRegionOffHeapDUnitTest.java | 4 +-
.../gemfire/cache30/QueueMsgDUnitTest.java | 26 +-
.../cache30/RRSynchronizationDUnitTest.java | 35 +-
.../gemfire/cache30/ReconnectDUnitTest.java | 52 +-
.../ReconnectedCacheServerDUnitTest.java | 8 +-
.../RegionReliabilityListenerDUnitTest.java | 17 +-
.../cache30/RegionReliabilityTestCase.java | 57 +-
.../gemfire/cache30/RequiredRolesDUnitTest.java | 27 +-
.../cache30/RolePerformanceDUnitTest.java | 11 +-
.../gemfire/cache30/SlowRecDUnitTest.java | 69 +-
.../gemfire/cache30/TXDistributedDUnitTest.java | 67 +-
.../AbstractLauncherIntegrationTest.java | 19 +-
.../AbstractLauncherIntegrationTestCase.java | 38 +-
.../distributed/AbstractLauncherTest.java | 44 +-
...ocatorLauncherRemoteIntegrationTestCase.java | 10 +-
...stractServerLauncherIntegrationTestCase.java | 20 +-
...ServerLauncherRemoteIntegrationTestCase.java | 18 +-
.../distributed/DistributedMemberDUnitTest.java | 50 +-
.../DistributedSystemConnectPerf.java | 12 +-
.../distributed/DistributedSystemDUnitTest.java | 105 +-
.../distributed/HostedLocatorsDUnitTest.java | 47 +-
.../LauncherMemberMXBeanIntegrationTest.java | 41 +-
.../gemfire/distributed/LocatorDUnitTest.java | 184 +-
.../gemfire/distributed/LocatorJUnitTest.java | 72 +-
.../LocatorLauncherIntegrationTest.java | 36 +-
.../LocatorLauncherLocalIntegrationTest.java | 40 +-
.../LocatorLauncherRemoteIntegrationTest.java | 187 +-
.../distributed/LocatorLauncherTest.java | 25 +-
.../gemfire/distributed/RoleDUnitTest.java | 19 +-
.../ServerLauncherIntegrationTest.java | 36 +-
.../ServerLauncherLocalIntegrationTest.java | 69 +-
.../ServerLauncherRemoteIntegrationTest.java | 49 +-
.../gemfire/distributed/ServerLauncherTest.java | 37 +-
...rverLauncherWithProviderIntegrationTest.java | 17 +-
.../distributed/internal/Bug40751DUnitTest.java | 32 +-
.../ConsoleDistributionManagerDUnitTest.java | 34 +-
.../internal/DistributionConfigJUnitTest.java | 66 +-
.../internal/DistributionManagerDUnitTest.java | 73 +-
.../InternalDistributedSystemJUnitTest.java | 181 +-
.../gemfire/distributed/internal/LDM.java | 12 +-
.../internal/ProductUseLogDUnitTest.java | 26 +-
.../locks/DLockReentrantLockJUnitTest.java | 14 +-
.../membership/MembershipJUnitTest.java | 60 +-
.../gms/auth/GMSAuthenticatorJUnitTest.java | 59 +-
.../gms/fd/GMSHealthMonitorJUnitTest.java | 64 +-
.../locator/GMSLocatorRecoveryJUnitTest.java | 41 +-
.../gms/membership/GMSJoinLeaveJUnitTest.java | 52 +-
.../gms/membership/StatRecorderJUnitTest.java | 43 +-
.../messenger/JGroupsMessengerJUnitTest.java | 78 +-
.../gms/mgr/GMSMembershipManagerJUnitTest.java | 53 +-
.../TcpServerBackwardCompatDUnitTest.java | 27 +-
.../gemfire/disttx/DistTXExpiryJUnitTest.java | 14 +-
.../gemfire/disttx/DistTXJUnitTest.java | 24 +-
.../disttx/DistTXManagerImplJUnitTest.java | 18 +-
.../gemfire/disttx/DistTXOrderDUnitTest.java | 4 +-
.../DistTXReleasesOffHeapOnCloseJUnitTest.java | 19 +-
.../disttx/DistTXRestrictionsDUnitTest.java | 6 +-
.../disttx/DistTXWithDeltaDUnitTest.java | 4 +-
.../gemfire/disttx/DistTXWriterJUnitTest.java | 14 +-
.../disttx/DistTXWriterOOMEJUnitTest.java | 14 +-
.../disttx/DistributedTransactionDUnitTest.java | 50 +-
.../gemfire/disttx/PRDistTXDUnitTest.java | 4 +-
.../gemfire/disttx/PRDistTXJUnitTest.java | 20 +-
.../disttx/PRDistTXWithVersionsDUnitTest.java | 4 +-
...entPartitionedRegionWithDistTXDUnitTest.java | 6 +-
.../internal/AbstractConfigJUnitTest.java | 23 +-
.../internal/AvailablePortJUnitTest.java | 17 +-
.../gemfire/internal/Bug51616JUnitTest.java | 21 +-
.../internal/GemFireStatSamplerJUnitTest.java | 69 +-
.../GemFireVersionIntegrationJUnitTest.java | 19 +-
.../gemfire/internal/InlineKeyJUnitTest.java | 32 +-
.../gemfire/internal/JSSESocketJUnitTest.java | 244 ++-
.../internal/JarClassLoaderJUnitTest.java | 49 +-
.../gemfire/internal/JarDeployerDUnitTest.java | 35 +-
.../internal/PdxDeleteFieldDUnitTest.java | 35 +-
.../internal/PdxDeleteFieldJUnitTest.java | 48 +-
.../gemfire/internal/PdxRenameDUnitTest.java | 35 +-
.../gemfire/internal/PdxRenameJUnitTest.java | 36 +-
...lityShouldUseArrayEqualsIntegrationTest.java | 19 +-
.../internal/SSLConfigIntegrationJUnitTest.java | 13 +-
.../gemfire/internal/SSLConfigJUnitTest.java | 355 ++--
.../gemfire/internal/cache/BackupJUnitTest.java | 55 +-
.../internal/cache/Bug33726JUnitTest.java | 23 +-
.../internal/cache/Bug34583JUnitTest.java | 22 +-
.../internal/cache/Bug37244JUnitTest.java | 37 +-
.../internal/cache/Bug39079DUnitTest.java | 35 +-
.../internal/cache/Bug41091DUnitTest.java | 28 +-
.../internal/cache/Bug41957DUnitTest.java | 31 +-
.../internal/cache/Bug45934DUnitTest.java | 25 +-
.../internal/cache/Bug48182JUnitTest.java | 26 +-
.../cache/CacheLifecycleListenerJUnitTest.java | 38 +-
.../internal/cache/CacheServiceJUnitTest.java | 17 +-
.../internal/cache/ClearDAckDUnitTest.java | 28 +-
...ssagesRegionCreationAndDestroyJUnitTest.java | 28 +-
.../cache/ClientServerGetAllDUnitTest.java | 37 +-
...ServerInvalidAndDestroyedEntryDUnitTest.java | 27 +-
.../cache/ClientServerTransactionDUnitTest.java | 135 +-
.../cache/ConcurrentMapLocalJUnitTest.java | 23 +-
.../cache/ConcurrentMapOpsDUnitTest.java | 38 +-
.../cache/ConnectDisconnectDUnitTest.java | 41 +-
.../cache/DeltaPropagationDUnitTest.java | 44 +-
.../cache/DeltaPropagationStatsDUnitTest.java | 27 +-
.../cache/DiskOfflineCompactionJUnitTest.java | 52 +-
.../internal/cache/DiskOldAPIsJUnitTest.java | 33 +-
.../cache/DiskRegCacheXmlJUnitTest.java | 33 +-
.../DiskRegCachexmlGeneratorJUnitTest.java | 32 +-
.../cache/DiskRegionClearJUnitTest.java | 48 +-
.../DiskRegionIllegalArguementsJUnitTest.java | 33 +-
...iskRegionIllegalCacheXMLvaluesJUnitTest.java | 28 +-
.../internal/cache/DiskRegionTestingBase.java | 48 +-
.../cache/DiskStoreFactoryJUnitTest.java | 33 +-
...DistrbutedRegionProfileOffHeapDUnitTest.java | 11 +-
.../internal/cache/EventTrackerDUnitTest.java | 36 +-
.../internal/cache/EvictionTestBase.java | 35 +-
.../cache/FixedPRSinglehopDUnitTest.java | 56 +-
.../internal/cache/GIIDeltaDUnitTest.java | 41 +-
.../internal/cache/GridAdvisorDUnitTest.java | 61 +-
.../HAOverflowMemObjectSizerDUnitTest.java | 23 +-
.../cache/IncrementalBackupDUnitTest.java | 38 +-
.../internal/cache/InterruptDiskJUnitTest.java | 46 +-
...InterruptsConserveSocketsFalseDUnitTest.java | 4 +-
.../LIFOEvictionAlgoEnabledRegionJUnitTest.java | 41 +-
...victionAlgoMemoryEnabledRegionJUnitTest.java | 46 +-
.../internal/cache/MapClearGIIDUnitTest.java | 30 +-
.../internal/cache/MapInterfaceJUnitTest.java | 48 +-
.../MultipleOplogsRollingFeatureJUnitTest.java | 10 +-
.../cache/NetSearchMessagingDUnitTest.java | 24 +-
.../cache/OffHeapEvictionDUnitTest.java | 16 +-
.../cache/OffHeapEvictionStatsDUnitTest.java | 8 +-
.../cache/OfflineSnapshotJUnitTest.java | 33 +-
.../cache/P2PDeltaPropagationDUnitTest.java | 14 +-
.../cache/PRConcurrentMapOpsJUnitTest.java | 27 +-
.../cache/PRDataStoreMemoryJUnitTest.java | 22 +-
.../PRDataStoreMemoryOffHeapJUnitTest.java | 8 +-
...dRegionAPIConserveSocketsFalseDUnitTest.java | 4 +-
...gionBucketCreationDistributionDUnitTest.java | 43 +-
...rtitionedRegionCacheXMLExampleDUnitTest.java | 15 +-
.../PartitionedRegionDataStoreJUnitTest.java | 40 +-
.../PartitionedRegionEvictionDUnitTest.java | 41 +-
...nedRegionLocalMaxMemoryOffHeapDUnitTest.java | 4 +-
...rtitionedRegionOffHeapEvictionDUnitTest.java | 8 +-
...artitionedRegionRedundancyZoneDUnitTest.java | 11 +-
.../PartitionedRegionSingleHopDUnitTest.java | 79 +-
...RegionSingleHopWithServerGroupDUnitTest.java | 61 +-
.../cache/PartitionedRegionTestHelper.java | 32 +-
.../PersistentPartitionedRegionJUnitTest.java | 28 +-
.../internal/cache/RegionListenerJUnitTest.java | 22 +-
.../cache/RemoteTransactionDUnitTest.java | 82 +-
.../internal/cache/RunCacheInOldGemfire.java | 16 +-
.../internal/cache/SingleHopStatsDUnitTest.java | 8 +-
.../internal/cache/TXManagerImplJUnitTest.java | 37 +-
.../cache/TXReservationMgrJUnitTest.java | 24 +-
.../cache/TombstoneCreationJUnitTest.java | 38 +-
.../cache/TransactionsWithDeltaDUnitTest.java | 15 +-
.../internal/cache/UpdateVersionJUnitTest.java | 34 +-
.../cache/control/MemoryMonitorJUnitTest.java | 47 +-
.../control/MemoryMonitorOffHeapJUnitTest.java | 31 +-
.../control/RebalanceOperationDUnitTest.java | 76 +-
.../DiskRegionPersistOnlySyncJUnitTest.java | 28 +-
...ltiThreadedOplogPerJUnitPerformanceTest.java | 32 +-
.../cache/execute/Bug51193DUnitTest.java | 35 +-
...ributedRegionFunctionExecutionDUnitTest.java | 65 +-
.../execute/FunctionServiceStatsDUnitTest.java | 44 +-
.../MemberFunctionExecutionDUnitTest.java | 36 +-
.../OnGroupsFunctionExecutionDUnitTest.java | 50 +-
...egionFunctionExecutionFailoverDUnitTest.java | 39 +-
.../cache/execute/PRClientServerTestBase.java | 44 +-
.../execute/PRCustomPartitioningDUnitTest.java | 36 +-
.../execute/PRFunctionExecutionDUnitTest.java | 66 +-
.../cache/ha/BlockingHARegionJUnitTest.java | 22 +-
.../cache/ha/Bug36853EventsExpiryDUnitTest.java | 31 +-
.../internal/cache/ha/Bug48571DUnitTest.java | 53 +-
.../internal/cache/ha/Bug48879DUnitTest.java | 13 +-
.../cache/ha/EventIdOptimizationDUnitTest.java | 45 +-
.../internal/cache/ha/FailoverDUnitTest.java | 37 +-
.../internal/cache/ha/HABugInPutDUnitTest.java | 25 +-
.../internal/cache/ha/HAClearDUnitTest.java | 32 +-
.../cache/ha/HAConflationDUnitTest.java | 33 +-
.../internal/cache/ha/HADuplicateDUnitTest.java | 36 +-
.../cache/ha/HAEventIdPropagationDUnitTest.java | 41 +-
.../internal/cache/ha/HAGIIDUnitTest.java | 41 +-
.../cache/ha/HARQAddOperationJUnitTest.java | 43 +-
.../cache/ha/HARQueueNewImplDUnitTest.java | 42 +-
.../internal/cache/ha/HARegionJUnitTest.java | 41 +-
.../cache/ha/HARegionQueueJUnitTest.java | 51 +-
.../ha/HARegionQueueStartStopJUnitTest.java | 22 +-
.../cache/ha/HARegionQueueStatsJUnitTest.java | 25 +-
.../cache/ha/HASlowReceiverDUnitTest.java | 30 +-
.../ha/OperationsPropagationDUnitTest.java | 32 +-
.../internal/cache/ha/PutAllDUnitTest.java | 41 +-
.../internal/cache/ha/StatsBugDUnitTest.java | 33 +-
.../cache/locks/TXLockServiceDUnitTest.java | 24 +-
.../internal/cache/lru/LRUClockJUnitTest.java | 36 +-
.../cache/lru/TransactionsWithOverflowTest.java | 7 +-
.../cache/partitioned/Bug43684DUnitTest.java | 37 +-
.../cache/partitioned/Bug47388DUnitTest.java | 19 +-
.../cache/partitioned/Bug51400DUnitTest.java | 19 +-
.../PersistentPartitionedRegionDUnitTest.java | 67 +-
.../fixed/FixedPartitioningTestBase.java | 62 +-
.../PersistentRecoveryOrderDUnitTest.java | 63 +-
.../tier/sockets/AcceptorImplJUnitTest.java | 29 +-
...mpatibilityHigherVersionClientDUnitTest.java | 32 +-
.../cache/tier/sockets/Bug36269DUnitTest.java | 27 +-
.../cache/tier/sockets/Bug36457DUnitTest.java | 31 +-
.../cache/tier/sockets/Bug36805DUnitTest.java | 31 +-
.../cache/tier/sockets/Bug36829DUnitTest.java | 24 +-
.../cache/tier/sockets/Bug36995DUnitTest.java | 31 +-
.../cache/tier/sockets/Bug37210DUnitTest.java | 34 +-
.../cache/tier/sockets/Bug37805DUnitTest.java | 20 +-
.../CacheServerMaxConnectionsJUnitTest.java | 36 +-
.../cache/tier/sockets/CacheServerTestUtil.java | 105 +-
.../CacheServerTransactionsDUnitTest.java | 38 +-
.../tier/sockets/ClearPropagationDUnitTest.java | 39 +-
.../tier/sockets/ClientConflationDUnitTest.java | 34 +-
.../sockets/ClientHealthMonitorJUnitTest.java | 23 +-
.../sockets/ClientInterestNotifyDUnitTest.java | 39 +-
.../ClientServerForceInvalidateDUnitTest.java | 32 +-
.../tier/sockets/ClientServerMiscDUnitTest.java | 50 +-
.../cache/tier/sockets/ConflationDUnitTest.java | 45 +-
.../tier/sockets/ConnectionProxyJUnitTest.java | 37 +-
.../DataSerializerPropogationDUnitTest.java | 43 +-
.../DestroyEntryPropagationDUnitTest.java | 59 +-
.../sockets/DurableClientBug39997DUnitTest.java | 32 +-
.../DurableClientQueueSizeDUnitTest.java | 30 +-
.../DurableClientReconnectDUnitTest.java | 40 +-
.../sockets/DurableClientStatsDUnitTest.java | 31 +-
.../sockets/DurableRegistrationDUnitTest.java | 41 +-
.../sockets/DurableResponseMatrixDUnitTest.java | 27 +-
.../sockets/EventIDVerificationDUnitTest.java | 37 +-
...ForceInvalidateOffHeapEvictionDUnitTest.java | 8 +-
.../cache/tier/sockets/HAInterestTestCase.java | 42 +-
.../sockets/HAStartupAndFailoverDUnitTest.java | 55 +-
.../InstantiatorPropagationDUnitTest.java | 45 +-
.../tier/sockets/InterestListDUnitTest.java | 55 +-
.../sockets/InterestListEndpointDUnitTest.java | 40 +-
.../sockets/InterestListRecoveryDUnitTest.java | 45 +-
.../sockets/InterestRegrListenerDUnitTest.java | 34 +-
.../sockets/InterestResultPolicyDUnitTest.java | 37 +-
.../tier/sockets/RedundancyLevelJUnitTest.java | 26 +-
.../tier/sockets/RedundancyLevelTestBase.java | 35 +-
.../tier/sockets/RegionCloseDUnitTest.java | 34 +-
...erInterestBeforeRegionCreationDUnitTest.java | 33 +-
.../sockets/RegisterInterestKeysDUnitTest.java | 25 +-
.../sockets/ReliableMessagingDUnitTest.java | 37 +-
.../sockets/UnregisterInterestDUnitTest.java | 29 +-
.../sockets/UpdatePropagationDUnitTest.java | 50 +-
...UpdatesFromNonInterestEndPointDUnitTest.java | 38 +-
.../cache/wan/AsyncEventQueueTestBase.java | 79 +-
.../asyncqueue/AsyncEventListenerDUnitTest.java | 24 +-
.../AsyncEventQueueValidationsJUnitTest.java | 36 +-
.../CompressionCacheConfigDUnitTest.java | 20 +-
...ompressionCacheListenerOffHeapDUnitTest.java | 8 +-
...ressionRegionOperationsOffHeapDUnitTest.java | 4 +-
.../datasource/AbstractPoolCacheJUnitTest.java | 44 +-
.../internal/datasource/CleanUpJUnitTest.java | 29 +-
.../ConnectionPoolCacheImplJUnitTest.java | 32 +-
.../datasource/ConnectionPoolingJUnitTest.java | 45 +-
.../datasource/DataSourceFactoryJUnitTest.java | 28 +-
.../internal/datasource/RestartJUnitTest.java | 29 +-
.../internal/jta/BlockingTimeOutJUnitTest.java | 50 +-
.../gemfire/internal/jta/CacheUtils.java | 25 +-
.../internal/jta/DataSourceJTAJUnitTest.java | 46 +-
.../internal/jta/ExceptionJUnitTest.java | 24 +-
.../jta/GlobalTransactionJUnitTest.java | 33 +-
.../internal/jta/JtaIntegrationJUnitTest.java | 27 +-
.../internal/jta/TransactionImplJUnitTest.java | 22 +-
.../jta/TransactionManagerImplJUnitTest.java | 30 +-
.../jta/TransactionTimeOutJUnitTest.java | 47 +-
.../jta/UserTransactionImplJUnitTest.java | 25 +-
.../internal/jta/dunit/ExceptionsDUnitTest.java | 27 +-
.../jta/dunit/IdleTimeOutDUnitTest.java | 38 +-
.../jta/dunit/LoginTimeOutDUnitTest.java | 45 +-
.../jta/dunit/MaxPoolSizeDUnitTest.java | 38 +-
.../jta/dunit/TransactionTimeOutDUnitTest.java | 40 +-
.../dunit/TxnManagerMultiThreadDUnitTest.java | 43 +-
.../internal/jta/dunit/TxnTimeOutDUnitTest.java | 36 +-
.../DistributedSystemLogFileJUnitTest.java | 144 +-
.../logging/LocatorLogFileJUnitTest.java | 39 +-
.../logging/LogWriterPerformanceTest.java | 17 +-
.../logging/LoggingPerformanceTestCase.java | 10 +-
.../internal/logging/TestLogWriterFactory.java | 11 +-
.../logging/log4j/Log4J2PerformanceTest.java | 22 +-
.../log4j/LogWriterLoggerPerformanceTest.java | 22 +-
.../CustomConfigWithCacheIntegrationTest.java | 31 +-
.../internal/offheap/FreeListManagerTest.java | 31 +-
.../offheap/FreeListOffHeapRegionJUnitTest.java | 8 +-
.../internal/offheap/InlineKeyJUnitTest.java | 35 +-
...moryAllocatorFillPatternIntegrationTest.java | 19 +-
.../MemoryAllocatorFillPatternJUnitTest.java | 14 +-
.../offheap/MemoryBlockNodeJUnitTest.java | 27 +-
.../internal/offheap/OffHeapIndexJUnitTest.java | 32 +-
.../internal/offheap/OffHeapRegionBase.java | 36 +-
.../offheap/OffHeapStorageJUnitTest.java | 33 +-
.../offheap/OffHeapValidationJUnitTest.java | 56 +-
.../OldFreeListOffHeapRegionJUnitTest.java | 10 +-
.../offheap/OutOfOffHeapMemoryDUnitTest.java | 19 +-
.../TxReleasesOffHeapOnCloseJUnitTest.java | 24 +-
.../internal/size/ObjectTraverserJUnitTest.java | 19 +-
.../statistics/StatisticsDUnitTest.java | 55 +-
.../internal/stats50/AtomicStatsJUnitTest.java | 25 +-
.../ConcurrentHashMapIteratorJUnitTest.java | 18 +-
.../management/CacheManagementDUnitTest.java | 42 +-
.../management/ClientHealthStatsDUnitTest.java | 32 +-
.../DataBrowserJSONValidationJUnitTest.java | 38 +-
.../management/LocatorManagementDUnitTest.java | 51 +-
.../management/OffHeapManagementDUnitTest.java | 33 +-
.../gemfire/management/TypedJsonJUnitTest.java | 25 +-
...ersalMembershipListenerAdapterDUnitTest.java | 39 +-
.../stats/DistributedSystemStatsJUnitTest.java | 28 +-
.../bean/stats/MBeanStatsTestCase.java | 25 +-
.../internal/cli/CliUtilDUnitTest.java | 30 +-
.../cli/HeadlessGfshIntegrationTest.java | 36 +-
.../cli/commands/CliCommandTestBase.java | 30 +-
.../cli/commands/ConfigCommandsDUnitTest.java | 113 +-
...eateAlterDestroyRegionCommandsDUnitTest.java | 91 +-
.../cli/commands/DeployCommandsDUnitTest.java | 51 +-
.../commands/DiskStoreCommandsDUnitTest.java | 83 +-
.../cli/commands/FunctionCommandsDUnitTest.java | 38 +-
.../commands/GemfireDataCommandsDUnitTest.java | 54 +-
...WithCacheLoaderDuringCacheMissDUnitTest.java | 39 +-
.../HTTPServiceSSLSupportJUnitTest.java | 40 +-
.../commands/HelpCommandsIntegrationTest.java | 8 +-
.../cli/commands/IndexCommandsDUnitTest.java | 57 +-
...stAndDescribeDiskStoreCommandsDUnitTest.java | 32 +-
.../ListAndDescribeRegionDUnitTest.java | 28 +-
.../cli/commands/ListIndexCommandDUnitTest.java | 39 +-
.../cli/commands/MemberCommandsDUnitTest.java | 47 +-
.../MiscellaneousCommandsDUnitTest.java | 55 +-
...laneousCommandsExportLogsPart3DUnitTest.java | 23 +-
.../cli/commands/QueueCommandsDUnitTest.java | 48 +-
.../SharedConfigurationCommandsDUnitTest.java | 72 +-
.../cli/commands/ShellCommandsDUnitTest.java | 22 +-
.../cli/commands/ShowDeadlockDUnitTest.java | 34 +-
.../cli/commands/ShowMetricsDUnitTest.java | 43 +-
.../cli/commands/ShowStackTraceDUnitTest.java | 22 +-
.../cli/commands/UserCommandsDUnitTest.java | 15 +-
.../functions/DataCommandFunctionJUnitTest.java | 10 +-
.../SharedConfigurationDUnitTest.java | 87 +-
.../SharedConfigurationUsingDirDUnitTest.java | 59 +-
.../utils/XmlUtilsAddNewNodeJUnitTest.java | 37 +-
.../internal/pulse/TestClientIdsDUnitTest.java | 31 +-
.../pulse/TestSubscriptionsDUnitTest.java | 32 +-
.../security/ExampleJSONAuthorization.java | 26 +-
.../GeodeSecurityUtilCustomRealmJUnitTest.java | 1 -
.../GeodeSecurityUtilWithIniFileJUnitTest.java | 9 +-
.../internal/security/JSONAuthorization.java | 21 +
.../JsonAuthorizationCacheStartRule.java | 14 +-
.../internal/security/MultiUserDUnitTest.java | 19 +-
.../internal/security/ShiroCacheStartRule.java | 14 +-
.../ReadOpFileAccessControllerJUnitTest.java | 49 +-
.../DomainObjectsAsValuesJUnitTest.java | 33 +-
.../GemcachedDevelopmentJUnitTest.java | 36 +-
.../gemfire/memcached/IntegrationJUnitTest.java | 37 +-
.../gemfire/pdx/AutoSerializableJUnitTest.java | 57 +-
.../ClientsWithVersioningRetryDUnitTest.java | 46 +-
.../pdx/DistributedSystemIdDUnitTest.java | 23 +-
.../gemfire/pdx/JSONFormatterJUnitTest.java | 31 +-
.../pdx/JSONPdxClientServerDUnitTest.java | 24 +-
.../gemfire/pdx/PdxAttributesJUnitTest.java | 48 +-
.../gemfire/pdx/PdxClientServerDUnitTest.java | 56 +-
.../pdx/PdxInstanceFactoryJUnitTest.java | 46 +-
.../gemfire/pdx/PdxInstanceJUnitTest.java | 44 +-
.../gemfire/pdx/PdxSerializableJUnitTest.java | 79 +-
.../gemfire/pdx/PdxStringJUnitTest.java | 30 +-
.../gemstone/gemfire/redis/AuthJUnitTest.java | 40 +-
.../gemfire/redis/ConcurrentStartTest.java | 21 +-
.../gemstone/gemfire/redis/HashesJUnitTest.java | 34 +-
.../gemstone/gemfire/redis/ListsJUnitTest.java | 34 +-
.../gemfire/redis/RedisDistDUnitTest.java | 33 +-
.../gemstone/gemfire/redis/SetsJUnitTest.java | 35 +-
.../gemfire/redis/SortedSetsJUnitTest.java | 40 +-
.../gemfire/redis/StringsJunitTest.java | 34 +-
.../security/ClientAuthenticationTestUtils.java | 12 +-
.../security/ClientAuthorizationTestCase.java | 55 +-
.../security/P2PAuthenticationDUnitTest.java | 136 +-
.../gemfire/security/SecurityTestUtils.java | 116 +-
.../generator/LdapUserCredentialGenerator.java | 13 +-
.../generator/SSLCredentialGenerator.java | 18 +-
.../UserPasswordWithExtraPropsAuthInit.java | 9 +-
.../test/dunit/DistributedTestUtils.java | 14 +-
.../gemfire/test/dunit/LogWriterUtils.java | 7 +-
.../gemfire/test/dunit/NetworkUtils.java | 7 +-
.../cache/internal/JUnit4CacheTestCase.java | 19 +-
.../internal/JUnit4DistributedTestCase.java | 47 +-
.../test/dunit/standalone/DUnitLauncher.java | 80 +-
.../test/dunit/standalone/ProcessManager.java | 96 +-
...ingGetPropertiesDisconnectsAllDUnitTest.java | 17 +-
...ingGetPropertiesDisconnectsAllDUnitTest.java | 11 +-
.../com/gemstone/gemfire/test/fake/Fakes.java | 12 +-
.../gemfire/test/golden/GoldenTestCase.java | 16 +-
.../gemfire/test/process/ProcessWrapper.java | 18 +-
.../com/main/WANBootStrapping_Site1_Add.java | 15 +-
.../com/main/WANBootStrapping_Site1_Remove.java | 10 +-
.../com/main/WANBootStrapping_Site2_Add.java | 10 +-
.../com/main/WANBootStrapping_Site2_Remove.java | 10 +-
.../cache/query/internal/cq/CqServiceImpl.java | 64 +-
.../gemfire/cache/query/cq/CQJUnitTest.java | 18 +-
.../cq/dunit/CqDataUsingPoolDUnitTest.java | 56 +-
.../cache/query/cq/dunit/CqQueryDUnitTest.java | 58 +-
.../dunit/CqQueryOptimizedExecuteDUnitTest.java | 11 +-
.../cq/dunit/CqQueryUsingPoolDUnitTest.java | 58 +-
.../cache/query/cq/dunit/CqStateDUnitTest.java | 29 +-
.../PartitionedRegionCqQueryDUnitTest.java | 40 +-
...dRegionCqQueryOptimizedExecuteDUnitTest.java | 10 +-
.../cache/query/dunit/PdxQueryCQTestBase.java | 32 +-
.../query/dunit/QueryMonitorDUnitTest.java | 40 +-
.../cache/snapshot/ClientSnapshotDUnitTest.java | 16 +-
.../cache/PRDeltaPropagationDUnitTest.java | 48 +-
.../internal/cache/PutAllCSDUnitTest.java | 77 +-
.../cache/RemoteCQTransactionDUnitTest.java | 39 +-
.../internal/cache/ha/CQListGIIDUnitTest.java | 50 +-
.../cache/ha/HADispatcherDUnitTest.java | 57 +-
.../sockets/ClientToServerDeltaDUnitTest.java | 37 +-
.../DeltaPropagationWithCQDUnitTest.java | 46 +-
...ToRegionRelationCQRegistrationDUnitTest.java | 46 +-
.../sockets/DurableClientSimpleDUnitTest.java | 28 +-
.../tier/sockets/DurableClientTestCase.java | 62 +-
.../CacheServerManagementDUnitTest.java | 7 +-
.../cli/commands/ClientCommandsDUnitTest.java | 65 +-
.../DurableClientCommandsDUnitTest.java | 40 +-
.../security/ClientAuthzObjectModDUnitTest.java | 30 +-
.../gemfire/security/MultiUserAPIDUnitTest.java | 27 +-
.../repository/IndexRepositoryImpl.java | 25 +-
...ceneIndexCreationOffHeapIntegrationTest.java | 17 +-
.../cache/lucene/LuceneIntegrationTest.java | 22 +-
.../LuceneIndexRecoveryHAIntegrationTest.java | 37 +-
.../LuceneServiceImplIntegrationTest.java | 11 +-
.../IndexRepositoryImplPerformanceTest.java | 70 +-
...neIndexXmlGeneratorIntegrationJUnitTest.java | 26 +-
...uceneIndexXmlParserIntegrationJUnitTest.java | 42 +-
.../pulse/testbed/GemFireDistributedSystem.java | 4 +-
.../gemfire/tools/pulse/tests/Server.java | 38 +-
.../util/AutoBalancerIntegrationJUnitTest.java | 36 +-
.../spark/connector/JavaApiIntegrationTest.java | 2 +-
.../internal/locator/wan/LocatorDiscovery.java | 16 +-
.../wan/LocatorMembershipListenerImpl.java | 37 +-
.../locator/wan/WanLocatorDiscovererImpl.java | 19 +-
.../cache/wan/AbstractRemoteGatewaySender.java | 17 +-
.../internal/cache/UpdateVersionDUnitTest.java | 65 +-
.../cache/wan/CacheClientNotifierDUnitTest.java | 50 +-
.../gemfire/internal/cache/wan/WANTestBase.java | 192 +-
.../ConcurrentWANPropogation_1_DUnitTest.java | 7 +-
.../cache/wan/disttx/DistTXWANDUnitTest.java | 3 +-
.../wan/misc/NewWanAuthenticationDUnitTest.java | 24 +-
.../SenderWithTransportFilterDUnitTest.java | 28 +-
.../wan/misc/WANConfigurationJUnitTest.java | 79 +-
.../wan/misc/WANLocatorServerDUnitTest.java | 23 +-
...arallelGatewaySenderOperationsDUnitTest.java | 16 +-
...llelGatewaySenderQueueOverflowDUnitTest.java | 27 +-
.../SerialGatewaySenderQueueDUnitTest.java | 33 +-
.../serial/SerialWANPropogationDUnitTest.java | 22 +-
.../wan/wancommand/WANCommandTestBase.java | 59 +-
...anCommandCreateGatewayReceiverDUnitTest.java | 62 +-
.../WanCommandCreateGatewaySenderDUnitTest.java | 61 +-
...WanCommandGatewayReceiverStartDUnitTest.java | 42 +-
.../WanCommandGatewayReceiverStopDUnitTest.java | 42 +-
.../WanCommandGatewaySenderStartDUnitTest.java | 26 +-
.../WanCommandGatewaySenderStopDUnitTest.java | 41 +-
.../wan/wancommand/WanCommandListDUnitTest.java | 22 +-
.../WanCommandPauseResumeDUnitTest.java | 57 +-
.../wancommand/WanCommandStatusDUnitTest.java | 46 +-
.../ClusterConfigurationDUnitTest.java | 120 +-
.../web/swagger/config/RestApiPathProvider.java | 5 +-
.../ConnectCommandWithHttpAndSSLDUnitTest.java | 115 +-
835 files changed, 13678 insertions(+), 20627 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java
index 9cd6c88..b6db20a 100644
--- a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java
+++ b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireCacheProvider.java
@@ -21,6 +21,7 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.distributed.DistributedLockService;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.modules.util.CreateRegionFunction;
import com.gemstone.gemfire.modules.util.RegionConfiguration;
@@ -125,7 +126,7 @@ public class GemFireCacheProvider implements CacheProvider {
*/
private String getRegionType(String regionName) {
String rType = regionAttributes
- .getProperty("gemfire.default-region-attributes-id");
+ .getProperty(DistributionConfig.GEMFIRE_PREFIX + "default-region-attributes-id");
if (rType == null) {
rType = DEFAULT_REGION_TYPE;
}
@@ -157,9 +158,8 @@ public class GemFireCacheProvider implements CacheProvider {
String key = (String)keyObj;
if (key.contains("region-attributes")) {
regionAttributes.put(key, properties.get(key));
- }
- else if (key.startsWith("gemfire.")) {
- gemfireOnlyProperties.setProperty(key.replace("gemfire.", ""),
+ } else if (key.startsWith(DistributionConfig.GEMFIRE_PREFIX)) {
+ gemfireOnlyProperties.setProperty(key.replace(DistributionConfig.GEMFIRE_PREFIX, ""),
properties.getProperty(key));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java
index 97e5fdf..31e4551 100644
--- a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java
+++ b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/GemFireRegionFactory.java
@@ -16,27 +16,6 @@
*/
package com.gemstone.gemfire.modules.hibernate;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-
-import org.hibernate.cache.CacheDataDescription;
-import org.hibernate.cache.CacheException;
-import org.hibernate.cache.CollectionRegion;
-import org.hibernate.cache.EntityRegion;
-import org.hibernate.cache.QueryResultsRegion;
-import org.hibernate.cache.RegionFactory;
-import org.hibernate.cache.Timestamper;
-import org.hibernate.cache.TimestampsRegion;
-import org.hibernate.cache.access.AccessType;
-import org.hibernate.cfg.Settings;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.GemFireCache;
import com.gemstone.gemfire.cache.Region;
@@ -45,20 +24,27 @@ import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.modules.hibernate.internal.ClientServerRegionFactoryDelegate;
-import com.gemstone.gemfire.modules.hibernate.internal.EntityWrapper;
-import com.gemstone.gemfire.modules.hibernate.internal.GemFireCollectionRegion;
-import com.gemstone.gemfire.modules.hibernate.internal.GemFireEntityRegion;
-import com.gemstone.gemfire.modules.hibernate.internal.GemFireQueryResultsRegion;
-import com.gemstone.gemfire.modules.hibernate.internal.RegionFactoryDelegate;
+import com.gemstone.gemfire.modules.hibernate.internal.*;
import com.gemstone.gemfire.modules.util.Banner;
+import org.hibernate.cache.*;
+import org.hibernate.cache.access.AccessType;
+import org.hibernate.cfg.Settings;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
public class GemFireRegionFactory implements RegionFactory {
-
- private static final String GEMFIRE_QUERY_RESULTS_REGION_NAME = "gemfire.hibernateQueryResults";
+ private static final String GEMFIRE_QUERY_RESULTS_REGION_NAME = DistributionConfig.GEMFIRE_PREFIX + "hibernateQueryResults";
- private static final String GEMFIRE_TIMESTAMPS_REGION_NAME = "gemfire.hibernateTimestamps";
+ private static final String GEMFIRE_TIMESTAMPS_REGION_NAME = DistributionConfig.GEMFIRE_PREFIX + "hibernateTimestamps";
private GemFireCache _cache;
@@ -102,15 +88,13 @@ public class GemFireRegionFactory implements RegionFactory {
String key = (String)keyObj;
if (key.contains("region-attributes")) {
regionProperties.put(key, properties.get(key));
- }
- else if (key.equals("gemfire.cache-topology")) {
+ } else if (key.equals(DistributionConfig.GEMFIRE_PREFIX + "cache-topology")) {
if (properties.getProperty(key).trim()
.equalsIgnoreCase("client-server")) {
isClient = true;
}
- }
- else if (key.startsWith("gemfire.") && isGemFireAttribute(key)) {
- gemfireProperties.setProperty(key.replace("gemfire.", ""),
+ } else if (key.startsWith(DistributionConfig.GEMFIRE_PREFIX) && isGemFireAttribute(key)) {
+ gemfireProperties.setProperty(key.replace(DistributionConfig.GEMFIRE_PREFIX, ""),
properties.getProperty(key));
}
}
@@ -122,7 +106,7 @@ public class GemFireRegionFactory implements RegionFactory {
}
private boolean isGemFireAttribute(String key) {
- String gfKey = key.replace("gemfire.", "");
+ String gfKey = key.replace(DistributionConfig.GEMFIRE_PREFIX, "");
Set<String> gemfireAttributes = getGemFireAttributesNames();
return gemfireAttributes.contains(gfKey);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java
index 980e6ab..225379a 100644
--- a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java
+++ b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/ClientServerRegionFactoryDelegate.java
@@ -16,18 +16,6 @@
*/
package com.gemstone.gemfire.modules.hibernate.internal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
import com.gemstone.gemfire.cache.GemFireCache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
@@ -36,10 +24,15 @@ import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.modules.util.BootstrappingFunction;
import com.gemstone.gemfire.modules.util.CreateRegionFunction;
import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+
public class ClientServerRegionFactoryDelegate extends RegionFactoryDelegate {
private static final String DEFAULT_SERVER_REGION_TYPE = RegionShortcut.PARTITION.name();
@@ -56,7 +49,7 @@ public class ClientServerRegionFactoryDelegate extends RegionFactoryDelegate {
@Override
public GemFireCache startCache() {
log.info("Creating a GemFire client cache");
- String locatorsString = (String)gemfireProperties.remove("locators");
+ String locatorsString = (String) gemfireProperties.remove(LOCATORS);
checkExistingCache();
ClientCacheFactory ccf = new ClientCacheFactory(gemfireProperties).setPoolSubscriptionEnabled(true);
List<LocatorHolder> locators = getLocatorsMap(locatorsString);
@@ -152,7 +145,7 @@ public class ClientServerRegionFactoryDelegate extends RegionFactoryDelegate {
if (rType != null) {
return rType.toUpperCase();
}
- rType = regionProperties.getProperty("gemfire.default-client-region-attributes-id");
+ rType = regionProperties.getProperty(DistributionConfig.GEMFIRE_PREFIX + "default-client-region-attributes-id");
if (rType == null) {
rType = DEFAULT_CLIENT_REGION_TYPE;
}
@@ -164,7 +157,7 @@ public class ClientServerRegionFactoryDelegate extends RegionFactoryDelegate {
if (rType != null) {
return rType.toUpperCase();
}
- rType = regionProperties.getProperty("gemfire.default-region-attributes-id");
+ rType = regionProperties.getProperty(DistributionConfig.GEMFIRE_PREFIX + "default-region-attributes-id");
if (rType == null) {
rType = DEFAULT_SERVER_REGION_TYPE;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
index 76fdf77..65b0eb2 100644
--- a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
+++ b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
@@ -16,31 +16,26 @@
*/
package com.gemstone.gemfire.modules.hibernate.internal;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.modules.hibernate.GemFireCacheProvider;
import com.gemstone.gemfire.modules.util.BootstrappingFunction;
import com.gemstone.gemfire.modules.util.CreateRegionFunction;
import com.gemstone.gemfire.modules.util.RegionConfiguration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.Iterator;
+import java.util.Properties;
public class RegionFactoryDelegate {
- private static final String LOG_FILE = "log-file";
+ private static final String LOG_FILE = DistributionConfig.LOG_FILE_NAME;
- private static final String CACHE_XML_FILE = "cache-xml-file";
+ private static final String CACHE_XML_FILE = DistributionConfig.CACHE_XML_FILE_NAME;
private static final String DEFAULT_REGION_TYPE = RegionShortcut.REPLICATE_HEAP_LRU.name();
@@ -131,7 +126,7 @@ public class RegionFactoryDelegate {
return rType.toUpperCase();
}
rType = regionProperties
- .getProperty("gemfire.default-region-attributes-id");
+ .getProperty(DistributionConfig.GEMFIRE_PREFIX + "default-region-attributes-id");
if (rType == null) {
rType = DEFAULT_REGION_TYPE;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java b/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java
index 9a86f10..88ffe19 100644
--- a/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java
+++ b/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/HibernateJUnitTest.java
@@ -18,6 +18,7 @@ package com.gemstone.gemfire.modules;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.Region.Entry;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.modules.Owner.Status;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -43,6 +44,7 @@ import java.util.List;
import java.util.Properties;
import java.util.logging.Level;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
@@ -61,16 +63,16 @@ public class HibernateJUnitTest {
public void setUp() throws Exception {
// Create a per-user scratch directory
tmpDir = new File(System.getProperty("java.io.tmpdir"),
- "gemfire_modules-" + System.getProperty("user.name"));
+ "gemfire_modules-" + System.getProperty("user.name"));
tmpDir.mkdirs();
tmpDir.deleteOnExit();
gemfireLog = tmpDir.getPath() +
- System.getProperty("file.separator") + "gemfire_modules.log";
+ System.getProperty("file.separator") + "gemfire_modules.log";
}
public static SessionFactory getSessionFactory(Properties overrideProps) {
- System.setProperty("gemfire.home", "GEMFIREHOME");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "home", "GEMFIREHOME");
Configuration cfg = new Configuration();
cfg.setProperty("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
cfg.setProperty("hibernate.connection.driver_class",
@@ -88,10 +90,10 @@ public class HibernateJUnitTest {
cfg.setProperty("hibernate.show_sql", "true");
cfg.setProperty("hibernate.cache.use_query_cache", "true");
//cfg.setProperty("gemfire.mcast-port", AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS)+"");
- cfg.setProperty("gemfire.mcast-port", "0");
- cfg.setProperty("gemfire.statistic-sampling-enabled", "true");
- cfg.setProperty("gemfire.log-file", gemfireLog);
- cfg.setProperty("gemfire.writable-working-dir", tmpDir.getPath());
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + STATISTIC_SAMPLING_ENABLED, "true");
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_FILE, gemfireLog);
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + "writable-working-dir", tmpDir.getPath());
//cfg.setProperty("gemfire.statistic-archive-file", "plugin-stats-file.gfs");
//cfg.setProperty("gemfire.default-client-region-attributes-id", "CACHING_PROXY");
//cfg.setProperty("gemfire.cache-topology", "client-server");
@@ -103,7 +105,7 @@ public class HibernateJUnitTest {
if (overrideProps != null) {
Iterator it = overrideProps.keySet().iterator();
while (it.hasNext()) {
- String key = (String)it.next();
+ String key = (String) it.next();
cfg.setProperty(key, overrideProps.getProperty(key));
}
}
@@ -124,7 +126,7 @@ public class HibernateJUnitTest {
Long id = theEvent.getId();
session.getTransaction().commit();
session.beginTransaction();
- Event ev = (Event)session.get(Event.class, id);
+ Event ev = (Event) session.get(Event.class, id);
log.info("SWAP:load complete: " + ev);
session.getTransaction().commit();
}
@@ -147,7 +149,7 @@ public class HibernateJUnitTest {
session.getTransaction().commit();
log.info("commit complete...doing load");
session.beginTransaction();
- Event ev = (Event)session.load(Event.class, id);
+ Event ev = (Event) session.load(Event.class, id);
log.info("load complete: " + ev);
log.trace("SWAP");
ev.setTitle("newTitle");
@@ -157,7 +159,7 @@ public class HibernateJUnitTest {
log.info("save complete " + ev);
session.beginTransaction();
- ev = (Event)session.load(Event.class, id);
+ ev = (Event) session.load(Event.class, id);
log.info("load complete: " + ev);
ev.setTitle("newTitle2");
session.save(ev);
@@ -165,32 +167,32 @@ public class HibernateJUnitTest {
session.getTransaction().commit();
log.info("save complete " + ev);
- ev = (Event)session.load(Event.class, id);
+ ev = (Event) session.load(Event.class, id);
log.info("second load " + ev);
session.flush();
session.close();
log.info("flush complete session:" + session);
- for (int i=0; i<5; i++) {
+ for (int i = 0; i < 5; i++) {
session = getSessionFactory(null).openSession();
- log.info("doing get "+id);
+ log.info("doing get " + id);
// ev = (Event) session.load(Event.class, id);
- ev = (Event)session.get(Event.class, id);
+ ev = (Event) session.get(Event.class, id);
log.info("third load " + ev);
}
printExistingDB();
Iterator it = GemFireCacheImpl.getInstance().rootRegions().iterator();
while (it.hasNext()) {
- Region r = (Region)it.next();
- System.out.println("Region:"+r);
+ Region r = (Region) it.next();
+ System.out.println("Region:" + r);
Iterator enIt = r.entrySet().iterator();
while (enIt.hasNext()) {
- Region.Entry re = (Entry)enIt.next();
- System.out.println("key:"+re.getKey()+" value:"+re.getValue());
+ Region.Entry re = (Entry) enIt.next();
+ System.out.println("key:" + re.getKey() + " value:" + re.getValue());
}
}
Thread.sleep(3000);
- //System.in.read();
+ //System.in.read();
// try direct data
}
@@ -205,7 +207,7 @@ public class HibernateJUnitTest {
public void testRelationship() throws Exception {
//java.util.logging.Logger.getLogger("org.hibernate").setLevel(Level.ALL);
Properties props = new Properties();
- props.put("gemfire.topology", "client-server");
+ props.put(DistributionConfig.GEMFIRE_PREFIX + "topology", "client-server");
Session session = getSessionFactory(null).openSession();
session.beginTransaction();
@@ -217,14 +219,14 @@ public class HibernateJUnitTest {
session.save(thePerson);
personId = thePerson.getId();
log.info("person saved");
-
+
Event theEvent = new Event();
theEvent.setTitle("title");
theEvent.setDate(new Date());
session.save(theEvent);
Long eventId = theEvent.getId();
log.info("event saved");
-
+
Event theEvent2 = new Event();
theEvent2.setTitle("title2");
theEvent2.setDate(new Date());
@@ -232,7 +234,7 @@ public class HibernateJUnitTest {
Long eventId2 = theEvent2.getId();
log.info("event2 saved");
session.getTransaction().commit();
-
+
session.beginTransaction();
Person aPerson = (Person) session.load(Person.class, personId);
Event anEvent = (Event) session.load(Event.class, eventId);
@@ -248,7 +250,7 @@ public class HibernateJUnitTest {
log.info("opening new session");
session = getSessionFactory(null).openSession();
log.info("SWAP:loading person");
- aPerson = (Person)session.load(Person.class, personId);
+ aPerson = (Person) session.load(Person.class, personId);
log.info("loading events");
Iterator<Event> e = aPerson.getE().iterator();
while (e.hasNext()) {
@@ -258,42 +260,42 @@ public class HibernateJUnitTest {
log.info("opening new session");
session = getSessionFactory(null).openSession();
log.info("SWAP:loading person");
- aPerson = (Person)session.load(Person.class, personId);
+ aPerson = (Person) session.load(Person.class, personId);
log.info("loading events");
e = aPerson.getE().iterator();
while (e.hasNext()) {
e.next();
}
- log.info(aPerson.getE()+"");
+ log.info(aPerson.getE() + "");
session.close();
//System.in.read();
-// log.info("opening third session");
-// session = getSessionFactory().openSession();
-// log.info("loading person");
-// aPerson = (Person)session.load(Person.class, personId);
-// log.info("loading events");
-// log.info(aPerson.getEvents()+"");
+ // log.info("opening third session");
+ // session = getSessionFactory().openSession();
+ // log.info("loading person");
+ // aPerson = (Person)session.load(Person.class, personId);
+ // log.info("loading events");
+ // log.info(aPerson.getEvents()+"");
}
-
+
public void _testQueryCache() throws Exception {
Session session = getSessionFactory(null).openSession();
Query q = session.createQuery("from Event");
q.setCacheable(true);
List l = q.list();
- log.info("list:"+l);
-// log.info("Sleeping for 10 seconds");
-// Thread.sleep(10000);
+ log.info("list:" + l);
+ // log.info("Sleeping for 10 seconds");
+ // Thread.sleep(10000);
l = q.list();
- log.info("list2:"+l);
+ log.info("list2:" + l);
log.info("updating an event");
session.beginTransaction();
- Event e = (Event)l.get(0);
+ Event e = (Event) l.get(0);
e.setDate(new Date());
session.saveOrUpdate(e);
session.getTransaction().commit();
l = q.list();
- log.info("list3:"+l);
+ log.info("list3:" + l);
}
@Test
@@ -310,7 +312,7 @@ public class HibernateJUnitTest {
session.saveOrUpdate("Person", p);
session.getTransaction().commit();
assertEquals(1, session.getStatistics().getEntityCount());
- assertEquals(initSize+1, r.size());
+ assertEquals(initSize + 1, r.size());
session.beginTransaction();
p.setAge(1);
@@ -322,7 +324,7 @@ public class HibernateJUnitTest {
@Test
public void testNormalRegion() {
Properties props = new Properties();
- props.setProperty("gemfire.default-region-attributes-id", "LOCAL");
+ props.setProperty(DistributionConfig.GEMFIRE_PREFIX + "default-region-attributes-id", "LOCAL");
Session session = getSessionFactory(props).openSession();
session.beginTransaction();
Event theEvent = new Event();
@@ -332,17 +334,16 @@ public class HibernateJUnitTest {
Long id = theEvent.getId();
session.getTransaction().commit();
session.beginTransaction();
- Event ev = (Event)session.load(Event.class, id);
+ Event ev = (Event) session.load(Event.class, id);
ev.setTitle("newTitle");
session.save(ev);
session.getTransaction().commit();
}
-
+
private void printExistingDB() throws SQLException {
try {
Class.forName("org.hsqldb.jdbc.JDBCDriver");
- }
- catch (Exception e) {
+ } catch (Exception e) {
System.err.println("ERROR: failed to load HSQLDB JDBC driver.");
e.printStackTrace();
return;
@@ -379,10 +380,10 @@ public class HibernateJUnitTest {
"com.gemstone.gemfire.modules.hibernate.GemFireRegionFactory");
cfg.setProperty("hibernate.show_sql", "true");
cfg.setProperty("hibernate.cache.use_query_cache", "true");
- cfg.setProperty("gemfire.statistic-sampling-enabled", "true");
- cfg.setProperty("gemfire.log-file", gemfireLog);
- cfg.setProperty("gemfire.writable-working-dir", tmpDir.getPath());
- cfg.setProperty("gemfire.mcast-port", "0");
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + STATISTIC_SAMPLING_ENABLED, "true");
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_FILE, gemfireLog);
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + "writable-working-dir", tmpDir.getPath());
+ cfg.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
//cfg.setProperty("gemfire.cache-topology", "client-server");
SessionFactory sf = cfg.buildSessionFactory();
@@ -397,10 +398,10 @@ public class HibernateJUnitTest {
log.info("testEnum:commiting tx");
session.getTransaction().commit();
session.close();
-
+
session = sf.openSession();
Owner o1 = (Owner) session.load(Owner.class, id);
- log.info("loaded:"+o);
+ log.info("loaded:" + o);
assertEquals(o.getAddress(), o1.getAddress());
assertEquals(o.getCity(), o1.getCity());
assertEquals(o.getStatus(), o1.getStatus());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java b/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
index e3b6480..386e22f 100644
--- a/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
+++ b/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
@@ -16,26 +16,27 @@
*/
package com.gemstone.gemfire.modules;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.logging.Level;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.Region.Entry;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import junit.framework.TestCase;
-
import org.hibernate.Session;
import org.junit.Ignore;
import org.junit.experimental.categories.Category;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.logging.Level;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Ignore("Can this test be deleted?")
@Category(IntegrationTest.class)
@@ -48,8 +49,8 @@ public class SecondVMTest extends TestCase {
}
public void _testStartEmptyVM() throws IOException {
Properties gemfireProperties = new Properties();
- gemfireProperties.setProperty("mcast-port", "5555");
- gemfireProperties.setProperty("log-level", "fine");
+ gemfireProperties.setProperty(MCAST_PORT, "5555");
+ gemfireProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
Cache cache = new CacheFactory(gemfireProperties).create();
System.in.read();
Iterator it = cache.rootRegions().iterator();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java b/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java
index a3d3c10..272f3c8 100644
--- a/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java
+++ b/extensions/geode-modules-session-internal/src/main/java/com/gemstone/gemfire/modules/session/internal/filter/GemfireSessionManager.java
@@ -21,6 +21,7 @@ import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.EntryNotFoundException;
import com.gemstone.gemfire.cache.control.ResourceManager;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.modules.session.bootstrap.AbstractCache;
import com.gemstone.gemfire.modules.session.bootstrap.ClientServerCache;
@@ -61,12 +62,12 @@ public class GemfireSessionManager implements SessionManager {
/**
* Prefix of init param string used to set gemfire properties
*/
- private static final String GEMFIRE_PROPERTY = "gemfire.property.";
+ private static final String GEMFIRE_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "property.";
/**
* Prefix of init param string used to set gemfire distributedCache setting
*/
- private static final String GEMFIRE_CACHE = "gemfire.cache.";
+ private static final String GEMFIRE_CACHE = DistributionConfig.GEMFIRE_PREFIX + "cache.";
private static final String INIT_PARAM_CACHE_TYPE = "cache-type";
private static final String CACHE_TYPE_CLIENT_SERVER = "client-server";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java b/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java
index 7490fdd..7abc253 100644
--- a/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java
+++ b/extensions/geode-modules-session/src/main/java/com/gemstone/gemfire/modules/session/filter/SessionCachingFilter.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.modules.session.filter;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.modules.session.internal.filter.GemfireHttpSession;
import com.gemstone.gemfire.modules.session.internal.filter.GemfireSessionManager;
import com.gemstone.gemfire.modules.session.internal.filter.SessionManager;
@@ -24,18 +25,8 @@ import com.gemstone.gemfire.modules.session.internal.filter.util.ThreadLocalSess
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import javax.servlet.Filter;
-import javax.servlet.FilterChain;
-import javax.servlet.FilterConfig;
-import javax.servlet.ServletException;
-import javax.servlet.ServletRequest;
-import javax.servlet.ServletResponse;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletRequestWrapper;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpServletResponseWrapper;
-import javax.servlet.http.HttpSession;
+import javax.servlet.*;
+import javax.servlet.http.*;
import java.io.IOException;
import java.io.PrintStream;
import java.io.PrintWriter;
@@ -73,10 +64,10 @@ public class SessionCachingFilter implements Filter {
*/
private static AtomicInteger started =
new AtomicInteger(
- Integer.getInteger("gemfire.override.session.manager.count", 1));
+ Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "override.session.manager.count", 1));
private static int percentInactiveTimeTriggerRebuild =
- Integer.getInteger("gemfire.session.inactive.trigger.rebuild", 80);
+ Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "session.inactive.trigger.rebuild", 80);
/**
* This latch ensures that at least one thread/instance has fired up the
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
index df7fa1c..309ee4e 100644
--- a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
+++ b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationIntegrationJUnitTest.java
@@ -16,41 +16,36 @@
*/
package com.gemstone.gemfire.modules.session.internal.filter;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.ArrayList;
-import java.util.EnumSet;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.StringTokenizer;
-import java.util.concurrent.TimeUnit;
-import javax.servlet.DispatcherType;
-import javax.servlet.RequestDispatcher;
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.http.HttpSession;
-
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.modules.session.junit.PerTestClassLoaderRunner;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
+import com.gemstone.gemfire.modules.session.junit.PerTestClassLoaderRunner;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.apache.jasper.servlet.JspServlet;
+import org.eclipse.jetty.http.HttpTester;
+import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletHolder;
import org.junit.After;
import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
-import org.eclipse.jetty.servlet.FilterHolder;
-import org.eclipse.jetty.servlet.ServletHolder;
-import org.eclipse.jetty.http.HttpTester;
+
+import javax.servlet.DispatcherType;
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpSession;
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
import static org.junit.Assert.*;
@@ -85,8 +80,8 @@ public class SessionReplicationIntegrationJUnitTest {
tester.setContextPath("/test");
filterHolder = tester.addFilter(SessionCachingFilter.class, "/*", EnumSet.of(DispatcherType.REQUEST));
- filterHolder.setInitParameter("gemfire.property.mcast-port", "0");
- filterHolder.setInitParameter("gemfire.property.log-file", gemfireLogFile.getAbsolutePath());
+ filterHolder.setInitParameter(DistributionConfig.GEMFIRE_PREFIX + "property.mcast-port", "0");
+ filterHolder.setInitParameter(DistributionConfig.GEMFIRE_PREFIX + "property.log-file", gemfireLogFile.getAbsolutePath());
filterHolder.setInitParameter("cache-type", "peer-to-peer");
servletHolder = tester.addServlet(BasicServlet.class, "/hello");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java
index ba4cbd9..280169d 100644
--- a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java
+++ b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationJUnitTest.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.modules.session.internal.filter;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.mockrunner.mock.web.MockFilterConfig;
@@ -37,7 +38,7 @@ public class SessionReplicationJUnitTest extends CommonTests {
WebMockObjectFactory factory = getWebMockObjectFactory();
MockFilterConfig config = factory.getMockFilterConfig();
- config.setInitParameter("gemfire.property.mcast-port", "0");
+ config.setInitParameter(DistributionConfig.GEMFIRE_PREFIX + "property.mcast-port", "0");
config.setInitParameter("cache-type", "peer-to-peer");
factory.getMockServletContext().setContextPath(CONTEXT_PATH);
[16/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
index 7846723..5881066 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
@@ -16,20 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -39,13 +27,12 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.tier.InterestType;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableCallableIF;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
/**
* This tests the fix for bug #43407 under a variety of configurations and
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
index 672c5e6..d49b116 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
@@ -16,68 +16,16 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import javax.naming.Context;
-import javax.transaction.UserTransaction;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
-import com.gemstone.gemfire.cache.TransactionDataNodeHasDepartedException;
-import com.gemstone.gemfire.cache.TransactionDataNotColocatedException;
-import com.gemstone.gemfire.cache.TransactionEvent;
-import com.gemstone.gemfire.cache.TransactionException;
-import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.TransactionInDoubtException;
-import com.gemstone.gemfire.cache.TransactionWriter;
-import com.gemstone.gemfire.cache.TransactionWriterException;
-import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
+import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache.util.TransactionListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.AvailablePort;
@@ -86,13 +34,18 @@ import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
import com.gemstone.gemfire.internal.cache.tx.ClientTXStateStub;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import javax.naming.Context;
+import javax.transaction.UserTransaction;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getDUnitLogLevel;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
/**
* Tests the basic client-server transaction functionality
@@ -151,8 +104,8 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
af.setScope(Scope.DISTRIBUTED_ACK);
af.setDataPolicy(DataPolicy.REPLICATE);
Properties props = getDistributedSystemProperties();
- props.put("mcast-port", "0");
- props.remove("locators");
+ props.put(MCAST_PORT, "0");
+ props.remove(LOCATORS);
InternalDistributedSystem system = getSystem(props);
Cache cache = CacheFactory.create(system);
cache.createRegion(OTHER_REGION,af.create());
@@ -194,7 +147,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
// these settings were used to manually check that tx operation stats were being updated
//ccf.set(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
//ccf.set(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "clientStats.gfs");
@@ -249,12 +202,12 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
disconnectAllFromDS(); // some other VMs seem to be hanging around and have the region this tests uses
final int port1 = createRegionsAndStartServer(datastore1, false);
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
@@ -321,11 +274,11 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
final int port1 = createRegionsAndStartServer(accessor, true);
createRegionOnServer(datastore, false, false);
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(cachingProxy ? ClientRegionShortcut.CACHING_PROXY : ClientRegionShortcut.PROXY);
@@ -1380,7 +1333,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -1476,7 +1429,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost", port2);
ccf.setPoolLoadConditioningInterval(1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -1587,13 +1540,13 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
/*final TXId txid = (TXId) */client.invoke(new SerializableCallable() {
public Object call() throws Exception {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
if (port2 != 0) ccf.addPoolServer("localhost", port2);
if (port3 != 0) ccf.addPoolServer("localhost", port3);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(cachingProxy ? ClientRegionShortcut.CACHING_PROXY : ClientRegionShortcut.PROXY);
@@ -2105,7 +2058,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost", port2);
ccf.setPoolSubscriptionEnabled(false);
ccf.setPoolLoadConditioningInterval(1);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -2491,14 +2444,14 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
client.invoke(new SerializableCallable() {
public Object call() throws Exception {
disconnectFromDS();
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.addPoolServer("localhost", port2);
ccf.setPoolMinConnections(5);
ccf.setPoolLoadConditioningInterval(-1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
Region r1 = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create("r1");
Region r2 = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create("r2");
@@ -2541,12 +2494,12 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
txState.setAfterSend(new Runnable() {
public void run() {
getCache().getLogger().info("SWAP:closing cache");
- System.setProperty("gemfire.no-flush-on-close", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "no-flush-on-close", "true");
try {
mgr.removeHostedTXState((TXId) txState.getTransactionId());
getCache().close();
} finally {
- System.getProperties().remove("gemfire.no-flush-on-close");
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "no-flush-on-close");
}
}
});
@@ -2726,12 +2679,12 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
try {
client.invoke(new SerializableCallable() {
public Object call() throws Exception {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.addPoolServer("localhost", port2);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
// these settings were used to manually check that tx operation stats were being updated
//ccf.set(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
//ccf.set(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "clientStats.gfs");
@@ -3028,12 +2981,12 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
final TXId txid = (TXId) client.invoke(new SerializableCallable() {
@Override
public Object call() throws Exception {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
if (port2 != 0) ccf.addPoolServer("localhost", port2);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3168,13 +3121,13 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
/*final TXId txid = (TXId) */client.invoke(new SerializableCallable() {
public Object call() throws Exception {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.addPoolServer("localhost", port2);
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3257,12 +3210,12 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
/*final TXId txid = (TXId) */client.invoke(new SerializableCallable() {
public Object call() throws Exception {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3346,13 +3299,13 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
client2.invoke(new SerializableCallable() {
@Override
public Object call() throws Exception {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port2);
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(true);
ccf.setPoolSubscriptionRedundancy(0);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
Region r = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).addCacheListener(new ClientListener()).create(regionName);
r.registerInterestRegex(".*");
@@ -3363,12 +3316,12 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
client1.invoke(new SerializableCallable() {
@Override
public Object call() throws Exception {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set("log-level", getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
Region r = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create(regionName);
getCache().getCacheTransactionManager().begin();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapLocalJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapLocalJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapLocalJUnitTest.java
index 587aa55..4aabc5c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapLocalJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapLocalJUnitTest.java
@@ -16,26 +16,17 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import junit.framework.TestCase;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class ConcurrentMapLocalJUnitTest {
@@ -44,7 +35,7 @@ public class ConcurrentMapLocalJUnitTest {
@Before
public void setUp() throws Exception {
- this.cache = new CacheFactory().set("mcast-port", "0").set("locators", "").create();
+ this.cache = new CacheFactory().set(MCAST_PORT, "0").set(LOCATORS, "").create();
}
@After
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
index da2cc95..8a1586c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
@@ -19,24 +19,9 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import junit.framework.AssertionFailedError;
-
import com.gemstone.gemfire.Delta;
import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
@@ -46,17 +31,20 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import junit.framework.AssertionFailedError;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* tests for the concurrentMapOperations. there are more tests in ClientServerMiscDUnitTest
@@ -147,7 +135,7 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
ccf.addPoolServer("localhost", port2);
}
ccf.setPoolSubscriptionEnabled(true);
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
index 680fa84..b6d5a12 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
@@ -16,35 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.List;
-import java.util.Properties;
-
-import org.jgroups.protocols.UDP;
-
-import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroupsMessenger;
-import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
/** A test of 46438 - missing response to an update attributes message */
public class ConnectDisconnectDUnitTest extends CacheTestCase {
@@ -172,11 +151,11 @@ public class ConnectDisconnectDUnitTest extends CacheTestCase {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty("log-level", "info");
- props.setProperty("conserve-sockets", "false");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
if (LOCATOR_PORT > 0) {
- props.setProperty("start-locator", "localhost["+LOCATOR_PORT+"]");
- props.setProperty("locators", LOCATORS_STRING);
+ props.setProperty(START_LOCATOR, "localhost[" + LOCATOR_PORT + "]");
+ props.setProperty(LOCATORS, LOCATORS_STRING);
}
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
index 48f994b..7624d12 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
@@ -19,27 +19,10 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.util.Properties;
-
import com.gemstone.gemfire.DeltaTestImpl;
import com.gemstone.gemfire.InvalidDeltaException;
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
@@ -59,12 +42,13 @@ import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* @since GemFire 6.1
@@ -663,8 +647,8 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
((PoolFactoryImpl)pf).getPoolAttributes();
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(60));
@@ -736,8 +720,8 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
((PoolFactoryImpl)pf).getPoolAttributes();
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(60));
@@ -1328,8 +1312,8 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
CacheServerTestUtil.disableShufflingOfEndpoints();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.CLIENT_CONFLATION_PROP_NAME, conflate);
new DeltaPropagationDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
index dd97ab6..5469948 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
@@ -19,18 +19,9 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.DeltaTestImpl;
import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -42,12 +33,12 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -522,8 +513,8 @@ public class DeltaPropagationStatsDUnitTest extends DistributedTestCase {
public static void createClientCache(String host, Integer port)
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = new DeltaPropagationStatsDUnitTest("temp").createCache(props);
pool = PoolManager.createFactory().addServer(host, port)
.setThreadLocalConnections(true).setMinConnections(1)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
index 4ab4544..d57f706 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
@@ -16,38 +16,26 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.HeapDataOutputStream;
+import com.gemstone.gemfire.internal.InternalDataSerializer;
+import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
-
-import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.internal.Version;
-
-import junit.framework.TestCase;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
* Tests offline compaction
@@ -74,12 +62,12 @@ public class DiskOfflineCompactionJUnitTest
private void connectDSandCache() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "config"); // to keep diskPerf logs smaller
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-archive-file", "stats.gfs");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
index 7d2cc99..316813d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
@@ -16,22 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.*;
-import java.util.*;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.distributed.*;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.util.Properties;
+import java.util.Set;
-import junit.framework.TestCase;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* Tests the old disk apis to make sure they do the correct thing.
@@ -49,12 +50,12 @@ public class DiskOldAPIsJUnitTest
protected static Properties props = new Properties();
static {
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "config"); // to keep diskPerf logs smaller
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-archive-file", "stats.gfs");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
}
@Before
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
index 9669ef6..b1a67e3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
@@ -16,24 +16,25 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.util.*;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-
-import junit.framework.*;
-
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.util.test.TestUtil;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* This test is for testing Disk attributes set via xml.
@@ -69,10 +70,10 @@ public class DiskRegCacheXmlJUnitTest
dirs[2] = file3;
// Connect to the GemFire distributed system
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "test");
+ props.setProperty(SystemConfigurationProperties.NAME, "test");
String path = TestUtil.getResourcePath(getClass(), "DiskRegCacheXmlJUnitTest.xml");
- props.setProperty("mcast-port", "0");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds = DistributedSystem.connect(props);
try {
// Create the cache which causes the cache-xml-file to be parsed
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
index c0f269f..a71be75 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
@@ -16,24 +16,26 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.util.Properties;
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.xmlcache.*;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
* This test is for testing Disk attributes set programmatically
@@ -241,10 +243,10 @@ public class DiskRegCachexmlGeneratorJUnitTest extends DiskRegionTestingBase
ds.disconnect();
// Connect to the GemFire distributed system
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "DiskRegCachexmlGeneratorJUnitTest");
- props.setProperty("mcast-port", "0");
+ props.setProperty(SystemConfigurationProperties.NAME, "DiskRegCachexmlGeneratorJUnitTest");
+ props.setProperty(MCAST_PORT, "0");
String path = "DiskRegCachexmlGeneratorJUnitTest.xml";
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds = DistributedSystem.connect(props);
// Create the cache which causes the cache-xml-file to be parsed
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionClearJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionClearJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionClearJUnitTest.java
index 7e58329..dee130f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionClearJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionClearJUnitTest.java
@@ -16,36 +16,24 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Iterator;
-import java.util.Properties;
-
+import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.Assert;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
+import java.util.Iterator;
+import java.util.Properties;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
// @TODO: use DiskRegionTestingBase and DiskRegionHelperFactory
/**
@@ -74,8 +62,8 @@ public class DiskRegionClearJUnitTest {
@Before
public void setUp() throws Exception {
Properties properties = new Properties();
- properties.setProperty("mcast-port", "0");
- properties.setProperty("locators", "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
distributedSystem = DistributedSystem
.connect(properties);
cache = CacheFactory.create(distributedSystem);
@@ -202,8 +190,8 @@ public class DiskRegionClearJUnitTest {
cache.close();
distributedSystem.disconnect();
Properties properties = new Properties();
- properties.setProperty("mcast-port", "0");
- properties.setProperty("locators", "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
distributedSystem = DistributedSystem.connect(properties);
cache = CacheFactory.create(distributedSystem);
AttributesFactory factory = new AttributesFactory();
@@ -235,8 +223,8 @@ public class DiskRegionClearJUnitTest {
cache.close();
distributedSystem.disconnect();
Properties properties = new Properties();
- properties.setProperty("mcast-port", "0");
- properties.setProperty("locators", "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
distributedSystem = DistributedSystem.connect(properties);
cache = CacheFactory.create(distributedSystem);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
index b9bfa17..09f95f8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
@@ -16,21 +16,24 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DiskStoreFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
-
-import junit.framework.TestCase;
+import java.io.File;
+import java.util.Properties;
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.*;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
* This test tests Illegal arguements being passed to create disk regions. The
@@ -49,12 +52,12 @@ public class DiskRegionIllegalArguementsJUnitTest
protected static Properties props = new Properties();
static {
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "config"); // to keep diskPerf logs smaller
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-archive-file", "stats.gfs");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
}
@Before
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
index 6787d10..cac5087 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
@@ -16,24 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-
-import junit.framework.TestCase;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.CacheXmlException;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.util.test.TestUtil;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
* This test tests Illegal arguements being passed to
@@ -55,8 +51,8 @@ public class DiskRegionIllegalCacheXMLvaluesJUnitTest
dir.mkdir();
dir.deleteOnExit();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("cache-xml-file", TestUtil.getResourcePath(getClass(), path));
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), path));
ds = DistributedSystem.connect(props);
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
index bf6267b..08772a4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
@@ -20,9 +20,18 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.FileUtil;
+import com.gemstone.gemfire.internal.cache.LocalRegion.NonTXEntry;
+import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.rules.TestName;
import java.io.File;
import java.io.IOException;
@@ -30,24 +39,9 @@ import java.util.HashMap;
import java.util.Iterator;
import java.util.Properties;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.rules.TestName;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.internal.cache.LocalRegion.NonTXEntry;
-import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* All disk region unit tests extend this base class , common method to be used in
@@ -81,12 +75,12 @@ public class DiskRegionTestingBase
@Before
public void setUp() throws Exception
{
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "config"); // to keep diskPerf logs smaller
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-archive-file", "stats.gfs");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
File testingDirectory = new File("testingDirectory");
testingDirectory.mkdir();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
index 38a1c5f..f2685f6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
@@ -16,22 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.*;
-import java.util.*;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.distributed.*;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.Arrays;
+import java.util.Properties;
-import junit.framework.TestCase;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Tests DiskStoreFactory
@@ -48,12 +49,12 @@ public class DiskStoreFactoryJUnitTest
protected static Properties props = new Properties();
static {
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "config"); // to keep diskPerf logs smaller
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-archive-file", "stats.gfs");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
}
@Before
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
index 33513b9..5f4f4da 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
@@ -16,14 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -32,6 +25,8 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
private static final long serialVersionUID = 1L;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EventTrackerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EventTrackerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EventTrackerDUnitTest.java
index 38cad55..263b130 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EventTrackerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EventTrackerDUnitTest.java
@@ -16,36 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.EventTracker.BulkOpHolder;
import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.ConcurrentMap;
/**
* Tests <code>EventTracker</code> management.
@@ -204,7 +188,7 @@ public class EventTrackerDUnitTest extends CacheTestCase {
serverVM.invoke(new CacheSerializableRunnable("Create server") {
public void run2() throws CacheException {
// Set the message tracking timeout
- System.setProperty("gemfire.messageTrackingTimeout", MESSAGE_TRACKING_TIMEOUT);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "messageTrackingTimeout", MESSAGE_TRACKING_TIMEOUT);
// Create a distributed Region
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java
index ec8d46c..6bf8ec0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/EvictionTestBase.java
@@ -16,27 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAlgorithm;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.ObjectSizerImpl;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
@@ -44,14 +29,10 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.Resou
import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
import com.gemstone.gemfire.internal.cache.control.MemoryThresholds.MemoryState;
import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.util.*;
public class EvictionTestBase extends CacheTestCase {
@@ -211,7 +192,7 @@ public class EvictionTestBase extends CacheTestCase {
public static void setTolerance()
{
- System.setProperty("gemfire.memoryEventTolerance", Integer.toString(0));
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "memoryEventTolerance", Integer.toString(0));
}
public void createDistributedRegion() {
@@ -270,7 +251,7 @@ public class EvictionTestBase extends CacheTestCase {
public void createCache() {
try {
HeapMemoryMonitor.setTestDisableMemoryUpdates(true);
- System.setProperty("gemfire.memoryEventTolerance", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "memoryEventTolerance", "0");
Properties props = new Properties();
DistributedSystem ds = getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
index 8f3fc2d..c97ac23 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
@@ -16,24 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.ClientMetadataService;
@@ -47,17 +30,16 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.partitioned.fixed.QuarterPartitionResolver;
import com.gemstone.gemfire.internal.cache.partitioned.fixed.SingleHopQuarterPartitionResolver;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallableIF;
-import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class FixedPRSinglehopDUnitTest extends CacheTestCase {
@@ -387,7 +369,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
"FixedPRSinglehopDUnitTest");
Properties props = new Properties();
props = new Properties();
- props.setProperty("locators", locator);
+ props.setProperty(LOCATORS, locator);
DistributedSystem ds = test.getSystem(props);
cache = new CacheFactory(props).create(ds);
@@ -481,8 +463,8 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
public static void createClient(int port0) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new FixedPRSinglehopDUnitTest(
"FixedPRSinglehopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -507,8 +489,8 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
public static void createClient(int port0, int port1) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new FixedPRSinglehopDUnitTest(
"FixedPRSinglehopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -533,8 +515,8 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
public static void createClientWithLocator(String host, int port0) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new FixedPRSinglehopDUnitTest(
"FixedPRSinglehopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -558,8 +540,8 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
public static void createClient(int port0, int port1, int port2, int port3) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new FixedPRSinglehopDUnitTest(
"FixedPRSinglehopDUnitTest");
DistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
index feac209..ce309a1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GIIDeltaDUnitTest.java
@@ -21,60 +21,33 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.DistributionMessage;
import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.CachePerfStats;
import com.gemstone.gemfire.internal.cache.DestroyOperation.DestroyMessage;
-import com.gemstone.gemfire.internal.cache.DistributedCacheOperation;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.DistributedTombstoneOperation.TombstoneMessage;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InitialImageOperation;
import com.gemstone.gemfire.internal.cache.InitialImageOperation.GIITestHook;
import com.gemstone.gemfire.internal.cache.InitialImageOperation.GIITestHookType;
import com.gemstone.gemfire.internal.cache.InitialImageOperation.RequestImageMessage;
-import com.gemstone.gemfire.internal.cache.InitialImageOperation.RequestRVVMessage;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.LocalRegion.NonTXEntry;
-import com.gemstone.gemfire.internal.cache.TombstoneService;
import com.gemstone.gemfire.internal.cache.UpdateOperation.UpdateMessage;
import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.experimental.categories.Category;
public class GIIDeltaDUnitTest extends CacheTestCase {
@@ -2027,7 +2000,7 @@ public class GIIDeltaDUnitTest extends CacheTestCase {
SerializableRunnable createRegion = new SerializableRunnable("Create Region") {
public void run() {
try {
- String value = System.getProperty("gemfire.no-flush-on-close");
+ String value = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "no-flush-on-close");
assertNull(value);
RegionFactory f = getCache().createRegionFactory(getRegionAttributes());
// CCRegion = (LocalRegion)f.create(REGION_NAME);
@@ -2047,10 +2020,10 @@ public class GIIDeltaDUnitTest extends CacheTestCase {
public void run() {
try {
Cache cache = getCache();
- System.setProperty("gemfire.no-flush-on-close", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "no-flush-on-close", "true");
cache.close();
} finally {
- System.getProperties().remove("gemfire.no-flush-on-close");
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "no-flush-on-close");
}
}
};
[35/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 64f7cc0..32a3d73 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -17,30 +17,24 @@
package com.gemstone.gemfire.distributed.internal;
-import java.io.File;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.GemFireConfigException;
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.ConfigSource;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.util.*;
+
/**
* Provides an implementation of <code>DistributionConfig</code> that
* knows how to read the configuration file.
@@ -1146,8 +1140,8 @@ public class DistributionConfigImpl
private void computeMcastPortDefault() {
// a no-op since multicast discovery has been removed
// and the default mcast port is now zero
-
-// ConfigSource cs = getAttSourceMap().get(MCAST_PORT_NAME);
+
+ // ConfigSource cs = getAttSourceMap().get(SystemConfigurationProperties.MCAST_PORT);
// if (cs == null) {
// String locators = getLocators();
// if (locators != null && !locators.isEmpty()) {
@@ -1578,16 +1572,16 @@ public class DistributionConfigImpl
if (value == null) {
value = DEFAULT_NAME;
}
- this.name = (String)checkAttribute(NAME_NAME, value);
+ this.name = (String) checkAttribute(SystemConfigurationProperties.NAME, value);
}
public void setTcpPort(int value) {
- this.tcpPort = (Integer)checkAttribute(TCP_PORT_NAME, value);
+ this.tcpPort = (Integer) checkAttribute(TCP_PORT, value);
}
public void setMcastPort(int value) {
- this.mcastPort = (Integer)checkAttribute(MCAST_PORT_NAME, value);
+ this.mcastPort = (Integer) checkAttribute(MCAST_PORT, value);
}
public void setMcastTtl(int value) {
- this.mcastTtl = (Integer)checkAttribute(MCAST_TTL_NAME, value);
+ this.mcastTtl = (Integer) checkAttribute(MCAST_TTL, value);
}
public void setSocketLeaseTime(int value) {
this.socketLeaseTime = (Integer)checkAttribute(SOCKET_LEASE_TIME_NAME, value);
@@ -1611,19 +1605,19 @@ public class DistributionConfigImpl
}
public void setMcastAddress(InetAddress value) {
- this.mcastAddress = (InetAddress)checkAttribute(MCAST_ADDRESS_NAME, value);
+ this.mcastAddress = (InetAddress) checkAttribute(MCAST_ADDRESS, value);
}
public void setBindAddress(String value) {
- this.bindAddress = (String)checkAttribute(BIND_ADDRESS_NAME, value);
+ this.bindAddress = (String) checkAttribute(BIND_ADDRESS, value);
}
public void setServerBindAddress(String value) {
- this.serverBindAddress = (String)checkAttribute(SERVER_BIND_ADDRESS_NAME, value);
+ this.serverBindAddress = (String) checkAttribute(SERVER_BIND_ADDRESS, value);
}
public void setLocators(String value) {
if (value == null) {
value = DEFAULT_LOCATORS;
}
- this.locators = (String)checkAttribute(LOCATORS_NAME, value);
+ this.locators = (String) checkAttribute(LOCATORS, value);
}
public void setLocatorWaitTime(int value) {
@@ -1680,7 +1674,7 @@ public class DistributionConfigImpl
}
}
else {
- value = (String)checkAttribute(START_LOCATOR_NAME, value);
+ value = (String) checkAttribute(START_LOCATOR, value);
}
}
this.startLocator = value;
@@ -3074,7 +3068,7 @@ public class DistributionConfigImpl
*/
public static void main(String args[]) throws IOException {
DistributionConfigImpl cfg = new DistributionConfigImpl();
- String fileName = "gemfire.properties";
+ String fileName = DistributionConfig.GEMFIRE_PREFIX + "properties";
if (args != null && args.length > 0) {
String temp = args[0].trim();
fileName = "".equals(temp) ? fileName : temp;
@@ -3089,12 +3083,12 @@ public class DistributionConfigImpl
* to obtain a free port for your test.
*/
public void checkForDisallowedDefaults() {
- if (Boolean.getBoolean("gemfire.disallowMcastDefaults")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disallowMcastDefaults")) {
if (getMcastPort() != 0) { // it is not disabled
if (getMcastAddress().equals(DistributionConfig.DEFAULT_MCAST_ADDRESS)
&& getMcastPort() == DistributionConfig.DEFAULT_MCAST_PORT) {
throw new IllegalStateException(
- "gemfire.disallowMcastDefaults set and default address and port are being used");
+ DistributionConfig.GEMFIRE_PREFIX + "disallowMcastDefaults set and default address and port are being used");
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
index 3f002cd..29a9da7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
@@ -16,67 +16,16 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.ForcedDisconnectException;
-import com.gemstone.gemfire.IncompatibleSystemException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.SystemConnectException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.ToDataException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.admin.GemFireHealthConfig;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.Role;
import com.gemstone.gemfire.distributed.internal.locks.ElderState;
-import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.MemberFactory;
-import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.NetView;
+import com.gemstone.gemfire.distributed.internal.membership.*;
import com.gemstone.gemfire.i18n.StringId;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.OSProcess;
-import com.gemstone.gemfire.internal.SetUtils;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.admin.remote.AdminConsoleDisconnectMessage;
import com.gemstone.gemfire.internal.admin.remote.RemoteGfManagerAgent;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
@@ -92,6 +41,13 @@ import com.gemstone.gemfire.internal.tcp.Connection;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
import com.gemstone.gemfire.internal.tcp.ReenteredConnectException;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.*;
/**
* The <code>DistributionManager</code> uses a {@link
@@ -208,8 +164,8 @@ public class DistributionManager
*
* Added for normura issue 7033 - they have duplicate link local addresses on different boxes
*/
- public static volatile boolean INCLUDE_LINK_LOCAL_ADDRESSES =
- Boolean.getBoolean("gemfire.IncludeLinkLocalAddresses");
+ public static volatile boolean INCLUDE_LINK_LOCAL_ADDRESSES =
+ Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "IncludeLinkLocalAddresses");
/** The DM type for regular distribution managers */
public static final int NORMAL_DM_TYPE = 10;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/FunctionExecutionPooledExecutor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/FunctionExecutionPooledExecutor.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/FunctionExecutionPooledExecutor.java
index 92adb7a..86127b4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/FunctionExecutionPooledExecutor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/FunctionExecutionPooledExecutor.java
@@ -17,21 +17,11 @@
package com.gemstone.gemfire.distributed.internal;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.ThreadFactory;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.internal.logging.LogWriterImpl;
import java.util.List;
+import java.util.concurrent.*;
/**
* A ThreadPoolExecutor with stat support. This executor also has a
@@ -146,7 +136,7 @@ public class FunctionExecutionPooledExecutor extends ThreadPoolExecutor {
public FunctionExecutionPooledExecutor(BlockingQueue<Runnable> q, int maxPoolSize, PoolStatHelper stats, ThreadFactory tf, int msTimeout, final boolean forFnExec) {
this(initQ(q), maxPoolSize, stats, tf, msTimeout, initREH(q,forFnExec));
- final int retryFor = Integer.getInteger("gemfire.RETRY_INTERVAL", 5000).intValue();
+ final int retryFor = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "RETRY_INTERVAL", 5000).intValue();
if (!(q instanceof SynchronousQueue)) {
this.bufferQueue = q;
// create a thread that takes from bufferQueue and puts into result
@@ -216,7 +206,7 @@ public class FunctionExecutionPooledExecutor extends ThreadPoolExecutor {
* from its thread pool. Default is (30000 * 60) ms (30 minutes).
* It is not static so it can be set at runtime and pick up different values.
*/
- this(q, poolSize, stats, tf, Integer.getInteger("gemfire.IDLE_THREAD_TIMEOUT", 30000*60), false /* not for fn exec*/);
+ this(q, poolSize, stats, tf, Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "IDLE_THREAD_TIMEOUT", 30000 * 60), false /* not for fn exec*/);
}
public FunctionExecutionPooledExecutor(BlockingQueue<Runnable> q, int poolSize, PoolStatHelper stats, ThreadFactory tf, boolean forFnExec) {
@@ -225,7 +215,7 @@ public class FunctionExecutionPooledExecutor extends ThreadPoolExecutor {
* from its thread pool. Default is (30000 * 60) ms (30 minutes).
* It is not static so it can be set at runtime and pick up different values.
*/
- this(q, poolSize, stats, tf, Integer.getInteger("gemfire.IDLE_THREAD_TIMEOUT", 30000*60), forFnExec);
+ this(q, poolSize, stats, tf, Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "IDLE_THREAD_TIMEOUT", 30000 * 60), forFnExec);
}
/**
* Default timeout with no stats.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index 76a49db..9439fbb 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -17,42 +17,7 @@
package com.gemstone.gemfire.distributed.internal;
-import java.io.File;
-import java.io.IOException;
-import java.io.Reader;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.SortedSet;
-import java.util.StringTokenizer;
-import java.util.TreeSet;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.ForcedDisconnectException;
-import com.gemstone.gemfire.GemFireConfigException;
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
-import com.gemstone.gemfire.SystemConnectException;
-import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.admin.AlertLevel;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -69,21 +34,7 @@ import com.gemstone.gemfire.distributed.internal.membership.QuorumChecker;
import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
import com.gemstone.gemfire.i18n.LogWriterI18n;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.DSFIDFactory;
-import com.gemstone.gemfire.internal.DummyStatisticsImpl;
-import com.gemstone.gemfire.internal.GemFireStatSampler;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.InternalInstantiator;
-import com.gemstone.gemfire.internal.LinuxProcFsStatistics;
-import com.gemstone.gemfire.internal.LocalStatisticsImpl;
-import com.gemstone.gemfire.internal.OSProcess;
-import com.gemstone.gemfire.internal.OsStatisticsFactory;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.StatisticsImpl;
-import com.gemstone.gemfire.internal.StatisticsManager;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
-import com.gemstone.gemfire.internal.SystemTimer;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
import com.gemstone.gemfire.internal.cache.CacheConfig;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
@@ -109,6 +60,21 @@ import com.gemstone.gemfire.internal.util.concurrent.StoppableCondition;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
import com.gemstone.gemfire.management.ManagementException;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.lang.reflect.Array;
+import java.net.InetAddress;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* The concrete implementation of {@link DistributedSystem} that
@@ -122,8 +88,8 @@ public class InternalDistributedSystem
implements OsStatisticsFactory, StatisticsManager
{
private static final Logger logger = LogService.getLogger();
-
- public static final String DISABLE_MANAGEMENT_PROPERTY = "gemfire.disableManagement";
+
+ public static final String DISABLE_MANAGEMENT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "disableManagement";
/**
* If auto-reconnect is going on this will hold a reference to it
@@ -232,12 +198,12 @@ public class InternalDistributedSystem
* A property to prevent shutdown hooks from being registered with the VM.
* This is regarding bug 38407
*/
- public final static String DISABLE_SHUTDOWN_HOOK_PROPERTY = "gemfire.disableShutdownHook";
+ public final static String DISABLE_SHUTDOWN_HOOK_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "disableShutdownHook";
/**
* A property to append to existing log-file instead of truncating it.
*/
- public final static String APPEND_TO_LOG_FILE = "gemfire.append-log";
+ public final static String APPEND_TO_LOG_FILE = DistributionConfig.GEMFIRE_PREFIX + "append-log";
//////////////////// Configuration Fields ////////////////////
@@ -247,7 +213,7 @@ public class InternalDistributedSystem
/** The config object to which most configuration work is delegated */
private DistributionConfig config;
- private final boolean statsDisabled = Boolean.getBoolean("gemfire.statsDisabled");
+ private final boolean statsDisabled = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "statsDisabled");
private volatile boolean shareSockets = DistributionConfig.DEFAULT_CONSERVE_SOCKETS;
@@ -534,9 +500,9 @@ public class InternalDistributedSystem
if (this.originalConfig.getLocators().equals("")) {
if (this.originalConfig.getMcastPort() != 0) {
throw new GemFireConfigException("The "
- + DistributionConfig.LOCATORS_NAME
+ + LOCATORS
+ " attribute can not be empty when the "
- + DistributionConfig.MCAST_PORT_NAME
+ + MCAST_PORT
+ " attribute is non-zero.");
} else {
// no distribution
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 9d8e58c..7bc65c8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@ -16,36 +16,11 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.io.File;
-import java.io.IOException;
-import java.net.ConnectException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.ClientReplacementRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.GetAllServersRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.LocatorListRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.LocatorStatusRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.LocatorStatusResponse;
-import com.gemstone.gemfire.cache.client.internal.locator.QueueConnectionRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.ServerLocationRequest;
+import com.gemstone.gemfire.cache.client.internal.locator.*;
import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorMembershipListener;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.Locator;
@@ -82,6 +57,22 @@ import com.gemstone.gemfire.management.internal.configuration.handlers.SharedCon
import com.gemstone.gemfire.management.internal.configuration.messages.ConfigurationRequest;
import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusRequest;
import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusResponse;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.BIND_ADDRESS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
* Provides the implementation of a distribution <code>Locator</code>
@@ -123,7 +114,7 @@ public class InternalLocator extends Locator implements ConnectListener {
public static final String INHIBIT_DM_BANNER = "Locator.inhibitDMBanner";
/** system property name for forcing locators to be preferred as coordinators */
- public static final String LOCATORS_PREFERRED_AS_COORDINATORS = "gemfire.disable-floating-coordinator";
+ public static final String LOCATORS_PREFERRED_AS_COORDINATORS = DistributionConfig.GEMFIRE_PREFIX + "disable-floating-coordinator";
///////////////////// Instance Fields //////////////////////
@@ -543,7 +534,7 @@ public class InternalLocator extends Locator implements ConnectListener {
// set bind-address explicitly only if not wildcard and let any explicit
// value in distributedSystemProperties take precedence (#46870)
if (bindAddress != null && !bindAddress.isAnyLocalAddress()) {
- env.setProperty(DistributionConfig.BIND_ADDRESS_NAME,
+ env.setProperty(BIND_ADDRESS,
bindAddress.getHostAddress());
}
@@ -752,11 +743,11 @@ public class InternalLocator extends Locator implements ConnectListener {
}
if (setLocatorsProp) {
Properties updateEnv = new Properties();
- updateEnv.setProperty(DistributionConfig.LOCATORS_NAME, locatorsProp);
+ updateEnv.setProperty(LOCATORS, locatorsProp);
this.config.setApiProps(updateEnv);
// fix for bug 41248
String propName = DistributionConfig.GEMFIRE_PREFIX +
- DistributionConfig.LOCATORS_NAME;
+ LOCATORS;
if (System.getProperty(propName) != null) {
System.setProperty(propName, locatorsProp);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
index 6cad358..8970fda 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LocatorStats.java
@@ -16,15 +16,13 @@
*/
package com.gemstone.gemfire.distributed.internal;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
* This class maintains statistics for the locator
@@ -32,9 +30,8 @@ import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
*/
public class LocatorStats {
private static StatisticsType type;
-
-
- private static final String KNOWN_LOCATORS = "locators"; // gauge
+
+ private static final String KNOWN_LOCATORS = LOCATORS; // gauge
private static final String REQUESTS_TO_LOCATOR = "locatorRequests"; // counter
private static final String RESPONSES_FROM_LOCATOR = "locatorResponses"; // counter
private static final String ENDPOINTS_KNOWN = "servers"; // gauge
@@ -74,7 +71,7 @@ public class LocatorStats {
statName,
statDescription,
new StatisticDescriptor[] {
- f.createIntGauge(KNOWN_LOCATORS, "Number of locators known to this locator", "locators"),
+ f.createIntGauge(KNOWN_LOCATORS, "Number of locators known to this locator", LOCATORS),
f.createLongCounter(REQUESTS_TO_LOCATOR, "Number of requests this locator has received from clients", "requests"),
f.createLongCounter(RESPONSES_FROM_LOCATOR, "Number of responses this locator has sent to clients", "responses"),
f.createIntGauge(ENDPOINTS_KNOWN, "Number of servers this locator knows about", "servers"),
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
index 3920267..7f8eed6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
@@ -16,28 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.Vector;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.distributed.DistributedMember;
@@ -53,6 +31,12 @@ import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.*;
+
/**
* A <code>LonerDistributionManager</code> is a dm that never communicates
* with anyone else.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/PooledExecutorWithDMStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/PooledExecutorWithDMStats.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/PooledExecutorWithDMStats.java
index 3909474..5bb82f0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/PooledExecutorWithDMStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/PooledExecutorWithDMStats.java
@@ -17,18 +17,12 @@
package com.gemstone.gemfire.distributed.internal;
-import java.util.List;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.util.List;
+import java.util.concurrent.*;
+
/**
* A ThreadPoolExecutor with stat support.
*
@@ -148,7 +142,7 @@ public class PooledExecutorWithDMStats extends ThreadPoolExecutor {
* from its thread pool. Default is (30000 * 60) ms (30 minutes).
* It is not static so it can be set at runtime and pick up different values.
*/
- this(q, poolSize, stats, tf, Integer.getInteger("gemfire.IDLE_THREAD_TIMEOUT", 30000*60).intValue());
+ this(q, poolSize, stats, tf, Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "IDLE_THREAD_TIMEOUT", 30000 * 60).intValue());
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
index 5705689..49e11df 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
@@ -17,15 +17,6 @@
package com.gemstone.gemfire.distributed.internal;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.cache.TimeoutException;
@@ -33,6 +24,7 @@ import com.gemstone.gemfire.cache.UnsupportedVersionException;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
import com.gemstone.gemfire.distributed.internal.deadlock.MessageDependencyMonitor;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.DSFIDNotFoundException;
import com.gemstone.gemfire.internal.Version;
@@ -42,7 +34,9 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.util.Breadcrumbs;
import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
/**
* This class processes responses to {@link DistributionMessage}s. It
@@ -181,7 +175,7 @@ public class ReplyProcessor21
////////////////////// Static Methods /////////////////////
static {
- String str = System.getProperty("gemfire.ack-severe-alert-reduction-ratio", ".80");
+ String str = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "ack-severe-alert-reduction-ratio", ".80");
double ratio;
try {
ratio = Double.parseDouble(str);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
index 6df3dfe..05810e5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
@@ -16,27 +16,23 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.internal.*;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.Instantiator;
import com.gemstone.gemfire.SystemConnectException;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.InternalDataSerializer.SerializerAttributesHolder;
import com.gemstone.gemfire.internal.InternalInstantiator.InstantiatorAttributesHolder;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
/**
* A message that is sent to all other distribution manager when
@@ -213,12 +209,12 @@ public final class StartupMessage extends HighPriorityDistributionMessage implem
rejectionMessage =
LocalizedStrings.StartupMessage_REJECTED_NEW_SYSTEM_NODE_0_BECAUSE_ISTCPDISABLED_1_DOES_NOT_MATCH_THE_DISTRIBUTED_SYSTEM_IT_IS_ATTEMPTING_TO_JOIN
.toLocalizedString(new Object[] {getSender(), Boolean.valueOf(isTcpDisabled)});
- }
- else if (dm.getDistributedSystemId() != DistributionConfig.DEFAULT_DISTRIBUTED_SYSTEM_ID && distributedSystemId != DistributionConfig.DEFAULT_DISTRIBUTED_SYSTEM_ID
+ } else if (dm.getDistributedSystemId() != DistributionConfig.DEFAULT_DISTRIBUTED_SYSTEM_ID
+ && distributedSystemId != DistributionConfig.DEFAULT_DISTRIBUTED_SYSTEM_ID
&& distributedSystemId != dm.getDistributedSystemId()) {
String distributedSystemListener = System
- .getProperty("gemfire.DistributedSystemListener");
+ .getProperty(DistributionConfig.GEMFIRE_PREFIX + "DistributedSystemListener");
//this check is specific for Jayesh's use case of WAN BootStraping
if(distributedSystemListener != null){
if(-distributedSystemId != dm.getDistributedSystemId()){
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
index ac41d1c..f1caa5d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
@@ -17,57 +17,32 @@
package com.gemstone.gemfire.distributed.internal.direct;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.net.InetAddress;
-import java.net.SocketTimeoutException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Semaphore;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.ToDataException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.TimeoutException;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DirectReplyProcessor;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
-import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.cache.DirectReplyMessage;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.tcp.BaseMsgStreamer;
-import com.gemstone.gemfire.internal.tcp.ConnectExceptions;
-import com.gemstone.gemfire.internal.tcp.Connection;
-import com.gemstone.gemfire.internal.tcp.ConnectionException;
-import com.gemstone.gemfire.internal.tcp.MemberShunnedException;
-import com.gemstone.gemfire.internal.tcp.MsgStreamer;
-import com.gemstone.gemfire.internal.tcp.TCPConduit;
+import com.gemstone.gemfire.internal.tcp.*;
import com.gemstone.gemfire.internal.util.Breadcrumbs;
import com.gemstone.gemfire.internal.util.concurrent.ReentrantSemaphore;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.net.InetAddress;
+import java.net.SocketTimeoutException;
+import java.util.*;
+import java.util.concurrent.Semaphore;
/**
* DirectChannel is used to interact directly with other Direct servers to
@@ -132,7 +107,7 @@ public class DirectChannel {
}
public DirectChannel(MembershipManager mgr, DirectChannelListener listener,
- DistributionConfig dc)
+ DistributionConfig dc)
throws ConnectionException {
this.receiver = listener;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockGrantor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockGrantor.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockGrantor.java
index 969335a..d02580e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockGrantor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockGrantor.java
@@ -17,27 +17,13 @@
package com.gemstone.gemfire.distributed.internal.locks;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.cache.CommitConflictException;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
import com.gemstone.gemfire.distributed.LockServiceDestroyedException;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.MembershipListener;
import com.gemstone.gemfire.distributed.internal.locks.DLockQueryProcessor.DLockQueryMessage;
import com.gemstone.gemfire.distributed.internal.locks.DLockRequestProcessor.DLockRequestMessage;
@@ -51,6 +37,11 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantReadWriteLock;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.atomic.AtomicLong;
/**
* Provides lock grantor authority to a distributed lock service. This is
@@ -66,7 +57,7 @@ public class DLockGrantor {
public static final boolean DEBUG_SUSPEND_LOCK = // TODO:LOG:CONVERT: REMOVE THIS
Boolean.getBoolean(
- "gemfire.DLockService.DLockGrantor.debugSuspendLock");
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.DLockGrantor.debugSuspendLock");
/**
* Default wait before grantor thread will reawaken to check for expirations
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
index c0c97ff..5e9d3c5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/DLockService.java
@@ -17,33 +17,10 @@
package com.gemstone.gemfire.distributed.internal.locks;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.distributed.DistributedLockService;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.LeaseExpiredException;
-import com.gemstone.gemfire.distributed.LockNotHeldException;
-import com.gemstone.gemfire.distributed.LockServiceDestroyedException;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.distributed.*;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.ResourceEvent;
import com.gemstone.gemfire.distributed.internal.deadlock.UnsafeThreadLocal;
@@ -60,6 +37,13 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.util.StopWatch;
import com.gemstone.gemfire.internal.util.concurrent.FutureResult;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.util.*;
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Implements the distributed locking service with distributed lock grantors.
@@ -70,28 +54,28 @@ public class DLockService extends DistributedLockService {
private static final Logger logger = LogService.getLogger();
public static final long NOT_GRANTOR_SLEEP = Long.getLong(
- "gemfire.DLockService.notGrantorSleep", 100).longValue();
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.notGrantorSleep", 100).longValue();
public static final boolean DEBUG_DISALLOW_NOT_HOLDER = Boolean.getBoolean(
- "gemfire.DLockService.debug.disallowNotHolder");
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.debug.disallowNotHolder");
public static final boolean DEBUG_LOCK_REQUEST_LOOP = Boolean.getBoolean(
- "gemfire.DLockService.debug.disallowLockRequestLoop");
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.debug.disallowLockRequestLoop");
public static final int DEBUG_LOCK_REQUEST_LOOP_COUNT = Integer.getInteger(
- "gemfire.DLockService.debug.disallowLockRequestLoopCount", 20).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.debug.disallowLockRequestLoopCount", 20).intValue();
public static final boolean DEBUG_NONGRANTOR_DESTROY_LOOP = Boolean.getBoolean(
- "gemfire.DLockService.debug.nonGrantorDestroyLoop");
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.debug.nonGrantorDestroyLoop");
public static final int DEBUG_NONGRANTOR_DESTROY_LOOP_COUNT = Integer.getInteger(
- "gemfire.DLockService.debug.nonGrantorDestroyLoopCount", 20).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.debug.nonGrantorDestroyLoopCount", 20).intValue();
public static final boolean DEBUG_ENFORCE_SAFE_EXIT = Boolean.getBoolean(
- "gemfire.DLockService.debug.enforceSafeExit");
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.debug.enforceSafeExit");
public static final boolean AUTOMATE_FREE_RESOURCES = Boolean.getBoolean(
- "gemfire.DLockService.automateFreeResources");
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.automateFreeResources");
public static final int INVALID_LEASE_ID = -1;
@@ -2904,7 +2888,7 @@ public class DLockService extends DistributedLockService {
* Specifies the starting serial number for the serialNumberSequencer
*/
public static final int START_SERIAL_NUMBER = Integer.getInteger(
- "gemfire.DistributedLockService.startSerialNumber", 1).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "DistributedLockService.startSerialNumber", 1).intValue();
/**
* Incrementing serial number used to identify order of DLS creation
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/LockGrantorId.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/LockGrantorId.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/LockGrantorId.java
index 49fdd07..448c382 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/LockGrantorId.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/LockGrantorId.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.distributed.internal.locks;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -28,7 +29,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
public class LockGrantorId {
public static final int ROLLOVER_MARGIN = Integer.getInteger(
- "gemfire.DLockService.LockGrantorId.rolloverMargin", 10000).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "DLockService.LockGrantorId.rolloverMargin", 10000).intValue();
private final DM dm;
private final InternalDistributedMember lockGrantorMember;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
index a63cfb4..2d8b8e1 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
@@ -16,22 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal.membership;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.EOFException;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.net.Inet4Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.cache.UnsupportedVersionException;
@@ -39,16 +23,18 @@ import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DurableClientAttributes;
import com.gemstone.gemfire.distributed.Role;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.ProfileId;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.OSProcess;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.io.*;
+import java.net.Inet4Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
/**
* This is the fundamental representation of a member of a GemFire distributed
* system.
@@ -61,7 +47,7 @@ public class InternalDistributedMember
private final static long serialVersionUID = -2785249969777296507L;
// whether to show NetMember components in toString()
- private final boolean SHOW_NETMEMBER = Boolean.getBoolean("gemfire.show_netmembers");
+ private final boolean SHOW_NETMEMBER = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "show_netmembers");
protected NetMember netMbr; // the underlying member object, e.g. from JGroups
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
index c2223f8..013ef35 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
@@ -16,9 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal.membership;
-import java.io.File;
-import java.net.InetAddress;
-
import com.gemstone.gemfire.distributed.internal.DMStats;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.LocatorStats;
@@ -26,6 +23,9 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMemberFactory
import com.gemstone.gemfire.distributed.internal.membership.gms.NetLocator;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
+import java.io.File;
+import java.net.InetAddress;
+
/**
* Create a new Member based on the given inputs.
* TODO: need to implement a real factory implementation based on gemfire.properties
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
index a1240f4..7f48e46 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
@@ -16,16 +16,15 @@
*/
package com.gemstone.gemfire.distributed.internal.membership;
-import java.io.File;
-import java.net.InetAddress;
-
-import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.distributed.internal.DMStats;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.LocatorStats;
import com.gemstone.gemfire.distributed.internal.membership.gms.NetLocator;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
+import java.io.File;
+import java.net.InetAddress;
+
/**
* This is the SPI for a provider of membership services.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
index 6089eb8..d5d0b8e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
@@ -16,21 +16,21 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.jgroups.util.UUID;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.distributed.DurableClientAttributes;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
import com.gemstone.gemfire.distributed.internal.membership.NetMember;
import com.gemstone.gemfire.internal.DataSerializableFixedID;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import org.jgroups.util.UUID;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
/**
* This is the fundamental representation of a member of a GemFire distributed system.
@@ -46,7 +46,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
*/
public class GMSMember implements NetMember, DataSerializableFixedID {
// whether to show UUID info in toString()
- private final static boolean SHOW_UUIDS = Boolean.getBoolean("gemfire.show_UUIDs");
+ private final static boolean SHOW_UUIDS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "show_UUIDs");
private int udpPort=0;
private boolean preferredForCoordinator;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
index 2063d7c..4328bed 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
@@ -16,21 +16,13 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms;
-import java.io.File;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
import com.gemstone.gemfire.GemFireConfigException;
import com.gemstone.gemfire.SystemConnectException;
import com.gemstone.gemfire.distributed.internal.DMStats;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionException;
import com.gemstone.gemfire.distributed.internal.LocatorStats;
-import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
-import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
-import com.gemstone.gemfire.distributed.internal.membership.MemberServices;
-import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.NetMember;
+import com.gemstone.gemfire.distributed.internal.membership.*;
import com.gemstone.gemfire.distributed.internal.membership.gms.locator.GMSLocator;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.Version;
@@ -40,6 +32,10 @@ import com.gemstone.gemfire.internal.tcp.ConnectionException;
import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.security.AuthenticationRequiredException;
+import java.io.File;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
/**
* Create a new Member based on the given inputs.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/ServiceConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/ServiceConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/ServiceConfig.java
index 3a48c3f..2a41574 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/ServiceConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/ServiceConfig.java
@@ -16,19 +16,18 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms;
-import java.net.InetAddress;
-
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
+import java.net.InetAddress;
+
public class ServiceConfig {
/** stall time to wait for concurrent join/leave/remove requests to be received */
- public static final long MEMBER_REQUEST_COLLECTION_INTERVAL = Long.getLong("gemfire.member-request-collection-interval", 300);
+ public static final long MEMBER_REQUEST_COLLECTION_INTERVAL = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "member-request-collection-interval", 300);
/** various settings from Geode configuration */
private long joinTimeout;
@@ -190,13 +189,13 @@ public class ServiceConfig {
} else if (ackCollectionTimeout > 12437) {
ackCollectionTimeout = 12437;
}
- ackCollectionTimeout = Integer.getInteger("gemfire.VIEW_ACK_TIMEOUT", ackCollectionTimeout).intValue();
+ ackCollectionTimeout = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "VIEW_ACK_TIMEOUT", ackCollectionTimeout).intValue();
- lossThreshold = Integer.getInteger("gemfire.network-partition-threshold", 51);
+ lossThreshold = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "network-partition-threshold", 51);
if (lossThreshold < 51) lossThreshold = 51;
if (lossThreshold > 100) lossThreshold = 100;
-
- memberWeight = Integer.getInteger("gemfire.member-weight", 0);
+
+ memberWeight = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "member-weight", 0);
locatorWaitTime = theConfig.getLocatorWaitTime();
networkPartitionDetectionEnabled = theConfig.getEnableNetworkPartitionDetection();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
index 4f5a1a4..bc59180 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/Services.java
@@ -16,10 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms;
-import java.util.Timer;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.ForcedDisconnectException;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
@@ -32,12 +28,7 @@ import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
import com.gemstone.gemfire.distributed.internal.membership.NetView;
import com.gemstone.gemfire.distributed.internal.membership.gms.auth.GMSAuthenticator;
import com.gemstone.gemfire.distributed.internal.membership.gms.fd.GMSHealthMonitor;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Authenticator;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.HealthMonitor;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.JoinLeave;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Locator;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Manager;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.*;
import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave;
import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroupsMessenger;
import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
@@ -46,6 +37,9 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.security.AuthenticationFailedException;
+import org.apache.logging.log4j.Logger;
+
+import java.util.Timer;
public class Services {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
index 741eb2c..6fca8b7 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticator.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.distributed.internal.membership.gms.auth;
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.NetView;
import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
@@ -35,22 +37,14 @@ import java.security.Principal;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.*;
// static messages
-import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.HandShake_AUTHENTICATOR_INSTANCE_COULD_NOT_BE_OBTAINED;
-import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.HandShake_FAILED_TO_ACQUIRE_AUTHENTICATOR_OBJECT;
-import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.HandShake_FAILED_TO_ACQUIRE_AUTHINITIALIZE_METHOD_0;
-import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.AUTH_PEER_AUTHENTICATION_FAILED_WITH_EXCEPTION;
-import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.AUTH_PEER_AUTHENTICATION_FAILED;
-import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.AUTH_PEER_AUTHENTICATION_MISSING_CREDENTIALS;
-import static com.gemstone.gemfire.internal.i18n.LocalizedStrings.AUTH_FAILED_TO_ACQUIRE_AUTHINITIALIZE_INSTANCE;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME;
public class GMSAuthenticator implements Authenticator {
- private final static String secPrefix = "gemfire.sys.security-";
- private final static int gemfireSysPrefixLen = "gemfire.sys.".length();
+ private final static String secPrefix = DistributionConfig.GEMFIRE_PREFIX + "sys.security-";
+ private final static int gemfireSysPrefixLen = (DistributionConfig.GEMFIRE_PREFIX + "sys.").length();
private Services services;
private Properties securityProps = getSecurityProps();
@@ -119,7 +113,7 @@ public class GMSAuthenticator implements Authenticator {
*/
String authenticate(DistributedMember member, Object credentials, Properties secProps, DistributedMember localMember) throws AuthenticationFailedException {
- String authMethod = secProps.getProperty(SECURITY_PEER_AUTHENTICATOR_NAME);
+ String authMethod = secProps.getProperty(SystemConfigurationProperties.SECURITY_PEER_AUTHENTICATOR);
if (authMethod == null || authMethod.length() == 0) {
return null;
}
@@ -186,7 +180,7 @@ public class GMSAuthenticator implements Authenticator {
return getCredentials(member, securityProps);
} catch (Exception e) {
- String authMethod = securityProps.getProperty(SECURITY_PEER_AUTH_INIT_NAME);
+ String authMethod = securityProps.getProperty(SystemConfigurationProperties.SECURITY_PEER_AUTH_INIT);
services.getSecurityLogWriter().warning(LocalizedStrings.AUTH_FAILED_TO_OBTAIN_CREDENTIALS_IN_0_USING_AUTHINITIALIZE_1_2, new Object[] { authMethod, e.getLocalizedMessage() });
return null;
}
@@ -197,7 +191,7 @@ public class GMSAuthenticator implements Authenticator {
*/
Properties getCredentials(DistributedMember member, Properties secProps) {
Properties credentials = null;
- String authMethod = secProps.getProperty(SECURITY_PEER_AUTH_INIT_NAME);
+ String authMethod = secProps.getProperty(SystemConfigurationProperties.SECURITY_PEER_AUTH_INIT);
try {
if (authMethod != null && authMethod.length() > 0) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index e12740e..d618dce 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -35,7 +35,6 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.locator.FindCoor
import com.gemstone.gemfire.distributed.internal.membership.gms.locator.FindCoordinatorResponse;
import com.gemstone.gemfire.distributed.internal.membership.gms.messages.*;
import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
-import com.gemstone.gemfire.internal.CopyOnWriteHashSet;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.security.AuthenticationFailedException;
@@ -47,6 +46,8 @@ import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
import static com.gemstone.gemfire.distributed.internal.membership.gms.ServiceConfig.MEMBER_REQUEST_COLLECTION_INTERVAL;
import static com.gemstone.gemfire.internal.DataSerializableFixedID.*;
@@ -57,32 +58,32 @@ import static com.gemstone.gemfire.internal.DataSerializableFixedID.*;
*/
public class GMSJoinLeave implements JoinLeave, MessageHandler {
- public static final String BYPASS_DISCOVERY_PROPERTY = "gemfire.bypass-discovery";
+ public static final String BYPASS_DISCOVERY_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "bypass-discovery";
/**
* amount of time to wait for responses to FindCoordinatorRequests
*/
- private static final int DISCOVERY_TIMEOUT = Integer.getInteger("gemfire.discovery-timeout", 3000);
+ private static final int DISCOVERY_TIMEOUT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "discovery-timeout", 3000);
/**
* amount of time to sleep before trying to join after a failed attempt
*/
- private static final int JOIN_RETRY_SLEEP = Integer.getInteger("gemfire.join-retry-sleep", 1000);
+ private static final int JOIN_RETRY_SLEEP = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "join-retry-sleep", 1000);
/**
* time to wait for a broadcast message to be transmitted by jgroups
*/
- private static final long BROADCAST_MESSAGE_SLEEP_TIME = Long.getLong("gemfire.broadcast-message-sleep-time", 1000);
+ private static final long BROADCAST_MESSAGE_SLEEP_TIME = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "broadcast-message-sleep-time", 1000);
/**
* if the locators don't know who the coordinator is we send find-coord requests to this many nodes
*/
- private static final int MAX_DISCOVERY_NODES = Integer.getInteger("gemfire.max-discovery-nodes", 30);
+ private static final int MAX_DISCOVERY_NODES = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "max-discovery-nodes", 30);
/**
* interval for broadcasting the current view to members in case they didn't get it the first time
*/
- private static final long VIEW_BROADCAST_INTERVAL = Long.getLong("gemfire.view-broadcast-interval", 60000);
+ private static final long VIEW_BROADCAST_INTERVAL = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "view-broadcast-interval", 60000);
/**
* membership logger
@@ -1491,7 +1492,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
if (dc.getMcastPort() != 0 && dc.getLocators().trim().isEmpty() && dc.getStartLocator().trim().isEmpty()) {
throw new GemFireConfigException(
"Multicast cannot be configured for a non-distributed cache." + " Please configure the locator services for this cache using "
- + DistributionConfig.LOCATORS_NAME + " or " + DistributionConfig.START_LOCATOR_NAME + ".");
+ + LOCATORS + " or " + START_LOCATOR + ".");
}
services.getMessenger().addHandler(JoinRequestMessage.class, this);
@@ -1512,7 +1513,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
} else if (ackCollectionTimeout > 12437) {
ackCollectionTimeout = 12437;
}
- ackCollectionTimeout = Integer.getInteger("gemfire.VIEW_ACK_TIMEOUT", ackCollectionTimeout).intValue();
+ ackCollectionTimeout = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "VIEW_ACK_TIMEOUT", ackCollectionTimeout).intValue();
this.viewAckTimeout = ackCollectionTimeout;
this.quorumRequired = services.getConfig().getDistributionConfig().getEnableNetworkPartitionDetection();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGAddress.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGAddress.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGAddress.java
index 6ddafa0..1f97001 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGAddress.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGAddress.java
@@ -16,24 +16,18 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
-import org.jgroups.Address;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
+import com.gemstone.gemfire.internal.SocketCreator;
import org.jgroups.Global;
import org.jgroups.stack.IpAddress;
import org.jgroups.util.UUID;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
-import com.gemstone.gemfire.internal.SocketCreator;
+import java.io.*;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
/**
* This is a copy of JGroups 3.6.4 IpAddress (Apache 2.0 License)
@@ -46,7 +40,7 @@ public class JGAddress extends UUID {
private static final long serialVersionUID=-1818672332115113291L;
// whether to show UUID info in toString()
- private final static boolean SHOW_UUIDS = Boolean.getBoolean("gemfire.show_UUIDs");
+ private final static boolean SHOW_UUIDS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "show_UUIDs");
private InetAddress ip_addr;
private int port;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 0460964..fc81049 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -16,62 +16,10 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.messenger;
-import static com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil.replaceStrings;
-import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_REQUEST;
-import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_RESPONSE;
-
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.lang.reflect.Field;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-import org.jgroups.Address;
-import org.jgroups.Event;
-import org.jgroups.JChannel;
-import org.jgroups.Message;
-import org.jgroups.Message.Flag;
-import org.jgroups.Message.TransientFlag;
-import org.jgroups.ReceiverAdapter;
-import org.jgroups.View;
-import org.jgroups.ViewId;
-import org.jgroups.conf.ClassConfigurator;
-import org.jgroups.protocols.UDP;
-import org.jgroups.protocols.pbcast.NAKACK2;
-import org.jgroups.stack.IpAddress;
-import org.jgroups.util.Digest;
-import org.jgroups.util.UUID;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.ForcedDisconnectException;
-import com.gemstone.gemfire.GemFireConfigException;
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.SystemConnectException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
import com.gemstone.gemfire.distributed.DurableClientAttributes;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.HighPriorityDistributionMessage;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
import com.gemstone.gemfire.distributed.internal.membership.NetView;
@@ -82,12 +30,8 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messa
import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinRequestMessage;
import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinResponseMessage;
-import com.gemstone.gemfire.internal.ClassPathLoader;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.OSProcess;
-import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.VersionedDataInputStream;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
import com.gemstone.gemfire.internal.cache.DirectReplyMessage;
import com.gemstone.gemfire.internal.cache.DistributedCacheOperation;
@@ -95,8 +39,30 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.tcp.MemberShunnedException;
-
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
+import org.apache.logging.log4j.Logger;
+import org.jgroups.*;
+import org.jgroups.Message.Flag;
+import org.jgroups.Message.TransientFlag;
+import org.jgroups.conf.ClassConfigurator;
+import org.jgroups.protocols.UDP;
+import org.jgroups.protocols.pbcast.NAKACK2;
+import org.jgroups.stack.IpAddress;
+import org.jgroups.util.Digest;
+import org.jgroups.util.UUID;
+
+import java.io.*;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil.replaceStrings;
+import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_REQUEST;
+import static com.gemstone.gemfire.internal.DataSerializableFixedID.JOIN_RESPONSE;
public class JGroupsMessenger implements Messenger {
@@ -209,7 +175,8 @@ public class JGroupsMessenger implements Messenger {
properties = replaceStrings(properties, "MCAST_TTL", String.valueOf(dc.getMcastTtl()));
properties = replaceStrings(properties, "MCAST_SEND_BUFFER_SIZE", String.valueOf(dc.getMcastSendBufferSize()));
properties = replaceStrings(properties, "MCAST_RECV_BUFFER_SIZE", String.valueOf(dc.getMcastRecvBufferSize()));
- properties = replaceStrings(properties, "MCAST_RETRANSMIT_INTERVAL", ""+Integer.getInteger("gemfire.mcast-retransmit-interval", 500));
+ properties = replaceStrings(properties, "MCAST_RETRANSMIT_INTERVAL",
+ "" + Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "mcast-retransmit-interval", 500));
properties = replaceStrings(properties, "RETRANSMIT_LIMIT", String.valueOf(dc.getUdpFragmentSize()-256));
}
@@ -233,7 +200,7 @@ public class JGroupsMessenger implements Messenger {
}
properties = replaceStrings(properties, "BIND_ADDR_SETTING", "bind_addr=\""+str+"\"");
- int port = Integer.getInteger("gemfire.jg-bind-port", 0);
+ int port = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "jg-bind-port", 0);
if (port != 0) {
properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE_START", ""+port);
properties = replaceStrings(properties, "MEMBERSHIP_PORT_RANGE", ""+0);
[60/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8975cbdf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8975cbdf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8975cbdf
Branch: refs/heads/develop
Commit: 8975cbdf298964eccaaeb9f3777a6624a54ae26c
Parents: cb29153
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue May 31 11:34:28 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../internal/web/RestInterfaceJUnitTest.java | 11 +-
.../web/controllers/RestAPITestBase.java | 10 +-
.../RestAPIsAndInterOpsDUnitTest.java | 21 +-
...APIsOnMembersFunctionExecutionDUnitTest.java | 11 +-
.../RestAPIsQueryAndFEJUnitTest.java | 11 +-
.../controllers/RestAPIsWithSSLDUnitTest.java | 106 ++---
.../gemfire/admin/DistributedSystemConfig.java | 9 +-
.../internal/DistributedSystemConfigImpl.java | 2 +-
.../gemfire/distributed/DistributedSystem.java | 6 -
.../SystemConfigurationProperties.java | 41 +-
.../internal/AbstractDistributionConfig.java | 10 +-
.../internal/DistributionConfig.java | 383 ++++++++++---------
.../internal/DistributionConfigImpl.java | 144 +++----
.../internal/RuntimeDistributionConfigImpl.java | 2 +-
.../gemfire/internal/AbstractConfig.java | 4 +-
.../admin/remote/RemoteTransportConfig.java | 2 +-
.../internal/cache/CacheServerLauncher.java | 2 +-
.../cache/tier/sockets/AcceptorImpl.java | 7 +-
.../cache/tier/sockets/CacheClientNotifier.java | 8 +-
.../internal/cache/tier/sockets/HandShake.java | 6 +-
.../cache/tier/sockets/ServerConnection.java | 5 +-
.../tier/sockets/ServerHandShakeProcessor.java | 10 +-
.../internal/security/GeodeSecurityUtil.java | 6 +-
.../security/shiro/CustomAuthRealm.java | 8 +-
.../gemfire/internal/tcp/Connection.java | 6 +-
.../cli/commands/LauncherLifecycleCommands.java | 1 +
.../internal/cli/shell/JmxOperationInvoker.java | 6 +-
.../CacheServerSSLConnectionDUnitTest.java | 44 +--
.../internal/SSLNoClientAuthDUnitTest.java | 39 +-
.../MemoryThresholdsOffHeapDUnitTest.java | 6 +-
.../QueryParamsAuthorizationDUnitTest.java | 4 +-
.../cache/snapshot/RegionSnapshotJUnitTest.java | 4 +-
.../gemfire/cache30/Bug38741DUnitTest.java | 5 +-
.../gemfire/cache30/CacheLogRollDUnitTest.java | 4 +-
.../cache30/CacheXmlGeode10DUnitTest.java | 10 +-
...tedAckOverflowRegionCCEOffHeapDUnitTest.java | 5 +-
...dAckPersistentRegionCCEOffHeapDUnitTest.java | 5 +-
.../DistributedAckRegionCCEDUnitTest.java | 2 +-
...DistributedAckRegionCCEOffHeapDUnitTest.java | 4 +-
.../DistributedAckRegionOffHeapDUnitTest.java | 5 +-
...stributedNoAckRegionCCEOffHeapDUnitTest.java | 5 +-
.../DistributedNoAckRegionOffHeapDUnitTest.java | 4 +-
.../cache30/GlobalRegionCCEDUnitTest.java | 2 +-
.../GlobalRegionCCEOffHeapDUnitTest.java | 5 +-
.../cache30/GlobalRegionOffHeapDUnitTest.java | 5 +-
.../OffHeapLRUEvictionControllerDUnitTest.java | 5 +-
.../PartitionedRegionOffHeapDUnitTest.java | 5 +-
.../AbstractLauncherIntegrationTest.java | 5 +-
.../distributed/DistributedMemberDUnitTest.java | 6 +-
.../gemfire/distributed/LocatorDUnitTest.java | 12 +-
.../gemfire/distributed/LocatorJUnitTest.java | 14 +-
.../LocatorLauncherLocalIntegrationTest.java | 4 +-
.../ServerLauncherLocalIntegrationTest.java | 4 +-
.../internal/DistributionConfigJUnitTest.java | 42 +-
.../InternalDistributedSystemJUnitTest.java | 4 +-
.../membership/MembershipJUnitTest.java | 2 +-
.../gms/auth/GMSAuthenticatorJUnitTest.java | 35 +-
.../internal/SSLConfigIntegrationJUnitTest.java | 5 +-
.../cache/ClientServerGetAllDUnitTest.java | 6 +-
.../cache/DeltaPropagationStatsDUnitTest.java | 6 +-
...DistrbutedRegionProfileOffHeapDUnitTest.java | 15 +-
.../internal/cache/GridAdvisorDUnitTest.java | 4 +-
.../cache/OffHeapEvictionDUnitTest.java | 5 +-
.../cache/OffHeapEvictionStatsDUnitTest.java | 5 +-
.../cache/P2PDeltaPropagationDUnitTest.java | 5 +-
.../PRDataStoreMemoryOffHeapJUnitTest.java | 5 +-
...gionBucketCreationDistributionDUnitTest.java | 7 +-
...nedRegionLocalMaxMemoryOffHeapDUnitTest.java | 5 +-
...rtitionedRegionOffHeapEvictionDUnitTest.java | 5 +-
...artitionedRegionRedundancyZoneDUnitTest.java | 5 +-
.../control/MemoryMonitorOffHeapJUnitTest.java | 5 +-
.../control/RebalanceOperationDUnitTest.java | 5 +-
...ributedRegionFunctionExecutionDUnitTest.java | 2 +-
.../OnGroupsFunctionExecutionDUnitTest.java | 2 +-
.../cache/ha/HASlowReceiverDUnitTest.java | 6 +-
.../tier/sockets/ClientConflationDUnitTest.java | 4 +-
.../sockets/ClientInterestNotifyDUnitTest.java | 61 +--
...ForceInvalidateOffHeapEvictionDUnitTest.java | 5 +-
.../tier/sockets/InterestListDUnitTest.java | 8 +-
.../cache/wan/AsyncEventQueueTestBase.java | 9 +-
...ompressionCacheListenerOffHeapDUnitTest.java | 4 +-
...ressionRegionOperationsOffHeapDUnitTest.java | 4 +-
.../DistributedSystemLogFileJUnitTest.java | 24 +-
.../logging/LocatorLogFileJUnitTest.java | 2 +-
.../offheap/OutOfOffHeapMemoryDUnitTest.java | 4 +-
.../management/CacheManagementDUnitTest.java | 4 +-
.../DataBrowserJSONValidationJUnitTest.java | 8 +-
.../management/LocatorManagementDUnitTest.java | 20 +-
.../gemfire/management/ManagementTestBase.java | 8 +-
.../management/OffHeapManagementDUnitTest.java | 11 +-
.../stats/DistributedSystemStatsJUnitTest.java | 8 +-
.../internal/cli/CliUtilDUnitTest.java | 14 +-
.../cli/commands/CliCommandTestBase.java | 12 +-
...eateAlterDestroyRegionCommandsDUnitTest.java | 14 +-
.../cli/commands/DeployCommandsDUnitTest.java | 14 +-
.../commands/DiskStoreCommandsDUnitTest.java | 18 +-
.../cli/commands/FunctionCommandsDUnitTest.java | 30 +-
.../commands/HelpCommandsIntegrationTest.java | 10 +-
.../cli/commands/IndexCommandsDUnitTest.java | 10 +-
.../ListAndDescribeRegionDUnitTest.java | 2 +-
.../cli/commands/MemberCommandsDUnitTest.java | 2 +-
.../MiscellaneousCommandsDUnitTest.java | 8 +-
...laneousCommandsExportLogsPart3DUnitTest.java | 4 +-
.../cli/commands/QueueCommandsDUnitTest.java | 10 +-
.../cli/commands/ShowStackTraceDUnitTest.java | 2 +-
.../GeodeSecurityUtilCustomRealmJUnitTest.java | 6 +-
.../GeodeSecurityUtilWithIniFileJUnitTest.java | 4 +-
.../JsonAuthorizationCacheStartRule.java | 15 +-
.../internal/security/MultiUserDUnitTest.java | 1 -
.../internal/security/ShiroCacheStartRule.java | 14 +-
.../gemfire/memcached/IntegrationJUnitTest.java | 9 +-
.../pdx/DistributedSystemIdDUnitTest.java | 4 +-
.../pdx/JSONPdxClientServerDUnitTest.java | 5 +-
.../gemfire/pdx/PdxClientServerDUnitTest.java | 5 +-
.../gemfire/pdx/PdxInstanceJUnitTest.java | 5 +-
.../generator/LdapUserCredentialGenerator.java | 8 +-
.../test/dunit/DistributedTestUtils.java | 7 +-
.../test/dunit/standalone/DUnitLauncher.java | 4 +-
.../com/main/WANBootStrapping_Site1_Add.java | 2 +-
.../com/main/WANBootStrapping_Site1_Remove.java | 4 +-
.../com/main/WANBootStrapping_Site2_Add.java | 4 +-
.../com/main/WANBootStrapping_Site2_Remove.java | 4 +-
.../cache/query/cq/dunit/CqStateDUnitTest.java | 6 +-
.../sockets/ClientToServerDeltaDUnitTest.java | 6 +-
.../CacheServerManagementDUnitTest.java | 2 +-
.../IndexRepositoryImplPerformanceTest.java | 1 +
.../gemfire/tools/pulse/tests/Server.java | 7 +-
.../internal/cache/UpdateVersionDUnitTest.java | 6 +-
.../gemfire/internal/cache/wan/WANTestBase.java | 81 ++--
.../wan/misc/NewWanAuthenticationDUnitTest.java | 4 +-
.../wan/misc/WANLocatorServerDUnitTest.java | 2 +-
.../wan/wancommand/WANCommandTestBase.java | 12 +-
.../WanCommandCreateGatewaySenderDUnitTest.java | 24 +-
.../WanCommandGatewaySenderStartDUnitTest.java | 16 +-
.../WanCommandGatewaySenderStopDUnitTest.java | 14 +-
.../wan/wancommand/WanCommandListDUnitTest.java | 14 +-
.../WanCommandPauseResumeDUnitTest.java | 24 +-
137 files changed, 940 insertions(+), 946 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
index 62131fe..c82b481 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
@@ -111,10 +111,9 @@ public class RestInterfaceJUnitTest {
.set("name", getClass().getSimpleName())
.set(MCAST_PORT, "0")
.set(LOG_LEVEL, "config")
- .set(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, "localhost")
- .set(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(getHttpServicePort()))
- //.set("http-service-ssl-enabled", "false")
- .set(DistributionConfig.START_DEV_REST_API_NAME, "true")
+ .set(HTTP_SERVICE_BIND_ADDRESS, "localhost")
+ .set(HTTP_SERVICE_PORT, String.valueOf(getHttpServicePort()))
+ .set(START_DEV_REST_API, "true")
.create();
RegionFactory<String, Object> peopleRegionFactory = gemfireCache.createRegionFactory();
@@ -134,11 +133,11 @@ public class RestInterfaceJUnitTest {
protected synchronized int getHttpServicePort() {
try {
- return Integer.parseInt(StringUtils.trimWhitespace(gemfireProperties.getProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME)));
+ return Integer.parseInt(StringUtils.trimWhitespace(gemfireProperties.getProperty(HTTP_SERVICE_PORT)));
}
catch (NumberFormatException ignore) {
int httpServicePort = getHttpServicePort(DEFAULT_HTTP_SERVICE_PORT);
- gemfireProperties.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpServicePort));
+ gemfireProperties.setProperty(HTTP_SERVICE_PORT, String.valueOf(httpServicePort));
return httpServicePort;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
index 2eddddc..52d4f09 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
@@ -47,6 +47,8 @@ import java.util.List;
import java.util.Properties;
import java.util.Random;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class RestAPITestBase extends DistributedTestCase {
protected Cache cache = null;
protected List<String> restURLs = new ArrayList();
@@ -109,12 +111,12 @@ public class RestAPITestBase extends DistributedTestCase {
Properties props = new Properties();
if (groups != null) {
- props.put(DistributionConfig.GROUPS_NAME, groups);
+ props.put(GROUPS, groups);
}
- props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
- props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(servicePort));
+ props.setProperty(START_DEV_REST_API, "true");
+ props.setProperty(HTTP_SERVICE_BIND_ADDRESS, hostName);
+ props.setProperty(HTTP_SERVICE_PORT, String.valueOf(servicePort));
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
index 8e0286a..27e2780 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
@@ -50,8 +50,7 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Dunit Test containing inter - operations between REST Client and Gemfire cache client
@@ -183,9 +182,9 @@ public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(0));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
- props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(restServicerPort));
+ props.setProperty(START_DEV_REST_API, "true");
+ props.setProperty(HTTP_SERVICE_BIND_ADDRESS, hostName);
+ props.setProperty(HTTP_SERVICE_PORT, String.valueOf(restServicerPort));
DistributedSystem ds = getSystem(props);
Cache cache = CacheFactory.create(ds);
@@ -835,15 +834,15 @@ public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
.setProperty(MCAST_PORT, String.valueOf(0));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "true");
+ props.setProperty(JMX_MANAGER_PORT, "0");
final int httpPort = AvailablePortHelper.getRandomAvailableTCPPort();
//Set REST service related configuration
- props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, "localhost");
- props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+ props.setProperty(START_DEV_REST_API, "true");
+ props.setProperty(HTTP_SERVICE_BIND_ADDRESS, "localhost");
+ props.setProperty(HTTP_SERVICE_PORT, String.valueOf(httpPort));
DistributedSystem ds = getSystem(props);
Cache cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
index c650e27..cca3959 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
@@ -21,13 +21,12 @@ import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.execute.FunctionContext;
import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
import org.apache.http.client.methods.CloseableHttpResponse;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase {
@@ -74,10 +73,10 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
final int servicePort = AvailablePortHelper.getRandomAvailableTCPPort();
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, memberName);
- props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
- props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(servicePort));
+ props.setProperty(NAME, memberName);
+ props.setProperty(START_DEV_REST_API, "true");
+ props.setProperty(HTTP_SERVICE_BIND_ADDRESS, hostName);
+ props.setProperty(HTTP_SERVICE_PORT, String.valueOf(servicePort));
Cache c = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
index 1789c98..3bceea5 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.rest.internal.web.controllers;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.distributed.ServerLauncher;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.GemFireVersion;
import com.gemstone.gemfire.internal.SocketCreator;
@@ -40,7 +39,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(IntegrationTest.class)
public class RestAPIsQueryAndFEJUnitTest extends TestCase {
@@ -1317,10 +1316,10 @@ public class RestAPIsQueryAndFEJUnitTest extends TestCase {
ServerLauncher serverLauncher = new ServerLauncher.Builder()
.set(MCAST_PORT, "0")
.setServerBindAddress(this.hostName)
- .setServerPort(AvailablePortHelper.getRandomAvailableTCPPort())
- .set(DistributionConfig.START_DEV_REST_API_NAME, "true")
- .set(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(this.restServicePort))
- .set(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, this.hostName)
+ .setServerPort(0)
+ .set(START_DEV_REST_API, "true")
+ .set(HTTP_SERVICE_PORT, String.valueOf(this.restServicePort))
+ .set(HTTP_SERVICE_BIND_ADDRESS, this.hostName)
.setPdxReadSerialized(true)
.setWorkingDirectory(workingDirectory)
.build();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index 4be3b0f..af0318b 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -97,9 +97,9 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
- props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(restServicePort));
+ props.setProperty(START_DEV_REST_API, "true");
+ props.setProperty(HTTP_SERVICE_BIND_ADDRESS, hostName);
+ props.setProperty(HTTP_SERVICE_PORT, String.valueOf(restServicePort));
System.setProperty("javax.net.debug", "ssl,handshake");
configureSSL(props, sslProperties, clusterLevel);
@@ -276,16 +276,16 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "true");
Cache cache = null;
configureSSL(props, sslProperties, false);
while (true) {
try {
DistributedSystem ds = getSystem(props);
- System.out.println("Creating cache with http-service-port " + props.getProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, "7070")
- + " and jmx-manager-port " + props.getProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "1099"));
+ System.out.println("Creating cache with http-service-port " + props.getProperty(HTTP_SERVICE_PORT, "7070")
+ + " and jmx-manager-port " + props.getProperty(JMX_MANAGER_PORT, "1099"));
cache = CacheFactory.create(ds);
System.out.println("Successfully created cache.");
break;
@@ -305,8 +305,8 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
//try a different port
int httpServicePort = AvailablePortHelper.getRandomAvailableTCPPort();
int jmxManagerPort = AvailablePortHelper.getRandomAvailableTCPPort();
- props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, Integer.toString(httpServicePort));
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, Integer.toString(jmxManagerPort));
+ props.setProperty(HTTP_SERVICE_PORT, Integer.toString(httpServicePort));
+ props.setProperty(JMX_MANAGER_PORT, Integer.toString(jmxManagerPort));
System.out.println("Try a different http-service-port " + httpServicePort);
System.out.println("Try a different jmx-manager-port " + jmxManagerPort);
} else {
@@ -405,19 +405,19 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testSimpleSSL() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, "JKS");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_TYPE, "JKS");
String restEndpoint = startInfraWithSSL(props,false);
validateConnection(restEndpoint, "SSL");
}
public void testSSLWithoutKeyStoreType() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "SSL");
@@ -425,10 +425,10 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testSSLWithSSLProtocol() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "SSL");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "SSL");
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "SSL");
@@ -436,10 +436,10 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testSSLWithTLSProtocol() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "TLS");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLS");
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "TLS");
@@ -447,10 +447,10 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testSSLWithTLSv11Protocol() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "TLSv1.1");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.1");
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "TLSv1.1");
@@ -458,10 +458,10 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testSSLWithTLSv12Protocol() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "TLSv1.2");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.2");
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "TLSv1.2");
@@ -469,10 +469,10 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testWithMultipleProtocol() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "SSL,TLSv1.2");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "SSL,TLSv1.2");
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "TLSv1.2");
@@ -481,17 +481,17 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testSSLWithCipherSuite() throws Exception {
System.setProperty("javax.net.debug", "ssl");
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "TLSv1.2");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.2");
SSLContext ssl = SSLContext.getInstance("TLSv1.2");
ssl.init(null, null, new java.security.SecureRandom());
String[] cipherSuites = ssl.getSocketFactory().getSupportedCipherSuites();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_CIPHERS_NAME, cipherSuites[0]);
+ props.setProperty(HTTP_SERVICE_SSL_CIPHERS, cipherSuites[0]);
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "TLSv1.2");
@@ -499,17 +499,17 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testSSLWithMultipleCipherSuite() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "TLSv1.2");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "TLSv1.2");
SSLContext ssl = SSLContext.getInstance("TLSv1.2");
ssl.init(null, null, new java.security.SecureRandom());
String[] cipherSuites = ssl.getSocketFactory().getSupportedCipherSuites();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_CIPHERS_NAME, cipherSuites[0] + "," + cipherSuites[1]);
+ props.setProperty(HTTP_SERVICE_SSL_CIPHERS, cipherSuites[0] + "," + cipherSuites[1]);
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "TLSv1.2");
@@ -517,15 +517,15 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
public void testMutualAuthentication() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, "password");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, "SSL");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME, "true");
+ props.setProperty(HTTP_SERVICE_SSL_ENABLED, "true");
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, "password");
+ props.setProperty(HTTP_SERVICE_SSL_PROTOCOLS, "SSL");
+ props.setProperty(HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION, "true");
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_TRUSTSTORE_NAME, jks.getCanonicalPath());
+ props.setProperty(HTTP_SERVICE_SSL_TRUSTSTORE, jks.getCanonicalPath());
- props.setProperty(DistributionConfig.HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ props.setProperty(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD, "password");
String restEndpoint = startInfraWithSSL(props, false);
validateConnection(restEndpoint, "SSL");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
index e5e2d6e..a060c96 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
@@ -87,20 +87,17 @@ public interface DistributedSystemConfig extends Cloneable {
String DEFAULT_NAME = "";
/** The name of the "mcastPort" property */
- String MCAST_PORT_NAME =
- MCAST_PORT;
+ String MCAST_PORT_NAME = MCAST_PORT;
/** The default value of the "mcastPort" property (10334) */
int DEFAULT_MCAST_PORT =
DistributionConfig.DEFAULT_MCAST_PORT;
/** The minimum mcastPort (0) */
- int MIN_MCAST_PORT =
- DistributionConfig.MIN_MCAST_PORT;
+ int MIN_MCAST_PORT = DistributionConfig.MIN_MCAST_PORT;
/** The maximum mcastPort (65535) */
- int MAX_MCAST_PORT =
- DistributionConfig.MAX_MCAST_PORT;
+ int MAX_MCAST_PORT = DistributionConfig.MAX_MCAST_PORT;
/** The name of the "mcastAddress" property */
String MCAST_ADDRESS_NAME = MCAST_ADDRESS;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
index cad20d0..d40addc 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
@@ -1091,7 +1091,7 @@ public class DistributedSystemConfigImpl
buf.append(" " + DISABLE_TCP + "=");
buf.append(String.valueOf(this.disableTcp));
buf.append(lf);
- buf.append(" " + DistributionConfig.DISABLE_AUTO_RECONNECT_NAME + "=");
+ buf.append(" " + DISABLE_AUTO_RECONNECT + "=");
buf.append(String.valueOf(this.disableAutoReconnect));
buf.append(lf);
buf.append(" " + REMOTE_COMMAND_NAME + "=");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
index 80f1b82..674f46d 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
@@ -1574,12 +1574,6 @@ public abstract class DistributedSystem implements StatisticsFactory {
// fix for bug 33992
config = new Properties();
}
-// {
-// LogWriterI18n logger =
-// new LocalLogWriter(LocalLogWriter.ALL_LEVEL, System.out);
-// logger.info("DistributedSystem: Connecting with " + config,
-// new Exception("Stack trace"));
-// }
synchronized (existingSystemsLock) {
if (DistributionManager.isDedicatedAdminVM) {
// For a dedicated admin VM, check to see if there is already
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
index 40a11bb..c451708 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
@@ -53,7 +53,7 @@ public interface SystemConfigurationProperties {
String ENABLE_CLUSTER_CONFIGURATION = "enable-cluster-configuration";
String ENABLE_NETWORK_PARTITION_DETECTION = "enable-network-partition-detection";
String ENABLE_TIME_STATISTICS = "enable-time-statistics";
- String ENFORE_UNIQUE_HOST = "enforce-unique-host";
+ String ENFORCE_UNIQUE_HOST = "enforce-unique-host";
String GATEWAY_SSL_CIPHERS = "gateway-ssl-ciphers";
String GATEWAY_SSL_ENABLED = "gateway-ssl-enabled";
String GATEWAY_SSL_KEYSTORE = "gateway-ssl-keystore";
@@ -79,9 +79,19 @@ public interface SystemConfigurationProperties {
String JMX_MANAGER_ACCESS_FILE = "jmx-manager-access-file";
String JMX_MANAGER_BIND_ADDRESS = "jmx-manager-bind-address";
String JMX_MANAGER_HOSTNAME_FOR_CLIENTS = "jmx-manager-hostname-for-clients";
+
+ /**
+ * The name of the "jmx-manager-http-port" property.
+ *
+ * @deprecated as of 8.0 use {@link #HTTP_SERVICE_PORT} instead.
+ */
String JMX_MANAGER_HTTP_PORT = "jmx-manager-http-port";
String JMX_MANAGER_PASSWORD_FILE = "jmx-manager-password-file";
String JMX_MANAGER_PORT = "jmx-manager-port";
+
+ /**
+ * @deprecated as of 8.0 use {@link #JMX_MANAGER_SSL_ENABLED} instead.
+ */
String JMX_MANAGER_SSL = "jmx-manager-ssl";
String JMX_MANAGER_START = "jmx-manager-start";
String JMX_MANAGER_UPDATE_RATE = "jmx-manager-update-rate";
@@ -171,13 +181,34 @@ public interface SystemConfigurationProperties {
String SECURITY_SHIRO_INIT = SECURITY_PREFIX + "shiro-init";
String DISTRIBUTED_TRANSACTIONS = "distributed-transactions";
- @Deprecated
+ /**
+ * Returns the value of the <a
+ * href="../DistributedSystem.html#ssl-enabled">"ssl-enabled"</a>
+ * property.
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_ENABLED} instead.
+ */
String SSL_ENABLED = "ssl-enabled";
- @Deprecated
+
+ /**
+ * The name of the "SSLProtocols" property
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_PROTOCOLS} instead.
+ */
String SSL_PROTOCOLS = "ssl-protocols";
- @Deprecated
+
+ /**
+ * The name of the "SSLCiphers" property
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_CIPHERS} instead.
+ */
String SSL_CIPHERS = "ssl-ciphers";
- @Deprecated
+
+ /**
+ * The name of the "SSLRequireAuthentication" property
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION} instead.
+ */
String SSL_REQUIRE_AUTHENTICATION = "ssl-require-authentication";
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index 864c93b..98c3faf 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -619,7 +619,7 @@ public abstract class AbstractDistributionConfig
* @return an empty list
*/
public List<String> getModifiableAttributes(){
- String[] modifiables = {HTTP_SERVICE_PORT,JMX_MANAGER_HTTP_PORT_NAME};
+ String[] modifiables = {HTTP_SERVICE_PORT,JMX_MANAGER_HTTP_PORT};
return Arrays.asList(modifiables);
};
@@ -962,7 +962,7 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_SECURITY_LOG_FILE_NAME_0
.toLocalizedString(DEFAULT_SECURITY_LOG_FILE));
- m.put(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME,
+ m.put(SECURITY_PEER_VERIFY_MEMBER_TIMEOUT,
LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_SECURITY_PEER_VERIFYMEMBER_TIMEOUT)));
@@ -974,11 +974,11 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_USERDEFINED_PREFIX_NAME
.toLocalizedString());
- m.put(REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME,
+ m.put(REMOVE_UNRESPONSIVE_CLIENT,
LocalizedStrings.AbstractDistributionConfig_REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME_0
.toLocalizedString(DEFAULT_REMOVE_UNRESPONSIVE_CLIENT));
- m.put(DELTA_PROPAGATION_PROP_NAME, "Whether delta propagation is enabled");
+ m.put(DELTA_PROPAGATION, "Whether delta propagation is enabled");
m.put(REMOTE_LOCATORS,
LocalizedStrings.AbstractDistributionConfig_REMOTE_DISTRIBUTED_SYSTEMS_NAME_0
@@ -987,7 +987,7 @@ public abstract class AbstractDistributionConfig
m.put(DISTRIBUTED_SYSTEM_ID, "An id that uniquely idenitifies this distributed system. " +
"Required when using portable data exchange objects and the WAN." +
"Must be the same on each member in this distributed system if set.");
- m.put(ENFORCE_UNIQUE_HOST_NAME, "Whether to require partitioned regions to put " +
+ m.put(ENFORCE_UNIQUE_HOST, "Whether to require partitioned regions to put " +
"redundant copies of data on different physical machines");
m.put(REDUNDANCY_ZONE, "The zone that this member is in. When this is set, " +
[30/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java
index a4cf7e9..c5746ed 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java
@@ -16,80 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.ConcurrentModificationException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Queue;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.query.CqQuery;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.internal.CqQueryVsdStats;
import com.gemstone.gemfire.cache.query.internal.cq.CqService;
import com.gemstone.gemfire.cache.query.internal.cq.InternalCqQuery;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.DataSerializableFixedID;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.Conflatable;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.HARegion;
-import com.gemstone.gemfire.internal.cache.RegionQueue;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientMarkerMessageImpl;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessage;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.tier.sockets.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl.CqNameToOp;
-import com.gemstone.gemfire.internal.cache.tier.sockets.HAEventWrapper;
-import com.gemstone.gemfire.internal.cache.tier.sockets.HandShake;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
@@ -98,7 +41,18 @@ import com.gemstone.gemfire.internal.util.concurrent.StoppableCondition;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantReadWriteLock;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantReadWriteLock.StoppableWriteLock;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
/**
* An implementation of Queue using Gemfire Region as the underlying
@@ -268,7 +222,7 @@ public class HARegionQueue implements RegionQueue
/**
* Constant used to set region entry expiry time using system property.
*/
- public static final String REGION_ENTRY_EXPIRY_TIME = "gemfire.MessageTimeToLive";
+ public static final String REGION_ENTRY_EXPIRY_TIME = DistributionConfig.GEMFIRE_PREFIX + "MessageTimeToLive";
/**
* The default frequency (in seconds) at which a message will be sent by the
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueAttributes.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueAttributes.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueAttributes.java
index c0af8e2..c2ff1a0 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueAttributes.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueAttributes.java
@@ -19,6 +19,8 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
/**
*
* This class defines the user specified attributes of the HARegion which are
@@ -38,7 +40,7 @@ public class HARegionQueueAttributes
/**
* String storing the System Property key representing the blocking queue capacity
*/
- private static final String BLOCKING_QUEUE_CAPACITY = "gemfire.Capacity";
+ private static final String BLOCKING_QUEUE_CAPACITY = DistributionConfig.GEMFIRE_PREFIX + "Capacity";
/**
* expiry time for region entries in seconds
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapEvictor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapEvictor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapEvictor.java
index 6aac4a9..b4bba96 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapEvictor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapEvictor.java
@@ -16,41 +16,25 @@
*/
package com.gemstone.gemfire.internal.cache.lru;
-import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.RegionDestroyedException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.OverflowQueueWithDMStats;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.RegionEvictorTask;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
import com.gemstone.gemfire.internal.cache.control.ResourceListener;
-import com.gemstone.gemfire.internal.lang.ThreadUtils;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
+import it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* Triggers centralized eviction(asynchronously) when the ResourceManager sends
@@ -65,23 +49,23 @@ public class HeapEvictor implements ResourceListener<MemoryEvent> {
// Add 1 for the management task that's putting more eviction tasks on the queue
public static final int MAX_EVICTOR_THREADS = Integer.getInteger(
- "gemfire.HeapLRUCapacityController.MAX_EVICTOR_THREADS", (Runtime.getRuntime().availableProcessors()*4)) + 1;
+ DistributionConfig.GEMFIRE_PREFIX + "HeapLRUCapacityController.MAX_EVICTOR_THREADS", (Runtime.getRuntime().availableProcessors() * 4)) + 1;
public static final boolean DISABLE_HEAP_EVICTIOR_THREAD_POOL = Boolean
- .getBoolean("gemfire.HeapLRUCapacityController.DISABLE_HEAP_EVICTIOR_THREAD_POOL");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "HeapLRUCapacityController.DISABLE_HEAP_EVICTIOR_THREAD_POOL");
public static final boolean EVICT_HIGH_ENTRY_COUNT_BUCKETS_FIRST = Boolean.valueOf(
System.getProperty(
- "gemfire.HeapLRUCapacityController.evictHighEntryCountBucketsFirst",
+ DistributionConfig.GEMFIRE_PREFIX + "HeapLRUCapacityController.evictHighEntryCountBucketsFirst",
"true")).booleanValue();
public static final int MINIMUM_ENTRIES_PER_BUCKET = Integer
- .getInteger("gemfire.HeapLRUCapacityController.inlineEvictionThreshold",0);
+ .getInteger(DistributionConfig.GEMFIRE_PREFIX + "HeapLRUCapacityController.inlineEvictionThreshold", 0);
public static final long TOTAL_BYTES_TO_EVICT_FROM_HEAP;
public static final int BUCKET_SORTING_INTERVAL = Integer.getInteger(
- "gemfire.HeapLRUCapacityController.higherEntryCountBucketCalculationInterval",
+ DistributionConfig.GEMFIRE_PREFIX + "HeapLRUCapacityController.higherEntryCountBucketCalculationInterval",
100).intValue();
private static final String EVICTOR_THREAD_GROUP_NAME = "EvictorThreadGroup";
@@ -90,7 +74,7 @@ public class HeapEvictor implements ResourceListener<MemoryEvent> {
static {
float evictionBurstPercentage = Float.parseFloat(System.getProperty(
- "gemfire.HeapLRUCapacityController.evictionBurstPercentage", "0.4"));
+ DistributionConfig.GEMFIRE_PREFIX + "HeapLRUCapacityController.evictionBurstPercentage", "0.4"));
long maxTenuredBytes = HeapMemoryMonitor.getTenuredPoolMaxMemory();
TOTAL_BYTES_TO_EVICT_FROM_HEAP = (long)(maxTenuredBytes * 0.01 * evictionBurstPercentage);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java
index 948a9d7..7bf2d1f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/HeapLRUCapacityController.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.lru;
-import java.util.Properties;
-
import com.gemstone.gemfire.StatisticDescriptor;
import com.gemstone.gemfire.StatisticsFactory;
import com.gemstone.gemfire.StatisticsType;
@@ -26,15 +24,14 @@ import com.gemstone.gemfire.cache.EvictionAction;
import com.gemstone.gemfire.cache.EvictionAlgorithm;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.util.ObjectSizer;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
-import com.gemstone.gemfire.internal.cache.AbstractRegion;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.Token;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.util.Properties;
+
/**
* A <code>HeapLRUCapacityController</code> controls the contents of
* {@link Region} based on the percentage of memory that is
@@ -65,7 +62,7 @@ public class HeapLRUCapacityController extends LRUAlgorithm {
/**
* The default percentage of VM heap usage over which LRU eviction occurs
*/
- public static final String TOP_UP_HEAP_EVICTION_PERCENTAGE_PROPERTY = "gemfire.topUpHeapEvictionPercentage";
+ public static final String TOP_UP_HEAP_EVICTION_PERCENTAGE_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "topUpHeapEvictionPercentage";
public static final float DEFAULT_TOP_UP_HEAP_EVICTION_PERCENTAGE = 4.0f;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/NewLRUClockHand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/NewLRUClockHand.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/NewLRUClockHand.java
index 59245f8..7d2591c 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/NewLRUClockHand.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/NewLRUClockHand.java
@@ -17,21 +17,16 @@
package com.gemstone.gemfire.internal.cache.lru;
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.StatisticsFactory;
import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.cache.AbstractRegionEntry;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PlaceHolderDiskRegion;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
+import org.apache.logging.log4j.Logger;
/**
* AbstractLRUClockHand holds the lrulist, and the behavior for
@@ -56,13 +51,13 @@ public class NewLRUClockHand {
final private LRUStatistics stats;
/** Counter for the size of the LRU list */
protected int size = 0;
-
-public static final boolean debug = Boolean.getBoolean("gemfire.verbose-lru-clock");
+
+ public static final boolean debug = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "verbose-lru-clock");
static private final int maxEntries;
static {
- String squelch = System.getProperty("gemfire.lru.maxSearchEntries");
+ String squelch = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "lru.maxSearchEntries");
if (squelch == null)
maxEntries = -1;
else
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/OffHeapEvictor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/OffHeapEvictor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/OffHeapEvictor.java
index 4b1270b..d147c57 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/OffHeapEvictor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/lru/OffHeapEvictor.java
@@ -17,7 +17,7 @@
package com.gemstone.gemfire.internal.cache.lru;
import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.control.ResourceManager;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
@@ -44,7 +44,8 @@ public class OffHeapEvictor extends HeapEvictor {
}
private void calculateEvictionBurst() {
- float evictionBurstPercentage = Float.parseFloat(System.getProperty("gemfire.HeapLRUCapacityController.evictionBurstPercentage", "0.4"));
+ float evictionBurstPercentage = Float
+ .parseFloat(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "HeapLRUCapacityController.evictionBurstPercentage", "0.4"));
MemoryAllocator allocator = ((GemFireCacheImpl) this.cache).getOffHeapStore();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
index 76cdeb3..e903def 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/GetMessage.java
@@ -17,48 +17,18 @@
package com.gemstone.gemfire.internal.cache.partitioned;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.cache.EntryNotFoundException;
import com.gemstone.gemfire.cache.TransactionDataNotColocatedException;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DirectReplyProcessor;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.ReplyMessage;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
-import com.gemstone.gemfire.distributed.internal.ReplySender;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.InternalDataSerializer;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue;
-import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
-import com.gemstone.gemfire.internal.cache.DataLocationException;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.KeyInfo;
-import com.gemstone.gemfire.internal.cache.KeyWithRegionContext;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
-import com.gemstone.gemfire.internal.cache.PrimaryBucketException;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
-import com.gemstone.gemfire.internal.cache.Token;
-import com.gemstone.gemfire.internal.cache.VersionTagHolder;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -66,6 +36,13 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
import com.gemstone.gemfire.internal.util.BlobHelper;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Set;
/**
* This message is used as the request for a
@@ -114,7 +91,7 @@ public final class GetMessage extends PartitionMessageWithDirectReply
this.returnTombstones = returnTombstones;
}
- private static final boolean ORDER_PR_GETS = Boolean.getBoolean("gemfire.order-pr-gets");
+ private static final boolean ORDER_PR_GETS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "order-pr-gets");
@Override
final public int getProcessorType()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRSanityCheckMessage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRSanityCheckMessage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRSanityCheckMessage.java
index 47b73ba..9e69e7a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRSanityCheckMessage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PRSanityCheckMessage.java
@@ -16,16 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Set;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.query.QueryException;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
import com.gemstone.gemfire.internal.SystemTimer;
@@ -34,6 +30,11 @@ import com.gemstone.gemfire.internal.cache.ForceReattemptException;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Set;
+
/**
* PRSanityCheckMessage is used to assert correctness of prID assignments
* across the distributed system.
@@ -97,7 +98,7 @@ public final class PRSanityCheckMessage extends PartitionMessage
* be enabled with gemfire.PRSanityCheckEnabled=true.
*/
public static void schedule(final PartitionedRegion pr) {
- if (Boolean.getBoolean("gemfire.PRSanityCheckEnabled")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRSanityCheckEnabled")) {
final DM dm = pr.getDistributionManager();
// RegionAdvisor ra = pr.getRegionAdvisor();
// final Set recipients = ra.adviseAllPRNodes();
@@ -114,7 +115,7 @@ public final class PRSanityCheckMessage extends PartitionMessage
PRSanityCheckMessage instance = new PRSanityCheckMessage(recipients,
pr.getPRId(), null, pr.getRegionIdentifier());
dm.putOutgoing(instance);
- int sanityCheckInterval = Integer.getInteger("gemfire.PRSanityCheckInterval",
+ int sanityCheckInterval = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "PRSanityCheckInterval",
5000).intValue();
if (sanityCheckInterval != 0) {
final SystemTimer tm = new SystemTimer(dm.getSystem(), true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionRebalanceOp.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionRebalanceOp.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionRebalanceOp.java
index 641d43d..d683f03 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionRebalanceOp.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PartitionedRegionRebalanceOp.java
@@ -16,22 +16,11 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.cache.partition.PartitionMemberInfo;
import com.gemstone.gemfire.cache.partition.PartitionRebalanceInfo;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.MembershipListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
@@ -46,17 +35,15 @@ import com.gemstone.gemfire.internal.cache.control.ResourceManagerStats;
import com.gemstone.gemfire.internal.cache.partitioned.BecomePrimaryBucketMessage.BecomePrimaryBucketResponse;
import com.gemstone.gemfire.internal.cache.partitioned.MoveBucketMessage.MoveBucketResponse;
import com.gemstone.gemfire.internal.cache.partitioned.RemoveBucketMessage.RemoveBucketResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.rebalance.BucketOperator;
-import com.gemstone.gemfire.internal.cache.partitioned.rebalance.BucketOperatorImpl;
-import com.gemstone.gemfire.internal.cache.partitioned.rebalance.BucketOperatorWrapper;
-import com.gemstone.gemfire.internal.cache.partitioned.rebalance.ParallelBucketOperator;
-import com.gemstone.gemfire.internal.cache.partitioned.rebalance.PartitionedRegionLoadModel;
+import com.gemstone.gemfire.internal.cache.partitioned.rebalance.*;
import com.gemstone.gemfire.internal.cache.partitioned.rebalance.PartitionedRegionLoadModel.AddressComparor;
-import com.gemstone.gemfire.internal.cache.partitioned.rebalance.RebalanceDirector;
-import com.gemstone.gemfire.internal.cache.partitioned.rebalance.SimulatedBucketOperator;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* This class performs a rebalance on a single partitioned region.
@@ -85,9 +72,9 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
@SuppressWarnings("synthetic-access")
public class PartitionedRegionRebalanceOp {
private static final Logger logger = LogService.getLogger();
-
- private static final int MAX_PARALLEL_OPERATIONS = Integer.getInteger("gemfire.MAX_PARALLEL_BUCKET_RECOVERIES", 8);
- private final boolean DEBUG = Boolean.getBoolean("gemfire.LOG_REBALANCE");
+
+ private static final int MAX_PARALLEL_OPERATIONS = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "MAX_PARALLEL_BUCKET_RECOVERIES", 8);
+ private final boolean DEBUG = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "LOG_REBALANCE");
private final boolean simulate;
private final boolean replaceOfflineData;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
index bdb3c25..176a41a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/RegionAdvisor.java
@@ -17,28 +17,6 @@
package com.gemstone.gemfire.internal.cache.partitioned;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Queue;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireException;
@@ -46,26 +24,15 @@ import com.gemstone.gemfire.cache.InterestPolicy;
import com.gemstone.gemfire.cache.LowMemoryException;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ProfileListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.cache.BucketAdvisor;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.BucketAdvisor.BucketProfile;
import com.gemstone.gemfire.internal.cache.BucketAdvisor.ServerBucketProfile;
-import com.gemstone.gemfire.internal.cache.BucketPersistenceAdvisor;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.BucketServerLocation66;
-import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.FixedPartitionAttributesImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
-import com.gemstone.gemfire.internal.cache.Node;
import com.gemstone.gemfire.internal.cache.PRHARedundancyProvider.DataStoreBuckets;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionStats;
-import com.gemstone.gemfire.internal.cache.ProxyBucketRegion;
import com.gemstone.gemfire.internal.cache.control.MemoryThresholds;
import com.gemstone.gemfire.internal.cache.control.ResourceAdvisor;
import com.gemstone.gemfire.internal.cache.persistence.PersistenceAdvisor;
@@ -74,6 +41,16 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.atomic.AtomicLong;
public class RegionAdvisor extends CacheDistributionAdvisor
{
@@ -83,7 +60,7 @@ public class RegionAdvisor extends CacheDistributionAdvisor
* Number of threads allowed to concurrently volunteer for bucket primary.
*/
public static final short VOLUNTEERING_THREAD_COUNT = Integer.getInteger(
- "gemfire.RegionAdvisor.volunteeringThreadCount", 1).shortValue();
+ DistributionConfig.GEMFIRE_PREFIX + "RegionAdvisor.volunteeringThreadCount", 1).shortValue();
/**
* Non-thread safe queue for volunteering for primary bucket. Each
@@ -1232,7 +1209,7 @@ public class RegionAdvisor extends CacheDistributionAdvisor
/**
* Get the most recent primary node for the bucketId. Returns null if no
- * primary can be found within {@link com.gemstone.gemfire.distributed.internal.DistributionConfig#getMemberTimeout}.
+ * primary can be found within {@link DistributionConfig#getMemberTimeout}.
* @param bucketId
* @return the Node managing the primary copy of the bucket
*/
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/SizedBasedLoadProbe.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/SizedBasedLoadProbe.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/SizedBasedLoadProbe.java
index 068c6a4..df4d894 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/SizedBasedLoadProbe.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/SizedBasedLoadProbe.java
@@ -16,11 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.DataSerializableFixedID;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.BucketAdvisor;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
+
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@@ -34,7 +36,7 @@ import java.io.IOException;
public class SizedBasedLoadProbe implements LoadProbe, DataSerializableFixedID {
private static final long serialVersionUID = 7040814060882774875L;
//TODO rebalancing come up with a better threshold for minumum bucket size?
- public static final int MIN_BUCKET_SIZE = Integer.getInteger("gemfire.MIN_BUCKET_SIZE", 1).intValue();
+ public static final int MIN_BUCKET_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "MIN_BUCKET_SIZE", 1).intValue();
public PRLoad getLoad(PartitionedRegion pr) {
PartitionedRegionDataStore ds = pr.getDataStore();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
index 89856ad..7c4cc55 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/BackupManager.java
@@ -16,18 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.persistence;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -42,6 +30,13 @@ import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+
/**
* This class manages the state an logic to backup a single
* cache.
@@ -243,7 +238,7 @@ public class BackupManager implements MembershipListener {
URL propertyURL = DistributedSystem.getPropertyFileURL();
if(propertyURL != null) {
- File propertyBackup = new File(configBackupDir, "gemfire.properties");
+ File propertyBackup = new File(configBackupDir, DistributionConfig.GEMFIRE_PREFIX + "properties");
FileUtil.copy(propertyURL, propertyBackup);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/PersistenceAdvisorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/PersistenceAdvisorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/PersistenceAdvisorImpl.java
index 3c09612..d865828 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/PersistenceAdvisorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/persistence/PersistenceAdvisorImpl.java
@@ -16,29 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.persistence;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.DiskAccessException;
import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.persistence.ConflictingPersistentDataException;
import com.gemstone.gemfire.cache.persistence.RevokedPersistentDataException;
import com.gemstone.gemfire.distributed.DistributedLockService;
-import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
-import com.gemstone.gemfire.distributed.internal.MembershipListener;
-import com.gemstone.gemfire.distributed.internal.ProfileListener;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor;
import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor.CacheProfile;
@@ -51,6 +35,11 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.process.StartupStatus;
import com.gemstone.gemfire.internal.util.TransformUtils;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
/**
*
@@ -79,8 +68,8 @@ public class PersistenceAdvisorImpl implements PersistenceAdvisor {
private volatile Set<PersistentMemberID> allMembersWaitingFor;
private volatile Set<PersistentMemberID> offlineMembersWaitingFor;
protected final Object lock;
-
- private static final int PERSISTENT_VIEW_RETRY = Integer.getInteger("gemfire.PERSISTENT_VIEW_RETRY", 5);
+
+ private static final int PERSISTENT_VIEW_RETRY = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "PERSISTENT_VIEW_RETRY", 5);
public PersistenceAdvisorImpl(CacheDistributionAdvisor advisor, DistributedLockService dl, PersistentMemberView storage, String regionPath, DiskRegionStats diskStats, PersistentMemberManager memberManager) {
this.advisor = advisor;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/RegionSnapshotServiceImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/RegionSnapshotServiceImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/RegionSnapshotServiceImpl.java
index 78f6b0e..804aa93 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/RegionSnapshotServiceImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/RegionSnapshotServiceImpl.java
@@ -16,51 +16,36 @@
*/
package com.gemstone.gemfire.internal.cache.snapshot;
-import static com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.getLoggerI18n;
-
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.ProxyRegion;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
-import com.gemstone.gemfire.cache.execute.ResultSender;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
import com.gemstone.gemfire.cache.snapshot.RegionSnapshotService;
import com.gemstone.gemfire.cache.snapshot.SnapshotOptions;
import com.gemstone.gemfire.cache.snapshot.SnapshotOptions.SnapshotFormat;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.cache.CachePerfStats;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalDataSet;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.Token;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.snapshot.GFSnapshot.GFSnapshotImporter;
import com.gemstone.gemfire.internal.cache.snapshot.GFSnapshot.SnapshotWriter;
import com.gemstone.gemfire.internal.cache.snapshot.SnapshotPacket.SnapshotRecord;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.io.*;
+import java.util.HashMap;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import static com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.getLoggerI18n;
+
/**
* Provides an implementation for region snapshots.
*
@@ -70,10 +55,10 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
*/
public class RegionSnapshotServiceImpl<K, V> implements RegionSnapshotService<K, V> {
// controls number of concurrent putAll ops during an import
- private static final int IMPORT_CONCURRENCY = Integer.getInteger("gemfire.RegionSnapshotServiceImpl.IMPORT_CONCURRENCY", 10);
+ private static final int IMPORT_CONCURRENCY = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "RegionSnapshotServiceImpl.IMPORT_CONCURRENCY", 10);
// controls the size (in bytes) of the r/w buffer during imoprt and export
- static final int BUFFER_SIZE = Integer.getInteger("gemfire.RegionSnapshotServiceImpl.BUFFER_SIZE", 1024 * 1024);
+ static final int BUFFER_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "RegionSnapshotServiceImpl.BUFFER_SIZE", 1024 * 1024);
static final SnapshotFileMapper LOCAL_MAPPER = new SnapshotFileMapper() {
private static final long serialVersionUID = 1L;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/WindowedExporter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/WindowedExporter.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/WindowedExporter.java
index a097568..2860719 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/WindowedExporter.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/snapshot/WindowedExporter.java
@@ -16,7 +16,21 @@
*/
package com.gemstone.gemfire.internal.cache.snapshot;
-import static com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.getLoggerI18n;
+import com.gemstone.gemfire.cache.EntryDestroyedException;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.execute.*;
+import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
+import com.gemstone.gemfire.cache.snapshot.SnapshotOptions;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.execute.InternalExecution;
+import com.gemstone.gemfire.internal.cache.execute.LocalResultCollector;
+import com.gemstone.gemfire.internal.cache.snapshot.FlowController.Window;
+import com.gemstone.gemfire.internal.cache.snapshot.RegionSnapshotServiceImpl.ExportSink;
+import com.gemstone.gemfire.internal.cache.snapshot.RegionSnapshotServiceImpl.Exporter;
+import com.gemstone.gemfire.internal.cache.snapshot.SnapshotPacket.SnapshotRecord;
import java.io.IOException;
import java.io.InterruptedIOException;
@@ -32,26 +46,7 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
-import com.gemstone.gemfire.cache.EntryDestroyedException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
-import com.gemstone.gemfire.cache.execute.ResultSender;
-import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.cache.snapshot.SnapshotOptions;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.execute.InternalExecution;
-import com.gemstone.gemfire.internal.cache.execute.LocalResultCollector;
-import com.gemstone.gemfire.internal.cache.snapshot.FlowController.Window;
-import com.gemstone.gemfire.internal.cache.snapshot.RegionSnapshotServiceImpl.ExportSink;
-import com.gemstone.gemfire.internal.cache.snapshot.RegionSnapshotServiceImpl.Exporter;
-import com.gemstone.gemfire.internal.cache.snapshot.SnapshotPacket.SnapshotRecord;
+import static com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.getLoggerI18n;
/**
* Exports snapshot data using a sliding window to prevent the nodes in a
@@ -65,7 +60,7 @@ import com.gemstone.gemfire.internal.cache.snapshot.SnapshotPacket.SnapshotRecor
* @param <V> the value type
*/
public class WindowedExporter<K, V> implements Exporter<K, V> {
- private static final int WINDOW_SIZE = Integer.getInteger("gemfire.WindowedExporter.WINDOW_SIZE", 10);
+ private static final int WINDOW_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "WindowedExporter.WINDOW_SIZE", 10);
@Override
public long export(Region<K, V> region, ExportSink sink, SnapshotOptions<K, V> options) throws IOException {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index e1c22b7..2a7c144 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -17,48 +17,6 @@
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.BindException;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.nio.channels.CancelledKeyException;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.ClosedSelectorException;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.net.ssl.SSLException;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.ToDataException;
@@ -67,12 +25,7 @@ import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
-import com.gemstone.gemfire.distributed.internal.PooledExecutorWithDMStats;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.SystemTimer;
import com.gemstone.gemfire.internal.cache.BucketAdvisor;
@@ -90,6 +43,18 @@ import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
import com.gemstone.gemfire.internal.util.ArrayUtils;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLException;
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InterruptedIOException;
+import java.net.*;
+import java.nio.ByteBuffer;
+import java.nio.channels.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Implements the acceptor thread on the bridge server. Accepts connections from
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
index ca7818a..bdebb6b 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
@@ -19,57 +19,18 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Semaphore;
-import java.util.regex.Pattern;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.CopyException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.SerializationException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TransactionException;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.persistence.PartitionOfflineException;
import com.gemstone.gemfire.cache.query.types.CollectionType;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.EntrySnapshot;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.FindVersionTagOperation;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.LocalRegion.NonTXEntry;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
-import com.gemstone.gemfire.internal.cache.Token;
-import com.gemstone.gemfire.internal.cache.VersionTagHolder;
import com.gemstone.gemfire.internal.cache.tier.CachedRegionHelper;
import com.gemstone.gemfire.internal.cache.tier.Command;
import com.gemstone.gemfire.internal.cache.tier.InterestType;
@@ -82,6 +43,12 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.Semaphore;
+import java.util.regex.Pattern;
/**
*
@@ -97,7 +64,7 @@ public abstract class BaseCommand implements Command {
protected static final boolean zipValues = false;
protected static final boolean APPLY_RETRIES = Boolean
- .getBoolean("gemfire.gateway.ApplyRetries");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "gateway.ApplyRetries");
public static final byte[] OK_BYTES = new byte[]{0};
@@ -108,7 +75,7 @@ public abstract class BaseCommand implements Command {
/** Whether to suppress logging of IOExceptions */
private static boolean suppressIOExceptionLogging = Boolean
- .getBoolean("gemfire.bridge.suppressIOExceptionLogging");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "bridge.suppressIOExceptionLogging");
/**
* Maximum number of concurrent incoming client message bytes that a bridge
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
index b8cd2f5..517d497 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
@@ -352,7 +352,10 @@ public class CacheClientNotifier {
.getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME);
if (postAuthzFactoryName != null && postAuthzFactoryName.length() > 0) {
if (principal == null) {
- securityLogWriter.warning(LocalizedStrings.CacheClientNotifier_CACHECLIENTNOTIFIER_POST_PROCESS_AUTHORIZATION_CALLBACK_ENABLED_BUT_AUTHENTICATION_CALLBACK_0_RETURNED_WITH_NULL_CREDENTIALS_FOR_PROXYID_1, new Object[] {DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, proxyID});
+ securityLogWriter.warning(
+ LocalizedStrings.CacheClientNotifier_CACHECLIENTNOTIFIER_POST_PROCESS_AUTHORIZATION_CALLBACK_ENABLED_BUT_AUTHENTICATION_CALLBACK_0_RETURNED_WITH_NULL_CREDENTIALS_FOR_PROXYID_1,
+ new Object[] {
+ DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, proxyID });
}
Method authzMethod = ClassLoadUtil
.methodFromName(postAuthzFactoryName);
@@ -2575,11 +2578,11 @@ public class CacheClientNotifier {
* System property name for indicating how much frequently the "Queue full"
* message should be logged.
*/
- public static final String MAX_QUEUE_LOG_FREQUENCY = "gemfire.logFrequency.clientQueueReachedMaxLimit";
+ public static final String MAX_QUEUE_LOG_FREQUENCY = DistributionConfig.GEMFIRE_PREFIX + "logFrequency.clientQueueReachedMaxLimit";
public static final long DEFAULT_LOG_FREQUENCY = 1000;
- public static final String EVENT_ENQUEUE_WAIT_TIME_NAME = "gemfire.subscription.EVENT_ENQUEUE_WAIT_TIME";
+ public static final String EVENT_ENQUEUE_WAIT_TIME_NAME = DistributionConfig.GEMFIRE_PREFIX + "subscription.EVENT_ENQUEUE_WAIT_TIME";
public static final int DEFAULT_EVENT_ENQUEUE_WAIT_TIME = 100;
@@ -2607,10 +2610,10 @@ public class CacheClientNotifier {
private final SocketCloser socketCloser;
private static final long CLIENT_PING_TASK_PERIOD =
- Long.getLong("gemfire.serverToClientPingPeriod", 60000);
+ Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "serverToClientPingPeriod", 60000);
private static final long CLIENT_PING_TASK_COUNTER =
- Long.getLong("gemfire.serverToClientPingCounter", 3);
+ Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "serverToClientPingCounter", 3);
public long getLogFrequency() {
return this.logFrequency;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
index d9a71d5..c4b48f4 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientProxy.java
@@ -17,77 +17,25 @@
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.net.Socket;
-import java.net.SocketException;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.regex.Pattern;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.ClientSession;
-import com.gemstone.gemfire.cache.DynamicRegionFactory;
-import com.gemstone.gemfire.cache.InterestRegistrationEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionExistsException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.internal.RegisterInterestTracker;
-import com.gemstone.gemfire.cache.operations.DestroyOperationContext;
-import com.gemstone.gemfire.cache.operations.InvalidateOperationContext;
-import com.gemstone.gemfire.cache.operations.OperationContext;
-import com.gemstone.gemfire.cache.operations.PutOperationContext;
-import com.gemstone.gemfire.cache.operations.RegionClearOperationContext;
-import com.gemstone.gemfire.cache.operations.RegionCreateOperationContext;
-import com.gemstone.gemfire.cache.operations.RegionDestroyOperationContext;
+import com.gemstone.gemfire.cache.operations.*;
import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqQuery;
import com.gemstone.gemfire.cache.query.internal.cq.CqService;
import com.gemstone.gemfire.cache.query.internal.cq.InternalCqQuery;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.SystemTimer;
import com.gemstone.gemfire.internal.SystemTimer.SystemTimerTask;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.ClientServerObserver;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisee;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor.InitialImageAdvice;
-import com.gemstone.gemfire.internal.cache.Conflatable;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.FilterProfile;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InterestRegistrationEventImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.StateFlushOperation;
import com.gemstone.gemfire.internal.cache.ha.HAContainerWrapper;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueueAttributes;
@@ -104,7 +52,23 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.security.AuthorizeRequestPP;
import com.gemstone.gemfire.security.AccessControl;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.net.Socket;
+import java.net.SocketException;
+import java.nio.ByteBuffer;
+import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.regex.Pattern;
/**
* Class <code>CacheClientProxy</code> represents the server side of the
@@ -198,7 +162,7 @@ public class CacheClientProxy implements ClientSession {
/**
* The number of times to peek on shutdown before giving up and shutting down
*/
- protected static final int MAXIMUM_SHUTDOWN_PEEKS = Integer.getInteger("gemfire.MAXIMUM_SHUTDOWN_PEEKS",50).intValue();
+ protected static final int MAXIMUM_SHUTDOWN_PEEKS = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "MAXIMUM_SHUTDOWN_PEEKS", 50).intValue();
/**
* The number of milliseconds to wait for an offering to the message queue
@@ -230,7 +194,7 @@ public class CacheClientProxy implements ClientSession {
* be logged.
*/
protected static final boolean LOG_DROPPED_MSGS = !Boolean
- .getBoolean("gemfire.disableNotificationWarnings");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableNotificationWarnings");
/**
* for testing purposes, delays the start of the dispatcher thread
@@ -294,7 +258,7 @@ public class CacheClientProxy implements ClientSession {
* currently.
*/
protected static final boolean NOTIFY_REGION_ON_INTEREST = Boolean
- .getBoolean("gemfire.updateAccessTimeOnClientInterest");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "updateAccessTimeOnClientInterest");
/**
* The AcceptorImpl identifier to which the proxy is connected.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
index 6e45d1d..28b789a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientUpdater.java
@@ -17,68 +17,21 @@
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.net.ConnectException;
-import java.net.InetAddress;
-import java.net.NoRouteToHostException;
-import java.net.Socket;
-import java.net.SocketException;
-import java.nio.ByteBuffer;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.net.ssl.SSLException;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
-import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.EntryNotFoundException;
import com.gemstone.gemfire.cache.InterestResultPolicy;
import com.gemstone.gemfire.cache.Operation;
import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
-import com.gemstone.gemfire.cache.client.internal.ClientUpdater;
-import com.gemstone.gemfire.cache.client.internal.Endpoint;
-import com.gemstone.gemfire.cache.client.internal.EndpointManager;
-import com.gemstone.gemfire.cache.client.internal.GetEventValueOp;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.client.internal.QueueManager;
+import com.gemstone.gemfire.cache.client.internal.*;
import com.gemstone.gemfire.cache.query.internal.cq.CqService;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.DisconnectListener;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.InternalInstantiator;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
-import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.ClientServerObserver;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.*;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.CachedRegionHelper;
import com.gemstone.gemfire.internal.cache.tier.MessageType;
import com.gemstone.gemfire.internal.cache.versions.ConcurrentCacheModificationException;
@@ -95,6 +48,19 @@ import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.security.AuthenticationRequiredException;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLException;
+import java.io.*;
+import java.net.ConnectException;
+import java.net.Socket;
+import java.net.SocketException;
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* <code>CacheClientUpdater</code> is a thread that processes update messages
@@ -214,8 +180,8 @@ public class CacheClientUpdater extends Thread implements ClientUpdater,
private EndpointManager eManager = null;
private Endpoint endpoint = null;
- static private final long MAX_CACHE_WAIT =
- Long.getLong("gemfire.CacheClientUpdater.MAX_WAIT", 120).longValue(); // seconds
+ static private final long MAX_CACHE_WAIT =
+ Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "CacheClientUpdater.MAX_WAIT", 120).longValue(); // seconds
/**
* Return true if cache appears
* @return true if cache appears
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
index ed38bd6..eb701fb 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitor.java
@@ -17,36 +17,25 @@
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicIntegerArray;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.SystemTimer.SystemTimerTask;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.cache.CacheClientStatus;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.IncomingGatewayStatus;
-import com.gemstone.gemfire.internal.cache.TXId;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.Acceptor;
import com.gemstone.gemfire.internal.concurrent.ConcurrentHashSet;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.net.InetAddress;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicIntegerArray;
/**
* Class <code>ClientHealthMonitor</code> is a server-side singleton that
@@ -279,8 +268,8 @@ public class ClientHealthMonitor {
}
}
}
-
- private final Set<TXId> scheduledToBeRemovedTx = Boolean.getBoolean("gemfire.trackScheduledToBeRemovedTx")?
+
+ private final Set<TXId> scheduledToBeRemovedTx = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "trackScheduledToBeRemovedTx") ?
new ConcurrentHashSet<TXId>() : null;
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
index 61ea62a..d4c291f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
@@ -16,35 +16,21 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Serializable;
-import java.util.Arrays;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.DurableClientAttributes;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.VersionedDataInputStream;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.util.Arrays;
/**
* This class represents a ConnectionProxy of the CacheClient
@@ -215,8 +201,8 @@ public final class ClientProxyMembershipID
}
private ClientProxyMembershipID(int id, byte[] clientSideIdentity) {
- Boolean specialCase=Boolean.getBoolean("gemfire.SPECIAL_DURABLE");
- String durableID = this.system.getProperties().getProperty("durable-client-id");
+ Boolean specialCase = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE");
+ String durableID = this.system.getProperties().getProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME);
if (specialCase.booleanValue() && durableID != null && (!durableID.equals(""))) {
this.uniqueId = durable_synch_counter;
} else {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
index 3e07cfe..4ea34f5 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
@@ -17,50 +17,6 @@
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.ByteArrayInputStream;
-import java.io.DataOutput;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.lang.reflect.Method;
-import java.math.BigInteger;
-import java.net.Socket;
-import java.security.Key;
-import java.security.KeyFactory;
-import java.security.KeyPair;
-import java.security.KeyPairGenerator;
-import java.security.KeyStore;
-import java.security.Principal;
-import java.security.PrivateKey;
-import java.security.PublicKey;
-import java.security.SecureRandom;
-import java.security.Signature;
-import java.security.cert.Certificate;
-import java.security.cert.X509Certificate;
-import java.security.spec.X509EncodedKeySpec;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import javax.crypto.Cipher;
-import javax.crypto.KeyAgreement;
-import javax.crypto.SecretKey;
-import javax.crypto.spec.DHParameterSpec;
-import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-import javax.net.ssl.SSLSocket;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireException;
@@ -70,20 +26,9 @@ import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
import com.gemstone.gemfire.cache.client.internal.Connection;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.ClassLoadUtil;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.InternalInstantiator;
-import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.VersionedDataInputStream;
-import com.gemstone.gemfire.internal.VersionedDataOutputStream;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.tier.Acceptor;
import com.gemstone.gemfire.internal.cache.tier.ClientHandShake;
import com.gemstone.gemfire.internal.cache.tier.ConnectionProxy;
@@ -91,11 +36,25 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
-import com.gemstone.gemfire.security.AuthInitialize;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.AuthenticationRequiredException;
-import com.gemstone.gemfire.security.Authenticator;
-import com.gemstone.gemfire.security.GemFireSecurityException;
+import com.gemstone.gemfire.security.*;
+import org.apache.logging.log4j.Logger;
+
+import javax.crypto.Cipher;
+import javax.crypto.KeyAgreement;
+import javax.crypto.SecretKey;
+import javax.crypto.spec.DHParameterSpec;
+import javax.crypto.spec.IvParameterSpec;
+import javax.crypto.spec.SecretKeySpec;
+import javax.net.ssl.SSLSocket;
+import java.io.*;
+import java.lang.reflect.Method;
+import java.math.BigInteger;
+import java.net.Socket;
+import java.security.*;
+import java.security.cert.Certificate;
+import java.security.cert.X509Certificate;
+import java.security.spec.X509EncodedKeySpec;
+import java.util.*;
public class HandShake implements ClientHandShake
{
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
index aef2935..139ccde 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Message.java
@@ -16,20 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.SocketTimeoutException;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.SerializationException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
@@ -41,6 +29,18 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.offheap.StoredObject;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
import com.gemstone.gemfire.internal.util.BlobHelper;
+import org.apache.logging.log4j.Logger;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.net.SocketTimeoutException;
+import java.nio.ByteBuffer;
+import java.nio.channels.SocketChannel;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
/**
* This class encapsulates the wire protocol. It provides accessors to
@@ -85,7 +85,7 @@ public class Message {
/**
* maximum size of an outgoing message. See GEODE-478
*/
- public static int MAX_MESSAGE_SIZE = Integer.getInteger("gemfire.client.max-message-size", DEFAULT_MAX_MESSAGE_SIZE).intValue();
+ public static int MAX_MESSAGE_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "client.max-message-size", DEFAULT_MAX_MESSAGE_SIZE).intValue();
private static final Logger logger = LogService.getLogger();
[18/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
index 33306d8..9b40e48 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/DistributedTransactionDUnitTest.java
@@ -16,53 +16,25 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.CommitIncompleteException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.DistTXState;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXState;
-import com.gemstone.gemfire.internal.cache.TXStateInterface;
-import com.gemstone.gemfire.internal.cache.TXStateProxyImpl;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
import com.gemstone.gemfire.internal.cache.execute.data.CustId;
import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
/**
* Port of GemFireXD's corresponding test for distributed transactions
@@ -83,7 +55,7 @@ public class DistributedTransactionDUnitTest extends CacheTestCase {
Invoke.invokeInEveryVM(new SerializableCallable() {
@Override
public Object call() throws Exception {
- System.setProperty("gemfire.sync-commits", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sync-commits", "true");
return null;
}
});
@@ -103,7 +75,7 @@ public class DistributedTransactionDUnitTest extends CacheTestCase {
Invoke.invokeInEveryVM(new SerializableCallable() {
@Override
public Object call() throws Exception {
- System.setProperty("gemfire.sync-commits", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sync-commits", "false");
return null;
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
index da9b511..7f75cae 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXDUnitTest.java
@@ -16,11 +16,11 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.execute.PRTransactionDUnitTest;
+import java.util.Properties;
+
public class PRDistTXDUnitTest extends PRTransactionDUnitTest {
public PRDistTXDUnitTest(String name) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
index dc0830a..2e539e3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXJUnitTest.java
@@ -16,19 +16,21 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PRTXJUnitTest;
import com.gemstone.gemfire.test.junit.categories.DistributedTransactionsTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Same tests as that of {@link PRTXJUnitTest} after setting
@@ -44,9 +46,9 @@ public class PRDistTXJUnitTest extends PRTXJUnitTest {
@Override
protected void createCache() throws Exception {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
- p.setProperty("distributed-transactions", "true");
- // p.setProperty("log-level", "fine");
+ p.setProperty(MCAST_PORT, "0"); // loner
+ p.setProperty(SystemConfigurationProperties.DISTRIBUTED_TRANSACTIONS, "true");
+ // p.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
this.cache = (GemFireCacheImpl) CacheFactory.create(DistributedSystem
.connect(p));
createRegion();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
index 424c0f6..f02ade9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PRDistTXWithVersionsDUnitTest.java
@@ -16,11 +16,11 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.execute.PRTransactionWithVersionsDUnitTest;
+import java.util.Properties;
+
public class PRDistTXWithVersionsDUnitTest extends
PRTransactionWithVersionsDUnitTest {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
index 745ad60..d9b8ed7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/disttx/PersistentPartitionedRegionWithDistTXDUnitTest.java
@@ -16,13 +16,11 @@
*/
package com.gemstone.gemfire.disttx;
-import java.util.Properties;
-
-import org.junit.Ignore;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.partitioned.PersistentPartitionedRegionWithTransactionDUnitTest;
+import java.util.Properties;
+
/**
* Same tests as that of
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
index 234d032..48fa764 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/AbstractConfigJUnitTest.java
@@ -16,15 +16,16 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.lang.reflect.Method;
import java.util.Map;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
@Category(UnitTest.class)
public class AbstractConfigJUnitTest {
@@ -35,12 +36,12 @@ public class AbstractConfigJUnitTest {
Method method = actc.getClass().getSuperclass().getDeclaredMethod("okToDisplayPropertyValue", String.class);
method.setAccessible(true);
assertFalse((Boolean) method.invoke(actc, "password"));
- assertFalse((Boolean) method.invoke(actc, "cluster-ssl-truststore-password"));
- assertTrue((Boolean) method.invoke(actc, "cluster-ssl-enabled"));
- assertFalse((Boolean) method.invoke(actc, "gateway-ssl-truststore-password"));
- assertFalse((Boolean) method.invoke(actc, "server-ssl-keystore-password"));
- assertTrue((Boolean) method.invoke(actc, "ssl-enabled"));
- assertTrue((Boolean) method.invoke(actc, "conserve-sockets"));
+ assertFalse((Boolean) method.invoke(actc, DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ assertTrue((Boolean) method.invoke(actc, DistributionConfig.CLUSTER_SSL_ENABLED_NAME));
+ assertFalse((Boolean) method.invoke(actc, DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME));
+ assertFalse((Boolean) method.invoke(actc, DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME));
+ assertTrue((Boolean) method.invoke(actc, DistributionConfig.SSL_ENABLED_NAME));
+ assertTrue((Boolean) method.invoke(actc, DistributionConfig.CONSERVE_SOCKETS_NAME));
assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStorePassword"));
assertFalse((Boolean) method.invoke(actc, "javax.net.ssl.keyStoreType"));
assertFalse((Boolean) method.invoke(actc, "sysprop-value"));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
index 706702d..dc1584f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/AvailablePortJUnitTest.java
@@ -16,19 +16,20 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.admin.internal.InetAddressUtil;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.admin.internal.InetAddressUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
/**
* multicast availability is tested in JGroupsMessengerJUnitTest
@@ -64,7 +65,7 @@ public class AvailablePortJUnitTest {
socket = new ServerSocket();
int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
socket.bind(new InetSocketAddress((InetAddress)null, port));
- System.out.println("bind addr="+System.getProperty("gemfire.bind-address"));
+ System.out.println("bind addr=" + System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "bind-address"));
assertFalse(AvailablePort.isPortAvailable(port, AvailablePort.SOCKET));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/Bug51616JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/Bug51616JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/Bug51616JUnitTest.java
index ec5ba98..393d848 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/Bug51616JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/Bug51616JUnitTest.java
@@ -16,28 +16,23 @@
*/
package com.gemstone.gemfire.internal;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class Bug51616JUnitTest {
@Test
public void testBug51616() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
final Cache cache = (new CacheFactory(props)).create();
try {
RegionFactory<Integer, String> rf1 = cache.createRegionFactory(RegionShortcut.PARTITION);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
index 242775e..9d50cc5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireStatSamplerJUnitTest.java
@@ -16,33 +16,13 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.*;
-import static org.junit.Assume.*;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
-
import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.StatisticsType;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.GemFireStatSampler.LocalStatListenerImpl;
import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
-import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.statistics.SampleCollector;
import com.gemstone.gemfire.internal.statistics.StatArchiveHandler;
@@ -50,6 +30,23 @@ import com.gemstone.gemfire.internal.statistics.StatArchiveHandlerConfig;
import com.gemstone.gemfire.internal.stats50.VMStats50;
import com.gemstone.gemfire.internal.util.StopWatch;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.apache.logging.log4j.Logger;
+import org.junit.*;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+import static org.junit.Assume.assumeFalse;
/**
* Integration tests for GemFireStatSampler.
@@ -184,7 +181,7 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
final File archiveFile1 = new File(dir + File.separator + this.testName + ".gfs");
Properties props = createGemFireProperties();
- props.setProperty("statistic-archive-file", archiveFileName);
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, archiveFileName);
connect(props);
GemFireStatSampler statSampler = getGemFireStatSampler();
@@ -363,9 +360,9 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
// set the system property to use KB instead of MB for file size
System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
Properties props = createGemFireProperties();
- props.setProperty("archive-file-size-limit", "1");
- props.setProperty("archive-disk-space-limit", "0");
- props.setProperty("statistic-archive-file", archiveFileName);
+ props.setProperty(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, "1");
+ props.setProperty(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, "0");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, archiveFileName);
connect(props);
assertTrue(getGemFireStatSampler().waitForInitialization(5000));
@@ -411,10 +408,10 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
// set the system property to use KB instead of MB for file size
System.setProperty(HostStatSampler.TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY, "true");
Properties props = createGemFireProperties();
- props.setProperty("statistic-archive-file", archiveFileName);
- props.setProperty("archive-file-size-limit", "1");
- props.setProperty("archive-disk-space-limit", "12");
- props.setProperty("statistic-sample-rate", String.valueOf(sampleRate));
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, archiveFileName);
+ props.setProperty(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, "1");
+ props.setProperty(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, "12");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, String.valueOf(sampleRate));
connect(props);
assertTrue(getGemFireStatSampler().waitForInitialization(5000));
@@ -537,13 +534,13 @@ public class GemFireStatSamplerJUnitTest extends StatSamplerTestCase {
private Properties createGemFireProperties() {
Properties props = new Properties();
- props.setProperty("statistic-sampling-enabled", "true"); // TODO: test true/false
- props.setProperty("enable-time-statistics", "true"); // TODO: test true/false
- props.setProperty("statistic-sample-rate", String.valueOf(STAT_SAMPLE_RATE));
- props.setProperty("archive-file-size-limit", "0");
- props.setProperty("archive-disk-space-limit", "0");
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true"); // TODO: test true/false
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true"); // TODO: test true/false
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, String.valueOf(STAT_SAMPLE_RATE));
+ props.setProperty(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME, "0");
+ props.setProperty(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionIntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionIntegrationJUnitTest.java
index f767cb7..7522211 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionIntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/GemFireVersionIntegrationJUnitTest.java
@@ -16,20 +16,19 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertNotNull;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Properties;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
@Category(IntegrationTest.class)
public class GemFireVersionIntegrationJUnitTest {
@@ -45,7 +44,7 @@ public class GemFireVersionIntegrationJUnitTest {
DistributionConfigImpl.main(args);
Properties props = new Properties();
props.load(new FileInputStream(args[0]));
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
CacheFactory cacheFactory = new CacheFactory(props);
Cache c = cacheFactory.create();
assertNotNull(c);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/InlineKeyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/InlineKeyJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/InlineKeyJUnitTest.java
index a4e3861..9cf0844 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/InlineKeyJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/InlineKeyJUnitTest.java
@@ -16,35 +16,29 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-import java.util.UUID;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.util.ObjectSizer;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryHeapIntKey;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryHeapLongKey;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryHeapObjectKey;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryHeapStringKey1;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryHeapStringKey2;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryHeapUUIDKey;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+import java.util.UUID;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class InlineKeyJUnitTest {
private GemFireCacheImpl createCache() {
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).create();
return result;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
index 63febc0..fc9fef5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JSSESocketJUnitTest.java
@@ -16,21 +16,11 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.LineNumberReader;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.StringReader;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.core.Appender;
@@ -46,10 +36,15 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.*;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* Test creation of server sockets and client sockets with various JSSE
@@ -57,179 +52,180 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
*/
@Category(IntegrationTest.class)
public class JSSESocketJUnitTest {
- public @Rule TestName name = new TestName();
-
+ public
+ @Rule
+ TestName name = new TestName();
+
private static final org.apache.logging.log4j.Logger logger = LogService.getLogger();
ServerSocket acceptor;
Socket server;
-
- static ByteArrayOutputStream baos = new ByteArrayOutputStream( );
-
+
+ static ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
private int randport = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
-
+
@Before
- public void setUp( ) throws Exception {
- System.out.println( "\n\n########## setup " + name.getMethodName() + " ############\n\n" );
+ public void setUp() throws Exception {
+ System.out.println("\n\n########## setup " + name.getMethodName() + " ############\n\n");
server = null;
acceptor = null;
baos.reset();
}
-
+
@After
- public void tearDown( ) throws Exception {
- System.out.println( "\n\n########## teardown " + name.getMethodName() + " ############\n\n" );
-
- if ( server != null ) {
+ public void tearDown() throws Exception {
+ System.out.println("\n\n########## teardown " + name.getMethodName() + " ############\n\n");
+
+ if (server != null) {
server.close();
}
- if ( acceptor != null ) {
+ if (acceptor != null) {
acceptor.close();
}
- System.out.println( baos.toString() );
+ System.out.println(baos.toString());
}
-
+
//----- test methods ------
-
+
@Test
- public void testSSLSocket( ) throws Exception {
+ public void testSSLSocket() throws Exception {
final Object[] receiver = new Object[1];
-
+
TestAppender.create();
-
+
// Get original base log level
Level originalBaseLevel = LogService.getBaseLogLevel();
try {
- // Set base log level to debug to log the SSL messages
- LogService.setBaseLogLevel(Level.DEBUG);
- {
- System.setProperty( "gemfire.mcast-port", "0");
- System.setProperty( "gemfire.ssl-enabled", "true" );
- System.setProperty( "gemfire.ssl-require-authentication", "true" );
- System.setProperty( "gemfire.ssl-ciphers", "any" );
- System.setProperty( "gemfire.ssl-protocols", "TLSv1.2" );
-
- File jks = findTestJKS();
- System.setProperty( "javax.net.ssl.trustStore", jks.getCanonicalPath() );
- System.setProperty( "javax.net.ssl.trustStorePassword", "password" );
- System.setProperty( "javax.net.ssl.keyStore", jks.getCanonicalPath() );
- System.setProperty( "javax.net.ssl.keyStorePassword", "password" );
- }
-
- assertTrue(SocketCreator.getDefaultInstance().useSSL());
-
- Thread serverThread = startServer( receiver );
-
- Socket client = SocketCreator.getDefaultInstance().connectForServer( InetAddress.getByName("localhost"), randport );
-
- ObjectOutputStream oos = new ObjectOutputStream( client.getOutputStream() );
- String expected = new String( "testing " + name.getMethodName() );
- oos.writeObject( expected );
- oos.flush();
-
- ThreadUtils.join(serverThread, 30 * 1000);
-
- client.close();
- if ( expected.equals( receiver[0] ) ) {
- System.out.println( "received " + receiver[0] + " as expected." );
- } else {
- throw new Exception( "Expected \"" + expected + "\" but received \"" + receiver[0] + "\"" );
- }
-
- String logOutput = baos.toString();
- StringReader sreader = new StringReader( logOutput );
- LineNumberReader reader = new LineNumberReader( sreader );
- int peerLogCount = 0;
- String line = null;
- while( (line = reader.readLine()) != null ) {
-
- if (line.matches( ".*peer CN=.*" ) ) {
- System.out.println( "Found peer log statement." );
- peerLogCount++;
+ // Set base log level to debug to log the SSL messages
+ LogService.setBaseLogLevel(Level.DEBUG);
+ {
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_ENABLED_NAME, "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_CIPHERS_NAME, "any");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_PROTOCOLS_NAME, "TLSv1.2");
+
+ File jks = findTestJKS();
+ System.setProperty("javax.net.ssl.trustStore", jks.getCanonicalPath());
+ System.setProperty("javax.net.ssl.trustStorePassword", "password");
+ System.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath());
+ System.setProperty("javax.net.ssl.keyStorePassword", "password");
+ }
+
+ assertTrue(SocketCreator.getDefaultInstance().useSSL());
+
+ Thread serverThread = startServer(receiver);
+
+ Socket client = SocketCreator.getDefaultInstance().connectForServer(InetAddress.getByName("localhost"), randport);
+
+ ObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream());
+ String expected = new String("testing " + name.getMethodName());
+ oos.writeObject(expected);
+ oos.flush();
+
+ ThreadUtils.join(serverThread, 30 * 1000);
+
+ client.close();
+ if (expected.equals(receiver[0])) {
+ System.out.println("received " + receiver[0] + " as expected.");
+ } else {
+ throw new Exception("Expected \"" + expected + "\" but received \"" + receiver[0] + "\"");
+ }
+
+ String logOutput = baos.toString();
+ StringReader sreader = new StringReader(logOutput);
+ LineNumberReader reader = new LineNumberReader(sreader);
+ int peerLogCount = 0;
+ String line = null;
+ while ((line = reader.readLine()) != null) {
+
+ if (line.matches(".*peer CN=.*")) {
+ System.out.println("Found peer log statement.");
+ peerLogCount++;
+ }
+ }
+ if (peerLogCount != 2) {
+ throw new Exception("Expected to find to peer identities logged.");
}
- }
- if ( peerLogCount != 2 ) {
- throw new Exception( "Expected to find to peer identities logged." );
- }
} finally {
// Reset original base log level
LogService.setBaseLogLevel(originalBaseLevel);
}
}
-
- /** not actually related to this test class, but this is as good a place
- as any for this little test of the client-side ability to tell gemfire
- to use a given socket factory. We just test the connectForClient method
- to see if it's used */
+
+ /**
+ * not actually related to this test class, but this is as good a place
+ * as any for this little test of the client-side ability to tell gemfire
+ * to use a given socket factory. We just test the connectForClient method
+ * to see if it's used
+ */
@Test
public void testClientSocketFactory() {
- System.getProperties().put("gemfire.clientSocketFactory",
- TSocketFactory.class.getName());
- System.getProperties().remove( "gemfire.ssl-enabled");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "clientSocketFactory",
+ TSocketFactory.class.getName());
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.SSL_ENABLED_NAME);
SocketCreator.getDefaultInstance(new Properties());
factoryInvoked = false;
try {
try {
Socket sock = SocketCreator.getDefaultInstance().connectForClient("localhost", 12345,
- 0);
+ 0);
sock.close();
fail("socket factory was not invoked");
} catch (IOException e) {
assertTrue("socket factory was not invoked: " + factoryInvoked, factoryInvoked);
}
} finally {
- System.getProperties().remove("gemfire.clientSocketFactory");
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "clientSocketFactory");
SocketCreator.getDefaultInstance().initializeClientSocketFactory();
}
}
-
+
static boolean factoryInvoked;
-
- public static class TSocketFactory implements com.gemstone.gemfire.distributed.ClientSocketFactory
- {
+
+ public static class TSocketFactory implements com.gemstone.gemfire.distributed.ClientSocketFactory {
public TSocketFactory() {
}
-
+
public Socket createSocket(InetAddress address, int port) throws IOException {
JSSESocketJUnitTest.factoryInvoked = true;
throw new IOException("splort!");
}
}
-
-
+
//------------- utilities -----
-
+
private File findTestJKS() {
return new File(TestUtil.getResourcePath(getClass(), "/ssl/trusted.keystore"));
}
-
- private Thread startServer( final Object[] receiver ) throws Exception {
- final ServerSocket ss = SocketCreator.getDefaultInstance().createServerSocket( randport, 0, InetAddress.getByName( "localhost" ) );
-
-
- Thread t = new Thread( new Runnable() {
- public void run( ) {
+
+ private Thread startServer(final Object[] receiver) throws Exception {
+ final ServerSocket ss = SocketCreator.getDefaultInstance().createServerSocket(randport, 0, InetAddress.getByName("localhost"));
+
+ Thread t = new Thread(new Runnable() {
+ public void run() {
try {
- Socket s = ss.accept();
- SocketCreator.getDefaultInstance().configureServerSSLSocket( s );
- ObjectInputStream ois = new ObjectInputStream( s.getInputStream() );
- receiver[0] = ois.readObject( );
- server = s;
- acceptor = ss;
- } catch ( Exception e ) {
+ Socket s = ss.accept();
+ SocketCreator.getDefaultInstance().configureServerSSLSocket(s);
+ ObjectInputStream ois = new ObjectInputStream(s.getInputStream());
+ receiver[0] = ois.readObject();
+ server = s;
+ acceptor = ss;
+ } catch (Exception e) {
e.printStackTrace();
receiver[0] = e;
}
}
- }, name.getMethodName() + "-server" );
+ }, name.getMethodName() + "-server");
t.start();
return t;
}
public static final class TestAppender extends AbstractAppender {
private static final String APPENDER_NAME = TestAppender.class.getName();
- private final static String SOCKET_CREATOR_CLASSNAME= SocketCreator.class.getName();
-
+ private final static String SOCKET_CREATOR_CLASSNAME = SocketCreator.class.getName();
+
private TestAppender() {
super(APPENDER_NAME, null, PatternLayout.createDefaultLayout());
start();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
index 56b715f..ea3fd64 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarClassLoaderJUnitTest.java
@@ -16,21 +16,19 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.ByteArrayInputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.RandomAccessFile;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.execute.Function;
+import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.ResultSender;
+import com.gemstone.gemfire.internal.cache.InternalCache;
+import com.gemstone.gemfire.internal.cache.execute.FunctionContextImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
import java.lang.management.ThreadMXBean;
@@ -44,19 +42,8 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.regex.Pattern;
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultSender;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.cache.InternalCache;
-import com.gemstone.gemfire.internal.cache.execute.FunctionContextImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* TODO: Need to fix this testDeclarableFunctionsWithParms and testClassOnClasspath on Windows:
@@ -258,7 +245,7 @@ public class JarClassLoaderJUnitTest {
final File jarFile1 = new File(JAR_PREFIX + "JarClassLoaderJUnit.jar#1");
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ properties.setProperty(MCAST_PORT, "0");
CacheFactory cacheFactory = new CacheFactory(properties);
this.cache = (InternalCache) cacheFactory.create();
@@ -330,7 +317,7 @@ public class JarClassLoaderJUnitTest {
final File jarFile2 = new File(JAR_PREFIX + "JarClassLoaderJUnit.jar#2");
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ properties.setProperty(MCAST_PORT, "0");
CacheFactory cacheFactory = new CacheFactory(properties);
this.cache = (InternalCache) cacheFactory.create();
@@ -406,7 +393,7 @@ public class JarClassLoaderJUnitTest {
final File jarFile2 = new File(JAR_PREFIX + "JarClassLoaderJUnit.jar#2");
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ properties.setProperty(MCAST_PORT, "0");
CacheFactory cacheFactory = new CacheFactory(properties);
this.cache = (InternalCache) cacheFactory.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
index e4c0faa..84a72b0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/JarDeployerDUnitTest.java
@@ -16,28 +16,6 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.RandomAccessFile;
-import java.nio.channels.FileLock;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.BrokenBarrierException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.CyclicBarrier;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.junit.Test;
-
import com.gemstone.gemfire.cache.execute.Execution;
import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.cache.execute.ResultCollector;
@@ -49,6 +27,19 @@ import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
+import org.junit.Test;
+
+import java.io.*;
+import java.nio.channels.FileLock;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.CyclicBarrier;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* Unit tests for the JarDeployer class
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
index f7b6529..5e179f2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldDUnitTest.java
@@ -16,19 +16,7 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
@@ -43,6 +31,15 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class PdxDeleteFieldDUnitTest extends CacheTestCase{
final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
@@ -56,8 +53,8 @@ public class PdxDeleteFieldDUnitTest extends CacheTestCase{
final Properties props = new Properties();
final int[] locatorPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+locatorPorts[0]+"],localhost["+locatorPorts[1]+"]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locatorPorts[0] + "],localhost[" + locatorPorts[1] + "]");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File f = new File(DS_NAME);
@@ -74,7 +71,7 @@ public class PdxDeleteFieldDUnitTest extends CacheTestCase{
vm1.invoke(new SerializableCallable() {
public Object call() throws Exception {
disconnectFromDS();
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[0]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[0] + "]");
final Cache cache = (new CacheFactory(props)).setPdxPersistent(true).setPdxDiskStore(DS_NAME).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setDiskDirs(new File[]{f});
@@ -90,7 +87,7 @@ public class PdxDeleteFieldDUnitTest extends CacheTestCase{
vm2.invoke(new SerializableCallable() {
public Object call() throws Exception {
disconnectFromDS();
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[1]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[1] + "]");
final Cache cache = (new CacheFactory(props)).setPdxReadSerialized(true).setPdxPersistent(true).setPdxDiskStore(DS_NAME2).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setDiskDirs(new File[]{f2});
@@ -128,7 +125,7 @@ public class PdxDeleteFieldDUnitTest extends CacheTestCase{
vm1.invoke(new SerializableCallable() {
public Object call() throws Exception {
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[0]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[0] + "]");
final Cache cache = (new CacheFactory(props)).setPdxPersistent(true).setPdxDiskStore(DS_NAME).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setDiskDirs(new File[]{f});
@@ -142,7 +139,7 @@ public class PdxDeleteFieldDUnitTest extends CacheTestCase{
vm2.invoke(new SerializableCallable() {
public Object call() throws Exception {
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[1]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[1] + "]");
final Cache cache = (new CacheFactory(props)).setPdxReadSerialized(true).setPdxPersistent(true).setPdxDiskStore(DS_NAME2).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldJUnitTest.java
index 17efa97..7b12de8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxDeleteFieldJUnitTest.java
@@ -16,37 +16,25 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.util.BlobHelper;
-import com.gemstone.gemfire.pdx.PdxInstance;
-import com.gemstone.gemfire.pdx.PdxInstanceFactory;
-import com.gemstone.gemfire.pdx.PdxReader;
-import com.gemstone.gemfire.pdx.PdxSerializable;
-import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.pdx.internal.PdxField;
-import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
-import com.gemstone.gemfire.pdx.internal.PdxType;
-import com.gemstone.gemfire.pdx.internal.PdxUnreadData;
-import com.gemstone.gemfire.pdx.internal.TypeRegistry;
+import com.gemstone.gemfire.pdx.*;
+import com.gemstone.gemfire.pdx.internal.*;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertSame;
@Category(IntegrationTest.class)
public class PdxDeleteFieldJUnitTest {
@@ -55,8 +43,8 @@ public class PdxDeleteFieldJUnitTest {
public void testPdxDeleteField() throws Exception {
String DS_NAME = "PdxDeleteFieldJUnitTestDiskStore";
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
File f = new File(DS_NAME);
f.mkdir();
try {
@@ -114,8 +102,8 @@ public class PdxDeleteFieldJUnitTest {
@Test
public void testPdxFieldDelete() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
try {
Cache cache = (new CacheFactory(props)).create();
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
index f10d953..ede5e16 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameDUnitTest.java
@@ -16,19 +16,7 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
@@ -44,6 +32,15 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class PdxRenameDUnitTest extends CacheTestCase{
final List<String> filesToBeDeleted = new CopyOnWriteArrayList<String>();
@@ -63,8 +60,8 @@ public class PdxRenameDUnitTest extends CacheTestCase{
this.filesToBeDeleted.add(DS_NAME2);
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+locatorPorts[0]+"],localhost["+locatorPorts[1]+"]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locatorPorts[0] + "],localhost[" + locatorPorts[1] + "]");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
Host host = Host.getHost(0);
@@ -74,7 +71,7 @@ public class PdxRenameDUnitTest extends CacheTestCase{
vm1.invoke(new SerializableCallable() {
public Object call() throws Exception {
disconnectFromDS();
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[0]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[0] + "]");
final Cache cache = (new CacheFactory(props)).setPdxPersistent(true).setPdxDiskStore(DS_NAME).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setDiskDirs(new File[]{f});
@@ -90,7 +87,7 @@ public class PdxRenameDUnitTest extends CacheTestCase{
vm2.invoke(new SerializableCallable() {
public Object call() throws Exception {
disconnectFromDS();
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[1]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[1] + "]");
final Cache cache = (new CacheFactory(props)).setPdxReadSerialized(true).setPdxPersistent(true).setPdxDiskStore(DS_NAME2).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setDiskDirs(new File[]{f2});
@@ -135,7 +132,7 @@ public class PdxRenameDUnitTest extends CacheTestCase{
vm1.invoke(new SerializableCallable() {
public Object call() throws Exception {
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[0]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[0] + "]");
final Cache cache = (new CacheFactory(props)).setPdxPersistent(true).setPdxDiskStore(DS_NAME).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
dsf.setDiskDirs(new File[]{f});
@@ -150,7 +147,7 @@ public class PdxRenameDUnitTest extends CacheTestCase{
vm2.invoke(new SerializableCallable() {
public Object call() throws Exception {
disconnectFromDS();
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPorts[1]+"]");
+ props.setProperty(START_LOCATOR, "localhost[" + locatorPorts[1] + "]");
final Cache cache = (new CacheFactory(props)).setPdxReadSerialized(true).setPdxPersistent(true).setPdxDiskStore(DS_NAME2).create();
DiskStoreFactory dsf = cache.createDiskStoreFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameJUnitTest.java
index 875a5cc..5f6aac5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/PdxRenameJUnitTest.java
@@ -16,22 +16,7 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.Properties;
-import java.util.regex.Pattern;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
import com.gemstone.gemfire.pdx.PdxReader;
import com.gemstone.gemfire.pdx.PdxSerializable;
@@ -39,6 +24,17 @@ import com.gemstone.gemfire.pdx.PdxWriter;
import com.gemstone.gemfire.pdx.internal.EnumInfo;
import com.gemstone.gemfire.pdx.internal.PdxType;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
public class PdxRenameJUnitTest {
@@ -46,8 +42,8 @@ public class PdxRenameJUnitTest {
public void testGetPdxTypes() throws Exception {
String DS_NAME = "PdxRenameJUnitTestDiskStore";
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
File f = new File(DS_NAME);
f.mkdir();
try {
@@ -79,8 +75,8 @@ public class PdxRenameJUnitTest {
public void testPdxRename() throws Exception {
String DS_NAME = "PdxRenameJUnitTestDiskStore";
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
File f = new File(DS_NAME);
f.mkdir();
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java
index aaa6a3c..d2c9de9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest.java
@@ -16,18 +16,19 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
* See bug 52093.
@@ -39,8 +40,8 @@ public class RegionOperationsEqualityShouldUseArrayEqualsIntegrationTest {
private GemFireCacheImpl createCache() {
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).create();
return result;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
index c4d643d..a931fe8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
@@ -16,17 +16,18 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.GemFireProperties;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.MemberMXBean;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
/**
* Test that DistributionConfigImpl handles SSL options correctly.
@@ -37,7 +38,7 @@ public class SSLConfigIntegrationJUnitTest {
@Test
public void testIsClusterSSLRequireAuthentication() {
- Cache mCache = new CacheFactory().set("mcast-port", "0").set("jmx-manager", "true").create();
+ Cache mCache = new CacheFactory().set(MCAST_PORT, "0").set(DistributionConfig.JMX_MANAGER_NAME, "true").create();
ManagementService mService = ManagementService.getManagementService(mCache);
MemberMXBean mMemberBean = mService.getMemberMXBean();
GemFireProperties mGemFireProperties = mMemberBean.listGemFireProperties();
[22/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
index 1efae19..f5190f6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
@@ -16,19 +16,7 @@
*/
package com.gemstone.gemfire.cache30;
-
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.MembershipAttributes;
-import com.gemstone.gemfire.cache.LossAction;
-import com.gemstone.gemfire.cache.ResumptionAction;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.CachePerfStats;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -37,6 +25,8 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Properties;
+
public class CacheRegionsReliablityStatsCheckDUnitTest extends CacheTestCase {
public CacheRegionsReliablityStatsCheckDUnitTest(String name) {
super(name);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
index 48fa935..bc50219 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml30DUnitTest.java
@@ -16,54 +16,22 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileWriter;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Properties;
-
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import junit.framework.AssertionFailedError;
-
-import org.xml.sax.SAXException;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheXmlException;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.DiskWriteAttributesFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.ObjectSizer;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.DiskWriteAttributesImpl;
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser;
-import com.gemstone.gemfire.internal.cache.xmlcache.ClientCacheCreation;
-import com.gemstone.gemfire.internal.cache.xmlcache.Declarable2;
-import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
-import com.gemstone.gemfire.internal.cache.xmlcache.RegionCreation;
+import com.gemstone.gemfire.internal.cache.xmlcache.*;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.util.test.TestUtil;
+import junit.framework.AssertionFailedError;
+import org.xml.sax.SAXException;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.Properties;
/**
* Tests the functionality of loading a declarative caching file when
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
index 0a275f5..80a845a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
@@ -19,15 +19,19 @@ package com.gemstone.gemfire.cache30;
import com.company.app.DBLoader;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.xmlcache.*;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheTransactionManagerCreation;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
+import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
-import java.io.*;
-import java.util.*;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
/**
* Tests the declarative caching functionality introduced in GemFire
@@ -159,7 +163,7 @@ public class CacheXml45DUnitTest extends CacheXml41DUnitTest {
// make our system play the roles used by this test so the create regions
// will not think the a required role is missing
Properties config = new Properties();
- config.setProperty("roles", MY_ROLES);
+ config.setProperty(DistributionConfig.ROLES_NAME, MY_ROLES);
this.xmlProps = config;
}
DistributedRegion.ignoreReconnect = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
index afcb9b0..6ba30f2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
@@ -20,9 +20,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.List;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Declarable;
import com.gemstone.gemfire.cache.Region;
@@ -39,6 +36,9 @@ import com.gemstone.gemfire.internal.cache.xmlcache.ResourceManagerCreation;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.test.dunit.IgnoredException;
+import java.util.List;
+import java.util.Properties;
+
public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
private static final long serialVersionUID = -6437436147079728413L;
@@ -58,7 +58,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
@SuppressWarnings("rawtypes")
public void testEnableOffHeapMemory() {
try {
- System.setProperty("gemfire."+DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
final String regionName = "testEnableOffHeapMemory";
@@ -82,7 +82,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
assertEquals(true, ((LocalRegion)regionAfter).getOffHeap());
regionAfter.localDestroyRegion();
} finally {
- System.clearProperty("gemfire."+DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME);
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME);
}
}
@@ -158,7 +158,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
final float high = 95.0f;
try {
- System.setProperty("gemfire."+DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
Cache c;
ResourceManagerCreation rmc = new ResourceManagerCreation();
@@ -236,7 +236,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
assertEquals(0f, c.getResourceManager().getEvictionOffHeapPercentage());
assertEquals(0f, c.getResourceManager().getCriticalOffHeapPercentage());
} finally {
- System.clearProperty("gemfire."+DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME);
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
index 8c9776e..eef0788 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
@@ -16,13 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
@@ -32,6 +25,12 @@ import com.gemstone.gemfire.internal.cache.xmlcache.ClientCacheCreation;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.util.test.TestUtil;
+import java.io.*;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class CacheXmlTestCase extends CacheTestCase {
/** The file used by this test (method) to initialize the cache */
@@ -97,8 +96,8 @@ public class CacheXmlTestCase extends CacheTestCase {
// make it a loner
if (lonerDistributedSystem) {
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
}
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
index 6c4bcf6..bfd32fc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClearMultiVmCallBkDUnitTest.java
@@ -22,17 +22,7 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -40,6 +30,8 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Properties;
+
/**
*
*/
@@ -81,7 +73,7 @@ public class ClearMultiVmCallBkDUnitTest extends DistributedTestCase{
public static void createCache(){
try{
CacheListener aListener = new ListenerCallBk();
-// props.setProperty("mcast-port", "1234");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
// ds = DistributedSystem.connect(props);
ds = (new ClearMultiVmCallBkDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index da3614c..5fc0813 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -29,7 +29,6 @@ import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.DurableClientAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
import com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl;
@@ -49,6 +48,9 @@ import java.net.Socket;
import java.util.*;
import java.util.concurrent.TimeUnit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Tests the ClientMembership API including ClientMembershipListener.
*
@@ -824,8 +826,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
// create bridge client in controller vm...
System.out.println("[testClientMembershipEventsInClient] create bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
try {
@@ -1026,8 +1028,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
public Object call() {
System.out.println("[testClientMembershipEventsInServer] create bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
properties = config;
DistributedSystem s = getSystem(config);
AttributesFactory factory = new AttributesFactory();
@@ -1209,8 +1211,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
// create loner in controller vm...
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
properties = config;
getSystem(config);
@@ -1291,8 +1293,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
public Object call() {
System.out.println("[testGetConnectedClients] create bridge client");
properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
getSystem(properties);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -1388,8 +1390,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
System.out.println("[testGetConnectedServers] create bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
properties = config;
getSystem(config);
getCache();
@@ -1493,8 +1495,8 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
System.out.println("[testGetNotifiedClients] create bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
properties = config;
getSystem();
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
index 325da80..b9614cc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientRegisterInterestDUnitTest.java
@@ -16,22 +16,19 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.IOException;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.cache.client.SubscriptionNotEnabledException;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests the client register interest
@@ -90,8 +87,8 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
LogWriterUtils.getLogWriter().info("[testBug35381] create bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
getCache();
@@ -222,8 +219,8 @@ public class ClientRegisterInterestDUnitTest extends ClientServerTestCase {
// create the bridge client
LogWriterUtils.getLogWriter().info("[testBug35654] create bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
index cb8ae57..b1e6694 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
@@ -16,43 +16,22 @@
*/
package com.gemstone.gemfire.cache30;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.Collection;
-import java.util.HashMap;
-
-import junit.framework.AssertionFailedError;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.TombstoneService;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import junit.framework.AssertionFailedError;
+
+import java.util.*;
/**
* concurrency-control tests for client/server
@@ -591,7 +570,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
ClientCacheFactory cf = new ClientCacheFactory();
cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port);
cf.setPoolSubscriptionEnabled(true);
- cf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache cache = getClientCache(cf);
ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
crf.setConcurrencyChecksEnabled(ccEnabled);
@@ -615,9 +594,9 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
cf.setPoolSubscriptionEnabled(true);
cf.setPoolSubscriptionRedundancy(1);
// bug #50683 - secondary durable queue retains all GC messages
- cf.set("durable-client-id", ""+vm.getPid());
- cf.set("durable-client-timeout", "" + 200);
- cf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ cf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, "" + vm.getPid());
+ cf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + 200);
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache cache = getClientCache(cf);
ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
crf.setConcurrencyChecksEnabled(ccEnabled);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
index 8555a07..71b3dd7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistAckMapMethodsDUnitTest.java
@@ -22,31 +22,15 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
/**
*
@@ -91,7 +75,7 @@ public class DistAckMapMethodsDUnitTest extends DistributedTestCase{
public static void createCache(){
try{
- //props.setProperty("mcast-port", "1234");
+ //props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
//ds = DistributedSystem.connect(props);
ds = (new DistAckMapMethodsDUnitTest("temp")).getSystem(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
index 810f1a7..c9c059a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Distributed Ack Overflow Region with ConcurrencyChecksEnabled and OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
index 13ec4a3..f81b0df 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Distributed Ack Persistent Region with ConcurrencyChecksEnabled and OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
index 3684e70..7594cc2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
@@ -20,58 +20,25 @@
*/
package com.gemstone.gemfire.cache30;
-import java.net.UnknownHostException;
-import java.util.Collections;
-import java.util.Properties;
-import java.util.Set;
-
-import junit.framework.Assert;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.cache.util.GatewayConflictHelper;
-import com.gemstone.gemfire.cache.util.GatewayConflictResolver;
-import com.gemstone.gemfire.cache.util.TimestampedEntryEvent;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.NetMember;
-import com.gemstone.gemfire.internal.cache.AbstractRegionEntry;
-import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor.InitialImageAdvice;
-import com.gemstone.gemfire.internal.cache.DistributedCacheOperation;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InitialImageOperation;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.RegionClearedException;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.Token;
-import com.gemstone.gemfire.internal.cache.TombstoneService;
-import com.gemstone.gemfire.internal.cache.UpdateOperation;
-import com.gemstone.gemfire.internal.cache.VersionTagHolder;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.versions.VMVersionTag;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.cache.vmotion.VMotionObserver;
import com.gemstone.gemfire.internal.cache.vmotion.VMotionObserverHolder;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.net.UnknownHostException;
+import java.util.Properties;
+import java.util.Set;
public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitTest {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
index 77fcd83..f1ba65e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Distributed Ack Region with ConcurrencyChecksEnabled and OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
index 30786e5..78d4138 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
@@ -16,20 +16,11 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
/**
* This class tests the functionality of a cache {@link Region region}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
index cfe7642..2f6bea9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Distributed Ack Region with OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
index 011b8f5..816ef6f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
@@ -16,37 +16,24 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.pdx.PdxReader;
import com.gemstone.gemfire.pdx.PdxSerializable;
import com.gemstone.gemfire.pdx.PdxSerializationException;
import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
@@ -252,9 +239,9 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
Properties p = new Properties();
p.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
p.put(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "multicast");
- p.put(DistributionConfig.MCAST_PORT_NAME, mcastport);
- p.put(DistributionConfig.MCAST_TTL_NAME, mcastttl);
- p.put(DistributionConfig.LOCATORS_NAME, "localhost[" + locatorPort +"]");
+ p.put(MCAST_PORT, mcastport);
+ p.put(MCAST_TTL, mcastttl);
+ p.put(LOCATORS, "localhost[" + locatorPort + "]");
p.put(DistributionConfig.LOG_LEVEL_NAME, "info");
return p;
}
@@ -284,9 +271,9 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
public Object call() {
final File locatorLogFile = new File(getTestMethodName() + "-locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(DistributionConfig.NAME_NAME, "LocatorWithMcast");
- locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, mcastport);
- locatorProps.setProperty(DistributionConfig.MCAST_TTL_NAME, mcastttl);
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "LocatorWithMcast");
+ locatorProps.setProperty(MCAST_PORT, mcastport);
+ locatorProps.setProperty(MCAST_TTL, mcastttl);
locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
//locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
index 9e9348b..15a045c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
@@ -16,33 +16,17 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Map;
+import java.util.Properties;
public class DistributedNoAckRegionCCEDUnitTest extends DistributedNoAckRegionDUnitTest {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
index d6c91a1..7c302b5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Distributed Ack Region with ConcurrencyChecksEnabled and OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
index 30c4c3e..de7b4df 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Distributed NoAck Region with OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
index 3c8b6e5..d054c9f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
@@ -20,16 +20,7 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
-import org.junit.Ignore;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.RegionClearedException;
@@ -40,6 +31,9 @@ import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
+import org.junit.Ignore;
+
+import java.util.Properties;
/**
* This test is only for GLOBAL REPLICATE Regions. Tests are
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
index 39f0b1a..1ac1966 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Global Region with ConcurrencyChecksEnabled and OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
index c178917..95ce20a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Global Region with OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
index 5d53968..5dc4848 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
@@ -26,6 +24,8 @@ import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests the basic functionality of the lru eviction
* controller and its statistics using off-heap regions.
@@ -56,8 +56,8 @@ public class OffHeapLRUEvictionControllerDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
- Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ Properties properties = super.getDistributedSystemProperties();
+ properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
index 3dbe5f9..ae2a698 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests Partitioned Region with OffHeap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
index 6a38b99..3b6fbda 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
@@ -16,31 +16,17 @@
*/
package com.gemstone.gemfire.cache30;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.CachePerfStats;
+import com.gemstone.gemfire.internal.cache.DistributedRegion;
+import com.gemstone.gemfire.test.dunit.*;
+
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheEvent;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.cache.CachePerfStats;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-
/**
* Test to make sure message queuing works.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java
index fe39484..fc69bda 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RRSynchronizationDUnitTest.java
@@ -16,42 +16,13 @@
*/
package com.gemstone.gemfire.cache30;
-
-import java.util.Properties;
-import java.util.concurrent.TimeoutException;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.SizeableRunnable;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.Token;
-import com.gemstone.gemfire.internal.cache.VMCachedDeserializable;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.versions.VMVersionTag;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
/**
* concurrency-control tests for client/server
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
index 948e75a..9c3498d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
@@ -48,6 +48,8 @@ import java.util.Properties;
import java.util.Set;
import java.util.concurrent.TimeUnit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
@SuppressWarnings("serial")
public class ReconnectDUnitTest extends CacheTestCase
{
@@ -117,8 +119,8 @@ public class ReconnectDUnitTest extends CacheTestCase
dsProperties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
dsProperties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "false");
dsProperties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- dsProperties.put(DistributionConfig.LOCATORS_NAME, "localHost["+locatorPort+"]");
- dsProperties.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ dsProperties.put(LOCATORS, "localHost[" + locatorPort + "]");
+ dsProperties.put(MCAST_PORT, "0");
dsProperties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
dsProperties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
}
@@ -196,8 +198,8 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put("cache-xml-file", xmlFileLoc+ fileSeparator +"MyDisconnect-cache.xml");
- props.put("max-num-reconnect-tries", "2");
+ props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
// props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
Cache cache = new CacheFactory(props).create();
IgnoredException.addIgnoredException("com.gemstone.gemfire.ForcedDisconnectException||Possible loss of quorum");
@@ -265,9 +267,9 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put("cache-xml-file", xmlFileLoc+ fileSeparator +"MyDisconnect-cache.xml");
- props.put("max-wait-time-reconnect", "1000");
- props.put("max-num-reconnect-tries", "2");
+ props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
+ props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
// props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
Cache cache = new CacheFactory(props).create();
Region myRegion = cache.getRegion("root/myRegion");
@@ -285,11 +287,11 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
final Properties props = getDistributedSystemProperties();
- props.put("cache-xml-file", xmlFileLoc+ fileSeparator +"MyDisconnect-cache.xml");
- props.put("max-wait-time-reconnect", "5000");
- props.put("max-num-reconnect-tries", "2");
- props.put("start-locator", "localhost["+secondLocPort+"]");
- props.put("locators", props.get("locators")+",localhost["+secondLocPort+"]");
+ props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "5000");
+ props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
+ props.put(START_LOCATOR, "localhost[" + secondLocPort + "]");
+ props.put(LOCATORS, props.get(LOCATORS) + ",localhost[" + secondLocPort + "]");
// props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
getSystem(props);
// MembershipManagerHelper.getMembershipManager(system).setDebugJGroups(true);
@@ -480,9 +482,9 @@ public class ReconnectDUnitTest extends CacheTestCase
{
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put("max-wait-time-reconnect", "1000");
- props.put("max-num-reconnect-tries", "2");
- props.put("locators", props.get("locators")+",localhost["+locPort+"]");
+ props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
+ props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
+ props.put(LOCATORS, props.get(LOCATORS) + ",localhost[" + locPort + "]");
props.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
try {
Locator.startLocatorAndDS(secondLocPort, null, props);
@@ -504,9 +506,9 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put("cache-xml-file", xmlFileLoc+ fileSeparator +"MyDisconnect-cache.xml");
- props.put("max-wait-time-reconnect", "1000");
- props.put("max-num-reconnect-tries", "2");
+ props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
+ props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
ReconnectDUnitTest.savedSystem = getSystem(props);
Cache cache = getCache();
Region myRegion = cache.getRegion("root/myRegion");
@@ -668,10 +670,10 @@ public class ReconnectDUnitTest extends CacheTestCase
LogWriterUtils.getLogWriter().info("####### STARTING THE REAL TEST ##########");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put("cache-xml-file", xmlFileLoc+ fileSeparator +"RoleReconnect-cache.xml");
- props.put("max-wait-time-reconnect", "200");
+ props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "RoleReconnect-cache.xml");
+ props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "200");
final int timeReconnect = 3;
- props.put("max-num-reconnect-tries", "3");
+ props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "3");
props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
// props.put("log-file", "roleLossVM0.log");
@@ -890,9 +892,9 @@ public class ReconnectDUnitTest extends CacheTestCase
LogWriterUtils.getLogWriter().info("Starting the test and creating the cache and regions etc ...");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put("cache-xml-file", "RoleRegained.xml");
- props.put("max-wait-time-reconnect", "3000");
- props.put("max-num-reconnect-tries", "8");
+ props.put(DistributionConfig.CACHE_XML_FILE_NAME, "RoleRegained.xml");
+ props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "3000");
+ props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "8");
props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
getSystem(props);
@@ -1041,7 +1043,7 @@ public class ReconnectDUnitTest extends CacheTestCase
public void run() {
locatorPort = locPort;
final Properties props = getDistributedSystemProperties();
- props.put("max-wait-time-reconnect", "1000");
+ props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
// props.put("log-file", "");
dsProperties = props;
ReconnectDUnitTest.savedSystem = getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
index 46ff2b7..df2699e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectedCacheServerDUnitTest.java
@@ -18,10 +18,10 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
-import com.gemstone.gemfire.internal.cache.CacheServerLauncher;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -58,7 +58,7 @@ public class ReconnectedCacheServerDUnitTest extends CacheTestCase {
public void testCacheServerConfigRetained() {
// make sure the environment isn't polluted
- assertFalse(Boolean.getBoolean("gemfire.autoReconnect-useCacheXMLFile"));
+ assertFalse(Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "autoReconnect-useCacheXMLFile"));
GemFireCacheImpl gc = (GemFireCacheImpl)this.cache;
@@ -73,8 +73,8 @@ public class ReconnectedCacheServerDUnitTest extends CacheTestCase {
}
public void testDefaultCacheServerNotCreatedOnReconnect() {
-
- assertFalse(Boolean.getBoolean("gemfire.autoReconnect-useCacheXMLFile"));
+
+ assertFalse(Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "autoReconnect-useCacheXMLFile"));
GemFireCacheImpl gc = (GemFireCacheImpl)this.cache;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
index 98c2b6e..d12a31c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
@@ -16,19 +16,7 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.LossAction;
-import com.gemstone.gemfire.cache.MembershipAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionRoleListener;
-import com.gemstone.gemfire.cache.ResumptionAction;
-import com.gemstone.gemfire.cache.RoleEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.RegionRoleListenerAdapter;
import com.gemstone.gemfire.distributed.Role;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -36,6 +24,9 @@ import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+import java.util.Set;
+
/**
* Tests the functionality of the {@link RegionRoleListener} class.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
index 86ed3a9..db3fedd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
@@ -16,40 +16,7 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.locks.Lock;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CommitDistributionException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.LossAction;
-import com.gemstone.gemfire.cache.MembershipAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAccessException;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDistributionException;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionMembershipListener;
-import com.gemstone.gemfire.cache.RegionReinitializedException;
-import com.gemstone.gemfire.cache.RequiredRoles;
-import com.gemstone.gemfire.cache.ResumptionAction;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.util.RegionMembershipListenerAdapter;
@@ -59,21 +26,15 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
-import com.gemstone.gemfire.internal.cache.AbstractRegion;
-import com.gemstone.gemfire.internal.cache.DistributedCacheOperation;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXState;
-import com.gemstone.gemfire.internal.cache.TXStateInterface;
-import com.gemstone.gemfire.internal.cache.TXStateProxyImpl;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.*;
+import java.util.concurrent.locks.Lock;
/**
* Tests region reliability defined by MembershipAttributes.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
index 094f7e8..eee3071 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
@@ -16,30 +16,17 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.LossAction;
-import com.gemstone.gemfire.cache.MembershipAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RequiredRoles;
-import com.gemstone.gemfire.cache.ResumptionAction;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.Role;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
/**
* Tests the functionality of the {@link RequiredRoles} class.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
index 0e805b9..51ab9c6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
@@ -16,19 +16,14 @@
*/
package com.gemstone.gemfire.cache30;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests the performance of Regions when Roles are assigned.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
index 0d99870..de24694 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
@@ -16,37 +16,24 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.Serializable;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.DMStats;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.tcp.Connection;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Properties;
+import java.util.Set;
/**
* Test to make sure slow receiver queuing is working
@@ -263,7 +250,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "1");
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
doCreateOtherVm(p, false);
int repeatCount = 2;
@@ -339,7 +326,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "1");
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
doCreateOtherVm(p, false);
forceQueuing(r);
@@ -409,7 +396,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "2");
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "2");
doCreateOtherVm(p, false);
forceQueuing(r);
@@ -461,7 +448,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "1");
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
doCreateOtherVm(p, false);
{
VM vm = getOtherVm();
@@ -658,8 +645,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "5");
- p.setProperty("async-max-queue-size", "1"); // 1 meg
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
+ p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1"); // 1 meg
doCreateOtherVm(p, false);
@@ -730,8 +717,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "5");
- p.setProperty("async-queue-timeout", "500"); // 500 ms
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
+ p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "500"); // 500 ms
doCreateOtherVm(p, true);
@@ -959,9 +946,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "5");
- p.setProperty("async-queue-timeout", "86400000"); // max value
- p.setProperty("async-max-queue-size", "1024"); // max value
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
+ p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
+ p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
@@ -1166,9 +1153,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty("async-distribution-timeout", "5");
- p.setProperty("async-queue-timeout", "86400000"); // max value
- p.setProperty("async-max-queue-size", "1024"); // max value
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
+ p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
+ p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
@@ -1322,9 +1309,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty("async-distribution-timeout", String.valueOf(1000*4)); // 4 sec
- p.setProperty("async-queue-timeout", "86400000"); // max value
- p.setProperty("async-max-queue-size", "1024"); // max value
+ p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, String.valueOf(1000 * 4)); // 4 sec
+ p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
+ p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
[27/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
index 5ddcc51..f386726 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
@@ -16,40 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import java.awt.Desktop;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URI;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.EmptyStackException;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-import java.util.TreeSet;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.management.Query;
-import javax.management.QueryExp;
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLHandshakeException;
-
import com.gemstone.gemfire.GemFireException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.operations.OperationContext;
@@ -61,6 +27,7 @@ import com.gemstone.gemfire.distributed.LocatorLauncher;
import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
import com.gemstone.gemfire.distributed.ServerLauncher;
import com.gemstone.gemfire.distributed.ServerLauncher.ServerState;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
import com.gemstone.gemfire.internal.DistributionLocator;
@@ -73,13 +40,9 @@ import com.gemstone.gemfire.internal.lang.ClassUtils;
import com.gemstone.gemfire.internal.lang.ObjectUtils;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.lang.SystemUtils;
-import com.gemstone.gemfire.internal.process.ClusterConfigurationNotAvailableException;
-import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
-import com.gemstone.gemfire.internal.process.ProcessStreamReader;
+import com.gemstone.gemfire.internal.process.*;
import com.gemstone.gemfire.internal.process.ProcessStreamReader.InputListener;
import com.gemstone.gemfire.internal.process.ProcessStreamReader.ReadingMode;
-import com.gemstone.gemfire.internal.process.ProcessType;
-import com.gemstone.gemfire.internal.process.ProcessUtils;
import com.gemstone.gemfire.internal.process.signal.SignalEvent;
import com.gemstone.gemfire.internal.process.signal.SignalListener;
import com.gemstone.gemfire.internal.util.IOUtils;
@@ -101,21 +64,34 @@ import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
import com.gemstone.gemfire.management.internal.cli.shell.JmxOperationInvoker;
import com.gemstone.gemfire.management.internal.cli.shell.OperationInvoker;
-import com.gemstone.gemfire.management.internal.cli.util.CauseFinder;
-import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.management.internal.cli.util.ConnectionEndpoint;
-import com.gemstone.gemfire.management.internal.cli.util.JConsoleNotFoundException;
-import com.gemstone.gemfire.management.internal.cli.util.VisualVmNotFoundException;
+import com.gemstone.gemfire.management.internal.cli.util.*;
import com.gemstone.gemfire.management.internal.configuration.domain.SharedConfigurationStatus;
import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusRequest;
import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusResponse;
import com.gemstone.gemfire.management.internal.security.ResourceOperation;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-
import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import javax.management.Query;
+import javax.management.QueryExp;
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLHandshakeException;
+import java.awt.*;
+import java.io.*;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* The LauncherLifecycleCommands class encapsulates all GemFire launcher commands for GemFire tools (like starting
* GemFire Monitor (GFMon) and Visual Statistics Display (VSD)) as well external tools (like jconsole).
@@ -130,13 +106,13 @@ import org.springframework.shell.core.annotation.CliOption;
public class LauncherLifecycleCommands extends AbstractCommandsSupport {
private static final String LOCATOR_TERM_NAME = "Locator";
- private static final String SERVER_TERM_NAME = "Server";
-
- private static final long PROCESS_STREAM_READER_JOIN_TIMEOUT_MILLIS = 30*1000;
- private static final long PROCESS_STREAM_READER_ASYNC_STOP_TIMEOUT_MILLIS = 5*1000;
- private static final long WAITING_FOR_STOP_TO_MAKE_PID_GO_AWAY_TIMEOUT_MILLIS = 30*1000;
- private static final long WAITING_FOR_PID_FILE_TO_CONTAIN_PID_TIMEOUT_MILLIS = 2*1000;
-
+ private static final String SERVER_TERM_NAME = "Server";
+
+ private static final long PROCESS_STREAM_READER_JOIN_TIMEOUT_MILLIS = 30 * 1000;
+ private static final long PROCESS_STREAM_READER_ASYNC_STOP_TIMEOUT_MILLIS = 5 * 1000;
+ private static final long WAITING_FOR_STOP_TO_MAKE_PID_GO_AWAY_TIMEOUT_MILLIS = 30 * 1000;
+ private static final long WAITING_FOR_PID_FILE_TO_CONTAIN_PID_TIMEOUT_MILLIS = 2 * 1000;
+
protected static final int CMS_INITIAL_OCCUPANCY_FRACTION = 60;
protected static final int DEFAULT_PROCESS_OUTPUT_WAIT_TIME_MILLISECONDS = 5000;
protected static final int INVALID_PID = -1;
@@ -154,15 +130,14 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
protected static final String GEMFIRE_JAR_PATHNAME = IOUtils.appendToPath(GEMFIRE_HOME, "lib", GemFireVersion.getGemFireJarFileName());
protected static final String CORE_DEPENDENCIES_JAR_PATHNAME =
- IOUtils.appendToPath(GEMFIRE_HOME, "lib", "geode-dependencies.jar");
+ IOUtils.appendToPath(GEMFIRE_HOME, "lib", "geode-dependencies.jar");
protected static boolean isAttachApiAvailable() {
if (ATTACH_API_AVAILABLE.get() == null) {
try {
ClassUtils.forName(ATTACH_API_CLASS_NAME, new AttachAPINotFoundException());
ATTACH_API_AVAILABLE.set(Boolean.TRUE);
- }
- catch (AttachAPINotFoundException ignore) {
+ } catch (AttachAPINotFoundException ignore) {
ATTACH_API_AVAILABLE.set(Boolean.FALSE);
}
}
@@ -173,106 +148,106 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
@CliCommand(value = CliStrings.START_LOCATOR, help = CliStrings.START_LOCATOR__HELP)
@CliMetaData(shellOnly = true, relatedTopic = { CliStrings.TOPIC_GEMFIRE_LOCATOR, CliStrings.TOPIC_GEMFIRE_LIFECYCLE })
public Result startLocator(@CliOption(key = CliStrings.START_LOCATOR__MEMBER_NAME,
- mandatory = true,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__MEMBER_NAME__HELP)
- final String memberName,
- @CliOption(key = CliStrings.START_LOCATOR__BIND_ADDRESS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__BIND_ADDRESS__HELP)
- final String bindAddress,
- @CliOption(key = CliStrings.START_LOCATOR__CLASSPATH,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__CLASSPATH__HELP)
- final String classpath,
- @CliOption(key = CliStrings.START_LOCATOR__FORCE,
- unspecifiedDefaultValue = "false",
- specifiedDefaultValue = "true",
- help = CliStrings.START_LOCATOR__FORCE__HELP)
- final Boolean force,
- @CliOption(key = CliStrings.START_LOCATOR__GROUP,
- optionContext = ConverterHint.MEMBERGROUP,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__GROUP__HELP)
- final String group,
- @CliOption(key = CliStrings.START_LOCATOR__HOSTNAME_FOR_CLIENTS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__HOSTNAME_FOR_CLIENTS__HELP)
- final String hostnameForClients,
- @CliOption(key = CliStrings.START_LOCATOR__INCLUDE_SYSTEM_CLASSPATH,
- specifiedDefaultValue = "true",
- unspecifiedDefaultValue = "false",
- help = CliStrings.START_LOCATOR__INCLUDE_SYSTEM_CLASSPATH__HELP)
- final Boolean includeSystemClasspath,
- @CliOption(key = CliStrings.START_LOCATOR__LOCATORS,
- optionContext = ConverterHint.LOCATOR_DISCOVERY_CONFIG,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__LOCATORS__HELP)
- final String locators,
- @CliOption(key = CliStrings.START_LOCATOR__LOG_LEVEL,
- optionContext = ConverterHint.LOG_LEVEL,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__LOG_LEVEL__HELP)
- final String logLevel,
- @CliOption(key = CliStrings.START_LOCATOR__MCAST_ADDRESS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__MCAST_ADDRESS__HELP)
- final String mcastBindAddress,
- @CliOption(key = CliStrings.START_LOCATOR__MCAST_PORT,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__MCAST_PORT__HELP)
- final Integer mcastPort,
- @CliOption(key = CliStrings.START_LOCATOR__PORT,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__PORT__HELP)
- final Integer port,
- @CliOption(key = CliStrings.START_LOCATOR__DIR,
- optionContext = ConverterHint.DIR_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__DIR__HELP)
- String workingDirectory,
- @CliOption(key = CliStrings.START_LOCATOR__PROPERTIES,
- optionContext = ConverterHint.FILE_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__PROPERTIES__HELP)
- String gemfirePropertiesPathname,
- @CliOption(key = CliStrings.START_LOCATOR__SECURITY_PROPERTIES,
- optionContext = ConverterHint.FILE_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__SECURITY_PROPERTIES__HELP)
- String gemfireSecurityPropertiesPathname,
- @CliOption(key = CliStrings.START_LOCATOR__INITIALHEAP,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__INITIALHEAP__HELP)
- final String initialHeap,
- @CliOption(key = CliStrings.START_LOCATOR__MAXHEAP,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__MAXHEAP__HELP)
- final String maxHeap,
- @CliOption(key = CliStrings.START_LOCATOR__J,
- optionContext = ConverterHint.STRING_LIST,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_LOCATOR__J__HELP)
- @CliMetaData(valueSeparator = ",")
- final String[] jvmArgsOpts,
- @CliOption (key = CliStrings.START_LOCATOR__CONNECT,
- unspecifiedDefaultValue = "true",
- specifiedDefaultValue = "true",
- help = CliStrings.START_LOCATOR__CONNECT__HELP)
- final boolean connect,
- @CliOption(key = CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION,
- unspecifiedDefaultValue = "true",
- specifiedDefaultValue = "true",
- help = CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION__HELP)
- final boolean enableSharedConfiguration,
- @CliOption(key = CliStrings.START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM,
- unspecifiedDefaultValue = "false",
- help = CliStrings.START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM__HELP)
- final boolean loadSharedConfigurationFromDirectory,
- @CliOption(key = CliStrings.START_LOCATOR__CLUSTER__CONFIG__DIR,
- unspecifiedDefaultValue = "",
- help = CliStrings.START_LOCATOR__CLUSTER__CONFIG__DIR__HELP)
- final String clusterConfigDir
+ mandatory = true,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__MEMBER_NAME__HELP)
+ final String memberName,
+ @CliOption(key = CliStrings.START_LOCATOR__BIND_ADDRESS,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__BIND_ADDRESS__HELP)
+ final String bindAddress,
+ @CliOption(key = CliStrings.START_LOCATOR__CLASSPATH,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__CLASSPATH__HELP)
+ final String classpath,
+ @CliOption(key = CliStrings.START_LOCATOR__FORCE,
+ unspecifiedDefaultValue = "false",
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_LOCATOR__FORCE__HELP)
+ final Boolean force,
+ @CliOption(key = CliStrings.START_LOCATOR__GROUP,
+ optionContext = ConverterHint.MEMBERGROUP,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__GROUP__HELP)
+ final String group,
+ @CliOption(key = CliStrings.START_LOCATOR__HOSTNAME_FOR_CLIENTS,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__HOSTNAME_FOR_CLIENTS__HELP)
+ final String hostnameForClients,
+ @CliOption(key = CliStrings.START_LOCATOR__INCLUDE_SYSTEM_CLASSPATH,
+ specifiedDefaultValue = "true",
+ unspecifiedDefaultValue = "false",
+ help = CliStrings.START_LOCATOR__INCLUDE_SYSTEM_CLASSPATH__HELP)
+ final Boolean includeSystemClasspath,
+ @CliOption(key = CliStrings.START_LOCATOR__LOCATORS,
+ optionContext = ConverterHint.LOCATOR_DISCOVERY_CONFIG,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__LOCATORS__HELP)
+ final String locators,
+ @CliOption(key = CliStrings.START_LOCATOR__LOG_LEVEL,
+ optionContext = ConverterHint.LOG_LEVEL,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__LOG_LEVEL__HELP)
+ final String logLevel,
+ @CliOption(key = CliStrings.START_LOCATOR__MCAST_ADDRESS,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__MCAST_ADDRESS__HELP)
+ final String mcastBindAddress,
+ @CliOption(key = CliStrings.START_LOCATOR__MCAST_PORT,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__MCAST_PORT__HELP)
+ final Integer mcastPort,
+ @CliOption(key = CliStrings.START_LOCATOR__PORT,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__PORT__HELP)
+ final Integer port,
+ @CliOption(key = CliStrings.START_LOCATOR__DIR,
+ optionContext = ConverterHint.DIR_PATHSTRING,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__DIR__HELP)
+ String workingDirectory,
+ @CliOption(key = CliStrings.START_LOCATOR__PROPERTIES,
+ optionContext = ConverterHint.FILE_PATHSTRING,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__PROPERTIES__HELP)
+ String gemfirePropertiesPathname,
+ @CliOption(key = CliStrings.START_LOCATOR__SECURITY_PROPERTIES,
+ optionContext = ConverterHint.FILE_PATHSTRING,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__SECURITY_PROPERTIES__HELP)
+ String gemfireSecurityPropertiesPathname,
+ @CliOption(key = CliStrings.START_LOCATOR__INITIALHEAP,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__INITIALHEAP__HELP)
+ final String initialHeap,
+ @CliOption(key = CliStrings.START_LOCATOR__MAXHEAP,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__MAXHEAP__HELP)
+ final String maxHeap,
+ @CliOption(key = CliStrings.START_LOCATOR__J,
+ optionContext = ConverterHint.STRING_LIST,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_LOCATOR__J__HELP)
+ @CliMetaData(valueSeparator = ",")
+ final String[] jvmArgsOpts,
+ @CliOption(key = CliStrings.START_LOCATOR__CONNECT,
+ unspecifiedDefaultValue = "true",
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_LOCATOR__CONNECT__HELP)
+ final boolean connect,
+ @CliOption(key = CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION,
+ unspecifiedDefaultValue = "true",
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION__HELP)
+ final boolean enableSharedConfiguration,
+ @CliOption(key = CliStrings.START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM,
+ unspecifiedDefaultValue = "false",
+ help = CliStrings.START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM__HELP)
+ final boolean loadSharedConfigurationFromDirectory,
+ @CliOption(key = CliStrings.START_LOCATOR__CLUSTER__CONFIG__DIR,
+ unspecifiedDefaultValue = "",
+ help = CliStrings.START_LOCATOR__CLUSTER__CONFIG__DIR__HELP)
+ final String clusterConfigDir
) {
try {
if (workingDirectory == null) {
@@ -281,7 +256,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
if (!(locatorWorkingDirectory.exists() || locatorWorkingDirectory.mkdir())) {
throw new IllegalStateException(CliStrings.format(CliStrings.START_LOCATOR__MSG__COULD_NOT_CREATE_DIRECTORY_0_VERIFY_PERMISSIONS,
- locatorWorkingDirectory.getAbsolutePath()));
+ locatorWorkingDirectory.getAbsolutePath()));
}
workingDirectory = IOUtils.tryGetCanonicalPathElseGetAbsolutePath(locatorWorkingDirectory);
@@ -291,14 +266,14 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
if (!StringUtils.isBlank(gemfirePropertiesPathname) && !IOUtils.isExistingPathname(gemfirePropertiesPathname)) {
return ResultBuilder.createUserErrorResult(CliStrings.format(CliStrings.GEMFIRE_0_PROPERTIES_1_NOT_FOUND_MESSAGE,
- StringUtils.EMPTY_STRING, gemfirePropertiesPathname));
+ StringUtils.EMPTY_STRING, gemfirePropertiesPathname));
}
gemfireSecurityPropertiesPathname = CliUtil.resolvePathname(gemfireSecurityPropertiesPathname);
if (!StringUtils.isBlank(gemfireSecurityPropertiesPathname) && !IOUtils.isExistingPathname(gemfireSecurityPropertiesPathname)) {
return ResultBuilder.createUserErrorResult(CliStrings.format(CliStrings.GEMFIRE_0_PROPERTIES_1_NOT_FOUND_MESSAGE,
- "Security ", gemfireSecurityPropertiesPathname));
+ "Security ", gemfireSecurityPropertiesPathname));
}
File locatorPidFile = new File(workingDirectory, ProcessType.LOCATOR.getPidFileName());
@@ -307,26 +282,27 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
Properties gemfireProperties = new Properties();
- gemfireProperties.setProperty(DistributionConfig.GROUPS_NAME, StringUtils.valueOf(group, StringUtils.EMPTY_STRING));
- gemfireProperties.setProperty(DistributionConfig.LOCATORS_NAME, StringUtils.valueOf(locators, StringUtils.EMPTY_STRING));
- gemfireProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, StringUtils.valueOf(logLevel, StringUtils.EMPTY_STRING));
- gemfireProperties.setProperty(DistributionConfig.MCAST_ADDRESS_NAME, StringUtils.valueOf(mcastBindAddress, StringUtils.EMPTY_STRING));
- gemfireProperties.setProperty(DistributionConfig.MCAST_PORT_NAME, StringUtils.valueOf(mcastPort, StringUtils.EMPTY_STRING));
- gemfireProperties.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, StringUtils.valueOf(enableSharedConfiguration, StringUtils.EMPTY_STRING));
- gemfireProperties.setProperty(DistributionConfig.LOAD_CLUSTER_CONFIG_FROM_DIR_NAME, StringUtils.valueOf(loadSharedConfigurationFromDirectory, StringUtils.EMPTY_STRING));
- gemfireProperties.setProperty(DistributionConfig.CLUSTER_CONFIGURATION_DIR, StringUtils.valueOf(clusterConfigDir, StringUtils.EMPTY_STRING));
-
+ gemfireProperties.setProperty(SystemConfigurationProperties.GROUPS, StringUtils.valueOf(group, StringUtils.EMPTY_STRING));
+ gemfireProperties.setProperty(SystemConfigurationProperties.LOCATORS, StringUtils.valueOf(locators, StringUtils.EMPTY_STRING));
+ gemfireProperties.setProperty(SystemConfigurationProperties.LOG_LEVEL, StringUtils.valueOf(logLevel, StringUtils.EMPTY_STRING));
+ gemfireProperties.setProperty(SystemConfigurationProperties.MCAST_ADDRESS, StringUtils.valueOf(mcastBindAddress, StringUtils.EMPTY_STRING));
+ gemfireProperties.setProperty(MCAST_PORT, StringUtils.valueOf(mcastPort, StringUtils.EMPTY_STRING));
+ gemfireProperties.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, StringUtils.valueOf(enableSharedConfiguration, StringUtils.EMPTY_STRING));
+ gemfireProperties.setProperty(SystemConfigurationProperties.LOAD_CLUSTER_CONFIGURATION_FROM_DIR,
+ StringUtils.valueOf(loadSharedConfigurationFromDirectory, StringUtils.EMPTY_STRING));
+ gemfireProperties.setProperty(SystemConfigurationProperties.CLUSTER_CONFIGURATION_DIR, StringUtils.valueOf(clusterConfigDir, StringUtils.EMPTY_STRING));
+
// read the OSProcess enable redirect system property here -- TODO: replace with new GFSH argument
final boolean redirectOutput = Boolean.getBoolean(OSProcess.ENABLE_OUTPUT_REDIRECTION_PROPERTY);
LocatorLauncher locatorLauncher = new LocatorLauncher.Builder()
- .setBindAddress(bindAddress)
- .setForce(force)
- .setHostnameForClients(hostnameForClients)
- .setMemberName(memberName)
- .setPort(port)
- .setRedirectOutput(redirectOutput)
- .setWorkingDirectory(workingDirectory)
- .build();
+ .setBindAddress(bindAddress)
+ .setForce(force)
+ .setHostnameForClients(hostnameForClients)
+ .setMemberName(memberName)
+ .setPort(port)
+ .setRedirectOutput(redirectOutput)
+ .setWorkingDirectory(workingDirectory)
+ .build();
String[] locatorCommandLine = createStartLocatorCommandLine(locatorLauncher, gemfirePropertiesPathname,
gemfireSecurityPropertiesPathname, gemfireProperties, classpath, includeSystemClasspath, jvmArgsOpts, initialHeap, maxHeap);
@@ -334,8 +310,8 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
//getGfsh().logInfo(StringUtils.concat(locatorCommandLine, " "), null);
final Process locatorProcess = new ProcessBuilder(locatorCommandLine)
- .directory(new File(locatorLauncher.getWorkingDirectory()))
- .start();
+ .directory(new File(locatorLauncher.getWorkingDirectory()))
+ .start();
locatorProcess.getInputStream().close();
locatorProcess.getOutputStream().close();
@@ -358,7 +334,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
.inputStream(locatorProcess.getErrorStream())
.inputListener(inputListener)
.readingMode(readingMode)
- .continueReadingMillis(2*1000)
+ .continueReadingMillis(2 * 1000)
.build()
.start();
@@ -372,7 +348,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
try {
getGfsh().logInfo(String.format(CliStrings.START_LOCATOR__RUN_MESSAGE,
- IOUtils.tryGetCanonicalPathElseGetAbsolutePath(new File(locatorLauncher.getWorkingDirectory()))), null);
+ IOUtils.tryGetCanonicalPathElseGetAbsolutePath(new File(locatorLauncher.getWorkingDirectory()))), null);
do {
try {
@@ -383,10 +359,9 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
//Gfsh.println(message);
return ResultBuilder.createShellClientErrorResult(String.format(
- CliStrings.START_LOCATOR__PROCESS_TERMINATED_ABNORMALLY_ERROR_MESSAGE,
+ CliStrings.START_LOCATOR__PROCESS_TERMINATED_ABNORMALLY_ERROR_MESSAGE,
exitValue, locatorLauncher.getWorkingDirectory(), message.toString()));
- }
- catch (IllegalThreadStateException ignore) {
+ } catch (IllegalThreadStateException ignore) {
// the IllegalThreadStateException is expected; it means the Locator's process has not terminated,
// and basically should not
Gfsh.print(".");
@@ -401,9 +376,8 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
String currentLocatorStatusMessage = locatorState.getStatusMessage();
if (isStartingOrNotResponding(locatorState.getStatus())
- && !(StringUtils.isBlank(currentLocatorStatusMessage)
- || currentLocatorStatusMessage.equalsIgnoreCase(previousLocatorStatusMessage)))
- {
+ && !(StringUtils.isBlank(currentLocatorStatusMessage)
+ || currentLocatorStatusMessage.equalsIgnoreCase(previousLocatorStatusMessage))) {
Gfsh.println();
Gfsh.println(currentLocatorStatusMessage);
previousLocatorStatusMessage = currentLocatorStatusMessage;
@@ -411,9 +385,8 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
}
while (!(registeredLocatorSignalListener && locatorSignalListener.isSignaled())
- && isStartingOrNotResponding(locatorState.getStatus()));
- }
- finally {
+ && isStartingOrNotResponding(locatorState.getStatus()));
+ } finally {
stderrReader.stopAsync(PROCESS_STREAM_READER_ASYNC_STOP_TIMEOUT_MILLIS); // stop will close ErrorStream
getGfsh().getSignalHandler().unregisterListener(locatorSignalListener);
}
@@ -421,14 +394,13 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
Gfsh.println();
final boolean asyncStart = (registeredLocatorSignalListener && locatorSignalListener.isSignaled()
- && isStartingNotRespondingOrNull(locatorState));
+ && isStartingNotRespondingOrNull(locatorState));
InfoResultData infoResultData = ResultBuilder.createInfoResultData();
if (asyncStart) {
infoResultData.addLine(String.format(CliStrings.ASYNC_PROCESS_LAUNCH_MESSAGE, LOCATOR_TERM_NAME));
- }
- else {
+ } else {
infoResultData.addLine(locatorState.toString());
String locatorHostName = StringUtils.defaultIfBlank(locatorLauncher.getHostnameForClients(), getLocalHost());
@@ -439,7 +411,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
// Else, ask the user to use the "connect" command to connect to the Locator.
if (shouldAutoConnect(connect)) {
doAutoConnect(locatorHostName, locatorPort, gemfirePropertiesPathname, gemfireSecurityPropertiesPathname,
- infoResultData);
+ infoResultData);
}
// Report on the state of the Shared Configuration service if enabled...
@@ -449,45 +421,39 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
return ResultBuilder.buildResult(infoResultData);
- }
- catch (IllegalArgumentException e) {
+ } catch (IllegalArgumentException e) {
String message = e.getMessage();
if (message != null && message.matches(LocalizedStrings.Launcher_Builder_UNKNOWN_HOST_ERROR_MESSAGE.toLocalizedString(".+"))) {
message = CliStrings.format(CliStrings.LAUNCHERLIFECYCLECOMMANDS__MSG__FAILED_TO_START_0_REASON_1, LOCATOR_TERM_NAME, message);
}
return ResultBuilder.createUserErrorResult(message);
- }
- catch (IllegalStateException e) {
+ } catch (IllegalStateException e) {
return ResultBuilder.createUserErrorResult(e.getMessage());
- }
- catch (VirtualMachineError e) {
+ } catch (VirtualMachineError e) {
SystemFailure.initiateFailure(e);
throw e;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
SystemFailure.checkFailure();
String errorMessage = String.format(CliStrings.START_LOCATOR__GENERAL_ERROR_MESSAGE,
- StringUtils.defaultIfBlank(workingDirectory, memberName), getLocatorId(bindAddress, port),
- toString(t, getGfsh().getDebug()));
+ StringUtils.defaultIfBlank(workingDirectory, memberName), getLocatorId(bindAddress, port),
+ toString(t, getGfsh().getDebug()));
getGfsh().logToFile(errorMessage, t);
return ResultBuilder.createShellClientErrorResult(errorMessage);
- }
- finally {
+ } finally {
Gfsh.redirectInternalJavaLoggers();
}
}
protected String[] createStartLocatorCommandLine(final LocatorLauncher launcher,
- final String gemfirePropertiesPathname,
- final String gemfireSecurityPropertiesPathname,
- final Properties gemfireProperties,
- final String userClasspath,
- final Boolean includeSystemClasspath,
- final String[] jvmArgsOpts,
- final String initialHeap,
- final String maxHeap)
- throws MalformedObjectNameException
- {
+ final String gemfirePropertiesPathname,
+ final String gemfireSecurityPropertiesPathname,
+ final Properties gemfireProperties,
+ final String userClasspath,
+ final Boolean includeSystemClasspath,
+ final String[] jvmArgsOpts,
+ final String initialHeap,
+ final String maxHeap)
+ throws MalformedObjectNameException {
List<String> commandLine = new ArrayList<>();
commandLine.add(getJavaPath());
@@ -505,7 +471,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
commandLine.add("-D".concat(AbstractLauncher.SIGNAL_HANDLER_REGISTRATION_SYSTEM_PROPERTY.concat("=true")));
commandLine.add("-Djava.awt.headless=true");
- commandLine.add("-Dsun.rmi.dgc.server.gcInterval".concat("=").concat(Long.toString(Long.MAX_VALUE-1)));
+ commandLine.add("-Dsun.rmi.dgc.server.gcInterval".concat("=").concat(Long.toString(Long.MAX_VALUE - 1)));
commandLine.add(LocatorLauncher.class.getName());
commandLine.add(LocatorLauncher.Command.START.getName());
@@ -548,17 +514,16 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
private boolean doAutoConnect(final String locatorHostname,
- final int locatorPort,
- final String gemfirePropertiesPathname,
- final String gemfireSecurityPropertiesPathname,
- final InfoResultData infoResultData)
- {
+ final int locatorPort,
+ final String gemfirePropertiesPathname,
+ final String gemfireSecurityPropertiesPathname,
+ final InfoResultData infoResultData) {
boolean connectSuccess = false;
boolean jmxManagerAuthEnabled = false;
boolean jmxManagerSslEnabled = false;
Map<String, String> configurationProperties = loadConfigurationProperties(gemfireSecurityPropertiesPathname,
- loadConfigurationProperties(gemfirePropertiesPathname));
+ loadConfigurationProperties(gemfirePropertiesPathname));
Map<String, String> locatorConfigurationProperties = new HashMap<>(configurationProperties);
String responseFailureMessage = null;
@@ -566,7 +531,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
for (int attempts = 0; (attempts < 10 && !connectSuccess); attempts++) {
try {
ConnectToLocatorResult connectToLocatorResult = ShellCommands.connectToLocator(locatorHostname, locatorPort,
- ShellCommands.getConnectLocatorTimeoutInMS() / 4, locatorConfigurationProperties);
+ ShellCommands.getConnectLocatorTimeoutInMS() / 4, locatorConfigurationProperties);
ConnectionEndpoint memberEndpoint = connectToLocatorResult.getMemberEndpoint();
@@ -577,7 +542,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
getGfsh().setOperationInvoker(new JmxOperationInvoker(memberEndpoint.getHost(), memberEndpoint.getPort(),
- null, null, configurationProperties, null));
+ null, null, configurationProperties, null));
String shellAndLogMessage = CliStrings.format(CliStrings.CONNECT__MSG__SUCCESS, memberEndpoint.toString(false));
@@ -587,13 +552,11 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
connectSuccess = true;
responseFailureMessage = null;
- }
- catch (IllegalStateException unexpected) {
+ } catch (IllegalStateException unexpected) {
if (CauseFinder.indexOfCause(unexpected, ClassCastException.class, false) != -1) {
responseFailureMessage = "The Locator might require SSL Configuration.";
}
- }
- catch (SecurityException ignore) {
+ } catch (SecurityException ignore) {
getGfsh().logToFile(ignore.getMessage(), ignore);
jmxManagerAuthEnabled = true;
break; // no need to continue after SecurityException
@@ -607,15 +570,13 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
if (ignore instanceof SSLHandshakeException) {
// try to connect again without SSL since the SSL handshake failed implying a plain text connection...
locatorConfigurationProperties.clear();
- }
- else {
+ } else {
// another type of SSL error occurred (possibly a configuration issue); pass the buck...
getGfsh().logToFile(ignore.getMessage(), ignore);
responseFailureMessage = "Check your SSL configuration and try again.";
break;
}
- }
- catch (Exception ignore) {
+ } catch (Exception ignore) {
getGfsh().logToFile(ignore.getMessage(), ignore);
responseFailureMessage = "Failed to connect; unknown cause: " + ignore.getMessage();
}
@@ -634,15 +595,14 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
private void doOnConnectionFailure(final String locatorHostName,
- final int locatorPort,
- final boolean jmxManagerAuthEnabled,
- final boolean jmxManagerSslEnabled,
- final InfoResultData infoResultData)
- {
+ final int locatorPort,
+ final boolean jmxManagerAuthEnabled,
+ final boolean jmxManagerSslEnabled,
+ final InfoResultData infoResultData) {
infoResultData.addLine("\n");
infoResultData.addLine(CliStrings.format(CliStrings.START_LOCATOR__USE__0__TO__CONNECT,
- new CommandStringBuilder(CliStrings.CONNECT).addOption(CliStrings.CONNECT__LOCATOR,
- locatorHostName + "[" + locatorPort + "]").toString()));
+ new CommandStringBuilder(CliStrings.CONNECT).addOption(CliStrings.CONNECT__LOCATOR,
+ locatorHostName + "[" + locatorPort + "]").toString()));
StringBuilder message = new StringBuilder();
@@ -664,19 +624,17 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
private Map<String, String> loadConfigurationProperties(final String configurationPropertiesPathname,
- Map<String, String> configurationProperties)
- {
+ Map<String, String> configurationProperties) {
configurationProperties = (configurationProperties != null ? configurationProperties
- : new HashMap<String, String>());
+ : new HashMap<String, String>());
if (IOUtils.isExistingPathname(configurationPropertiesPathname)) {
try {
configurationProperties.putAll(ShellCommands.loadPropertiesFromURL(
- new File(configurationPropertiesPathname).toURI().toURL()));
- }
- catch (MalformedURLException ignore) {
+ new File(configurationPropertiesPathname).toURI().toURL()));
+ } catch (MalformedURLException ignore) {
LogWrapper.getInstance().warning(String.format(
- "Failed to load GemFire configuration properties from pathname (%1$s)!",
+ "Failed to load GemFire configuration properties from pathname (%1$s)!",
configurationPropertiesPathname), ignore);
}
}
@@ -688,18 +646,19 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
return getSharedConfigurationStatusFromLocator(locatorState.getHost(), Integer.parseInt(locatorState.getPort()));
}
- private String getSharedConfigurationStatusFromLocator(String locatorHostName, int locatorPort) throws ClassNotFoundException, IOException {
+ private String getSharedConfigurationStatusFromLocator(String locatorHostName, int locatorPort) throws ClassNotFoundException, IOException {
final StringBuilder buffer = new StringBuilder();
-
+
try {
final InetAddress networkAddress = InetAddress.getByName(locatorHostName);
SharedConfigurationStatusResponse statusResponse = (SharedConfigurationStatusResponse)
- TcpClient.requestToServer(networkAddress, locatorPort, new SharedConfigurationStatusRequest(), 10000, true);
-
- for (int i=0; i<NUM_ATTEMPTS_FOR_SHARED_CONFIGURATION_STATUS; i++) {
+ TcpClient.requestToServer(networkAddress, locatorPort, new SharedConfigurationStatusRequest(), 10000, true);
+
+ for (int i = 0; i < NUM_ATTEMPTS_FOR_SHARED_CONFIGURATION_STATUS; i++) {
if (statusResponse.getStatus().equals(SharedConfigurationStatus.STARTED) || statusResponse.getStatus().equals(SharedConfigurationStatus.NOT_STARTED)) {
- statusResponse = (SharedConfigurationStatusResponse) TcpClient.requestToServer(networkAddress, locatorPort, new SharedConfigurationStatusRequest(), 10000, true);
+ statusResponse = (SharedConfigurationStatusResponse) TcpClient
+ .requestToServer(networkAddress, locatorPort, new SharedConfigurationStatusRequest(), 10000, true);
try {
Thread.sleep(5000);
} catch (InterruptedException e) {
@@ -709,47 +668,45 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
break;
}
}
-
+
switch (statusResponse.getStatus()) {
- case RUNNING:
- buffer.append("\nCluster configuration service is up and running.");
- break;
- case STOPPED:
- buffer.append("\nCluster configuration service failed to start , please check the log file for errors.");
- break;
- case WAITING:
- buffer.append("\nCluster configuration service is waiting for other locators with newer shared configuration data.");
- Set<PersistentMemberPattern> pmpSet = statusResponse.getOtherLocatorInformation();
- if (!pmpSet.isEmpty()) {
- buffer.append("\nThis locator might have stale cluster configuration data.");
- buffer.append("\nFollowing locators contain potentially newer cluster configuration data");
-
- for (PersistentMemberPattern pmp : pmpSet) {
- buffer.append("\nHost : ").append(pmp.getHost());
- buffer.append("\nDirectory : ").append(pmp.getDirectory());
- }
- }
- else {
- buffer.append("\nPlease check the log file for errors");
+ case RUNNING:
+ buffer.append("\nCluster configuration service is up and running.");
+ break;
+ case STOPPED:
+ buffer.append("\nCluster configuration service failed to start , please check the log file for errors.");
+ break;
+ case WAITING:
+ buffer.append("\nCluster configuration service is waiting for other locators with newer shared configuration data.");
+ Set<PersistentMemberPattern> pmpSet = statusResponse.getOtherLocatorInformation();
+ if (!pmpSet.isEmpty()) {
+ buffer.append("\nThis locator might have stale cluster configuration data.");
+ buffer.append("\nFollowing locators contain potentially newer cluster configuration data");
+
+ for (PersistentMemberPattern pmp : pmpSet) {
+ buffer.append("\nHost : ").append(pmp.getHost());
+ buffer.append("\nDirectory : ").append(pmp.getDirectory());
}
- break;
- case UNDETERMINED:
- buffer.append("\nUnable to determine the status of shared configuration service, please check the log file");
- break;
- case NOT_STARTED:
- buffer.append("\nCluster configuration service has not been started yet");
- break;
- case STARTED:
- buffer.append("\nCluster configuration service has been started, but its not running yet");
- break;
+ } else {
+ buffer.append("\nPlease check the log file for errors");
+ }
+ break;
+ case UNDETERMINED:
+ buffer.append("\nUnable to determine the status of shared configuration service, please check the log file");
+ break;
+ case NOT_STARTED:
+ buffer.append("\nCluster configuration service has not been started yet");
+ break;
+ case STARTED:
+ buffer.append("\nCluster configuration service has been started, but its not running yet");
+ break;
}
- }
- catch (Exception e) {
+ } catch (Exception e) {
// TODO fix this once Trac Bug #50513 gets fixed
// NOTE this ClassCastException occurs if the a plain text TCP/IP connection is used to connect to a Locator
// configured with SSL.
getGfsh().logToFile(String.format("Failed to get the status of the Shared Configuration Service running on Locator (%1$s[%2$d])!",
- locatorHostName, locatorPort), e);
+ locatorHostName, locatorPort), e);
}
return buffer.toString();
@@ -758,28 +715,27 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
@CliCommand(value = CliStrings.STATUS_LOCATOR, help = CliStrings.STATUS_LOCATOR__HELP)
@CliMetaData(shellOnly = true, relatedTopic = { CliStrings.TOPIC_GEMFIRE_LOCATOR, CliStrings.TOPIC_GEMFIRE_LIFECYCLE })
public Result statusLocator(@CliOption(key = CliStrings.STATUS_LOCATOR__MEMBER,
- optionContext = ConverterHint.LOCATOR_MEMBER_IDNAME,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.STATUS_LOCATOR__MEMBER__HELP)
- final String member,
- @CliOption(key = CliStrings.STATUS_LOCATOR__HOST,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.STATUS_LOCATOR__HOST__HELP)
- final String locatorHost,
- @CliOption(key = CliStrings.STATUS_LOCATOR__PORT,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.STATUS_LOCATOR__PORT__HELP)
- final Integer locatorPort,
- @CliOption(key = CliStrings.STATUS_LOCATOR__PID,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.STATUS_LOCATOR__PID__HELP)
- final Integer pid,
- @CliOption(key = CliStrings.STATUS_LOCATOR__DIR,
- optionContext = ConverterHint.DIR_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.STATUS_LOCATOR__DIR__HELP)
- final String workingDirectory)
- {
+ optionContext = ConverterHint.LOCATOR_MEMBER_IDNAME,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STATUS_LOCATOR__MEMBER__HELP)
+ final String member,
+ @CliOption(key = CliStrings.STATUS_LOCATOR__HOST,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STATUS_LOCATOR__HOST__HELP)
+ final String locatorHost,
+ @CliOption(key = CliStrings.STATUS_LOCATOR__PORT,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STATUS_LOCATOR__PORT__HELP)
+ final Integer locatorPort,
+ @CliOption(key = CliStrings.STATUS_LOCATOR__PID,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STATUS_LOCATOR__PID__HELP)
+ final Integer pid,
+ @CliOption(key = CliStrings.STATUS_LOCATOR__DIR,
+ optionContext = ConverterHint.DIR_PATHSTRING,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STATUS_LOCATOR__DIR__HELP)
+ final String workingDirectory) {
try {
if (!StringUtils.isBlank(member)) {
if (isConnectedAndReady()) {
@@ -788,67 +744,59 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
if (locatorProxy != null) {
LocatorState state = LocatorState.fromJson(locatorProxy.status());
return createStatusLocatorResult(state);
- }
- else {
+ } else {
return ResultBuilder.createUserErrorResult(CliStrings.format(
- CliStrings.STATUS_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE, member));
+ CliStrings.STATUS_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE, member));
}
- }
- else {
+ } else {
return ResultBuilder.createUserErrorResult(CliStrings.format(
- CliStrings.STATUS_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, LOCATOR_TERM_NAME));
+ CliStrings.STATUS_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, LOCATOR_TERM_NAME));
}
- }
- else {
+ } else {
final LocatorLauncher locatorLauncher = new LocatorLauncher.Builder()
- .setCommand(LocatorLauncher.Command.STATUS)
- .setBindAddress(locatorHost)
- .setDebug(isDebugging())
- .setPid(pid)
- .setPort(locatorPort)
- .setWorkingDirectory(workingDirectory)
- .build();
+ .setCommand(LocatorLauncher.Command.STATUS)
+ .setBindAddress(locatorHost)
+ .setDebug(isDebugging())
+ .setPid(pid)
+ .setPort(locatorPort)
+ .setWorkingDirectory(workingDirectory)
+ .build();
final LocatorState state = locatorLauncher.status();
return createStatusLocatorResult(state);
}
- }
- catch (IllegalArgumentException e) {
+ } catch (IllegalArgumentException e) {
return ResultBuilder.createUserErrorResult(e.getMessage());
- }
- catch (IllegalStateException e) {
+ } catch (IllegalStateException e) {
return ResultBuilder.createUserErrorResult(e.getMessage());
- }
- catch (VirtualMachineError e) {
+ } catch (VirtualMachineError e) {
SystemFailure.initiateFailure(e);
throw e;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
SystemFailure.checkFailure();
return ResultBuilder.createShellClientErrorResult(String.format(CliStrings.STATUS_LOCATOR__GENERAL_ERROR_MESSAGE,
- getLocatorId(locatorHost, locatorPort), StringUtils.defaultIfBlank(workingDirectory, SystemUtils.CURRENT_DIRECTORY),
+ getLocatorId(locatorHost, locatorPort), StringUtils.defaultIfBlank(workingDirectory, SystemUtils.CURRENT_DIRECTORY),
toString(t, getGfsh().getDebug())));
}
}
- @CliCommand(value=CliStrings.STOP_LOCATOR, help=CliStrings.STOP_LOCATOR__HELP)
- @CliMetaData(shellOnly=true, relatedTopic = {CliStrings.TOPIC_GEMFIRE_LOCATOR, CliStrings.TOPIC_GEMFIRE_LIFECYCLE})
- @ResourceOperation(resource= OperationContext.Resource.CLUSTER, operation = OperationContext.OperationCode.MANAGE)
+ @CliCommand(value = CliStrings.STOP_LOCATOR, help = CliStrings.STOP_LOCATOR__HELP)
+ @CliMetaData(shellOnly = true, relatedTopic = { CliStrings.TOPIC_GEMFIRE_LOCATOR, CliStrings.TOPIC_GEMFIRE_LIFECYCLE })
+ @ResourceOperation(resource = OperationContext.Resource.CLUSTER, operation = OperationContext.OperationCode.MANAGE)
public Result stopLocator(@CliOption(key = CliStrings.STOP_LOCATOR__MEMBER,
- optionContext = ConverterHint.LOCATOR_MEMBER_IDNAME,
- unspecifiedDefaultValue=CliMetaData.ANNOTATION_NULL_VALUE,
- help=CliStrings.STOP_LOCATOR__MEMBER__HELP)
- final String member,
- @CliOption(key=CliStrings.STOP_LOCATOR__PID,
- unspecifiedDefaultValue=CliMetaData.ANNOTATION_NULL_VALUE,
- help=CliStrings.STOP_LOCATOR__PID__HELP)
- final Integer pid,
- @CliOption(key=CliStrings.STOP_LOCATOR__DIR,
- optionContext = ConverterHint.DIR_PATHSTRING,
- unspecifiedDefaultValue=CliMetaData.ANNOTATION_NULL_VALUE,
- help=CliStrings.STOP_LOCATOR__DIR__HELP)
- final String workingDirectory)
- {
+ optionContext = ConverterHint.LOCATOR_MEMBER_IDNAME,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STOP_LOCATOR__MEMBER__HELP)
+ final String member,
+ @CliOption(key = CliStrings.STOP_LOCATOR__PID,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STOP_LOCATOR__PID__HELP)
+ final Integer pid,
+ @CliOption(key = CliStrings.STOP_LOCATOR__DIR,
+ optionContext = ConverterHint.DIR_PATHSTRING,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.STOP_LOCATOR__DIR__HELP)
+ final String workingDirectory) {
LocatorState locatorState;
try {
@@ -867,24 +815,21 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
locatorState = LocatorState.fromJson(locatorProxy.status());
locatorProxy.shutDownMember();
- }
- else {
+ } else {
return ResultBuilder.createUserErrorResult(CliStrings.format(
- CliStrings.STOP_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE, member));
+ CliStrings.STOP_LOCATOR__NO_LOCATOR_FOUND_FOR_MEMBER_ERROR_MESSAGE, member));
}
- }
- else {
+ } else {
return ResultBuilder.createUserErrorResult(CliStrings.format(
- CliStrings.STOP_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, LOCATOR_TERM_NAME));
+ CliStrings.STOP_SERVICE__GFSH_NOT_CONNECTED_ERROR_MESSAGE, LOCATOR_TERM_NAME));
}
- }
- else {
+ } else {
final LocatorLauncher locatorLauncher = new LocatorLauncher.Builder()
- .setCommand(LocatorLauncher.Command.STOP)
- .setDebug(isDebugging())
- .setPid(pid)
- .setWorkingDirectory(workingDirectory)
- .build();
+ .setCommand(LocatorLauncher.Command.STOP)
+ .setDebug(isDebugging())
+ .setPid(pid)
+ .setWorkingDirectory(workingDirectory)
+ .build();
locatorState = locatorLauncher.status();
locatorLauncher.stop();
@@ -892,7 +837,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
if (Status.ONLINE.equals(locatorState.getStatus())) {
getGfsh().logInfo(String.format(CliStrings.STOP_LOCATOR__STOPPING_LOCATOR_MESSAGE,
- locatorState.getWorkingDirectory(), locatorState.getServiceLocation(), locatorState.getMemberName(),
+ locatorState.getWorkingDirectory(), locatorState.getServiceLocation(), locatorState.getMemberName(),
locatorState.getPid(), locatorState.getLogFile()), null);
StopWatch stopWatch = new StopWatch(true);
@@ -907,25 +852,20 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
return ResultBuilder.createInfoResult(StringUtils.EMPTY_STRING);
- }
- else {
+ } else {
return ResultBuilder.createUserErrorResult(locatorState.toString());
}
- }
- catch (IllegalArgumentException e) {
+ } catch (IllegalArgumentException e) {
return ResultBuilder.createUserErrorResult(e.getMessage());
- }
- catch (IllegalStateException e) {
+ } catch (IllegalStateException e) {
return ResultBuilder.createUserErrorResult(e.getMessage());
- }
- catch (VirtualMachineError e) {
+ } catch (VirtualMachineError e) {
SystemFailure.initiateFailure(e);
throw e;
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
SystemFailure.checkFailure();
return ResultBuilder.createShellClientErrorResult(String.format(CliStrings.STOP_LOCATOR__GENERAL_ERROR_MESSAGE,
- toString(t, getGfsh().getDebug())));
+ toString(t, getGfsh().getDebug())));
} finally {
Gfsh.redirectInternalJavaLoggers();
}
@@ -935,16 +875,16 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
// the "current" Locators in order to conveniently add the new member to the GemFire cluster does not mean we should
// throw an Exception!
protected void addCurrentLocators(final List<String> commandLine, final Properties gemfireProperties) throws MalformedObjectNameException {
- if (StringUtils.isBlank(gemfireProperties.getProperty(DistributionConfig.LOCATORS_NAME))) {
+ if (StringUtils.isBlank(gemfireProperties.getProperty(LOCATORS))) {
String currentLocators = getCurrentLocators();
if (!StringUtils.isBlank(currentLocators)) {
commandLine.add("-D".concat(ProcessLauncherContext.OVERRIDDEN_DEFAULTS_PREFIX)
- .concat(DistributionConfig.LOCATORS_NAME).concat("=").concat(currentLocators));
+ .concat(LOCATORS).concat("=").concat(currentLocators));
}
}
}
-
+
protected Result createStatusLocatorResult(final LocatorState state) throws NumberFormatException, IOException, ClassNotFoundException {
InfoResultData infoResultData = ResultBuilder.createInfoResultData();
infoResultData.addLine(state.toString());
@@ -969,7 +909,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
final String propertyName = property.toString();
final String propertyValue = gemfireProperties.getProperty(propertyName);
if (!StringUtils.isBlank(propertyValue)) {
- commandLine.add("-Dgemfire." + propertyName + "=" + propertyValue);
+ commandLine.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + propertyName + "=" + propertyValue);
}
}
}
@@ -993,18 +933,15 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
// ProcessBuilder "on Windows" needs every word (space separated) to be
// a different element in the array/list. See #47312. Need to study why!
commandLine.add("-XX:OnOutOfMemoryError=taskkill /F /PID %p");
- }
- else { // All other platforms (Linux, Mac OS X, UNIX, etc)
+ } else { // All other platforms (Linux, Mac OS X, UNIX, etc)
commandLine.add("-XX:OnOutOfMemoryError=kill -KILL %p");
}
- }
- else if (SystemUtils.isJ9VM()) {
+ } else if (SystemUtils.isJ9VM()) {
// NOTE IBM states the following IBM J9 JVM command-line option/switch has side-effects on "performance",
// as noted in the reference documentation...
// http://publib.boulder.ibm.com/infocenter/javasdk/v6r0/index.jsp?topic=/com.ibm.java.doc.diagnostics.60/diag/appendixes/cmdline/commands_jvm.html
commandLine.add("-Xcheck:memory");
- }
- else if (SystemUtils.isJRockitVM()) {
+ } else if (SystemUtils.isJRockitVM()) {
// NOTE the following Oracle JRockit JVM documentation was referenced to identify the appropriate JVM option to
// set when handling OutOfMemoryErrors.
// http://docs.oracle.com/cd/E13150_01/jrockit_jvm/jrockit/jrdocs/refman/optionXX.html
@@ -1067,12 +1004,9 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
try {
fileReader = new BufferedReader(new FileReader(pidFile));
return Integer.parseInt(fileReader.readLine());
- }
- catch (IOException ignore) {
- }
- catch (NumberFormatException ignore) {
- }
- finally {
+ } catch (IOException ignore) {
+ } catch (NumberFormatException ignore) {
+ } finally {
IOUtils.close(fileReader);
}
}
@@ -1085,7 +1019,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
if (newPid != INVALID_PID && newPid != oldPid) {
ServerState serverState = new ServerLauncher.Builder().setPid(newPid).setDisableDefaultServer(true)
- .build().status();
+ .build().status();
if (ObjectUtils.equals(serverState.getMemberName(), memberName)) {
return serverState;
@@ -1097,7 +1031,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
protected ServerState serverStatus(final String workingDirectory, final String memberName) {
ServerState serverState = new ServerLauncher.Builder().setWorkingDirectory(workingDirectory)
- .setDisableDefaultServer(true).build().status();
+ .setDisableDefaultServer(true).build().status();
if (ObjectUtils.equals(serverState.getMemberName(), memberName)) {
return serverState;
@@ -1122,14 +1056,13 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
}
protected String getServerClasspath(final boolean includeSystemClasspath,
- final String userClasspath)
- {
+ final String userClasspath) {
List<String> jarFilePathnames = new ArrayList<>();
jarFilePathnames.add(CORE_DEPENDENCIES_JAR_PATHNAME);
return toClasspath(includeSystemClasspath, jarFilePathnames.toArray(new String[jarFilePathnames.size()]),
- userClasspath);
+ userClasspath);
}
protected String getSystemClasspath() {
@@ -1206,8 +1139,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
try {
IOUtils.verifyPathnameExists(toolsJarPathname);
- }
- catch (IOException e) {
+ } catch (IOException e) {
throw new AttachAPINotFoundException(getAttachAPINotFoundMessage());
}
}
@@ -1219,15 +1151,14 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
protected String getLocalHost() {
try {
return SocketCreator.getLocalHost().getCanonicalHostName();
- }
- catch (UnknownHostException ignore) {
+ } catch (UnknownHostException ignore) {
return LOCALHOST;
}
}
protected String getAttachAPINotFoundMessage() {
return CliStrings.format(CliStrings.ATTACH_API_IN_0_NOT_FOUND_ERROR_MESSAGE,
- ((SystemUtils.isMacOSX() && SystemUtils.isAppleJVM()) ? "classes.jar" : "tools.jar"));
+ ((SystemUtils.isMacOSX() && SystemUtils.isAppleJVM()) ? "classes.jar" : "tools.jar"));
}
protected String getLocatorId(final String host, final Integer port) {
@@ -1240,6 +1171,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
* Gets a proxy to the DistributedSystemMXBean from the GemFire Manager's MBeanServer, or null if unable to find
* the DistributedSystemMXBean.
* </p>
+ *
* @return a proxy to the DistributedSystemMXBean from the GemFire Manager's MBeanServer, or null if unable to find
* the DistributedSystemMXBean.
*/
@@ -1252,6 +1184,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
* Gets a proxy to the MemberMXBean for the GemFire member specified by member name or ID from the GemFire Manager's
* MBeanServer.
* </p>
+ *
* @param member a String indicating the GemFire member's name or ID.
* @return a proxy to the MemberMXBean having the specified GemFire member's name or ID from the GemFire Manager's
* MBeanServer, or null if no GemFire member could be found with the specified member name or ID.
@@ -1270,7 +1203,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
String objectNamePattern = ManagementConstants.OBJECTNAME__PREFIX;
objectNamePattern += (StringUtils.isBlank(serviceName) ? StringUtils.EMPTY_STRING
- : "service=" + serviceName + StringUtils.COMMA_DELIMITER);
+ : "service=" + serviceName + StringUtils.COMMA_DELIMITER);
objectNamePattern += "type=Member,*";
// NOTE throws a MalformedObjectNameException, however, this should not happen since the ObjectName is constructed
@@ -1278,8 +1211,8 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
final ObjectName objectName = ObjectName.getInstance(objectNamePattern);
final QueryExp query = Query.or(
- Query.eq(Query.attr("Name"), Query.value(member)),
- Query.eq(Query.attr("Id"), Query.value(member))
+ Query.eq(Query.attr("Name"), Query.value(member)),
+ Query.eq(Query.attr("Id"), Query.value(member))
);
final Set<ObjectName> memberObjectNames = getGfsh().getOperationInvoker().queryNames(objectName, query);
@@ -1287,8 +1220,7 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
if (!memberObjectNames.isEmpty()) {
memberBean = getGfsh().getOperationInvoker().getMBeanProxy(memberObjectNames.iterator().next(), MemberMXBean.class);
}
- }
- catch (MalformedObjectNameException e) {
+ } catch (MalformedObjectNameException e) {
getGfsh().logSevere(e.getMessage(), e);
}
@@ -1317,210 +1249,210 @@ public class LauncherLifecycleCommands extends AbstractCommandsSupport {
@CliCommand(value = CliStrings.START_SERVER, help = CliStrings.START_SERVER__HELP)
@CliMetaData(shellOnly = true, relatedTopic = { CliStrings.TOPIC_GEMFIRE_SERVER, CliStrings.TOPIC_GEMFIRE_LIFECYCLE })
public Result startServer(@CliOption(key = CliStrings.START_SERVER__ASSIGN_BUCKETS,
- unspecifiedDefaultValue = "false",
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__ASSIGN_BUCKETS__HELP)
- final Boolean assignBuckets,
- @CliOption(key = CliStrings.START_SERVER__BIND_ADDRESS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__BIND_ADDRESS__HELP)
- final String bindAddress,
- @CliOption(key = CliStrings.START_SERVER__CACHE_XML_FILE,
- optionContext = ConverterHint.FILE_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__CACHE_XML_FILE__HELP)
- String cacheXmlPathname,
- @CliOption(key = CliStrings.START_SERVER__CLASSPATH,
+ unspecifiedDefaultValue = "false",
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_SERVER__ASSIGN_BUCKETS__HELP)
+ final Boolean assignBuckets,
+ @CliOption(key = CliStrings.START_SERVER__BIND_ADDRESS,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__BIND_ADDRESS__HELP)
+ final String bindAddress,
+ @CliOption(key = CliStrings.START_SERVER__CACHE_XML_FILE,
+ optionContext = ConverterHint.FILE_PATHSTRING,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__CACHE_XML_FILE__HELP)
+ String cacheXmlPathname,
+ @CliOption(key = CliStrings.START_SERVER__CLASSPATH,
/*optionContext = ConverterHint.FILE_PATHSTRING, // there's an issue with TAB here*/
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__CLASSPATH__HELP)
- final String classpath,
- @CliOption(key = CliStrings.START_SERVER__CRITICAL__HEAP__PERCENTAGE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__CRITICAL__HEAP__HELP)
- final Float criticalHeapPercentage,
- @CliOption(key = CliStrings.START_SERVER__CRITICAL_OFF_HEAP_PERCENTAGE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__CRITICAL_OFF_HEAP__HELP)
- final Float criticalOffHeapPercentage,
- @CliOption(key = CliStrings.START_SERVER__DIR,
- optionContext = ConverterHint.DIR_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__DIR__HELP)
- String workingDirectory,
- @CliOption(key = CliStrings.START_SERVER__DISABLE_DEFAULT_SERVER,
- unspecifiedDefaultValue = "false",
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__DISABLE_DEFAULT_SERVER__HELP)
- final Boolean disableDefaultServer,
- @CliOption(key = CliStrings.START_SERVER__DISABLE_EXIT_WHEN_OUT_OF_MEMORY,
- unspecifiedDefaultValue = "false",
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__DISABLE_EXIT_WHEN_OUT_OF_MEMORY_HELP)
- final Boolean disableExitWhenOutOfMemory,
- @CliOption(key = CliStrings.START_SERVER__ENABLE_TIME_STATISTICS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__ENABLE_TIME_STATISTICS__HELP)
- final Boolean enableTimeStatistics,
- @CliOption(key = CliStrings.START_SERVER__EVICTION__HEAP__PERCENTAGE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__EVICTION__HEAP__PERCENTAGE__HELP)
- final Float evictionHeapPercentage,
- @CliOption(key = CliStrings.START_SERVER__EVICTION_OFF_HEAP_PERCENTAGE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__EVICTION_OFF_HEAP_PERCENTAGE__HELP)
- final Float evictionOffHeapPercentage,
- @CliOption(key = CliStrings.START_SERVER__FORCE,
- unspecifiedDefaultValue = "false",
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__FORCE__HELP)
- final Boolean force,
- @CliOption(key = CliStrings.START_SERVER__GROUP,
- optionContext = ConverterHint.MEMBERGROUP,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__GROUP__HELP)
- final String group,
- @CliOption(key = CliStrings.START_SERVER__HOSTNAME__FOR__CLIENTS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__HOSTNAME__FOR__CLIENTS__HELP)
- final String hostNameForClients,
- @CliOption(key = CliStrings.START_SERVER__INCLUDE_SYSTEM_CLASSPATH,
- specifiedDefaultValue = "true",
- unspecifiedDefaultValue = "false",
- help = CliStrings.START_SERVER__INCLUDE_SYSTEM_CLASSPATH__HELP)
- final Boolean includeSystemClasspath,
- @CliOption(key = CliStrings.START_SERVER__INITIAL_HEAP,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__INITIAL_HEAP__HELP)
- final String initialHeap,
- @CliOption(key = CliStrings.START_SERVER__J,
- optionContext = ConverterHint.STRING_LIST,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__J__HELP)
- @CliMetaData(valueSeparator = ",")
- final String[] jvmArgsOpts,
- @CliOption(key = CliStrings.START_SERVER__LOCATORS,
- optionContext = ConverterHint.LOCATOR_DISCOVERY_CONFIG,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__LOCATORS__HELP)
- final String locators,
- @CliOption(key = CliStrings.START_SERVER__LOCATOR_WAIT_TIME,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__LOCATOR_WAIT_TIME_HELP)
- final Integer locatorWaitTime,
- @CliOption(key = CliStrings.START_SERVER__LOCK_MEMORY,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__LOCK_MEMORY__HELP)
- final Boolean lockMemory,
- @CliOption(key = CliStrings.START_SERVER__LOG_LEVEL,
- optionContext = ConverterHint.LOG_LEVEL,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__LOG_LEVEL__HELP)
- final String logLevel,
- @CliOption(key = CliStrings.START_SERVER__MAX__CONNECTIONS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MAX__CONNECTIONS__HELP)
- final Integer maxConnections,
- @CliOption(key = CliStrings.START_SERVER__MAXHEAP,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MAXHEAP__HELP)
- final String maxHeap,
- @CliOption(key = CliStrings.START_SERVER__MAX__MESSAGE__COUNT,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MAX__MESSAGE__COUNT__HELP)
- final Integer maxMessageCount,
- @CliOption(key = CliStrings.START_SERVER__MAX__THREADS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MAX__THREADS__HELP)
- final Integer maxThreads,
- @CliOption(key = CliStrings.START_SERVER__MCAST_ADDRESS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MCAST_ADDRESS__HELP)
- final String mcastBindAddress,
- @CliOption(key = CliStrings.START_SERVER__MCAST_PORT,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MCAST_PORT__HELP)
- final Integer mcastPort,
- @CliOption(key = CliStrings.START_SERVER__MEMCACHED_PORT,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MEMCACHED_PORT__HELP)
- final Integer memcachedPort,
- @CliOption(key = CliStrings.START_SERVER__MEMCACHED_PROTOCOL,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MEMCACHED_PROTOCOL__HELP)
- final String memcachedProtocol,
- @CliOption(key = CliStrings.START_SERVER__MEMCACHED_BIND_ADDRESS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MEMCACHED_BIND_ADDRESS__HELP)
- final String memcachedBindAddress,
- @CliOption(key = CliStrings.START_SERVER__REDIS_PORT,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__REDIS_PORT__HELP)
- final Integer redisPort,
- @CliOption(key = CliStrings.START_SERVER__REDIS_BIND_ADDRESS,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__REDIS_BIND_ADDRESS__HELP)
- final String redisBindAddress,
- @CliOption(key = CliStrings.START_SERVER__REDIS_PASSWORD,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__REDIS_PASSWORD__HELP)
- final String redisPassword,
- @CliOption(key = CliStrings.START_SERVER__MESSAGE__TIME__TO__LIVE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__MESSAGE__TIME__TO__LIVE__HELP)
- final Integer messageTimeToLive,
- @CliOption(key = CliStrings.START_SERVER__NAME,
- mandatory = true,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__NAME__HELP)
- final String memberName,
- @CliOption(key = CliStrings.START_SERVER__OFF_HEAP_MEMORY_SIZE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__OFF_HEAP_MEMORY_SIZE__HELP)
- final String offHeapMemorySize,
- @CliOption(key = CliStrings.START_SERVER__PROPERTIES,
- optionContext = ConverterHint.FILE_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__PROPERTIES__HELP)
- String gemfirePropertiesPathname,
- @CliOption(key = CliStrings.START_SERVER__REBALANCE,
- unspecifiedDefaultValue = "false",
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__REBALANCE__HELP)
- final Boolean rebalance,
- @CliOption(key = CliStrings.START_SERVER__SECURITY_PROPERTIES,
- optionContext = ConverterHint.FILE_PATHSTRING,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__SECURITY_PROPERTIES__HELP)
- String gemfireSecurityPropertiesPathname,
- @CliOption(key = CliStrings.START_SERVER__SERVER_BIND_ADDRESS,
- unspecifiedDefaultValue = CacheServer.DEFAULT_BIND_ADDRESS,
- help = CliStrings.START_SERVER__SERVER_BIND_ADDRESS__HELP)
- final String serverBindAddress,
- @CliOption(key = CliStrings.START_SERVER__SERVER_PORT,
- unspecifiedDefaultValue = ("" + CacheServer.DEFAULT_PORT),
- help = CliStrings.START_SERVER__SERVER_PORT__HELP)
- final Integer serverPort,
- @CliOption(key = CliStrings.START_SERVER__SOCKET__BUFFER__SIZE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__SOCKET__BUFFER__SIZE__HELP)
- final Integer socketBufferSize,
- @CliOption(key = CliStrings.START_SERVER__SPRING_XML_LOCATION,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__SPRING_XML_LOCATION_HELP)
- final String springXmlLocation,
- @CliOption(key = CliStrings.START_SERVER__STATISTIC_ARCHIVE_FILE,
- unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
- help = CliStrings.START_SERVER__STATISTIC_ARCHIVE_FILE__HELP)
- final String statisticsArchivePathname,
- @CliOption(key = CliStrings.START_SERVER__USE_CLUSTER_CONFIGURATION,
- unspecifiedDefaultValue = "true",
- specifiedDefaultValue = "true",
- help = CliStrings.START_SERVER__USE_CLUSTER_CONFIGURATION__HELP)
- final Boolean requestSharedConfiguration)
- // NOTICE: keep the parameters in alphabetical order based on their CliStrings.START_SERVER_* text
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__CLASSPATH__HELP)
+ final String classpath,
+ @CliOption(key = CliStrings.START_SERVER__CRITICAL__HEAP__PERCENTAGE,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__CRITICAL__HEAP__HELP)
+ final Float criticalHeapPercentage,
+ @CliOption(key = CliStrings.START_SERVER__CRITICAL_OFF_HEAP_PERCENTAGE,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__CRITICAL_OFF_HEAP__HELP)
+ final Float criticalOffHeapPercentage,
+ @CliOption(key = CliStrings.START_SERVER__DIR,
+ optionContext = ConverterHint.DIR_PATHSTRING,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__DIR__HELP)
+ String workingDirectory,
+ @CliOption(key = CliStrings.START_SERVER__DISABLE_DEFAULT_SERVER,
+ unspecifiedDefaultValue = "false",
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_SERVER__DISABLE_DEFAULT_SERVER__HELP)
+ final Boolean disableDefaultServer,
+ @CliOption(key = CliStrings.START_SERVER__DISABLE_EXIT_WHEN_OUT_OF_MEMORY,
+ unspecifiedDefaultValue = "false",
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_SERVER__DISABLE_EXIT_WHEN_OUT_OF_MEMORY_HELP)
+ final Boolean disableExitWhenOutOfMemory,
+ @CliOption(key = CliStrings.START_SERVER__ENABLE_TIME_STATISTICS,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_SERVER__ENABLE_TIME_STATISTICS__HELP)
+ final Boolean enableTimeStatistics,
+ @CliOption(key = CliStrings.START_SERVER__EVICTION__HEAP__PERCENTAGE,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__EVICTION__HEAP__PERCENTAGE__HELP)
+ final Float evictionHeapPercentage,
+ @CliOption(key = CliStrings.START_SERVER__EVICTION_OFF_HEAP_PERCENTAGE,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__EVICTION_OFF_HEAP_PERCENTAGE__HELP)
+ final Float evictionOffHeapPercentage,
+ @CliOption(key = CliStrings.START_SERVER__FORCE,
+ unspecifiedDefaultValue = "false",
+ specifiedDefaultValue = "true",
+ help = CliStrings.START_SERVER__FORCE__HELP)
+ final Boolean force,
+ @CliOption(key = CliStrings.START_SERVER__GROUP,
+ optionContext = ConverterHint.MEMBERGROUP,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+ help = CliStrings.START_SERVER__GROUP__HELP)
+ final String group,
+ @CliOption(key = CliStrings.START_SERVER__HOSTNAME__FOR__CLIENTS,
+ unspecifiedDefaultValue = CliMetaData.ANNOTATION_NULL_VALUE,
+
<TRUNCATED>
[46/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
index d49b116..8115701 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerTransactionDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
import com.gemstone.gemfire.cache.client.*;
@@ -147,10 +149,10 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
// these settings were used to manually check that tx operation stats were being updated
- //ccf.set(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- //ccf.set(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "clientStats.gfs");
+ //ccf.set(STATISTIC_SAMPLING_ENABLED, "true");
+ //ccf.set(STATISTIC_ARCHIVE_FILE, "clientStats.gfs");
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
@@ -207,7 +209,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
@@ -278,7 +280,7 @@ public class ClientServerTransactionDUnitTest extends RemoteTransactionDUnitTest
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(cachingProxy ? ClientRegionShortcut.CACHING_PROXY : ClientRegionShortcut.PROXY);
@@ -1333,7 +1335,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -1429,7 +1431,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost", port2);
ccf.setPoolLoadConditioningInterval(1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -1546,7 +1548,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
if (port2 != 0) ccf.addPoolServer("localhost", port2);
if (port3 != 0) ccf.addPoolServer("localhost", port3);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(cachingProxy ? ClientRegionShortcut.CACHING_PROXY : ClientRegionShortcut.PROXY);
@@ -2058,7 +2060,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost", port2);
ccf.setPoolSubscriptionEnabled(false);
ccf.setPoolLoadConditioningInterval(1);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -2451,7 +2453,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.setPoolMinConnections(5);
ccf.setPoolLoadConditioningInterval(-1);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
Region r1 = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create("r1");
Region r2 = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create("r2");
@@ -2684,10 +2686,10 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.addPoolServer("localhost", port2);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
// these settings were used to manually check that tx operation stats were being updated
- //ccf.set(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- //ccf.set(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "clientStats.gfs");
+ //ccf.set(STATISTIC_SAMPLING_ENABLED, "true");
+ //ccf.set(STATISTIC_ARCHIVE_FILE, "clientStats.gfs");
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(ClientRegionShortcut.PROXY);
@@ -2986,7 +2988,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
if (port2 != 0) ccf.addPoolServer("localhost", port2);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3127,7 +3129,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost", port2);
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3215,7 +3217,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<CustId, Customer> custrf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
@@ -3305,7 +3307,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(true);
ccf.setPoolSubscriptionRedundancy(0);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
Region r = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).addCacheListener(new ClientListener()).create(regionName);
r.registerInterestRegex(".*");
@@ -3321,7 +3323,7 @@ public void testClientCommitAndDataStoreGetsEvent() throws Exception {
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port1);
ccf.setPoolMinConnections(0);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
Region r = cCache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create(regionName);
getCache().getCacheTransactionManager().begin();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
index 8a1586c..197b028 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConcurrentMapOpsDUnitTest.java
@@ -31,7 +31,6 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
import com.gemstone.gemfire.internal.AvailablePort;
@@ -46,6 +45,8 @@ import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* tests for the concurrentMapOperations. there are more tests in ClientServerMiscDUnitTest
*
@@ -135,7 +136,7 @@ public class ConcurrentMapOpsDUnitTest extends CacheTestCase {
ccf.addPoolServer("localhost", port2);
}
ccf.setPoolSubscriptionEnabled(true);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
index b6d5a12..34ad0fe 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ConnectDisconnectDUnitTest.java
@@ -22,8 +22,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/** A test of 46438 - missing response to an update attributes message */
public class ConnectDisconnectDUnitTest extends CacheTestCase {
@@ -151,8 +150,8 @@ public class ConnectDisconnectDUnitTest extends CacheTestCase {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(CONSERVE_SOCKETS, "false");
if (LOCATOR_PORT > 0) {
props.setProperty(START_LOCATOR, "localhost[" + LOCATOR_PORT + "]");
props.setProperty(LOCATORS, LOCATORS_STRING);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
index 7624d12..151a8e5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationDUnitTest.java
@@ -47,8 +47,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* @since GemFire 6.1
@@ -649,8 +648,8 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(60));
+ properties.setProperty(DURABLE_CLIENT_ID, durableClientId);
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT, String.valueOf(60));
createDurableCacheClient(((PoolFactoryImpl)pf).getPoolAttributes(),
regionName, properties, new Integer(DURABLE_CLIENT_LISTENER), Boolean.TRUE);
@@ -722,8 +721,8 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(60));
+ properties.setProperty(DURABLE_CLIENT_ID, durableClientId);
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT, String.valueOf(60));
createDurableCacheClient(((PoolFactoryImpl)pf).getPoolAttributes(),
regionName, properties, new Integer(DURABLE_CLIENT_LISTENER), Boolean.FALSE);
@@ -1314,7 +1313,7 @@ public class DeltaPropagationDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.CLIENT_CONFLATION_PROP_NAME, conflate);
+ props.setProperty(CONFLATE_EVENTS, conflate);
new DeltaPropagationDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
pool = ClientServerTestCase.configureConnectionPool(factory, "localhost", ports,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
index d57f706..60a0548 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOfflineCompactionJUnitTest.java
@@ -33,8 +33,7 @@ import java.io.File;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
/**
@@ -64,10 +63,10 @@ public class DiskOfflineCompactionJUnitTest
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
+ props.setProperty(LOG_LEVEL, "config"); // to keep diskPerf logs smaller
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
index 316813d..0ac0d11 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskOldAPIsJUnitTest.java
@@ -29,10 +29,8 @@ import java.io.File;
import java.util.Properties;
import java.util.Set;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
/**
* Tests the old disk apis to make sure they do the correct thing.
@@ -52,10 +50,10 @@ public class DiskOldAPIsJUnitTest
static {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
+ props.setProperty(LOG_LEVEL, "config"); // to keep diskPerf logs smaller
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs");
}
@Before
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
index b1a67e3..57bde39 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
@@ -32,7 +31,7 @@ import java.util.Arrays;
import java.util.Iterator;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
@@ -73,7 +72,7 @@ public class DiskRegCacheXmlJUnitTest
props.setProperty(SystemConfigurationProperties.NAME, "test");
String path = TestUtil.getResourcePath(getClass(), "DiskRegCacheXmlJUnitTest.xml");
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds = DistributedSystem.connect(props);
try {
// Create the cache which causes the cache-xml-file to be parsed
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
index a71be75..c7f1d18 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -34,7 +33,7 @@ import java.io.FileWriter;
import java.io.PrintWriter;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.fail;
/**
@@ -50,53 +49,9 @@ public class DiskRegCachexmlGeneratorJUnitTest extends DiskRegionTestingBase
DiskRegionProperties diskProps = new DiskRegionProperties();
- DiskRegionProperties diskProps1 = new DiskRegionProperties();
+ DiskRegionProperties[] diskRegionProperties = new DiskRegionProperties[12];
- DiskRegionProperties diskProps2 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps3 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps4 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps5 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps6 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps7 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps8 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps9 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps10 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps11 = new DiskRegionProperties();
-
- DiskRegionProperties diskProps12 = new DiskRegionProperties();
-
- Region region1;
-
- Region region2;
-
- Region region3;
-
- Region region4;
-
- Region region5;
-
- Region region6;
-
- Region region7;
-
- Region region8;
-
- Region region9;
-
- Region region10;
-
- Region region11;
-
- Region region12;
+ Region[] regions = new Region[12];
@Before
public void setUp() throws Exception
@@ -107,18 +62,17 @@ public class DiskRegCachexmlGeneratorJUnitTest extends DiskRegionTestingBase
diskDirSize[1] = Integer.MAX_VALUE;
diskDirSize[2] = 1073741824;
diskDirSize[3] = 2073741824;
- diskProps1.setDiskDirsAndSizes(dirs, diskDirSize);
- diskProps2.setDiskDirs(dirs);
- diskProps3.setDiskDirs(dirs);
- diskProps4.setDiskDirs(dirs);
- diskProps5.setDiskDirs(dirs);
- diskProps6.setDiskDirs(dirs);
- diskProps7.setDiskDirs(dirs);
- diskProps8.setDiskDirs(dirs);
- diskProps9.setDiskDirs(dirs);
- diskProps10.setDiskDirs(dirs);
- diskProps11.setDiskDirs(dirs);
- diskProps12.setDiskDirs(dirs);
+
+ for (int i = 0; i < diskRegionProperties.length; i++) {
+ diskRegionProperties[i] = new DiskRegionProperties();
+ if(i == 0)
+ {
+ diskRegionProperties[i].setDiskDirsAndSizes(dirs, diskDirSize);
+ }
+ else{
+ diskRegionProperties[i].setDiskDirs(dirs);
+ }
+ }
}
@After
@@ -130,97 +84,97 @@ public class DiskRegCachexmlGeneratorJUnitTest extends DiskRegionTestingBase
public void createCacheXML()
{
- // create the region1 which is SyncPersistOnly and set DiskWriteAttibutes
- diskProps1.setRolling(true);
- diskProps1.setMaxOplogSize(1073741824L);
- diskProps1.setRegionName("region1");
- region1 = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache,
- diskProps1, Scope.LOCAL);
-
- // create the region2 which is SyncPersistOnly and set DiskWriteAttibutes
-
- diskProps2.setRolling(false);
- diskProps2.setRegionName("region2");
- region2 = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache,
- diskProps2, Scope.LOCAL);
-
- // create the region3 which AsyncPersistOnly, No buffer and Rolling oplog
- diskProps3.setRolling(true);
- diskProps3.setMaxOplogSize(1073741824L);
- diskProps3.setRegionName("region3");
- region3 = DiskRegionHelperFactory.getAsyncPersistOnlyRegion(cache,
- diskProps3);
-
- // create the region4 which is AsynchPersistonly, No buffer and fixed oplog
- diskProps4.setRolling(false);
- diskProps4.setRegionName("region4");
- region4 = DiskRegionHelperFactory.getAsyncPersistOnlyRegion(cache,
- diskProps4);
-
- // create the region5 which is SynchOverflowOnly, Rolling oplog
- diskProps5.setRolling(true);
- diskProps5.setMaxOplogSize(1073741824L);
- diskProps5.setRegionName("region5");
- region5 = DiskRegionHelperFactory.getSyncOverFlowOnlyRegion(cache,
- diskProps5);
-
- // create the region6 which is SyncOverflowOnly, Fixed oplog
- diskProps6.setRolling(false);
- diskProps6.setRegionName("region6");
- region6 = DiskRegionHelperFactory.getSyncOverFlowOnlyRegion(cache,
- diskProps6);
-
- // create the region7 which is AsyncOverflow, with Buffer and rolling oplog
- diskProps7.setRolling(true);
- diskProps7.setMaxOplogSize(1073741824L);
- diskProps7.setBytesThreshold(10000l);
- diskProps7.setTimeInterval(15l);
- diskProps7.setRegionName("region7");
- region7 = DiskRegionHelperFactory.getAsyncOverFlowOnlyRegion(cache,
- diskProps7);
-
- // create the region8 which is AsyncOverflow ,Time base buffer-zero byte
+ // create the regions[0] which is SyncPersistOnly and set DiskWriteAttibutes
+ diskRegionProperties[0].setRolling(true);
+ diskRegionProperties[0].setMaxOplogSize(1073741824L);
+ diskRegionProperties[0].setRegionName("regions1");
+ regions[0] = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache,
+ diskRegionProperties[0], Scope.LOCAL);
+
+ // create the regions[1] which is SyncPersistOnly and set DiskWriteAttibutes
+
+ diskRegionProperties[1].setRolling(false);
+ diskRegionProperties[1].setRegionName("regions2");
+ regions[1] = DiskRegionHelperFactory.getSyncPersistOnlyRegion(cache,
+ diskRegionProperties[1], Scope.LOCAL);
+
+ // create the regions[2] which AsyncPersistOnly, No buffer and Rolling oplog
+ diskRegionProperties[2].setRolling(true);
+ diskRegionProperties[2].setMaxOplogSize(1073741824L);
+ diskRegionProperties[2].setRegionName("regions3");
+ regions[2] = DiskRegionHelperFactory.getAsyncPersistOnlyRegion(cache,
+ diskRegionProperties[2]);
+
+ // create the regions[3] which is AsynchPersistonly, No buffer and fixed oplog
+ diskRegionProperties[3].setRolling(false);
+ diskRegionProperties[3].setRegionName("regions4");
+ regions[3] = DiskRegionHelperFactory.getAsyncPersistOnlyRegion(cache,
+ diskRegionProperties[3]);
+
+ // create the regions[4] which is SynchOverflowOnly, Rolling oplog
+ diskRegionProperties[4].setRolling(true);
+ diskRegionProperties[4].setMaxOplogSize(1073741824L);
+ diskRegionProperties[4].setRegionName("regions5");
+ regions[4] = DiskRegionHelperFactory.getSyncOverFlowOnlyRegion(cache,
+ diskRegionProperties[4]);
+
+ // create the regions[5] which is SyncOverflowOnly, Fixed oplog
+ diskRegionProperties[5].setRolling(false);
+ diskRegionProperties[5].setRegionName("regions6");
+ regions[5] = DiskRegionHelperFactory.getSyncOverFlowOnlyRegion(cache,
+ diskRegionProperties[5]);
+
+ // create the regions[6] which is AsyncOverflow, with Buffer and rolling oplog
+ diskRegionProperties[6].setRolling(true);
+ diskRegionProperties[6].setMaxOplogSize(1073741824L);
+ diskRegionProperties[6].setBytesThreshold(10000l);
+ diskRegionProperties[6].setTimeInterval(15l);
+ diskRegionProperties[6].setRegionName("regions7");
+ regions[6] = DiskRegionHelperFactory.getAsyncOverFlowOnlyRegion(cache,
+ diskRegionProperties[6]);
+
+ // create the regions[7] which is AsyncOverflow ,Time base buffer-zero byte
// buffer
// and Fixed oplog
- diskProps8.setRolling(false);
- diskProps8.setTimeInterval(15l);
- diskProps8.setBytesThreshold(0l);
- diskProps8.setRegionName("region8");
- region8 = DiskRegionHelperFactory.getAsyncOverFlowOnlyRegion(cache,
- diskProps8);
-
- // create the region9 which is SyncPersistOverflow, Rolling oplog
- diskProps9.setRolling(true);
- diskProps9.setMaxOplogSize(1073741824L);
- diskProps9.setRegionName("region9");
- region9 = DiskRegionHelperFactory.getSyncOverFlowAndPersistRegion(cache,
- diskProps9);
-
- // create the region10 which is Sync PersistOverflow, fixed oplog
- diskProps10.setRolling(false);
- diskProps10.setRegionName("region10");
- region10 = DiskRegionHelperFactory.getSyncOverFlowAndPersistRegion(cache,
- diskProps10);
- // create the region11 which is Async Overflow Persist ,with buffer and
+ diskRegionProperties[7].setRolling(false);
+ diskRegionProperties[7].setTimeInterval(15l);
+ diskRegionProperties[7].setBytesThreshold(0l);
+ diskRegionProperties[7].setRegionName("regions8");
+ regions[7] = DiskRegionHelperFactory.getAsyncOverFlowOnlyRegion(cache,
+ diskRegionProperties[7]);
+
+ // create the regions[8] which is SyncPersistOverflow, Rolling oplog
+ diskRegionProperties[8].setRolling(true);
+ diskRegionProperties[8].setMaxOplogSize(1073741824L);
+ diskRegionProperties[8].setRegionName("regions9");
+ regions[8] = DiskRegionHelperFactory.getSyncOverFlowAndPersistRegion(cache,
+ diskRegionProperties[8]);
+
+ // create the regions[9] which is Sync PersistOverflow, fixed oplog
+ diskRegionProperties[9].setRolling(false);
+ diskRegionProperties[9].setRegionName("regions10");
+ regions[9] = DiskRegionHelperFactory.getSyncOverFlowAndPersistRegion(cache,
+ diskRegionProperties[9]);
+ // create the regions[10] which is Async Overflow Persist ,with buffer and
// rollong
// oplog
- diskProps11.setRolling(true);
- diskProps11.setMaxOplogSize(1073741824L);
- diskProps11.setBytesThreshold(10000l);
- diskProps11.setTimeInterval(15l);
- diskProps11.setRegionName("region11");
- region11 = DiskRegionHelperFactory.getAsyncOverFlowAndPersistRegion(cache,
- diskProps11);
-
- // create the region12 which is Async Persist Overflow with time based
+ diskRegionProperties[10].setRolling(true);
+ diskRegionProperties[10].setMaxOplogSize(1073741824L);
+ diskRegionProperties[10].setBytesThreshold(10000l);
+ diskRegionProperties[10].setTimeInterval(15l);
+ diskRegionProperties[10].setRegionName("regions11");
+ regions[10] = DiskRegionHelperFactory.getAsyncOverFlowAndPersistRegion(cache,
+ diskRegionProperties[10]);
+
+ // create the regions[11] which is Async Persist Overflow with time based
// buffer
// and Fixed oplog
- diskProps12.setRolling(false);
- diskProps12.setBytesThreshold(0l);
- diskProps12.setTimeInterval(15l);
- diskProps12.setRegionName("region12");
- region12 = DiskRegionHelperFactory.getAsyncOverFlowAndPersistRegion(cache,
- diskProps12);
+ diskRegionProperties[11].setRolling(false);
+ diskRegionProperties[11].setBytesThreshold(0l);
+ diskRegionProperties[11].setTimeInterval(15l);
+ diskRegionProperties[11].setRegionName("regions12");
+ regions[11] = DiskRegionHelperFactory.getAsyncOverFlowAndPersistRegion(cache,
+ diskRegionProperties[11]);
//cacheXmlGenerator: generates cacheXml file
@@ -246,58 +200,46 @@ public class DiskRegCachexmlGeneratorJUnitTest extends DiskRegionTestingBase
props.setProperty(SystemConfigurationProperties.NAME, "DiskRegCachexmlGeneratorJUnitTest");
props.setProperty(MCAST_PORT, "0");
String path = "DiskRegCachexmlGeneratorJUnitTest.xml";
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds = DistributedSystem.connect(props);
// Create the cache which causes the cache-xml-file to be parsed
cache = CacheFactory.create(ds);
- // Get the region1
- region1 = cache.getRegion("region1");
- verify((LocalRegion)region1, diskProps1);
+ // Get the regions[0]
+ verify((LocalRegion) cache.getRegion("regions1"), diskRegionProperties[0]);
- // Get the region2
- Region region2 = cache.getRegion("region2");
- verify((LocalRegion)region2, diskProps2);
+ // Get the regions[1]
+ verify((LocalRegion) cache.getRegion("regions2"), diskRegionProperties[1]);
- // Get the region3
- Region region3 = cache.getRegion("region3");
- verify((LocalRegion)region3, diskProps3);
+ // Get the regions[2]
+ verify((LocalRegion) cache.getRegion("regions3"), diskRegionProperties[2]);
- // Get the region4
- Region region4 = cache.getRegion("region4");
- verify((LocalRegion)region4, diskProps4);
+ // Get the regions[3]
+ verify((LocalRegion) cache.getRegion("regions4"), diskRegionProperties[3]);
- // Get the region5
- Region region5 = cache.getRegion("region5");
- verify((LocalRegion)region5, diskProps5);
+ // Get the regions[4]
+ verify((LocalRegion) cache.getRegion("regions5"), diskRegionProperties[4]);
- // Get the region6
- Region region6 = cache.getRegion("region6");
- verify((LocalRegion)region6, diskProps6);
+ // Get the regions[5]
+ verify((LocalRegion) cache.getRegion("regions6"), diskRegionProperties[5]);
- // Get the region7
- Region region7 = cache.getRegion("region7");
- verify((LocalRegion)region7, diskProps7);
+ // Get the regions[6]
+ verify((LocalRegion) cache.getRegion("regions7"), diskRegionProperties[6]);
- // Get the region8
- Region region8 = cache.getRegion("region8");
- verify((LocalRegion)region8, diskProps8);
+ // Get the regions[7]
+ verify((LocalRegion) cache.getRegion("regions8"), diskRegionProperties[7]);
- // Get the region9
- Region region9 = cache.getRegion("region9");
- verify((LocalRegion)region9, diskProps9);
+ // Get the regions[8]
+ verify((LocalRegion) cache.getRegion("regions9"), diskRegionProperties[8]);
- // Get the region10
- Region region10 = cache.getRegion("region10");
- verify((LocalRegion)region10, diskProps10);
+ // Get the regions[9]
+ verify((LocalRegion) cache.getRegion("regions10"), diskRegionProperties[9]);
- // Get the region11
- Region region11 = cache.getRegion("region11");
- verify((LocalRegion)region11, diskProps11);
+ // Get the regions[10]
+ verify((LocalRegion) cache.getRegion("regions11"), diskRegionProperties[10]);
- // Get the region12
- Region region12 = cache.getRegion("region12");
- verify((LocalRegion)region12, diskProps12);
+ // Get the regions[11]
+ verify((LocalRegion) cache.getRegion("regions12"), diskRegionProperties[11]);
}
}// end of DiskRegCachexmlGeneratorJUnitTest
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
index 09f95f8..005555a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalArguementsJUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.DiskStoreFactory;
@@ -54,10 +56,10 @@ public class DiskRegionIllegalArguementsJUnitTest
static {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
+ props.setProperty(LOG_LEVEL, "config"); // to keep diskPerf logs smaller
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs");
}
@Before
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
index cac5087..490aa8b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionIllegalCacheXMLvaluesJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.CacheXmlException;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.Test;
@@ -28,7 +27,7 @@ import org.junit.experimental.categories.Category;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.fail;
/**
@@ -52,7 +51,7 @@ public class DiskRegionIllegalCacheXMLvaluesJUnitTest
dir.deleteOnExit();
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), path));
+ props.setProperty(CACHE_XML_FILE, TestUtil.getResourcePath(getClass(), path));
ds = DistributedSystem.connect(props);
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
index 08772a4..83a29ae 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegionTestingBase.java
@@ -20,6 +20,8 @@
*/
package com.gemstone.gemfire.internal.cache;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
@@ -77,10 +79,10 @@ public class DiskRegionTestingBase
{
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
+ props.setProperty(LOG_LEVEL, "config"); // to keep diskPerf logs smaller
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs");
File testingDirectory = new File("testingDirectory");
testingDirectory.mkdir();
@@ -173,8 +175,8 @@ public class DiskRegionTestingBase
protected Cache createCache() {
// useful for debugging:
-// props.put(DistributionConfig.LOG_FILE_NAME, "diskRegionTestingBase_system.log");
-// props.put(DistributionConfig.LOG_LEVEL_NAME, getGemFireLogLevel());
+// props.put(LOG_FILE, "diskRegionTestingBase_system.log");
+// props.put(LOG_LEVEL, getGemFireLogLevel());
cache = new CacheFactory(props).create();
ds = cache.getDistributedSystem();
logWriter = cache.getLogger();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
index f2685f6..84dcd1b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskStoreFactoryJUnitTest.java
@@ -30,8 +30,7 @@ import java.io.FilenameFilter;
import java.util.Arrays;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -51,10 +50,10 @@ public class DiskStoreFactoryJUnitTest
static {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
+ props.setProperty(LOG_LEVEL, "config"); // to keep diskPerf logs smaller
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs");
}
@Before
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
index c97ac23..8ffcf07 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/FixedPRSinglehopDUnitTest.java
@@ -25,7 +25,6 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.partitioned.fixed.QuarterPartitionResolver;
import com.gemstone.gemfire.internal.cache.partitioned.fixed.SingleHopQuarterPartitionResolver;
@@ -38,8 +37,7 @@ import java.io.File;
import java.io.IOException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class FixedPRSinglehopDUnitTest extends CacheTestCase {
@@ -412,7 +410,7 @@ public class FixedPRSinglehopDUnitTest extends CacheTestCase {
File logFile = new File("locator-" + locatorPort + ".log");
Properties props = new Properties();
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
locator = Locator.startLocatorAndDS(locatorPort, logFile, null, props);
}
[34/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index a91306e..72e0118 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -16,63 +16,17 @@
*/
package com.gemstone.gemfire.distributed.internal.membership.gms.mgr;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.ForcedDisconnectException;
-import com.gemstone.gemfire.GemFireConfigException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.SystemConnectException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.ToDataException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.AdminMessageType;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DSClock;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionException;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.OverflowQueueWithDMStats;
-import com.gemstone.gemfire.distributed.internal.SizeableRunnable;
-import com.gemstone.gemfire.distributed.internal.StartupMessage;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.direct.DirectChannel;
import com.gemstone.gemfire.distributed.internal.direct.DirectChannelListener;
import com.gemstone.gemfire.distributed.internal.direct.ShunnedMemberException;
-import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.MembershipTestHook;
-import com.gemstone.gemfire.distributed.internal.membership.NetView;
-import com.gemstone.gemfire.distributed.internal.membership.QuorumChecker;
+import com.gemstone.gemfire.distributed.internal.membership.*;
import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
import com.gemstone.gemfire.distributed.internal.membership.gms.SuspectMember;
@@ -97,6 +51,17 @@ import com.gemstone.gemfire.internal.shared.StringPrintWriter;
import com.gemstone.gemfire.internal.tcp.ConnectExceptions;
import com.gemstone.gemfire.internal.tcp.MemberShunnedException;
import com.gemstone.gemfire.internal.util.Breadcrumbs;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
public class GMSMembershipManager implements MembershipManager, Manager
{
@@ -352,7 +317,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
* @see #shunnedMembers
*/
static private final int SHUNNED_SUNSET = Integer.getInteger(
- "gemfire.shunned-member-timeout", 300).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "shunned-member-timeout", 300).intValue();
/**
* Set to true when the service should stop.
@@ -736,7 +701,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
surpriseMemberTimeout = Math.max(20 * DistributionConfig.DEFAULT_MEMBER_TIMEOUT,
20 * config.getMemberTimeout());
- surpriseMemberTimeout = Integer.getInteger("gemfire.surprise-member-timeout", surpriseMemberTimeout).intValue();
+ surpriseMemberTimeout = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "surprise-member-timeout", surpriseMemberTimeout).intValue();
}
@@ -1604,7 +1569,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
// first save the current cache description so reconnect can rebuild the cache
GemFireCacheImpl cache = GemFireCacheImpl.getInstance();
if (cache != null && (cache instanceof Cache)) {
- if (!Boolean.getBoolean("gemfire.autoReconnect-useCacheXMLFile")
+ if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "autoReconnect-useCacheXMLFile")
&& !sharedConfigEnabled) {
try {
logger.info("generating XML to rebuild the cache after reconnect completes");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
index 6ce0b08..ceb5af8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/tcpserver/TcpServer.java
@@ -16,50 +16,24 @@
*/
package com.gemstone.gemfire.distributed.internal.tcpserver;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.IOException;
-import java.io.StreamCorruptedException;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.URL;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.net.ssl.SSLException;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.PoolStatHelper;
-import com.gemstone.gemfire.distributed.internal.PooledExecutorWithDMStats;
-import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
-import com.gemstone.gemfire.internal.DSFIDFactory;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.VersionedDataInputStream;
-import com.gemstone.gemfire.internal.VersionedDataOutputStream;
+import com.gemstone.gemfire.distributed.internal.*;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLException;
+import java.io.*;
+import java.net.*;
+import java.util.*;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* TCP server which listens on a port and delegates requests to a request
@@ -98,15 +72,16 @@ public class TcpServer {
public static int OLDTESTVERSION = OLDGOSSIPVERSION;
public static final long SHUTDOWN_WAIT_TIME = 60 * 1000;
- private static int MAX_POOL_SIZE = Integer.getInteger("gemfire.TcpServer.MAX_POOL_SIZE", 100).intValue();
+ private static int MAX_POOL_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "TcpServer.MAX_POOL_SIZE", 100).intValue();
private static int POOL_IDLE_TIMEOUT = 60 * 1000;
private static final Logger log = LogService.getLogger();
-
- protected/*GemStoneAddition*/ final/*GemStoneAddition*/ static int READ_TIMEOUT = Integer.getInteger("gemfire.TcpServer.READ_TIMEOUT", 60 * 1000).intValue();
+
+ protected/*GemStoneAddition*/ final/*GemStoneAddition*/ static int READ_TIMEOUT = Integer
+ .getInteger(DistributionConfig.GEMFIRE_PREFIX + "TcpServer.READ_TIMEOUT", 60 * 1000).intValue();
//This is for backwards compatibility. The p2p.backlog flag used to be the only way to configure the locator backlog.
private static final int P2P_BACKLOG = Integer.getInteger("p2p.backlog", 1000).intValue();
- private static final int BACKLOG = Integer.getInteger("gemfire.TcpServer.BACKLOG", P2P_BACKLOG).intValue();
+ private static final int BACKLOG = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "TcpServer.BACKLOG", P2P_BACKLOG).intValue();
// private int port=7500;
private final int port;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index 93cb9b2..964f741 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -17,30 +17,18 @@
package com.gemstone.gemfire.internal;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.reflect.Array;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeSet;
-
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.UnmodifiableException;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.FlowControlParams;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.io.*;
+import java.lang.reflect.Array;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
/**
* Provides an implementation of the {@link Config} interface
* that implements functionality that all {@link Config} implementations
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/Assert.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/Assert.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/Assert.java
index 80c691a..b337bbd 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/Assert.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/Assert.java
@@ -17,8 +17,9 @@
package com.gemstone.gemfire.internal;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.InternalGemFireError;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
/**
* Support for correctness assertions.
@@ -58,7 +59,7 @@ public class Assert {
}
}
- private static boolean debug = Boolean.getBoolean("gemfire.haltOnAssertFailure");
+ private static boolean debug = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "haltOnAssertFailure");
public static boolean waitForDebuggerOnError() { return debug; }
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/AvailablePort.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AvailablePort.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AvailablePort.java
index 11eb834..95ca22b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AvailablePort.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AvailablePort.java
@@ -16,12 +16,12 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.*;
-import java.net.*;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.*;
import java.util.Enumeration;
import java.util.Random;
@@ -47,10 +47,10 @@ public class AvailablePort {
String name = null;
try {
if (protocol == SOCKET) {
- name = System.getProperty("gemfire.bind-address");
+ name = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "bind-address");
}
else if (protocol == MULTICAST) {
- name = System.getProperty("gemfire.mcast-address");
+ name = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "mcast-address");
}
if (name != null) {
return InetAddress.getByName(name);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/Banner.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/Banner.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/Banner.java
index b6791ca..bee70a4 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/Banner.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/Banner.java
@@ -21,7 +21,8 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.internal.logging.LogService;
-import java.io.*;
+import java.io.PrintWriter;
+import java.io.StringWriter;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.util.*;
@@ -132,7 +133,7 @@ public class Banner {
prettyPrintPath((String)sp.get("java.library.path"), out);
sp.remove("java.library.path");
- if (Boolean.getBoolean("gemfire.disableSystemPropertyLogging")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableSystemPropertyLogging")) {
out.println("System property logging disabled.");
} else {
out.println("System Properties:");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
index 8d3cf0f..697f8c7 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/ClassPathLoader.java
@@ -16,6 +16,11 @@
*/
package com.gemstone.gemfire.internal;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.util.CollectionUtils;
+import org.apache.logging.log4j.Logger;
+
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -23,22 +28,9 @@ import java.lang.reflect.Proxy;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
+import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.util.CollectionUtils;
-
/**
* The delegating <tt>ClassLoader</tt> used by GemFire to load classes and other resources. This <tt>ClassLoader</tt>
* delegates to any <tt>ClassLoader</tt>s added to the list of custom class loaders, thread context <tt>ClassLoader</tt>
@@ -71,14 +63,14 @@ public final class ClassPathLoader {
*
* See also http://docs.oracle.com/javase/specs/jvms/se7/html/jvms-5.html
*/
-
- public static final String ENABLE_TRACE_PROPERTY = "gemfire.ClassPathLoader.enableTrace";
+
+ public static final String ENABLE_TRACE_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "ClassPathLoader.enableTrace";
public static final String ENABLE_TRACE_DEFAULT_VALUE = "false";
private final boolean ENABLE_TRACE = false;
private static final Logger logger = LogService.getLogger();
-
- public static final String EXCLUDE_TCCL_PROPERTY = "gemfire.excludeThreadContextClassLoader";
+
+ public static final String EXCLUDE_TCCL_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "excludeThreadContextClassLoader";
public static final boolean EXCLUDE_TCCL_DEFAULT_VALUE = false;
private boolean excludeTCCL;
@@ -87,7 +79,7 @@ public final class ClassPathLoader {
// class is found in a directory instead of a JAR file (as when testing),
// then it will be relative to the location of the root of the package and
// class.
- public static final String EXT_LIB_DIR_PARENT_PROPERTY = "gemfire.ClassPathLoader.EXT_LIB_DIR";
+ public static final String EXT_LIB_DIR_PARENT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "ClassPathLoader.EXT_LIB_DIR";
public static final String EXT_LIB_DIR_PARENT_DEFAULT = ClassPathLoader.class.getProtectionDomain().getCodeSource().getLocation().getPath();
static final File defineEXT_LIB_DIR() {
return new File((new File(System.getProperty(EXT_LIB_DIR_PARENT_PROPERTY, EXT_LIB_DIR_PARENT_DEFAULT))).getParent(), "ext");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/Config.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/Config.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/Config.java
index e017a9d..c70b1fa 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/Config.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/Config.java
@@ -16,9 +16,9 @@
*/
package com.gemstone.gemfire.internal;
-import java.util.Properties;
import java.io.File;
import java.io.IOException;
+import java.util.Properties;
/**
* Provides generic configuration features.
@@ -31,12 +31,12 @@ public interface Config {
* a Config instance.
* @throws IllegalArgumentException if the specified name is illegal
*/
- public String getAttribute(String attName);
+ String getAttribute(String attName);
/**
* Given the attribute's name return its value as an Object.
* @throws IllegalArgumentException if the specified name is illegal
*/
- public Object getAttributeObject(String attName);
+ Object getAttributeObject(String attName);
/**
* Given the attribute's name set its value.
* This method is used as a way to get command line arguments that
@@ -45,7 +45,7 @@ public interface Config {
* @throws IllegalArgumentException if the specified name or value are illegal
* @throws com.gemstone.gemfire.UnmodifiableException if the attribute can not be modified.
*/
- public void setAttribute(String attName, String attValue, ConfigSource source);
+ void setAttribute(String attName, String attValue, ConfigSource source);
/**
* Given the attribute's name set its value to the specified Object.
* @throws IllegalArgumentException if the specified name is unknown
@@ -53,58 +53,58 @@ public interface Config {
* with the attributes type
* @throws com.gemstone.gemfire.UnmodifiableException if the attribute can not be modified.
*/
- public void setAttributeObject(String attName, Object attValue, ConfigSource source);
+ void setAttributeObject(String attName, Object attValue, ConfigSource source);
/**
* Returns true if the named configuration attribute can be modified.
* @throws IllegalArgumentException if the specified name is illegal
*/
- public boolean isAttributeModifiable(String attName);
+ boolean isAttributeModifiable(String attName);
/**
* Returns the source of the given attribute. This lets you figure out where an attribute's value came from.
* @param attName the name of the attribute whose source is returned
* @return null if the attribute has not been configured; otherwise returns the source of the given attribute
*/
- public ConfigSource getAttributeSource(String attName);
+ ConfigSource getAttributeSource(String attName);
/**
* Returns a description of the named configuration attribute.
* @throws IllegalArgumentException if the specified name is illegal
*/
- public String getAttributeDescription(String attName);
+ String getAttributeDescription(String attName);
/**
* Returns the class that defines the type of this attribute.
* The attribute's values will be constrained to be instances of
* this type.
* @throws IllegalArgumentException if the specified name is illegal
*/
- public Class getAttributeType(String attName);
+ Class getAttributeType(String attName);
/**
* Returns an array containing the names of all the attributes.
*/
- public String[] getAttributeNames();
+ String[] getAttributeNames();
/**
* Gets the attributes names of just this config; does not include inherited
* attributes.
*/
- public String[] getSpecificAttributeNames();
+ String[] getSpecificAttributeNames();
/**
* Returns whether or not this configuration is the same as another
* configuration.
*/
- public boolean sameAs(Config v);
+ boolean sameAs(Config v);
/**
* Converts the contents of this config to a property instance.
* @since GemFire 3.5
*/
- public Properties toProperties();
+ Properties toProperties();
/**
* Writes this config to the specified file.
* @since GemFire 3.5
*/
- public void toFile(File f) throws IOException;
+ void toFile(File f) throws IOException;
/**
* Returns a formatted string suitable for logging.
* @since GemFire 7.0
*/
- public String toLoggerString();
+ String toLoggerString();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/DistributionLocator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/DistributionLocator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/DistributionLocator.java
index f77b594..2549c7a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/DistributionLocator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/DistributionLocator.java
@@ -16,20 +16,20 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.File;
-import java.io.IOException;
-import java.net.ConnectException;
-import java.net.InetAddress;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.util.Properties;
/**
* This class is used to work with a managed VM that hosts a {@link
@@ -40,8 +40,8 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
public class DistributionLocator {
private static final Logger logger = LogService.getLogger();
-
- public static final String TEST_OVERRIDE_DEFAULT_PORT_PROPERTY = "gemfire.test.DistributionLocator.OVERRIDE_DEFAULT_PORT";
+
+ public static final String TEST_OVERRIDE_DEFAULT_PORT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "test.DistributionLocator.OVERRIDE_DEFAULT_PORT";
/** Default file name for locator log: <code>"locator.log"</code> */
public static final String DEFAULT_LOG_FILE = "locator.log";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/FileUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/FileUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/FileUtil.java
index 2024959..276f6aa 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/FileUtil.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/FileUtil.java
@@ -16,13 +16,9 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
+import java.io.*;
import java.net.URL;
import java.nio.channels.FileChannel;
import java.nio.file.Files;
@@ -39,8 +35,8 @@ import java.util.List;
*
*/
public class FileUtil {
- public static final long MAX_TRANSFER_SIZE = Long.getLong("gemfire.FileUtil.MAX_TRANSFER_SIZE", 1024 * 1024).longValue();
- public static final boolean USE_NIO = !Boolean.getBoolean("gemfire.FileUtil.USE_OLD_IO");
+ public static final long MAX_TRANSFER_SIZE = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "FileUtil.MAX_TRANSFER_SIZE", 1024 * 1024).longValue();
+ public static final boolean USE_NIO = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "FileUtil.USE_OLD_IO");
public static final String extSeparator = ".";
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
index 11233b5..4bf39b6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/HeapDataOutputStream.java
@@ -16,24 +16,20 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.UTFDataFormatException;
-import java.nio.BufferOverflowException;
-import java.nio.ByteBuffer;
-import java.nio.channels.SocketChannel;
-import java.util.Iterator;
-import java.util.LinkedList;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.BytesAndBitsForCompactor;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSource;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.nio.BufferOverflowException;
+import java.nio.ByteBuffer;
+import java.nio.channels.SocketChannel;
+import java.util.Iterator;
+import java.util.LinkedList;
/** HeapDataOutputStream is an OutputStream that also implements DataOutput
* and stores all data written to it in heap memory.
@@ -1108,7 +1104,7 @@ public class HeapDataOutputStream extends OutputStream implements
* Use -Dgemfire.ASCII_STRINGS=true if all String instances contain
* ASCII characters. Setting this to true gives a performance improvement.
*/
- private static final boolean ASCII_STRINGS = Boolean.getBoolean("gemfire.ASCII_STRINGS");
+ private static final boolean ASCII_STRINGS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ASCII_STRINGS");
/**
* Writes two bytes of length information
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/HostStatSampler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/HostStatSampler.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/HostStatSampler.java
index 452e6dd..ebb4177 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/HostStatSampler.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/HostStatSampler.java
@@ -16,16 +16,11 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.File;
-import java.net.UnknownHostException;
-import java.util.List;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
@@ -35,6 +30,11 @@ import com.gemstone.gemfire.internal.statistics.SampleCollector;
import com.gemstone.gemfire.internal.statistics.StatArchiveHandlerConfig;
import com.gemstone.gemfire.internal.statistics.StatisticsSampler;
import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.net.UnknownHostException;
+import java.util.List;
/**
* HostStatSampler implements a thread which will monitor, sample, and archive
@@ -45,11 +45,11 @@ public abstract class HostStatSampler
implements Runnable, StatisticsSampler, StatArchiveHandlerConfig {
private static final Logger logger = LogService.getLogger();
-
- public static final String TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY = "gemfire.stats.test.fileSizeLimitInKB";
+
+ public static final String TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "stats.test.fileSizeLimitInKB";
public static final String OS_STATS_DISABLED_PROPERTY = "osStatsDisabled";
- protected static final String INITIALIZATION_TIMEOUT_PROPERTY = "gemfire.statSamplerInitializationTimeout";
+ protected static final String INITIALIZATION_TIMEOUT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "statSamplerInitializationTimeout";
protected static final int INITIALIZATION_TIMEOUT_DEFAULT = 3000;
protected static final long INITIALIZATION_TIMEOUT_MILLIS =
Long.getLong(INITIALIZATION_TIMEOUT_PROPERTY, INITIALIZATION_TIMEOUT_DEFAULT);
@@ -58,7 +58,7 @@ public abstract class HostStatSampler
* Used to check if the sampler thread wake-up is delayed, and log a warning if it is delayed by longer than
* the amount of milliseconds specified by this property. The value of 0 disables the check.
*/
- private static final long STAT_SAMPLER_DELAY_THRESHOLD = Long.getLong("gemfire.statSamplerDelayThreshold", 3000);
+ private static final long STAT_SAMPLER_DELAY_THRESHOLD = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "statSamplerDelayThreshold", 3000);
private static final long STAT_SAMPLER_DELAY_THRESHOLD_NANOS = NanoTimer.millisToNanos(STAT_SAMPLER_DELAY_THRESHOLD);
private static final int MIN_MS_SLEEP = 1;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/InternalDataSerializer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/InternalDataSerializer.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/InternalDataSerializer.java
index 67629e9..0df656a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/InternalDataSerializer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/InternalDataSerializer.java
@@ -16,87 +16,17 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.EOFException;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.NotSerializableException;
-import java.io.ObjectInput;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutput;
-import java.io.ObjectOutputStream;
-import java.io.ObjectStreamClass;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.io.UTFDataFormatException;
-import java.lang.ref.WeakReference;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Proxy;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.InetAddress;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.IdentityHashMap;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-import java.util.Vector;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.CanonicalInstantiator;
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.GemFireRethrowable;
-import com.gemstone.gemfire.Instantiator;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.SerializationException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.ToDataException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
-import com.gemstone.gemfire.distributed.internal.PooledDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerHelper;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientDataSerializerMessage;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
-import com.gemstone.gemfire.internal.cache.tier.sockets.Part;
+import com.gemstone.gemfire.internal.cache.tier.sockets.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
@@ -106,17 +36,25 @@ import com.gemstone.gemfire.pdx.NonPortableClassException;
import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.pdx.PdxSerializable;
import com.gemstone.gemfire.pdx.PdxSerializer;
-import com.gemstone.gemfire.pdx.internal.AutoSerializableManager;
+import com.gemstone.gemfire.pdx.internal.*;
import com.gemstone.gemfire.pdx.internal.AutoSerializableManager.AutoClassInfo;
-import com.gemstone.gemfire.pdx.internal.EnumInfo;
-import com.gemstone.gemfire.pdx.internal.PdxInputStream;
-import com.gemstone.gemfire.pdx.internal.PdxInstanceEnum;
-import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
-import com.gemstone.gemfire.pdx.internal.PdxOutputStream;
-import com.gemstone.gemfire.pdx.internal.PdxReaderImpl;
-import com.gemstone.gemfire.pdx.internal.PdxType;
-import com.gemstone.gemfire.pdx.internal.PdxWriterImpl;
-import com.gemstone.gemfire.pdx.internal.TypeRegistry;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.lang.ref.WeakReference;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Proxy;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.InetAddress;
+import java.sql.Timestamp;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.TimeUnit;
/**
* Contains static methods for data serializing instances of internal
@@ -140,9 +78,8 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
public static ConcurrentHashMap<String, DataSerializer> getClassesToSerializers() {
return classesToSerializers;
}
-
-
- private static final String serializationVersionTxt = System.getProperty("gemfire.serializationVersion");
+
+ private static final String serializationVersionTxt = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "serializationVersion");
/**
* Any time new serialization format is added then a new enum needs to be added here.
* @since GemFire 6.6.2
@@ -3346,7 +3283,7 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
* Note that some tests set this to a small amount to speed up failures.
* Made public for unit test access.
*/
- public static int WAIT_MS = Integer.getInteger("gemfire.InternalDataSerializer.WAIT_MS", 60 * 1000);
+ public static int WAIT_MS = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "InternalDataSerializer.WAIT_MS", 60 * 1000);
/**
* Returns the serializer associated with this marker. If the
@@ -4011,8 +3948,8 @@ public abstract class InternalDataSerializer extends DataSerializer implements D
}
return out.size();
}
-
- public static final boolean LOAD_CLASS_EACH_TIME = Boolean.getBoolean("gemfire.loadClassOnEveryDeserialization");
+
+ public static final boolean LOAD_CLASS_EACH_TIME = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "loadClassOnEveryDeserialization");
private static final CopyOnWriteHashMap<String, WeakReference<Class<?>>> classCache = LOAD_CLASS_EACH_TIME ? null : new CopyOnWriteHashMap<String, WeakReference<Class<?>>>();
private static final Object cacheAccessLock = new Object();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/LinuxProcFsStatistics.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/LinuxProcFsStatistics.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/LinuxProcFsStatistics.java
index c155b3b..3070287 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/LinuxProcFsStatistics.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/LinuxProcFsStatistics.java
@@ -16,19 +16,16 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.apache.logging.log4j.Logger;
-
public class LinuxProcFsStatistics {
private enum CPU {
USER, NICE, SYSTEM, IDLE, IOWAIT, IRQ, SOFTIRQ,
@@ -36,9 +33,9 @@ public class LinuxProcFsStatistics {
OTHER
}
- private static final int DEFAULT_PAGESIZE = 4 * 1024;
- private static final int OneMeg = 1024 * 1024;
- private static final String pageSizeProperty = "gemfire.statistics.linux.pageSize";
+ private static final int DEFAULT_PAGESIZE = 4 * 1024;
+ private static final int OneMeg = 1024 * 1024;
+ private static final String pageSizeProperty = DistributionConfig.GEMFIRE_PREFIX + "statistics.linux.pageSize";
private static CpuStat cpuStatSingleton;
private static int pageSize;
private static int sys_cpus;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
index d15dda4..0e80a28 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
@@ -24,18 +24,16 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectInputStream;
+import java.io.*;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketAddress;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* MigrationClient is used to retrieve all of the data for a region from
* a MigrationServer. First start a MigrationServer using one version of
@@ -156,9 +154,9 @@ public class MigrationClient {
private void createDistributedSystem() throws Exception {
Properties dsProps = new Properties();
// if no discovery information has been explicitly given, use a loner ds
- if (System.getProperty("gemfire." + DistributionConfig.MCAST_PORT_NAME) == null
- && System.getProperty("gemfire." + DistributionConfig.LOCATORS_NAME) == null) {
- dsProps.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ if (System.getProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT) == null
+ && System.getProperty(DistributionConfig.GEMFIRE_PREFIX + LOCATORS) == null) {
+ dsProps.put(MCAST_PORT, "0");
}
dsProps.put(DistributionConfig.LOG_FILE_NAME, "migrationClient.log");
if (this.cacheXmlFile != null) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
index bbcc148..6c9fa73 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
@@ -26,23 +26,15 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.NetworkInterface;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketException;
+import java.io.*;
+import java.net.*;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* MigrationServer creates a cache using a supplied cache.xml and then
* opens a server socket that a MigrationClient connects to and requests
@@ -212,9 +204,9 @@ public class MigrationServer {
private void createDistributedSystem() throws Exception {
Properties dsProps = new Properties();
// if no discovery information has been explicitly given, use a loner ds
- if (System.getProperty("gemfire." + DistributionConfig.MCAST_PORT_NAME) == null
- && System.getProperty("gemfire." + DistributionConfig.LOCATORS_NAME) == null) {
- dsProps.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ if (System.getProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT) == null
+ && System.getProperty(DistributionConfig.GEMFIRE_PREFIX + LOCATORS) == null) {
+ dsProps.put(MCAST_PORT, "0");
}
dsProps.put(DistributionConfig.LOG_FILE_NAME, "migrationServer.log");
if (this.cacheXmlFile != null) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/OSProcess.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/OSProcess.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/OSProcess.java
index 18d65d5..66dd612 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/OSProcess.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/OSProcess.java
@@ -16,35 +16,18 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.BufferedOutputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.CharArrayWriter;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.lang.management.LockInfo;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MonitorInfo;
-import java.lang.management.ThreadInfo;
-import java.lang.management.ThreadMXBean;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.Vector;
-import java.util.zip.GZIPOutputStream;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.io.TeePrintStream;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.lang.management.*;
+import java.util.*;
+import java.util.zip.GZIPOutputStream;
/**
* Used to interact with operating system processes.
@@ -55,9 +38,9 @@ import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
*/
public class OSProcess {
private static final Logger logger = LogService.getLogger();
-
- public static final String DISABLE_OUTPUT_REDIRECTION_PROPERTY = "gemfire.OSProcess.DISABLE_OUTPUT_REDIRECTION";
- public static final String ENABLE_OUTPUT_REDIRECTION_PROPERTY = "gemfire.OSProcess.ENABLE_OUTPUT_REDIRECTION";
+
+ public static final String DISABLE_OUTPUT_REDIRECTION_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "OSProcess.DISABLE_OUTPUT_REDIRECTION";
+ public static final String ENABLE_OUTPUT_REDIRECTION_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "OSProcess.ENABLE_OUTPUT_REDIRECTION";
private static final boolean DISABLE_OUTPUT_REDIRECTION = Boolean.getBoolean(DISABLE_OUTPUT_REDIRECTION_PROPERTY);
private static final boolean ENABLE_OUTPUT_REDIRECTION = Boolean.getBoolean(ENABLE_OUTPUT_REDIRECTION_PROPERTY);
@@ -134,7 +117,7 @@ public class OSProcess {
Map<String, String> env)
throws IOException
{
- String commandShell = System.getProperty("gemfire.commandShell", "bash");
+ String commandShell = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "commandShell", "bash");
if (cmdarray.length == 0) {
throw new java.lang.IndexOutOfBoundsException();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/PureJavaMode.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/PureJavaMode.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/PureJavaMode.java
index 769a959..bba2809 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/PureJavaMode.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/PureJavaMode.java
@@ -17,6 +17,8 @@
package com.gemstone.gemfire.internal;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
/**
* Used to determine if product should use pure java mode.
*/
@@ -24,12 +26,12 @@ public final class PureJavaMode {
/**
* System property to set to true to force pure java mode
*/
- public final static String PURE_MODE_PROPERTY = "gemfire.pureJavaMode";
+ public final static String PURE_MODE_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "pureJavaMode";
/**
* System property to set to true enable debug information regarding native library loading.
* @since GemFire 5.1
*/
- public final static String LOADLIBRARY_DEBUG_PROPERTY = "gemfire.loadLibrary.debug";
+ public final static String LOADLIBRARY_DEBUG_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "loadLibrary.debug";
private static final boolean debug = Boolean.getBoolean(LOADLIBRARY_DEBUG_PROPERTY);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/SharedLibrary.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SharedLibrary.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SharedLibrary.java
index 0edb02d..76d98c7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SharedLibrary.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SharedLibrary.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.internal;
import com.gemstone.gemfire.InternalGemFireError;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.lang.SystemUtils;
import com.gemstone.gemfire.pdx.internal.unsafe.UnsafeWrapper;
@@ -151,7 +152,7 @@ public class SharedLibrary {
if (is64Bit()) {
result.append("64");
}
- if (Boolean.getBoolean("gemfire.debug")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "debug")) {
result.append("_g");
}
return result.toString();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
index 9b7e5d7..367d4a7 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SocketCreator.java
@@ -16,57 +16,6 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.net.BindException;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.NetworkInterface;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketAddress;
-import java.net.SocketException;
-import java.net.UnknownHostException;
-import java.nio.channels.ServerSocketChannel;
-import java.security.GeneralSecurityException;
-import java.security.KeyStore;
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.security.UnrecoverableKeyException;
-import java.security.cert.Certificate;
-import java.security.cert.CertificateException;
-import java.security.cert.X509Certificate;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.Vector;
-
-import javax.naming.Context;
-import javax.naming.NamingEnumeration;
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-import javax.naming.directory.InitialDirContext;
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLPeerUnverifiedException;
-import javax.net.ssl.SSLServerSocket;
-import javax.net.ssl.SSLSession;
-import javax.net.ssl.SSLSocket;
-
import com.gemstone.gemfire.GemFireConfigException;
import com.gemstone.gemfire.SystemConnectException;
import com.gemstone.gemfire.SystemFailure;
@@ -84,12 +33,27 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.util.PasswordUtil;
+import org.apache.logging.log4j.Logger;
-import java.util.*;
-
+import javax.naming.Context;
+import javax.naming.NamingEnumeration;
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.directory.InitialDirContext;
+import javax.net.ServerSocketFactory;
+import javax.net.SocketFactory;
import javax.net.ssl.*;
-
-import org.apache.logging.log4j.Logger;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.net.*;
+import java.nio.channels.ServerSocketChannel;
+import java.security.*;
+import java.security.cert.Certificate;
+import java.security.cert.CertificateException;
+import java.security.cert.X509Certificate;
+import java.util.*;
/**
* Analyze configuration data (gemfire.properties) and configure sockets
@@ -117,8 +81,8 @@ public class SocketCreator {
private static final Logger logger = LogService.getLogger();
/** Optional system property to enable GemFire usage of link-local addresses */
- public static final String USE_LINK_LOCAL_ADDRESSES_PROPERTY =
- "gemfire.net.useLinkLocalAddresses";
+ public static final String USE_LINK_LOCAL_ADDRESSES_PROPERTY =
+ DistributionConfig.GEMFIRE_PREFIX + "net.useLinkLocalAddresses";
/** True if GemFire should use link-local addresses */
private static final boolean useLinkLocalAddresses =
@@ -134,7 +98,7 @@ public class SocketCreator {
private static final Map<InetAddress, String> hostNames = new HashMap<>();
/** flag to force always using DNS (regardless of the fact that these lookups can hang) */
- public static final boolean FORCE_DNS_USE = Boolean.getBoolean("gemfire.forceDnsUse");
+ public static final boolean FORCE_DNS_USE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "forceDnsUse");
/** set this to false to inhibit host name lookup */
public static volatile boolean resolve_dns = true;
@@ -241,9 +205,9 @@ public class SocketCreator {
// bug #49484 - customers want tcp/ip keep-alive turned on by default
// to avoid dropped connections. It can be turned off by setting this
// property to false
- String str = System.getProperty("gemfire.setTcpKeepAlive");
+ String str = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "setTcpKeepAlive");
if (str != null) {
- ENABLE_TCP_KEEP_ALIVE = Boolean.getBoolean("gemfire.setTcpKeepAlive");
+ ENABLE_TCP_KEEP_ALIVE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "setTcpKeepAlive");
} else {
ENABLE_TCP_KEEP_ALIVE = true;
}
@@ -264,8 +228,8 @@ public class SocketCreator {
* Returns the default instance for use in GemFire socket creation.
* <p>
* If not already initialized, the default instance of SocketCreator will be
- * initialized using defaults in {@link
- * com.gemstone.gemfire.distributed.internal.DistributionConfig}. If any
+ * initialized using defaults in {@link
+ * DistributionConfig}. If any
* values are specified in System properties, those values will be used to
* override the defaults.
* <p>
@@ -297,8 +261,8 @@ public class SocketCreator {
/**
* Returns the default instance for use in GemFire socket creation after
- * initializing it using defaults in {@link
- * com.gemstone.gemfire.distributed.internal.DistributionConfig}. If any
+ * initializing it using defaults in {@link
+ * DistributionConfig}. If any
* values are specified in the provided properties or in System properties,
* those values will be used to override the defaults.
* <p>
@@ -720,8 +684,8 @@ public class SocketCreator {
}
/**
- * Perform initialization using defaults in {@link
- * com.gemstone.gemfire.distributed.internal.DistributionConfig}. If any
+ * Perform initialization using defaults in {@link
+ * DistributionConfig}. If any
* values are specified in System properties, those values will be used to
* override the defaults.
* <p>
@@ -1168,7 +1132,7 @@ public class SocketCreator {
protected void initializeClientSocketFactory() {
this.clientSocketFactory = null;
- String className = System.getProperty("gemfire.clientSocketFactory");
+ String className = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "clientSocketFactory");
if (className != null) {
Object o;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
index ffbed3e..fcf645d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
@@ -16,29 +16,10 @@
*/
package com.gemstone.gemfire.internal;
-import java.io.BufferedOutputStream;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Calendar;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.TimeZone;
-import java.util.zip.GZIPOutputStream;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.StatisticDescriptor;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
@@ -46,6 +27,12 @@ import com.gemstone.gemfire.internal.statistics.ResourceInstance;
import com.gemstone.gemfire.internal.statistics.ResourceType;
import com.gemstone.gemfire.internal.statistics.SampleHandler;
import com.gemstone.gemfire.internal.statistics.StatArchiveDescriptor;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.zip.GZIPOutputStream;
/**
* StatArchiveWriter provides APIs to write statistic snapshots to an archive
@@ -59,8 +46,8 @@ public class StatArchiveWriter implements StatArchiveFormat, SampleHandler {
private static volatile String traceStatisticsName = null;
private static volatile String traceStatisticsTypeName = null;
private static volatile int traceResourceInstId = -1;
-
- private final boolean trace = Boolean.getBoolean("gemfire.stats.debug.traceStatArchiveWriter");
+
+ private final boolean trace = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "stats.debug.traceStatArchiveWriter");
private final Set<ResourceInstance> sampleWrittenForResources =
new HashSet<ResourceInstance>();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
index 9f4a703..d3220b8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
@@ -16,23 +16,13 @@
*/
package com.gemstone.gemfire.internal;
-import com.gemstone.gemfire.GemFireException;
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.NoSystemException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.UncreatedSystemException;
-import com.gemstone.gemfire.UnstartedSystemException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.admin.AdminException;
import com.gemstone.gemfire.admin.BackupStatus;
import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.distributed.internal.HighPriorityAckedMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.StatArchiveReader.ResourceInst;
import com.gemstone.gemfire.internal.StatArchiveReader.StatValue;
@@ -40,54 +30,23 @@ import com.gemstone.gemfire.internal.admin.remote.TailLogResponse;
import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.DateFormatter;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.internal.logging.LocalLogWriter;
import com.gemstone.gemfire.internal.logging.MergeLogFiles;
import com.gemstone.gemfire.internal.util.JavaCommandBuilder;
import com.gemstone.gemfire.internal.util.PasswordUtil;
import com.gemstone.gemfire.internal.util.PluckStacks;
import com.gemstone.gemfire.internal.util.PluckStacks.ThreadStack;
-import java.io.BufferedInputStream;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.io.RandomAccessFile;
-import java.io.StringWriter;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.net.SocketException;
-import java.net.URL;
-import java.net.URLDecoder;
-import java.net.UnknownHostException;
+import java.io.*;
+import java.net.*;
import java.text.DateFormat;
import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.zip.GZIPInputStream;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
+
/**
* Provides static methods for various system administation tasks.
*/
@@ -1396,7 +1355,7 @@ public class SystemAdmin {
private final static String[] validCommands = new String [] {
"version",
"stats",
- "start-locator", "stop-locator", "status-locator", "info-locator",
+ START_LOCATOR, "stop-locator", "status-locator", "info-locator",
"tail-locator-log",
"merge-logs", "encrypt-password",
"revoke-missing-disk-store",
@@ -1472,7 +1431,7 @@ public class SystemAdmin {
usage();
} else {
if (cmd.equalsIgnoreCase("locator-start")) {
- cmd = "start-locator";
+ cmd = START_LOCATOR;
} else if (cmd.equalsIgnoreCase("locator-stop")) {
cmd = "stop-locator";
} else if (cmd.equalsIgnoreCase("locator-info")) {
@@ -1547,7 +1506,7 @@ public class SystemAdmin {
}));
helpMap.put("encrypt-password",
LocalizedStrings.SystemAdmin_ENCRYPTS_A_PASSWORD_FOR_USE_IN_CACHE_XML_DATA_SOURCE_CONFIGURATION.toLocalizedString());
- helpMap.put("start-locator",
+ helpMap.put(START_LOCATOR,
LocalizedStrings.SystemAdmin_START_LOCATOR_HELP
.toLocalizedString(new Object[] { "-port=", Integer.valueOf(DistributionLocator.DEFAULT_LOCATOR_PORT), "-address=", "-dir=", "-properties=", "-peer=", "-server=", "-hostname-for-clients=", "-D", "-X" }));
helpMap.put("stop-locator",
@@ -1578,7 +1537,7 @@ public class SystemAdmin {
"This command uses the compaction threshold that each member has " +
"configured for its disk stores. The disk store must have allow-force-compaction " +
"set to true in order for this command to work.\n" +
- "This command will use the \"gemfire.properties\" file to determine what distributed system to connect to.");
+ "This command will use the gemfire.properties file to determine what distributed system to connect to.");
helpMap.put("modify-disk-store",
LocalizedStrings.SystemAdmin_MODIFY_DISK_STORE.toLocalizedString());
helpMap.put("revoke-missing-disk-store",
@@ -1589,24 +1548,24 @@ public class SystemAdmin {
"missing disk stores.\n" +
"You must pass the in the unique id for the disk store to revoke. The unique id is listed in the output " +
"of the list-missing-disk-stores command, for example a63d7d99-f8f8-4907-9eb7-cca965083dbb.\n" +
- "This command will use the \"gemfire.properties\" file to determine what distributed system to connect to.");
+ "This command will use the gemfire.properties file to determine what distributed system to connect to.");
helpMap.put("list-missing-disk-stores",
"Prints out a description of the disk stores that are currently missing from a distributed system\n\\n."
- + "This command will use the \"gemfire.properties\" file to determine what distributed system to connect to.");
+ + "This command will use the gemfire.properties file to determine what distributed system to connect to.");
helpMap.put("export-disk-store",
"Exports an offline disk store. The persistent data is written to a binary format.\n"
+ " -outputDir=<directory> specifies the location of the exported snapshot files.");
helpMap.put("shut-down-all",
"Connects to a running system and asks all its members that have a cache to close the cache and disconnect from system." +
"The timeout parameter allows you to specify that the system should be shutdown forcibly after the time has exceeded.\n" +
- "This command will use the \"gemfire.properties\" file to determine what distributed system to connect to.");
+ "This command will use the gemfire.properties file to determine what distributed system to connect to.");
helpMap.put("backup",
"Connects to a running system and asks all its members that have persistent data " +
"to backup their data to the specified directory. The directory specified must exist " +
"on all members, but it can be a local directory on each machine. This command " +
"takes care to ensure that the backup files will not be corrupted by concurrent " +
"operations. Backing up a running system with filesystem copy is not recommended.\n" +
- "This command will use the \"gemfire.properties\" file to determine what distributed system to connect to.");
+ "This command will use the gemfire.properties file to determine what distributed system to connect to.");
helpMap.put("print-stacks",
"fetches stack dumps of all processes. By default an attempt" +
" is made to remove idle GemFire threads from the dump. " +
@@ -1644,7 +1603,7 @@ public class SystemAdmin {
.toLocalizedString());
helpMap.put("-properties=",
LocalizedStrings.SystemAdmin_USED_TO_SPECIFY_THE_0_FILE_TO_BE_USED_IN_CONFIGURING_THE_LOCATORS_DISTRIBUTEDSYSTEM
- .toLocalizedString("gemfire.properties"));
+ .toLocalizedString(DistributionConfig.GEMFIRE_PREFIX + "properties"));
helpMap.put("-archive=",
LocalizedStrings.SystemAdmin_THE_ARGUMENT_IS_THE_STATISTIC_ARCHIVE_FILE_THE_0_COMMAND_SHOULD_READ
.toLocalizedString("stats"));
@@ -1663,8 +1622,8 @@ public class SystemAdmin {
.toLocalizedString(new Object[] {"stats", DateFormatter.FORMAT_STRING}));
helpMap.put("-dir=",
LocalizedStrings.SystemAdmin_DIR_ARGUMENT_HELP
- .toLocalizedString(new Object[] { "gemfire.properties",
- "gemfire.systemDirectory", "GEMFIRE", "defaultSystem",
+ .toLocalizedString(new Object[] { DistributionConfig.GEMFIRE_PREFIX + "properties",
+ DistributionConfig.GEMFIRE_PREFIX + "systemDirectory", "GEMFIRE", "defaultSystem",
"version" }));
helpMap.put("-D",
LocalizedStrings.SystemAdmin_SETS_A_JAVA_SYSTEM_PROPERTY_IN_THE_LOCATOR_VM_USED_MOST_OFTEN_FOR_CONFIGURING_SSL_COMMUNICATION
@@ -1709,7 +1668,8 @@ public class SystemAdmin {
usageMap.put("version", "version");
usageMap.put("help", "help [" + join(helpTopics, "|") + "]");
usageMap.put("stats", "stats ([<instanceId>][:<typeId>][.<statId>])* [-details] [-nofilter|-persec|-persample] [-prunezeros] [-starttime=<time>] [-endtime=<time>] -archive=<statFile>");
- usageMap.put("start-locator", "start-locator [-port=<port>] [-address=<ipAddr>] [-dir=<locatorDir>] [-properties=<gemfire.properties>] [-peer=<true|false>] [-server=<true|false>] [-hostname-for-clients=<ipAddr>] [-D<system.property>=<value>] [-X<vm-setting>]");
+ usageMap.put(START_LOCATOR,
+ "start-locator [-port=<port>] [-address=<ipAddr>] [-dir=<locatorDir>] [-properties=<gemfire.properties>] [-peer=<true|false>] [-server=<true|false>] [-hostname-for-clients=<ipAddr>] [-D<system.property>=<value>] [-X<vm-setting>]");
usageMap.put("stop-locator", "stop-locator [-port=<port>] [-address=<ipAddr>] [-dir=<locatorDir>]");
usageMap.put("status-locator", "status-locator [-dir=<locatorDir>]");
usageMap.put("info-locator", "info-locator [-dir=<locatorDir>]");
@@ -1774,7 +1734,8 @@ public class SystemAdmin {
cmdOptionsMap.put("help", new String[] {});
cmdOptionsMap.put("merge-logs", new String[] {"-out="});
cmdOptionsMap.put("stats", new String[] {"-details", "-monitor", "-nofilter", "-persec", "-persample", "-prunezeros", "-archive=", "-starttime=", "-endtime="});
- cmdOptionsMap.put("start-locator", new String[] {"-port=", "-dir=", "-address=", "-properties=", "-D", "-X", "-peer=", "-server=", "-hostname-for-clients="});
+ cmdOptionsMap
+ .put(START_LOCATOR, new String[] { "-port=", "-dir=", "-address=", "-properties=", "-D", "-X", "-peer=", "-server=", "-hostname-for-clients=" });
cmdOptionsMap.put("stop-locator", new String[] {"-port=", "-dir=", "-address=", "-D"});
cmdOptionsMap.put("status-locator", new String[] {"-dir=", "-D"});
cmdOptionsMap.put("info-locator", new String[] {"-dir=", "-D"});
@@ -2134,7 +2095,7 @@ public class SystemAdmin {
usage(cmd);
}
help(cmdLine);
- } else if (cmd.equalsIgnoreCase("start-locator")) {
+ } else if (cmd.equalsIgnoreCase(START_LOCATOR)) {
if (cmdLine.size() != 0) {
System.err.println( LocalizedStrings.SystemAdmin_ERROR_UNEXPECTED_COMMAND_LINE_ARGUMENTS_0.toLocalizedString(join(cmdLine)));
usage(cmd);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DistributionLocatorId.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DistributionLocatorId.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DistributionLocatorId.java
index cf8f7a1..87fa715 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DistributionLocatorId.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/DistributionLocatorId.java
@@ -17,12 +17,6 @@
package com.gemstone.gemfire.internal.admin.remote;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -30,6 +24,12 @@ import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.admin.SSLConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+
/**
* Identifies the host, port, and bindAddress a distribution locator is
* listening on.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchHostResponse.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchHostResponse.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchHostResponse.java
index 69f002c..949e5ad 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchHostResponse.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/FetchHostResponse.java
@@ -18,26 +18,26 @@
package com.gemstone.gemfire.internal.admin.remote;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.URL;
-import java.net.UnknownHostException;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
-//import java.util.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.GemFireVersion;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.cache.CacheServerLauncher;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URL;
+import java.net.UnknownHostException;
+
+//import java.util.*;
/**
* A message that is sent to a particular distribution manager to
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java
index 1f57127..8c7157a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteCacheInfo.java
@@ -18,16 +18,22 @@ package com.gemstone.gemfire.internal.admin.remote;
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.internal.admin.*;
-//import com.gemstone.gemfire.internal.*;
-import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.CacheRuntimeException;
+import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.admin.CacheInfo;
+import com.gemstone.gemfire.internal.admin.StatResource;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import java.io.*;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
import java.util.*;
+//import com.gemstone.gemfire.internal.*;
+
/**
* This class is an implementation of the {@link CacheInfo} interface.
*/
@@ -66,7 +72,7 @@ public class RemoteCacheInfo implements CacheInfo, DataSerializable {
} else {
try {
final Set roots;
- if (!Boolean.getBoolean("gemfire.PRDebug")) {
+ if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
roots = c.rootRegions();
} else {
roots = c.rootRegions(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
index 29dc6c2..9394bb2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteGfManagerAgent.java
@@ -16,51 +16,18 @@
*/
package com.gemstone.gemfire.internal.admin.remote;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.IncompatibleSystemException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.admin.OperationCancelledException;
import com.gemstone.gemfire.admin.RuntimeAdminException;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.DisconnectListener;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.ReconnectListener;
-import com.gemstone.gemfire.distributed.internal.MembershipListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.admin.Alert;
-import com.gemstone.gemfire.internal.admin.AlertListener;
-import com.gemstone.gemfire.internal.admin.ApplicationVM;
-import com.gemstone.gemfire.internal.admin.CacheCollector;
-import com.gemstone.gemfire.internal.admin.CacheSnapshot;
-import com.gemstone.gemfire.internal.admin.GemFireVM;
-import com.gemstone.gemfire.internal.admin.GfManagerAgent;
-import com.gemstone.gemfire.internal.admin.GfManagerAgentConfig;
-import com.gemstone.gemfire.internal.admin.JoinLeaveListener;
+import com.gemstone.gemfire.internal.admin.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
@@ -69,6 +36,10 @@ import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.security.AuthenticationFailedException;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.*;
/**
* An implementation of <code>GfManagerAgent</code> that uses a {@link
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
index 0a4e057..3e4ddf1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
@@ -16,19 +16,16 @@
*/
package com.gemstone.gemfire.internal.admin.remote;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.admin.SSLConfig;
import com.gemstone.gemfire.internal.admin.TransportConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tranport config for RemoteGfManagerAgent.
*
@@ -263,25 +260,25 @@ public class RemoteTransportConfig implements TransportConfig {
*/
Properties toDSProperties() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.BIND_ADDRESS_NAME,
+ props.setProperty(BIND_ADDRESS,
bindAddress);
// System.out.println("entering ds port range property of " + this.membershipPortRange);
if (this.membershipPortRange != null) {
props.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, this.membershipPortRange);
}
if (this.tcpPort != 0) {
- props.setProperty(DistributionConfig.TCP_PORT_NAME, String.valueOf(this.tcpPort));
+ props.setProperty(TCP_PORT, String.valueOf(this.tcpPort));
}
if (this.mcastEnabled) {
// Fix bug 32849
- props.setProperty(DistributionConfig.MCAST_ADDRESS_NAME,
+ props.setProperty(MCAST_ADDRESS,
String.valueOf(this.mcastId.getHost().getHostAddress()));
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,
+ props.setProperty(MCAST_PORT,
String.valueOf(this.mcastId.getPort()));
}
else {
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,
+ props.setProperty(MCAST_PORT,
String.valueOf(0));
}
// Create locator string
@@ -307,7 +304,7 @@ public class RemoteTransportConfig implements TransportConfig {
}
}
- props.setProperty(DistributionConfig.LOCATORS_NAME,
+ props.setProperty(LOCATORS,
locators.toString());
this.sslConfig.toDSProperties(props);
[67/67] [abbrv] incubator-geode git commit: GEODE-1377: Fixed missing
import
Posted by ud...@apache.org.
GEODE-1377: Fixed missing import
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/b42d6e99
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/b42d6e99
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/b42d6e99
Branch: refs/heads/develop
Commit: b42d6e9912f3fe530c5e369df5ce7c22c823e4c3
Parents: 1e985eb
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Thu Jun 2 10:04:55 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:04:55 2016 +1000
----------------------------------------------------------------------
.../internal/repository/IndexRepositoryImplPerformanceTest.java | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b42d6e99/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
index da9735f..8ed3ba5 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
@@ -30,6 +30,7 @@ import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollector;
import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
+import com.gemstone.gemfire.cache.lucene.internal.filesystem.FileSystemStats;
import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
import com.gemstone.gemfire.cache.query.QueryException;
import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
[32/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryExpiryTask.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryExpiryTask.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryExpiryTask.java
index 64b669a..252c9c3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryExpiryTask.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryExpiryTask.java
@@ -21,21 +21,14 @@ package com.gemstone.gemfire.internal.cache;
* EntryExpiryTask represents a timeout event for a region entry.
*/
-import java.util.concurrent.locks.Lock;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.EntryDestroyedException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.InternalStatisticsDisabledException;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
+import org.apache.logging.log4j.Logger;
+
+import java.util.concurrent.locks.Lock;
public class EntryExpiryTask extends ExpiryTask {
@@ -54,7 +47,7 @@ public class EntryExpiryTask extends ExpiryTask {
* necessary.
*/
public static boolean expireSendsEntryAsCallback =
- Boolean.getBoolean("gemfire.EXPIRE_SENDS_ENTRY_AS_CALLBACK");
+ Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "EXPIRE_SENDS_ENTRY_AS_CALLBACK");
protected EntryExpiryTask(LocalRegion region, RegionEntry re) {
super(region);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventID.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventID.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventID.java
index 794d4d7..a9fb7da 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventID.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventID.java
@@ -16,25 +16,11 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.Serializable;
-import java.nio.ByteBuffer;
-import java.util.Arrays;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.DataSerializableFixedID;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
@@ -46,6 +32,12 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.util.Breadcrumbs;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicLong;
/**
* This class uniquely identifies any Region Operation like create, update
@@ -61,7 +53,7 @@ public final class EventID
private static final Logger logger = LogService.getLogger();
/** turns on very verbose logging ove membership id bytes */
- private static boolean LOG_ID_BYTES = Boolean.getBoolean("gemfire.log-event-member-id-bytes");
+ private static boolean LOG_ID_BYTES = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "log-event-member-id-bytes");
/**
* Uniquely identifies the distributed member VM in which the Event is
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventTracker.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventTracker.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventTracker.java
index b4d4620..ee24cf9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventTracker.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EventTracker.java
@@ -19,23 +19,11 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.SystemTimer.SystemTimerTask;
@@ -45,6 +33,14 @@ import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
/**
* EventTracker tracks the last sequence number for a particular
@@ -123,7 +119,7 @@ public class EventTracker
* @param cache the cache to schedule tasks with
*/
public static ExpiryTask startTrackerServices(GemFireCacheImpl cache) {
- long expiryTime = Long.getLong("gemfire.messageTrackingTimeout",
+ long expiryTime = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "messageTrackingTimeout",
PoolFactory.DEFAULT_SUBSCRIPTION_MESSAGE_TRACKING_TIMEOUT / 3).longValue();
ExpiryTask result = new ExpiryTask(cache, expiryTime);
cache.getCCPTimer().scheduleAtFixedRate(result,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpirationScheduler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpirationScheduler.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpirationScheduler.java
index 2bfce5a..754db38 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpirationScheduler.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpirationScheduler.java
@@ -16,16 +16,16 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.EntryNotFoundException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.SystemTimer;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.util.concurrent.atomic.AtomicInteger;
/**
* ExpirationScheduler uses a single instance of java.util.Timer (and
@@ -39,7 +39,7 @@ public class ExpirationScheduler
private final SystemTimer timer;
private final AtomicInteger pendingCancels = new AtomicInteger();
- private static final int MAX_PENDING_CANCELS = Integer.getInteger("gemfire.MAX_PENDING_CANCELS", 10000).intValue();
+ private static final int MAX_PENDING_CANCELS = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "MAX_PENDING_CANCELS", 10000).intValue();
public ExpirationScheduler(InternalDistributedSystem ds) {
this.timer = new SystemTimer(ds, true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpiryTask.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpiryTask.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpiryTask.java
index 54f0b23..3f5b944 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpiryTask.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ExpiryTask.java
@@ -21,22 +21,11 @@ package com.gemstone.gemfire.internal.cache;
* ExpiryTask represents a timeout event for expiration
*/
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.PooledExecutorWithDMStats;
import com.gemstone.gemfire.internal.SystemTimer;
@@ -45,6 +34,12 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
+import org.apache.logging.log4j.Logger;
+
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.SynchronousQueue;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.ThreadPoolExecutor;
public abstract class ExpiryTask extends SystemTimer.SystemTimerTask {
@@ -56,7 +51,7 @@ public abstract class ExpiryTask extends SystemTimer.SystemTimerTask {
static {
// default to inline expiry to fix bug 37115
- int nThreads = Integer.getInteger("gemfire.EXPIRY_THREADS", 0).intValue();
+ int nThreads = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "EXPIRY_THREADS", 0).intValue();
if (nThreads > 0) {
ThreadFactory tf = new ThreadFactory() {
private int nextId = 0;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/FixedPartitionAttributesImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/FixedPartitionAttributesImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/FixedPartitionAttributesImpl.java
index d631413..e0b915a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/FixedPartitionAttributesImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/FixedPartitionAttributesImpl.java
@@ -17,13 +17,14 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.FixedPartitionAttributes;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
/**
* Internal implementation of {@link FixedPartitionAttributes}.
@@ -146,7 +147,7 @@ public class FixedPartitionAttributesImpl extends FixedPartitionAttributes
s.append("FixedPartitionAttributes@").append("[partitionName=").append(
this.partitionName).append(";isPrimary=").append(this.isPrimary)
.append(";numBuckets=").append(this.numBuckets);
- if (Boolean.getBoolean("gemfire.PRDebug")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
s.append(";startingBucketID= ").append(this.startingBucketID);
}
s.append("]");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index 64b4949..b08c480 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -17,110 +17,15 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.OutputStream;
-import java.io.OutputStreamWriter;
-import java.io.PrintStream;
-import java.io.Reader;
-import java.io.StringBufferInputStream;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.lang.reflect.Method;
-import java.net.InetSocketAddress;
-import java.net.URL;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.ServiceLoader;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executor;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.naming.Context;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.ForcedDisconnectException;
-import com.gemstone.gemfire.GemFireCacheException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.admin.internal.SystemMemberCacheEventProcessor;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheRuntimeException;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CacheXmlException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.DynamicRegionFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.GatewayException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionService;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.TimeoutException;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueFactoryImpl;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientRegionFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.ClientMetadataService;
import com.gemstone.gemfire.cache.client.internal.ClientRegionFactoryImpl;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
@@ -134,38 +39,17 @@ import com.gemstone.gemfire.cache.query.internal.cq.CqServiceProvider;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.snapshot.CacheSnapshotService;
import com.gemstone.gemfire.cache.util.GatewayConflictResolver;
-import com.gemstone.gemfire.cache.util.ObjectSizer;
import com.gemstone.gemfire.cache.wan.GatewayReceiver;
import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
-import com.gemstone.gemfire.distributed.DistributedLockService;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisee;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
+import com.gemstone.gemfire.distributed.*;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.PooledExecutorWithDMStats;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
-import com.gemstone.gemfire.distributed.internal.ResourceEvent;
-import com.gemstone.gemfire.distributed.internal.ResourceEventsListener;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.distributed.internal.locks.DLockService;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.i18n.LogWriterI18n;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ClassPathLoader;
-import com.gemstone.gemfire.internal.JarDeployer;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.SystemTimer;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.control.ResourceAdvisor;
@@ -183,12 +67,7 @@ import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberManager;
import com.gemstone.gemfire.internal.cache.persistence.query.TemporaryResultSetFactory;
import com.gemstone.gemfire.internal.cache.snapshot.CacheSnapshotServiceImpl;
-import com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientHealthMonitor;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
+import com.gemstone.gemfire.internal.cache.tier.sockets.*;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderAdvisor;
import com.gemstone.gemfire.internal.cache.wan.WANServiceProvider;
@@ -228,6 +107,19 @@ import com.gemstone.gemfire.pdx.internal.TypeRegistry;
import com.gemstone.gemfire.redis.GemFireRedisServer;
import com.sun.jna.Native;
import com.sun.jna.Platform;
+import org.apache.logging.log4j.Logger;
+
+import javax.naming.Context;
+import java.io.*;
+import java.net.InetSocketAddress;
+import java.net.URL;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
// @todo somebody Come up with more reasonable values for {@link #DEFAULT_LOCK_TIMEOUT}, etc.
/**
@@ -241,12 +133,12 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
// moved *SERIAL_NUMBER stuff to DistributionAdvisor
/** The default number of seconds to wait for a distributed lock */
- public static final int DEFAULT_LOCK_TIMEOUT = Integer.getInteger("gemfire.Cache.defaultLockTimeout", 60).intValue();
+ public static final int DEFAULT_LOCK_TIMEOUT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "Cache.defaultLockTimeout", 60).intValue();
/**
* The default duration (in seconds) of a lease on a distributed lock
*/
- public static final int DEFAULT_LOCK_LEASE = Integer.getInteger("gemfire.Cache.defaultLockLease", 120).intValue();
+ public static final int DEFAULT_LOCK_LEASE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "Cache.defaultLockLease", 120).intValue();
/** The default "copy on read" attribute value */
public static final boolean DEFAULT_COPY_ON_READ = false;
@@ -261,7 +153,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
/**
* The default amount of time to wait for a <code>netSearch</code> to complete
*/
- public static final int DEFAULT_SEARCH_TIMEOUT = Integer.getInteger("gemfire.Cache.defaultSearchTimeout", 300).intValue();
+ public static final int DEFAULT_SEARCH_TIMEOUT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "Cache.defaultSearchTimeout", 300).intValue();
/**
* The <code>CacheLifecycleListener</code> s that have been registered in this VM
@@ -271,7 +163,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
/**
* Define gemfire.Cache.ASYNC_EVENT_LISTENERS=true to invoke event listeners in the background
*/
- private static final boolean ASYNC_EVENT_LISTENERS = Boolean.getBoolean("gemfire.Cache.ASYNC_EVENT_LISTENERS");
+ private static final boolean ASYNC_EVENT_LISTENERS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "Cache.ASYNC_EVENT_LISTENERS");
/**
* If true then when a delta is applied the size of the entry value will be recalculated. If false (the default) then
@@ -279,20 +171,21 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
*
* @since GemFire hitachi 6.1.2.9
*/
- public static boolean DELTAS_RECALCULATE_SIZE = Boolean.getBoolean("gemfire.DELTAS_RECALCULATE_SIZE");
+ public static boolean DELTAS_RECALCULATE_SIZE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DELTAS_RECALCULATE_SIZE");
- public static final int EVENT_QUEUE_LIMIT = Integer.getInteger("gemfire.Cache.EVENT_QUEUE_LIMIT", 4096).intValue();
- public static final int EVENT_THREAD_LIMIT = Integer.getInteger("gemfire.Cache.EVENT_THREAD_LIMIT", 16).intValue();
+ public static final int EVENT_QUEUE_LIMIT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "Cache.EVENT_QUEUE_LIMIT", 4096).intValue();
+ public static final int EVENT_THREAD_LIMIT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "Cache.EVENT_THREAD_LIMIT", 16).intValue();
/**
* System property to limit the max query-execution time. By default its turned off (-1), the time is set in MiliSecs.
*/
- public static final int MAX_QUERY_EXECUTION_TIME = Integer.getInteger("gemfire.Cache.MAX_QUERY_EXECUTION_TIME", -1).intValue();
+ public static final int MAX_QUERY_EXECUTION_TIME = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "Cache.MAX_QUERY_EXECUTION_TIME", -1).intValue();
/**
* System property to disable query monitor even if resource manager is in use
*/
- public final boolean QUERY_MONITOR_DISABLED_FOR_LOW_MEM = Boolean.getBoolean("gemfire.Cache.DISABLE_QUERY_MONITOR_FOR_LOW_MEMORY");
+ public final boolean QUERY_MONITOR_DISABLED_FOR_LOW_MEM = Boolean
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "Cache.DISABLE_QUERY_MONITOR_FOR_LOW_MEMORY");
/**
* Property set to true if resource manager heap percentage is set and query monitor is required
@@ -307,7 +200,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
/**
* True if the user is allowed lock when memory resources appear to be overcommitted.
*/
- public static final boolean ALLOW_MEMORY_LOCK_WHEN_OVERCOMMITTED = Boolean.getBoolean("gemfire.Cache.ALLOW_MEMORY_OVERCOMMIT");
+ public static final boolean ALLOW_MEMORY_LOCK_WHEN_OVERCOMMITTED = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "Cache.ALLOW_MEMORY_OVERCOMMIT");
//time in ms
private static final int FIVE_HOURS = 5 * 60 * 60 * 1000;
@@ -550,7 +443,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
/** {@link PropertyResolver} to resolve ${} type property strings */
protected static PropertyResolver resolver;
- protected static boolean xmlParameterizationEnabled = !Boolean.getBoolean("gemfire.xml.parameterization.disabled");
+ protected static boolean xmlParameterizationEnabled = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "xml.parameterization.disabled");
public static Runnable internalBeforeApplyChanges;
@@ -582,8 +475,8 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
public static final int DEFAULT_CLIENT_FUNCTION_TIMEOUT = 0;
private static int clientFunctionTimeout;
-
- private final static Boolean DISABLE_AUTO_EVICTION = Boolean.getBoolean("gemfire.disableAutoEviction");
+
+ private final static Boolean DISABLE_AUTO_EVICTION = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableAutoEviction");
static {
// this works around jdk bug 6427854, reported in ticket #44434
@@ -1154,8 +1047,8 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
startRedisServer();
startRestAgentServer(this);
-
- int time = Integer.getInteger("gemfire.CLIENT_FUNCTION_TIMEOUT",
+
+ int time = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "CLIENT_FUNCTION_TIMEOUT",
DEFAULT_CLIENT_FUNCTION_TIMEOUT);
clientFunctionTimeout = time >= 0 ? time : DEFAULT_CLIENT_FUNCTION_TIMEOUT;
@@ -1611,7 +1504,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
/**
* Number of threads used to close PRs in shutdownAll. By default is the number of PRs in the cache
*/
- private static final int shutdownAllPoolSize = Integer.getInteger("gemfire.SHUTDOWN_ALL_POOL_SIZE", -1);
+ private static final int shutdownAllPoolSize = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "SHUTDOWN_ALL_POOL_SIZE", -1);
void shutdownSubTreeGracefully(Map<String, PartitionedRegion> prSubMap) {
for (final PartitionedRegion pr : prSubMap.values()) {
@@ -1946,7 +1839,7 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
}
}
- private final boolean DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE = Boolean.getBoolean("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
+ private final boolean DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
/**
* close the cache
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
index b43ba2d..f0836d4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InitialImageOperation.java
@@ -17,35 +17,7 @@
package com.gemstone.gemfire.internal.cache;
-import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ABSTRACT_REGION_ENTRY_FILL_IN_VALUE;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.Externalizable;
-import java.io.IOException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.DiskAccessException;
import com.gemstone.gemfire.cache.Operation;
import com.gemstone.gemfire.cache.RegionDestroyedException;
@@ -53,26 +25,12 @@ import com.gemstone.gemfire.cache.query.internal.CqStateImpl;
import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
import com.gemstone.gemfire.cache.query.internal.cq.CqService;
-import com.gemstone.gemfire.cache.query.internal.cq.InternalCqQuery;
import com.gemstone.gemfire.cache.query.internal.cq.ServerCQ;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.HighPriorityDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.MessageWithReply;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.ReplyMessage;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ByteArrayDataInput;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.NullDataOutputStream;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.InitialImageFlowControl.FlowControlPermitMessage;
import com.gemstone.gemfire.internal.cache.ha.HAContainerWrapper;
import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
@@ -81,13 +39,7 @@ import com.gemstone.gemfire.internal.cache.tier.InterestType;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
-import com.gemstone.gemfire.internal.cache.versions.DiskRegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.DiskVersionTag;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
-import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import com.gemstone.gemfire.internal.cache.versions.*;
import com.gemstone.gemfire.internal.cache.vmotion.VMotionObserverHolder;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -96,10 +48,15 @@ import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
-import com.gemstone.gemfire.internal.offheap.annotations.Retained;
import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
import com.gemstone.gemfire.internal.sequencelog.RegionLogger;
import com.gemstone.gemfire.internal.util.ObjectIntProcedure;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Handles requests for an initial image from a cache peer
@@ -123,19 +80,19 @@ public class InitialImageOperation {
* Allowed number of in flight GII chunks
*/
public static int CHUNK_PERMITS =
- Integer.getInteger("gemfire.GetInitialImage.CHUNK_PERMITS", 16).intValue();
+ Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "GetInitialImage.CHUNK_PERMITS", 16).intValue();
/**
* maximum number of unfinished operations to be supported by delta GII
*/
public static int MAXIMUM_UNFINISHED_OPERATIONS =
- Integer.getInteger("gemfire.GetInitialImage.MAXIMUM_UNFINISHED_OPERATIONS", 10000).intValue();
+ Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "GetInitialImage.MAXIMUM_UNFINISHED_OPERATIONS", 10000).intValue();
/**
* Allowed number GIIs in parallel
*/
public static int MAX_PARALLEL_GIIS =
- Integer.getInteger("gemfire.GetInitialImage.MAX_PARALLEL_GIIS", 5).intValue();
+ Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "GetInitialImage.MAX_PARALLEL_GIIS", 5).intValue();
/**
* the region we are fetching
@@ -4027,8 +3984,8 @@ public class InitialImageOperation {
}
- public static final boolean TRACE_GII = Boolean.getBoolean("gemfire.GetInitialImage.TRACE_GII");
- public static boolean FORCE_FULL_GII = Boolean.getBoolean("gemfire.GetInitialImage.FORCE_FULL_GII");
+ public static final boolean TRACE_GII = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "GetInitialImage.TRACE_GII");
+ public static boolean FORCE_FULL_GII = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "GetInitialImage.FORCE_FULL_GII");
// test hooks should be applied and waited in strict order as following
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InlineKeyHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InlineKeyHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InlineKeyHelper.java
index f146f89..aa98fa6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InlineKeyHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/InlineKeyHelper.java
@@ -16,12 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
/**
* No instances of this class. Just some static method having to do with inline keys.
*
*/
public class InlineKeyHelper {
- public static boolean INLINE_REGION_KEYS = !Boolean.getBoolean("gemfire.DISABLE_INLINE_REGION_KEYS");
+ public static boolean INLINE_REGION_KEYS = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_INLINE_REGION_KEYS");
/**
* The maximum number of longs any of region entry subclasses use
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index 8295487..31a0aae 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -17,95 +17,10 @@
package com.gemstone.gemfire.internal.cache;
-import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.*;
-
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.AbstractSet;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-import java.util.regex.Pattern;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.CopyHelper;
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.DeltaSerializationException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.admin.internal.SystemMemberCacheEventProcessor;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheEvent;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheRuntimeException;
-import com.gemstone.gemfire.cache.CacheStatistics;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.DiskWriteAttributes;
-import com.gemstone.gemfire.cache.DiskWriteAttributesFactory;
-import com.gemstone.gemfire.cache.EntryDestroyedException;
-import com.gemstone.gemfire.cache.EntryExistsException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.FailedSynchronizationException;
-import com.gemstone.gemfire.cache.InterestRegistrationEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.LowMemoryException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionedRegionStorageException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.RegionMembershipListener;
-import com.gemstone.gemfire.cache.RegionReinitializedException;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.StatisticsDisabledException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.TransactionException;
-import com.gemstone.gemfire.cache.TransactionId;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache.client.SubscriptionNotEnabledException;
@@ -117,17 +32,7 @@ import com.gemstone.gemfire.cache.control.ResourceManager;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.ResultCollector;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.cache.query.FunctionDomainException;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexMaintenanceException;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.MultiIndexCreationException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
@@ -141,19 +46,11 @@ import com.gemstone.gemfire.cache.util.ObjectSizer;
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.ResourceEvent;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ClassLoadUtil;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalStatisticsDisabledException;
-import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.i18n.StringId;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor.CacheProfile;
import com.gemstone.gemfire.internal.cache.DiskInitFile.DiskRegionFlag;
import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
@@ -164,11 +61,7 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.Resou
import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
import com.gemstone.gemfire.internal.cache.control.MemoryThresholds;
import com.gemstone.gemfire.internal.cache.control.ResourceListener;
-import com.gemstone.gemfire.internal.cache.execute.DistributedRegionFunctionExecutor;
-import com.gemstone.gemfire.internal.cache.execute.DistributedRegionFunctionResultSender;
-import com.gemstone.gemfire.internal.cache.execute.LocalResultCollector;
-import com.gemstone.gemfire.internal.cache.execute.RegionFunctionContextImpl;
-import com.gemstone.gemfire.internal.cache.execute.ServerToClientFunctionResultSender;
+import com.gemstone.gemfire.internal.cache.execute.*;
import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier;
import com.gemstone.gemfire.internal.cache.lru.LRUEntry;
import com.gemstone.gemfire.internal.cache.partitioned.RedundancyAlreadyMetException;
@@ -179,19 +72,8 @@ import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
import com.gemstone.gemfire.internal.cache.persistence.query.IndexMap;
import com.gemstone.gemfire.internal.cache.persistence.query.mock.IndexMapImpl;
import com.gemstone.gemfire.internal.cache.tier.InterestType;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientHealthMonitor;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientTombstoneMessage;
-import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessage;
-import com.gemstone.gemfire.internal.cache.tier.sockets.HandShake;
-import com.gemstone.gemfire.internal.cache.tier.sockets.VersionedObjectList;
-import com.gemstone.gemfire.internal.cache.versions.ConcurrentCacheModificationException;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
-import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import com.gemstone.gemfire.internal.cache.tier.sockets.*;
+import com.gemstone.gemfire.internal.cache.versions.*;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderEventCallbackArgument;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -208,7 +90,18 @@ import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
import com.gemstone.gemfire.internal.util.concurrent.FutureResult;
import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReadWriteLock;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+import java.util.regex.Pattern;
+
+import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_NEW_VALUE;
/**
* Implementation of a local scoped-region. Note that this class has a different
@@ -324,8 +217,7 @@ public class LocalRegion extends AbstractRegion
Pattern.compile("^import .*", Pattern.CASE_INSENSITIVE
| Pattern.UNICODE_CASE | Pattern.DOTALL) };
-
- public static final String EXPIRY_MS_PROPERTY = "gemfire.EXPIRY_UNITS_MS";
+ public static final String EXPIRY_MS_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "EXPIRY_UNITS_MS";
/**
* Used by unit tests to set expiry to milliseconds instead of the default
@@ -3385,7 +3277,7 @@ public class LocalRegion extends AbstractRegion
/**
* @since GemFire 5.0.2
*/
- private final boolean DO_EXPENSIVE_VALIDATIONS = Boolean.getBoolean("gemfire.DO_EXPENSIVE_VALIDATIONS");
+ private final boolean DO_EXPENSIVE_VALIDATIONS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DO_EXPENSIVE_VALIDATIONS");
/**
* the number of tombstone entries in the RegionMap
@@ -3937,7 +3829,7 @@ public class LocalRegion extends AbstractRegion
}
public void finishRegisterInterest() {
- if (Boolean.getBoolean("gemfire.testing.slow-interest-recovery")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "testing.slow-interest-recovery")) {
if(logger.isDebugEnabled()) {
logger.debug("slowing interest recovery...");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
index 42d1dbc..4c04054 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
@@ -16,71 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache;
-import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
-import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
-import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
-import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
-import it.unimi.dsi.fastutil.objects.ObjectIterator;
-
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.DataOutputStream;
-import java.io.EOFException;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.io.SyncFailedException;
-import java.nio.ByteBuffer;
-import java.nio.channels.ClosedChannelException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.SerializationException;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.EntryDestroyedException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.UnsupportedVersionException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.OplogCancelledException;
import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ByteArrayDataInput;
-import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.InternalStatisticsDisabledException;
-import com.gemstone.gemfire.internal.Sendable;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.Flushable;
import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.ValueWrapper;
import com.gemstone.gemfire.internal.cache.DiskInitFile.DiskRegionFlag;
@@ -89,19 +32,8 @@ import com.gemstone.gemfire.internal.cache.DiskStoreImpl.OplogEntryIdSet;
import com.gemstone.gemfire.internal.cache.DistributedRegion.DiskPosition;
import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
-import com.gemstone.gemfire.internal.cache.persistence.BytesAndBits;
-import com.gemstone.gemfire.internal.cache.persistence.DiskRecoveryStore;
-import com.gemstone.gemfire.internal.cache.persistence.DiskRegionView;
-import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
-import com.gemstone.gemfire.internal.cache.persistence.UninterruptibleFileChannel;
-import com.gemstone.gemfire.internal.cache.persistence.UninterruptibleRandomAccessFile;
-import com.gemstone.gemfire.internal.cache.versions.CompactVersionHolder;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.VersionHolder;
-import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
-import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import com.gemstone.gemfire.internal.cache.persistence.*;
+import com.gemstone.gemfire.internal.cache.versions.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
@@ -117,6 +49,25 @@ import com.gemstone.gemfire.internal.util.BlobHelper;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.internal.util.TransformUtils;
import com.gemstone.gemfire.pdx.internal.PdxWriterImpl;
+import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
+import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
+import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
+import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
+import it.unimi.dsi.fastutil.objects.ObjectIterator;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.nio.channels.ClosedChannelException;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
/**
* Implements an operation log to write to disk. As of prPersistSprint2 this
@@ -188,7 +139,7 @@ public final class Oplog implements CompactableOplog, Flushable {
* This system property instructs that writes be synchronously written to disk
* and not to file system. (Use rwd instead of rw - RandomAccessFile property)
*/
- private static final boolean SYNC_WRITES = Boolean.getBoolean("gemfire.syncWrites");
+ private static final boolean SYNC_WRITES = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "syncWrites");
/**
* The HighWaterMark of recentValues.
@@ -5040,7 +4991,7 @@ public final class Oplog implements CompactableOplog, Flushable {
}
private void setMaxCrfDrfSize() {
- int crfPct = Integer.getInteger("gemfire.CRF_MAX_PERCENTAGE", 90);
+ int crfPct = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "CRF_MAX_PERCENTAGE", 90);
if (crfPct > 100 || crfPct < 0) {
crfPct = 90;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
index 2ec1e3f..f933024 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRHARedundancyProvider.java
@@ -17,26 +17,6 @@
package com.gemstone.gemfire.internal.cache;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.CacheClosedException;
@@ -46,39 +26,20 @@ import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.persistence.PartitionOfflineException;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
import com.gemstone.gemfire.distributed.internal.MembershipListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.NanoTimer;
import com.gemstone.gemfire.internal.OneTaskOnlyExecutor;
import com.gemstone.gemfire.internal.cache.PartitionedRegion.RetryTimeKeeper;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.CreateBucketResult;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
-import com.gemstone.gemfire.internal.cache.partitioned.Bucket;
-import com.gemstone.gemfire.internal.cache.partitioned.BucketBackupMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.CreateBucketMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.CreateMissingBucketsTask;
-import com.gemstone.gemfire.internal.cache.partitioned.EndBucketCreationMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.FetchPartitionDetailsMessage;
+import com.gemstone.gemfire.internal.cache.partitioned.*;
import com.gemstone.gemfire.internal.cache.partitioned.FetchPartitionDetailsMessage.FetchPartitionDetailsResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.InternalPRInfo;
-import com.gemstone.gemfire.internal.cache.partitioned.InternalPartitionDetails;
-import com.gemstone.gemfire.internal.cache.partitioned.LoadProbe;
-import com.gemstone.gemfire.internal.cache.partitioned.ManageBackupBucketMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.ManageBucketMessage;
import com.gemstone.gemfire.internal.cache.partitioned.ManageBucketMessage.NodeResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.OfflineMemberDetails;
-import com.gemstone.gemfire.internal.cache.partitioned.OfflineMemberDetailsImpl;
-import com.gemstone.gemfire.internal.cache.partitioned.PRLoad;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionMemberInfoImpl;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionRegionInfoImpl;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverAdapter;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverHolder;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionRebalanceOp;
-import com.gemstone.gemfire.internal.cache.partitioned.RecoveryRunnable;
-import com.gemstone.gemfire.internal.cache.partitioned.RedundancyLogger;
-import com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor;
import com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor.PartitionProfile;
import com.gemstone.gemfire.internal.cache.partitioned.rebalance.CompositeDirector;
import com.gemstone.gemfire.internal.cache.partitioned.rebalance.FPRDirector;
@@ -89,7 +50,16 @@ import com.gemstone.gemfire.internal.cache.persistence.PersistentStateListener;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
/**
* This class provides the redundancy management for partitioned region. It will
@@ -104,9 +74,9 @@ import com.gemstone.gemfire.i18n.StringId;
public class PRHARedundancyProvider
{
private static final Logger logger = LogService.getLogger();
-
- private static final boolean DISABLE_CREATE_BUCKET_RANDOMNESS
- = Boolean.getBoolean("gemfire.DISABLE_CREATE_BUCKET_RANDOMNESS");
+
+ private static final boolean DISABLE_CREATE_BUCKET_RANDOMNESS
+ = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_CREATE_BUCKET_RANDOMNESS");
public static class ArrayListWithClearState<T> extends ArrayList<T> {
private static final long serialVersionUID = 1L;
@@ -122,7 +92,7 @@ public class PRHARedundancyProvider
}
public static final String DATASTORE_DISCOVERY_TIMEOUT_PROPERTY_NAME =
- "gemfire.partitionedRegionDatastoreDiscoveryTimeout";
+ DistributionConfig.GEMFIRE_PREFIX + "partitionedRegionDatastoreDiscoveryTimeout";
static volatile Long DATASTORE_DISCOVERY_TIMEOUT_MILLISECONDS =
Long.getLong(DATASTORE_DISCOVERY_TIMEOUT_PROPERTY_NAME);
@@ -442,7 +412,7 @@ public class PRHARedundancyProvider
}
public static final long INSUFFICIENT_LOGGING_THROTTLE_TIME =
- TimeUnit.SECONDS.toNanos(Integer.getInteger("gemfire.InsufficientLoggingThrottleTime", 2).intValue());
+ TimeUnit.SECONDS.toNanos(Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "InsufficientLoggingThrottleTime", 2).intValue());
public volatile static boolean TEST_MODE = false;
//since 6.6, please use the distributed system property enforce-unique-host instead.
// public static final boolean ENFORCE_UNIQUE_HOST_STORAGE_ALLOCATION = DistributionConfig.DEFAULT_ENFORCE_UNIQUE_HOST;
@@ -1597,7 +1567,7 @@ public class PRHARedundancyProvider
if (isStartup) {
delay = this.prRegion.getPartitionAttributes().getStartupRecoveryDelay();
- movePrimaries = !Boolean.getBoolean("gemfire.DISABLE_MOVE_PRIMARIES_ON_STARTUP");
+ movePrimaries = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_MOVE_PRIMARIES_ON_STARTUP");
} else {
delay = this.prRegion.getPartitionAttributes().getRecoveryDelay();
movePrimaries = false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRQueryProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRQueryProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRQueryProcessor.java
index 076c5e8..967a39d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRQueryProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PRQueryProcessor.java
@@ -16,42 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.cache.CacheRuntimeException;
import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.query.QueryException;
import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.internal.CompiledSelect;
-import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
-import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
-import com.gemstone.gemfire.cache.query.internal.IndexTrackingQueryObserver;
-import com.gemstone.gemfire.cache.query.internal.NWayMergeResults;
-import com.gemstone.gemfire.cache.query.internal.QueryExecutionContext;
-import com.gemstone.gemfire.cache.query.internal.QueryMonitor;
-import com.gemstone.gemfire.cache.query.internal.QueryObserver;
-import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
+import com.gemstone.gemfire.cache.query.internal.*;
import com.gemstone.gemfire.cache.query.types.ObjectType;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.DataSerializableFixedID;
import com.gemstone.gemfire.internal.Version;
@@ -59,6 +32,13 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegionQueryEvaluator.PRQue
import com.gemstone.gemfire.internal.cache.execute.BucketMovedException;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.*;
/**
@@ -78,8 +58,8 @@ public class PRQueryProcessor
private static final Logger logger = LogService.getLogger();
final static int BUCKET_QUERY_TIMEOUT = 60;
-
- public final static int NUM_THREADS = Integer.getInteger("gemfire.PRQueryProcessor.numThreads", 1).intValue();
+
+ public final static int NUM_THREADS = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "PRQueryProcessor.numThreads", 1).intValue();
/* For Test purpose */
public static int TEST_NUM_THREADS = 0;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
index 4165fd7..667c765 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
@@ -17,136 +17,33 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Executors;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.locks.Lock;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.StatisticsFactory;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheStatistics;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.EntryExistsException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.InterestRegistrationEvent;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.LowMemoryException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.PartitionedRegionDistributionException;
-import com.gemstone.gemfire.cache.PartitionedRegionStorageException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.RegionMembershipListener;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.TransactionDataNotColocatedException;
-import com.gemstone.gemfire.cache.TransactionDataRebalancedException;
-import com.gemstone.gemfire.cache.TransactionException;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
-import com.gemstone.gemfire.cache.execute.EmptyRegionFunctionException;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.partition.PartitionListener;
import com.gemstone.gemfire.cache.partition.PartitionNotAvailableException;
-import com.gemstone.gemfire.cache.query.FunctionDomainException;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexCreationException;
-import com.gemstone.gemfire.cache.query.IndexExistsException;
-import com.gemstone.gemfire.cache.query.IndexInvalidException;
-import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.MultiIndexCreationException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
-import com.gemstone.gemfire.cache.query.internal.CompiledSelect;
-import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
-import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
-import com.gemstone.gemfire.cache.query.internal.QCompiler;
-import com.gemstone.gemfire.cache.query.internal.QueryExecutor;
-import com.gemstone.gemfire.cache.query.internal.ResultsBag;
-import com.gemstone.gemfire.cache.query.internal.ResultsCollectionWrapper;
-import com.gemstone.gemfire.cache.query.internal.ResultsSet;
-import com.gemstone.gemfire.cache.query.internal.index.AbstractIndex;
-import com.gemstone.gemfire.cache.query.internal.index.IndexCreationData;
-import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
-import com.gemstone.gemfire.cache.query.internal.index.IndexUtils;
-import com.gemstone.gemfire.cache.query.internal.index.PartitionedIndex;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.internal.*;
+import com.gemstone.gemfire.cache.query.internal.index.*;
import com.gemstone.gemfire.cache.query.internal.types.ObjectTypeImpl;
import com.gemstone.gemfire.cache.query.types.ObjectType;
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.distributed.DistributedLockService;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.LockServiceDestroyedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisee;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.DisconnectListener;
-import com.gemstone.gemfire.distributed.internal.MembershipListener;
-import com.gemstone.gemfire.distributed.internal.ProfileListener;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
import com.gemstone.gemfire.distributed.internal.locks.DLockRemoteToken;
import com.gemstone.gemfire.distributed.internal.locks.DLockService;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.NanoTimer;
import com.gemstone.gemfire.internal.SetUtils;
@@ -160,63 +57,27 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
import com.gemstone.gemfire.internal.cache.control.MemoryThresholds;
-import com.gemstone.gemfire.internal.cache.execute.AbstractExecution;
-import com.gemstone.gemfire.internal.cache.execute.FunctionExecutionNodePruner;
-import com.gemstone.gemfire.internal.cache.execute.FunctionRemoteContext;
-import com.gemstone.gemfire.internal.cache.execute.InternalFunctionInvocationTargetException;
-import com.gemstone.gemfire.internal.cache.execute.LocalResultCollector;
-import com.gemstone.gemfire.internal.cache.execute.PartitionedRegionFunctionExecutor;
-import com.gemstone.gemfire.internal.cache.execute.PartitionedRegionFunctionResultSender;
-import com.gemstone.gemfire.internal.cache.execute.PartitionedRegionFunctionResultWaiter;
-import com.gemstone.gemfire.internal.cache.execute.RegionFunctionContextImpl;
-import com.gemstone.gemfire.internal.cache.execute.ServerToClientFunctionResultSender;
+import com.gemstone.gemfire.internal.cache.execute.*;
import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier;
import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
-import com.gemstone.gemfire.internal.cache.partitioned.ContainsKeyValueMessage;
+import com.gemstone.gemfire.internal.cache.partitioned.*;
import com.gemstone.gemfire.internal.cache.partitioned.ContainsKeyValueMessage.ContainsKeyValueResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.DestroyMessage;
import com.gemstone.gemfire.internal.cache.partitioned.DestroyMessage.DestroyResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.DestroyRegionOnDataStoreMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.DumpAllPRConfigMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.DumpB2NRegion;
import com.gemstone.gemfire.internal.cache.partitioned.DumpB2NRegion.DumpB2NResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.DumpBucketsMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.FetchBulkEntriesMessage;
import com.gemstone.gemfire.internal.cache.partitioned.FetchBulkEntriesMessage.FetchBulkEntriesResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.FetchEntriesMessage;
import com.gemstone.gemfire.internal.cache.partitioned.FetchEntriesMessage.FetchEntriesResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.FetchEntryMessage;
import com.gemstone.gemfire.internal.cache.partitioned.FetchEntryMessage.FetchEntryResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.FetchKeysMessage;
import com.gemstone.gemfire.internal.cache.partitioned.FetchKeysMessage.FetchKeysResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.GetMessage;
import com.gemstone.gemfire.internal.cache.partitioned.GetMessage.GetResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.IdentityRequestMessage;
import com.gemstone.gemfire.internal.cache.partitioned.IdentityRequestMessage.IdentityResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.IdentityUpdateMessage;
import com.gemstone.gemfire.internal.cache.partitioned.IdentityUpdateMessage.IdentityUpdateResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.IndexCreationMsg;
-import com.gemstone.gemfire.internal.cache.partitioned.InterestEventMessage;
import com.gemstone.gemfire.internal.cache.partitioned.InterestEventMessage.InterestEventResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.InvalidateMessage;
import com.gemstone.gemfire.internal.cache.partitioned.InvalidateMessage.InvalidateResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.PREntriesIterator;
-import com.gemstone.gemfire.internal.cache.partitioned.PRLocallyDestroyedException;
-import com.gemstone.gemfire.internal.cache.partitioned.PRSanityCheckMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.PRUpdateEntryVersionMessage;
import com.gemstone.gemfire.internal.cache.partitioned.PRUpdateEntryVersionMessage.UpdateEntryVersionResponse;
import com.gemstone.gemfire.internal.cache.partitioned.PartitionMessage.PartitionResponse;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserver;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverHolder;
-import com.gemstone.gemfire.internal.cache.partitioned.PutAllPRMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.PutMessage;
import com.gemstone.gemfire.internal.cache.partitioned.PutMessage.PutResult;
-import com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor;
import com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor.PartitionProfile;
-import com.gemstone.gemfire.internal.cache.partitioned.RemoveAllPRMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.RemoveIndexesMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.SizeMessage;
import com.gemstone.gemfire.internal.cache.partitioned.SizeMessage.SizeResponse;
import com.gemstone.gemfire.internal.cache.persistence.PRPersistentConfig;
import com.gemstone.gemfire.internal.cache.tier.InterestType;
@@ -245,7 +106,17 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
import com.gemstone.gemfire.internal.sequencelog.RegionLogger;
import com.gemstone.gemfire.internal.util.TransformUtils;
import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.Serializable;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.locks.Lock;
/**
* A Region whose total storage is split into chunks of data (partitions) which
@@ -257,7 +128,7 @@ public class PartitionedRegion extends LocalRegion implements
CacheDistributionAdvisee, QueryExecutor {
public static final Random rand = new Random(Long.getLong(
- "gemfire.PartitionedRegionRandomSeed", NanoTimer.getTime()).longValue());
+ DistributionConfig.GEMFIRE_PREFIX + "PartitionedRegionRandomSeed", NanoTimer.getTime()).longValue());
private static final AtomicInteger SERIAL_NUMBER_GENERATOR = new AtomicInteger();
@@ -266,7 +137,7 @@ public class PartitionedRegion extends LocalRegion implements
* Changes scope of replication to secondary bucket to SCOPE.DISTRIBUTED_NO_ACK
*/
public static final boolean DISABLE_SECONDARY_BUCKET_ACK = Boolean.getBoolean(
- "gemfire.disablePartitionedRegionBucketAck");
+ DistributionConfig.GEMFIRE_PREFIX + "disablePartitionedRegionBucketAck");
/**
* A debug flag used for testing calculation of starting bucket id
@@ -681,8 +552,8 @@ public class PartitionedRegion extends LocalRegion implements
*
*/
- static public final String RETRY_TIMEOUT_PROPERTY =
- "gemfire.partitionedRegionRetryTimeout";
+ static public final String RETRY_TIMEOUT_PROPERTY =
+ DistributionConfig.GEMFIRE_PREFIX + "partitionedRegionRetryTimeout";
private final PartitionRegionConfigValidator validator ;
@@ -740,10 +611,10 @@ public class PartitionedRegion extends LocalRegion implements
// No redundancy required for writes
this.minimumWriteRedundancy = Integer.getInteger(
- "gemfire.mimimumPartitionedRegionWriteRedundancy", 0).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "mimimumPartitionedRegionWriteRedundancy", 0).intValue();
// No redundancy required for reads
this.minimumReadRedundancy = Integer.getInteger(
- "gemfire.mimimumPartitionedRegionReadRedundancy", 0).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "mimimumPartitionedRegionReadRedundancy", 0).intValue();
this.haveCacheLoader = ra.getCacheLoader() != null;
@@ -9633,7 +9504,7 @@ public class PartitionedRegion extends LocalRegion implements
/**
* Return the primary for the local bucket. Returns null if no primary
- * can be found within {@link com.gemstone.gemfire.distributed.internal.DistributionConfig#getMemberTimeout}.
+ * can be found within {@link DistributionConfig#getMemberTimeout}.
* @param bucketId
* @return the primary bucket member
*/
[50/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
index be511d9..3e62372 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
@@ -35,6 +35,8 @@ import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/****
*
*
@@ -110,7 +112,7 @@ public class GetMemberConfigInformationFunction extends FunctionAdapter implemen
cacheServerAttributes.put("message-time-to-live", Integer.toString(cacheServer.getMessageTimeToLive()));
cacheServerAttributes.put("notify-by-subscription", Boolean.toString(cacheServer.getNotifyBySubscription()));
cacheServerAttributes.put("port", Integer.toString(cacheServer.getPort()));
- cacheServerAttributes.put(DistributionConfig.SOCKET_BUFFER_SIZE_NAME, Integer.toString(cacheServer.getSocketBufferSize()));
+ cacheServerAttributes.put(SOCKET_BUFFER_SIZE, Integer.toString(cacheServer.getSocketBufferSize()));
cacheServerAttributes.put("load-poll-interval", Long.toString(cacheServer.getLoadPollInterval()));
cacheServerAttributes.put("tcp-no-delay", Boolean.toString(cacheServer.getTcpNoDelay()));
@@ -160,7 +162,7 @@ public class GetMemberConfigInformationFunction extends FunctionAdapter implemen
csAttributesDefault.put("message-time-to-live", Integer.toString(CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE));
csAttributesDefault.put("notify-by-subscription", Boolean.toString(CacheServer.DEFAULT_NOTIFY_BY_SUBSCRIPTION));
csAttributesDefault.put("port", Integer.toString(CacheServer.DEFAULT_PORT));
- csAttributesDefault.put(DistributionConfig.SOCKET_BUFFER_SIZE_NAME, Integer.toString(CacheServer.DEFAULT_SOCKET_BUFFER_SIZE));
+ csAttributesDefault.put(SOCKET_BUFFER_SIZE, Integer.toString(CacheServer.DEFAULT_SOCKET_BUFFER_SIZE));
csAttributesDefault.put("load-poll-interval", Long.toString(CacheServer.DEFAULT_LOAD_POLL_INTERVAL));
return csAttributesDefault;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
index 88a4044..59554f5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
@@ -944,7 +944,7 @@ public class CliStrings {
public static final String EXPORT_LOGS__GROUP = "group";
public static final String EXPORT_LOGS__GROUP__HELP = "Group of members whose log files will be exported.";
public static final String EXPORT_LOGS__MSG__CANNOT_EXECUTE = "Cannot execute";
- public static final String EXPORT_LOGS__LOGLEVEL = DistributionConfig.LOG_LEVEL_NAME;
+ public static final String EXPORT_LOGS__LOGLEVEL = LOG_LEVEL;
public static final String EXPORT_LOGS__LOGLEVEL__HELP = "Minimum level of log entries to export. Valid values are: none, error, info, config , fine, finer and finest. The default is \"info\".";
public static final String EXPORT_LOGS__UPTO_LOGLEVEL = "only-log-level";
public static final String EXPORT_LOGS__UPTO_LOGLEVEL__HELP = "Whether to only include those entries that exactly match the --log-level specified.";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java b/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
index 47402a7..8649375 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
@@ -16,10 +16,11 @@
*/
package com.gemstone.gemfire.redis;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -383,7 +384,7 @@ public class GemFireRedisServer {
if (c == null) {
CacheFactory cacheFactory = new CacheFactory();
if (logLevel != null)
- cacheFactory.set(DistributionConfig.LOG_LEVEL_NAME, logLevel);
+ cacheFactory.set(LOG_LEVEL, logLevel);
c = cacheFactory.create();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
index bccf229..dce254a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.InternalInstantiator;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -32,8 +31,8 @@ import java.io.DataOutput;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import static org.junit.Assert.fail;
/**
@@ -77,7 +76,7 @@ public class DiskInstantiatorsJUnitTest {
Properties cfg = new Properties();
cfg.setProperty(MCAST_PORT, "0");
cfg.setProperty(LOCATORS, "");
- cfg.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
+ cfg.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
this.ds = DistributedSystem.connect(cfg);
this.c = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
index 5ccbc98..dccdf79 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
@@ -18,14 +18,12 @@ package com.gemstone.gemfire;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests the functionality of JOM {@link Statistics}.
@@ -40,8 +38,8 @@ public class LocalStatisticsJUnitTest extends StatisticsTestCase {
protected DistributedSystem getSystem() {
if (this.system == null) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "StatisticsTestCase-localTest.gfs");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "StatisticsTestCase-localTest.gfs");
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
props.setProperty(SystemConfigurationProperties.NAME, getName());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
index bbc485f..09605c7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
@@ -33,8 +33,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -62,7 +61,7 @@ public class LonerDMJUnitTest {
Properties cfg = new Properties();
cfg.setProperty(MCAST_PORT, "0");
cfg.setProperty(LOCATORS, "");
- cfg.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
+ cfg.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
for (int i=0; i < 2; i++) {
start = System.currentTimeMillis();
@@ -115,8 +114,8 @@ public class LonerDMJUnitTest {
Properties cfg = new Properties();
cfg.setProperty(MCAST_PORT, "0");
cfg.setProperty(LOCATORS, "");
- cfg.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- cfg.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "lonerStats.gfs");
+ cfg.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ cfg.setProperty(STATISTIC_ARCHIVE_FILE, "lonerStats.gfs");
for (int i=0; i < 1; i++) {
start = System.currentTimeMillis();
@@ -168,7 +167,7 @@ public class LonerDMJUnitTest {
Properties cfg = new Properties();
cfg.setProperty(MCAST_PORT, "0");
cfg.setProperty(LOCATORS, "");
- cfg.setProperty(DistributionConfig.ROLES_NAME, "lonelyOne");
+ cfg.setProperty(ROLES, "lonelyOne");
cfg.setProperty(SystemConfigurationProperties.NAME, name);
DistributedSystem ds = DistributedSystem.connect(cfg);
System.out.println("MemberId = " + ds.getMemberId());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
index de34b2b..5e7671a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
@@ -17,14 +17,12 @@
package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import org.junit.After;
import org.junit.Before;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Provides common setUp and tearDown for testing the Admin API.
@@ -63,7 +61,7 @@ public abstract class DistributedSystemTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "true");
+ props.setProperty(CONSERVE_SOCKETS, "true");
return props;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
index 55f10a4..2ed2241 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
@@ -17,15 +17,13 @@
package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import org.junit.After;
import org.junit.Before;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Superclass of tests for the {@linkplain
@@ -70,7 +68,7 @@ public abstract class HealthEvaluatorTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
index b5ea652..f782d66 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
@@ -31,8 +31,7 @@ import org.junit.experimental.categories.Category;
import java.util.Map;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
@Category(IntegrationTest.class)
@@ -46,7 +45,7 @@ public class ConnectionPoolFactoryJUnitTest {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
+ props.setProperty(LOG_LEVEL, "info"); // to keep diskPerf logs smaller
this.ds = DistributedSystem.connect(props);
this.cache = CacheFactory.create(this.ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
index c870091..4f87adc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
@@ -373,7 +373,7 @@ public class RegionFactoryJUnitTest {
final Properties gemfireProperties = createGemFireProperties();
gemfireProperties.put(MCAST_TTL, "64");
final String xmlFileName = getName() + "-cache.xml";
- gemfireProperties.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileName);
+ gemfireProperties.put(CACHE_XML_FILE, xmlFileName);
xmlFile = new File(xmlFileName);
xmlFile.delete();
xmlFile.createNewFile();
@@ -400,8 +400,8 @@ public class RegionFactoryJUnitTest {
r1 = factory.create(this.r1Name);
assertBasicRegionFunctionality(r1, r1Name);
assertEquals(gemfireProperties.get(MCAST_TTL), r1.getCache().getDistributedSystem().getProperties().get(MCAST_TTL));
- assertEquals(gemfireProperties.get(DistributionConfig.CACHE_XML_FILE_NAME),
- r1.getCache().getDistributedSystem().getProperties().get(DistributionConfig.CACHE_XML_FILE_NAME));
+ assertEquals(gemfireProperties.get(CACHE_XML_FILE),
+ r1.getCache().getDistributedSystem().getProperties().get(CACHE_XML_FILE));
RegionAttributes ra = r1.getAttributes();
assertEquals(ra.getStatisticsEnabled(), true);
assertEquals(ra.getScope().isDistributedAck(), true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
index 5abddf4..b64a517 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
@@ -52,8 +52,7 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
import static org.junit.runners.MethodSorters.NAME_ASCENDING;
@@ -106,7 +105,7 @@ public class ClientCacheFactoryJUnitTest {
}
try {
- new ClientCacheFactory().set(DistributionConfig.LOG_LEVEL_NAME, "severe").create();
+ new ClientCacheFactory().set(LOG_LEVEL, "severe").create();
fail("expected create to fail");
} catch (IllegalStateException expected) {
}
@@ -125,7 +124,7 @@ public class ClientCacheFactoryJUnitTest {
URL url = ClientCacheFactoryJUnitTest.class.getResource("ClientCacheFactoryJUnitTest_single_pool.xml");;
FileUtil.copy(url, this.tmpFile);
this.cc = new ClientCacheFactory()
- .set(DistributionConfig.CACHE_XML_FILE_NAME, this.tmpFile.getAbsolutePath())
+ .set(CACHE_XML_FILE, this.tmpFile.getAbsolutePath())
.create();
GemFireCacheImpl gfc = (GemFireCacheImpl)this.cc;
assertEquals(true, gfc.isClient());
@@ -217,13 +216,13 @@ public class ClientCacheFactoryJUnitTest {
@Test
public void test004SetMethod() throws Exception {
- this.cc = new ClientCacheFactory().set(DistributionConfig.LOG_LEVEL_NAME, "severe").create();
+ this.cc = new ClientCacheFactory().set(LOG_LEVEL, "severe").create();
GemFireCacheImpl gfc = (GemFireCacheImpl)this.cc;
assertEquals(true, gfc.isClient());
Properties dsProps = this.cc.getDistributedSystem().getProperties();
assertEquals("0", dsProps.getProperty(MCAST_PORT));
assertEquals("", dsProps.getProperty(LOCATORS));
- assertEquals("severe", dsProps.getProperty(DistributionConfig.LOG_LEVEL_NAME));
+ assertEquals("severe", dsProps.getProperty(LOG_LEVEL));
}
@Test
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
index 44d03ce..67675d0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
@@ -30,7 +30,7 @@ import java.util.Stack;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* The ClientServerRegisterInterestsDUnitTest class is a test suite of test cases testing the interaction between a
@@ -86,8 +86,8 @@ public class ClientServerRegisterInterestsDUnitTest extends DistributedTestCase
Cache cache = new CacheFactory()
.set("name", "ClientServerRegisterInterestsTestGemFireServer")
.set(MCAST_PORT, "0")
- .set(DistributionConfig.LOG_FILE_NAME, "clientServerRegisterInterestsTest.log")
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_FILE, "clientServerRegisterInterestsTest.log")
+ .set(LOG_LEVEL, "config")
//.set("jmx-manager", "true")
//.set("jmx-manager-http-port", "0")
//.set("jmx-manager-port", "1199")
@@ -140,7 +140,7 @@ public class ClientServerRegisterInterestsDUnitTest extends DistributedTestCase
private ClientCache setupGemFireClientCache() {
ClientCache clientCache = new ClientCacheFactory()
- .set(DistributionConfig.DURABLE_CLIENT_ID_NAME, "TestDurableClientId")
+ .set(DURABLE_CLIENT_ID, "TestDurableClientId")
.create();
PoolFactory poolFactory = PoolManager.createFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
index ee17818..1ca6a81 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
@@ -98,8 +98,8 @@ public abstract class LocatorTestBase extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(0));
props.setProperty(LOCATORS, otherLocators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
File logFile = new File(testName + "-locator" + locatorPort + ".log");
InetAddress bindAddr = null;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
index 6edc675..ab0a980 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.QueryTestUtils;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.util.test.TestUtil;
@@ -34,7 +33,7 @@ import java.util.Map;
import java.util.Properties;
import java.util.stream.IntStream;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(DistributedTest.class)
public class PartitionedRegionCompactRangeIndexDUnitTest extends DistributedTestCase {
@@ -46,7 +45,7 @@ public class PartitionedRegionCompactRangeIndexDUnitTest extends DistributedTest
private Properties getSystemProperties(String cacheXML) {
Properties props = new Properties();
props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), cacheXML));
+ props.setProperty(CACHE_XML_FILE, TestUtil.getResourcePath(getClass(), cacheXML));
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
index a35ef27..2bdcb88 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
@@ -38,7 +38,7 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
import org.junit.Ignore;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Test for accessing query bind parameters from authorization callbacks
@@ -87,9 +87,9 @@ public class QueryParamsAuthorizationDUnitTest extends CacheTestCase {
public Object call() throws Exception {
ClientCacheFactory ccf = new ClientCacheFactory()
.addPoolServer(NetworkUtils.getServerHostName(server1.getHost()), port)
- .set(DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create")
- .set("security-username", "root")
- .set("security-password", "root");
+ .set(SECURITY_CLIENT_AUTH_INIT, UserPasswordAuthInit.class.getName() + ".create")
+ .set(SECURITY_PREFIX+"username", "root")
+ .set(SECURITY_PREFIX+"password", "root");
ClientCache cache = getClientCache(ccf);
Region r1 = cache.createClientRegionFactory(
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
index ca2fe2f..3128dc7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
@@ -26,6 +26,8 @@
*/
package com.gemstone.gemfire.cache.query.functional;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.ComparableWrapper;
@@ -849,7 +851,7 @@ public class IndexCreationJUnitTest{
Properties props = new Properties();
props.setProperty(SystemConfigurationProperties.NAME, "test");
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-creation-with-eviction.xml").toURI().getPath());
+ props.setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-creation-with-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
// Create the cache which causes the cache-xml-file to be parsed
@@ -875,7 +877,7 @@ public class IndexCreationJUnitTest{
props.setProperty(MCAST_PORT, "0");
//Using a different cache.xml that changes some region properties
//That will force the disk code to copy the region entries.
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME,
+ props.setProperty(CACHE_XML_FILE,
IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
@@ -900,7 +902,7 @@ public class IndexCreationJUnitTest{
props.setProperty(SystemConfigurationProperties.NAME, "test");
props.setProperty(MCAST_PORT, "0");
props
- .setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
+ .setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
Region localRegion = cache.getRegion("localRegion");
@@ -928,7 +930,7 @@ public class IndexCreationJUnitTest{
props.setProperty(SystemConfigurationProperties.NAME, "test");
props.setProperty(MCAST_PORT, "0");
props
- .setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
+ .setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
Region localDiskRegion = cache.getRegion("localDiskRegion");
@@ -956,9 +958,9 @@ public class IndexCreationJUnitTest{
Properties props = new Properties();
props.setProperty(SystemConfigurationProperties.NAME, "test");
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
// Create the cache which causes the cache-xml-file to be parsed
@@ -990,9 +992,9 @@ public class IndexCreationJUnitTest{
Properties props = new Properties();
props.setProperty(SystemConfigurationProperties.NAME, "test");
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
QueryService qs = cache.getQueryService();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
index 55358f6..a64180e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
@@ -26,7 +26,6 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import junit.framework.Assert;
@@ -38,7 +37,7 @@ import org.junit.experimental.categories.Category;
import java.util.Collection;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -54,7 +53,7 @@ public class DeclarativeIndexCreationJUnitTest {
@Before
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
+ props.setProperty(CACHE_XML_FILE, TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
index 457dcb3..1764849 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
@@ -21,7 +21,6 @@ package com.gemstone.gemfire.cache.query.internal.index;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
@@ -35,7 +34,7 @@ import java.net.URISyntaxException;
import java.util.Collection;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -50,7 +49,7 @@ public class NewDeclarativeIndexCreationJUnitTest {
public void setUp() throws Exception {
//Read the Cache.xml placed in test.lib folder
Properties props = new Properties();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
+ props.setProperty(CACHE_XML_FILE, TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
props.setProperty(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
@@ -154,7 +153,7 @@ public class NewDeclarativeIndexCreationJUnitTest {
public void testIndexCreationExceptionOnRegionWithNewDTD() throws IOException, URISyntaxException {
if (cache != null && !cache.isClosed()) cache.close();
Properties props = new Properties();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), "cachequeryindexwitherror.xml"));
+ props.setProperty(CACHE_XML_FILE, TestUtil.getResourcePath(getClass(), "cachequeryindexwitherror.xml"));
props.setProperty(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(props);
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
index 27c0616..a0b6e65 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
@@ -22,7 +22,6 @@ package com.gemstone.gemfire.cache.query.internal.index;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
@@ -31,7 +30,7 @@ import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.fail;
/**
@@ -59,7 +58,7 @@ public class ProgRegionCreationIndexUpdateTypeJUnitTest{
public void testProgrammaticIndexUpdateType() throws Exception {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.setProperty(LOG_LEVEL, "config");
DistributedSystem ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
//Create a Region with index maintenance type as explicit synchronous
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
index 1749d43..1d94573 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
@@ -38,7 +38,7 @@ import java.util.Map;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicBoolean;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
@Category(IntegrationTest.class)
@@ -244,7 +244,7 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase {
cache.close();
CacheFactory cf = new CacheFactory().set(MCAST_PORT, "0")
- .set(DistributionConfig.LOG_LEVEL_NAME, "error")
+ .set(LOG_LEVEL, "error")
.setPdxSerializer(new MyPdxSerializer())
.set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
cache = cf.create();
@@ -264,7 +264,7 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase {
// change the DSID from 1 -> 100
CacheFactory cf2 = new CacheFactory().set(MCAST_PORT, "0")
- .set(DistributionConfig.LOG_LEVEL_NAME, "error")
+ .set(LOG_LEVEL, "error")
.setPdxSerializer(new MyPdxSerializer())
.set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "100");
cache = cf2.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
index 3804ee4..381e3ee 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
@@ -16,12 +16,13 @@
*/
package com.gemstone.gemfire.cache.snapshot;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.examples.snapshot.MyObject;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.DiskStore;
import com.gemstone.gemfire.cache.snapshot.RegionGenerator.SerializationType;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import org.junit.After;
import org.junit.Before;
@@ -52,7 +53,7 @@ public class SnapshotTestCase {
CacheFactory cf = new CacheFactory()
.set(MCAST_PORT, "0")
- .set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ .set(LOG_LEVEL, "error");
cache = cf.create();
ds = cache.createDiskStoreFactory()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
index 38e79cb..d7dd994 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
@@ -32,8 +31,7 @@ import org.junit.experimental.categories.Category;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -74,7 +72,7 @@ public class Bug40255JUnitTest {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
System.setProperty("gemfirePropertyFile", BUG_40255_PROPS);
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, BUG_40255_XML);
+ props.setProperty(CACHE_XML_FILE, BUG_40255_XML);
System.setProperty(NESTED_ATTR_PROPERTY_STRING, NESTED_ATTR_PROPERTY_VALUE);
System.setProperty(ATTR_PROPERTY_STRING, ATTR_PROPERTY_VALUE);
System.setProperty(ELEMENT_PROPERTY_STRING, ELEMENT_PROPERTY_VALUE);
@@ -104,7 +102,7 @@ public class Bug40255JUnitTest {
props.setProperty(MCAST_PORT, "10333");
props.setProperty(LOCATORS, "");
System.setProperty("gemfirePropertyFile", BUG_40255_PROPS);
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, BUG_40255_XML);
+ props.setProperty(CACHE_XML_FILE, BUG_40255_XML);
System.setProperty(NESTED_ATTR_PROPERTY_STRING, NESTED_ATTR_PROPERTY_VALUE);
System.setProperty(ATTR_PROPERTY_STRING, ATTR_PROPERTY_VALUE);
System.setProperty(ELEMENT_PROPERTY_STRING, ELEMENT_PROPERTY_VALUE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
index 9e9b2f5..93a94cd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
@@ -27,8 +26,7 @@ import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
/**
@@ -77,7 +75,7 @@ public class Bug40662JUnitTest {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, BUG_40662_XML);
+ props.setProperty(CACHE_XML_FILE, BUG_40662_XML);
this.ds = DistributedSystem.connect(props);
this.cache = CacheFactory.create(this.ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
index d595ab8..aaa585a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
@@ -27,6 +27,8 @@ import java.io.*;
import java.util.Properties;
import java.util.regex.Pattern;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Test to make sure cache close is working.
*
@@ -218,10 +220,10 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String baseLogName = "diskarito";
String logfile = baseLogName+".log";
- props.put(DistributionConfig.LOG_FILE_NAME, logfile);
- props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
+ props.put(LOG_FILE, logfile);
+ props.put(LOG_FILE_SIZE_LIMIT, "1");
DistributedSystem ds = this.getSystem(props);
- props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, "200");
+ props.put(LOG_DISK_SPACE_LIMIT, "200");
for(int i=0;i<10;i++) {
ds = this.getSystem(props);
ds.disconnect();
@@ -237,10 +239,10 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String baseLogName = "restarto";
String logfile = baseLogName+".log";
- props.put(DistributionConfig.LOG_FILE_NAME, logfile);
- props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
- props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, "200");
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_FILE, logfile);
+ props.put(LOG_FILE_SIZE_LIMIT, "1");
+ props.put(LOG_DISK_SPACE_LIMIT, "200");
+ props.put(LOG_LEVEL, "config");
InternalDistributedSystem ids = getSystem(props);
assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
ids.disconnect();
@@ -297,9 +299,9 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String baseLogName = "biscuits";
String logfile = baseLogName+".log";
- props.put(DistributionConfig.LOG_FILE_NAME, logfile);
- props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_FILE, logfile);
+ props.put(LOG_FILE_SIZE_LIMIT, "1");
+ props.put(LOG_LEVEL, "config");
DistributedSystem ds = getSystem(props);
InternalDistributedSystem ids = (InternalDistributedSystem) ds;
assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
@@ -324,7 +326,7 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
* Ok now we have rolled and yada yada. Let's disconnect and reconnect with same name!
*/
int dsId = System.identityHashCode(ds);
- props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, "200");
+ props.put(LOG_DISK_SPACE_LIMIT, "200");
File f1m = new File(logfile);
assertTrue(f1m.exists());
@@ -374,9 +376,9 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String logfile = baseLogName+".log";
- props.put(DistributionConfig.LOG_FILE_NAME, logfile);
- props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_FILE, logfile);
+ props.put(LOG_FILE_SIZE_LIMIT, "1");
+ props.put(LOG_LEVEL, "config");
DistributedSystem ds = getSystem(props);
InternalDistributedSystem ids = (InternalDistributedSystem) ds;
@@ -409,9 +411,9 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
String logfile = baseLogName+".log";
String sec_logfile = "sec_"+baseLogName+".log";
- props.put(DistributionConfig.LOG_FILE_NAME, logfile);
- props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_FILE, logfile);
+ props.put(LOG_FILE_SIZE_LIMIT, "1");
+ props.put(LOG_LEVEL, "config");
props.put(DistributionConfig.SECURITY_LOG_FILE_NAME, sec_logfile);
props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
index f5190f6..80e5da9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheRegionsReliablityStatsCheckDUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.CachePerfStats;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.dunit.Host;
@@ -27,100 +26,97 @@ import com.gemstone.gemfire.test.dunit.VM;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class CacheRegionsReliablityStatsCheckDUnitTest extends CacheTestCase {
- public CacheRegionsReliablityStatsCheckDUnitTest(String name) {
- super(name);
- }
-
- /**The tests check to see if all the reliablity stats are working
- * fine and asserts their values to constants.
- *
- * */
- public void testRegionsReliablityStats() throws Exception, RegionExistsException{
- final String rr1 = "roleA";
- final String regionNoAccess = "regionNoAccess";
- final String regionLimitedAccess = "regionLimitedAccess";
- final String regionFullAccess = "regionFullAccess";
- //final String regionNameRoleA = "roleA";
- String requiredRoles[] = { rr1};
- Cache myCache = getCache();
-
- MembershipAttributes ra = new MembershipAttributes(requiredRoles,
- LossAction.NO_ACCESS, ResumptionAction.NONE);
-
- AttributesFactory fac = new AttributesFactory();
- fac.setMembershipAttributes(ra);
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
-
- RegionAttributes attr = fac.create();
- myCache.createRegion(regionNoAccess, attr);
-
- ra = new MembershipAttributes(requiredRoles,
- LossAction.LIMITED_ACCESS, ResumptionAction.NONE);
- fac = new AttributesFactory();
- fac.setMembershipAttributes(ra);
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
- attr = fac.create();
- myCache.createRegion(regionLimitedAccess, attr);
-
- ra = new MembershipAttributes(requiredRoles,
- LossAction.FULL_ACCESS, ResumptionAction.NONE);
- fac = new AttributesFactory();
- fac.setMembershipAttributes(ra);
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
- attr = fac.create();
- myCache.createRegion(regionFullAccess, attr);
-
- CachePerfStats stats = ((GemFireCacheImpl)myCache).getCachePerfStats();
-
- assertEquals(stats.getReliableRegionsMissingNoAccess(), 1);
- assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 1);
- assertEquals(stats.getReliableRegionsMissingFullAccess(), 1);
- assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
- stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess() ));
-
-
- Host host = Host.getHost(0);
- VM vm1 = host.getVM(1);
-
- SerializableRunnable roleAPlayer = new CacheSerializableRunnable(
- "ROLEAPLAYER") {
- public void run2() throws CacheException
- {
-
- Properties props = new Properties();
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.setProperty(DistributionConfig.ROLES_NAME, rr1);
-
- getSystem(props);
- Cache cache = getCache();
- AttributesFactory fac = new AttributesFactory();
- fac.setScope(Scope.DISTRIBUTED_ACK);
- fac.setDataPolicy(DataPolicy.REPLICATE);
-
- RegionAttributes attr = fac.create();
- cache.createRegion(regionNoAccess, attr);
- cache.createRegion(regionLimitedAccess, attr);
- cache.createRegion(regionFullAccess, attr);
-
-
- }
-
- };
-
- vm1.invoke(roleAPlayer);
-
- assertEquals(stats.getReliableRegionsMissingNoAccess(), 0);
- assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 0);
- assertEquals(stats.getReliableRegionsMissingFullAccess(), 0);
- assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
- stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess() ));
-
-
- }
-
+ public CacheRegionsReliablityStatsCheckDUnitTest(String name) {
+ super(name);
+ }
+
+ /**
+ * The tests check to see if all the reliablity stats are working
+ * fine and asserts their values to constants.
+ */
+ public void testRegionsReliablityStats() throws Exception, RegionExistsException {
+ final String rr1 = "roleA";
+ final String regionNoAccess = "regionNoAccess";
+ final String regionLimitedAccess = "regionLimitedAccess";
+ final String regionFullAccess = "regionFullAccess";
+ //final String regionNameRoleA = "roleA";
+ String requiredRoles[] = { rr1 };
+ Cache myCache = getCache();
+
+ MembershipAttributes ra = new MembershipAttributes(requiredRoles,
+ LossAction.NO_ACCESS, ResumptionAction.NONE);
+
+ AttributesFactory fac = new AttributesFactory();
+ fac.setMembershipAttributes(ra);
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+
+ RegionAttributes attr = fac.create();
+ myCache.createRegion(regionNoAccess, attr);
+
+ ra = new MembershipAttributes(requiredRoles,
+ LossAction.LIMITED_ACCESS, ResumptionAction.NONE);
+ fac = new AttributesFactory();
+ fac.setMembershipAttributes(ra);
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+ attr = fac.create();
+ myCache.createRegion(regionLimitedAccess, attr);
+
+ ra = new MembershipAttributes(requiredRoles,
+ LossAction.FULL_ACCESS, ResumptionAction.NONE);
+ fac = new AttributesFactory();
+ fac.setMembershipAttributes(ra);
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+ attr = fac.create();
+ myCache.createRegion(regionFullAccess, attr);
+
+ CachePerfStats stats = ((GemFireCacheImpl) myCache).getCachePerfStats();
+
+ assertEquals(stats.getReliableRegionsMissingNoAccess(), 1);
+ assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 1);
+ assertEquals(stats.getReliableRegionsMissingFullAccess(), 1);
+ assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
+ stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess()));
+
+ Host host = Host.getHost(0);
+ VM vm1 = host.getVM(1);
+
+ SerializableRunnable roleAPlayer = new CacheSerializableRunnable(
+ "ROLEAPLAYER") {
+ public void run2() throws CacheException {
+
+ Properties props = new Properties();
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(ROLES, rr1);
+
+ getSystem(props);
+ Cache cache = getCache();
+ AttributesFactory fac = new AttributesFactory();
+ fac.setScope(Scope.DISTRIBUTED_ACK);
+ fac.setDataPolicy(DataPolicy.REPLICATE);
+
+ RegionAttributes attr = fac.create();
+ cache.createRegion(regionNoAccess, attr);
+ cache.createRegion(regionLimitedAccess, attr);
+ cache.createRegion(regionFullAccess, attr);
+
+ }
+
+ };
+
+ vm1.invoke(roleAPlayer);
+
+ assertEquals(stats.getReliableRegionsMissingNoAccess(), 0);
+ assertEquals(stats.getReliableRegionsMissingLimitedAccess(), 0);
+ assertEquals(stats.getReliableRegionsMissingFullAccess(), 0);
+ assertEquals(stats.getReliableRegionsMissing(), (stats.getReliableRegionsMissingNoAccess() +
+ stats.getReliableRegionsMissingLimitedAccess() + stats.getReliableRegionsMissingFullAccess()));
+
+ }
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
index 80a845a..b9893d2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXml45DUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.cache30;
import com.company.app.DBLoader;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheTransactionManagerCreation;
@@ -33,6 +32,8 @@ import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the declarative caching functionality introduced in GemFire
* 5.0 (i.e. congo1). Don't be confused by the 45 in my name :-)
@@ -163,7 +164,7 @@ public class CacheXml45DUnitTest extends CacheXml41DUnitTest {
// make our system play the roles used by this test so the create regions
// will not think the a required role is missing
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, MY_ROLES);
+ config.setProperty(ROLES, MY_ROLES);
this.xmlProps = config;
}
DistributedRegion.ignoreReconnect = true;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
index eef0788..9869e2e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlTestCase.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
@@ -28,8 +27,7 @@ import com.gemstone.gemfire.util.test.TestUtil;
import java.io.*;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class CacheXmlTestCase extends CacheTestCase {
@@ -90,7 +88,7 @@ public class CacheXmlTestCase extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
if (this.xmlFile != null) {
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME,
+ props.setProperty(CACHE_XML_FILE,
this.xmlFile.toString());
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
index b1e6694..d38c83f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.cache30;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
@@ -570,7 +572,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
ClientCacheFactory cf = new ClientCacheFactory();
cf.addPoolServer(NetworkUtils.getServerHostName(vm.getHost()), port);
cf.setPoolSubscriptionEnabled(true);
- cf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ cf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache cache = getClientCache(cf);
ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
crf.setConcurrencyChecksEnabled(ccEnabled);
@@ -594,9 +596,9 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
cf.setPoolSubscriptionEnabled(true);
cf.setPoolSubscriptionRedundancy(1);
// bug #50683 - secondary durable queue retains all GC messages
- cf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, "" + vm.getPid());
- cf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + 200);
- cf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ cf.set(DURABLE_CLIENT_ID, "" + vm.getPid());
+ cf.set(DURABLE_CLIENT_TIMEOUT, "" + 200);
+ cf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache cache = getClientCache(cf);
ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
crf.setConcurrencyChecksEnabled(ccEnabled);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
index 7594cc2..3b7a065 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
@@ -40,6 +40,8 @@ import java.net.UnknownHostException;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitTest {
public DistributedAckRegionCCEDUnitTest(String name) {
@@ -54,7 +56,7 @@ public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitT
@Override
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ p.put(CONSERVE_SOCKETS, "false");
if (distributedSystemID > 0) {
p.put(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+distributedSystemID);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
index 78d4138..2cd4961 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
@@ -16,8 +16,9 @@
*/
package com.gemstone.gemfire.cache30;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
@@ -48,8 +49,8 @@ public class DistributedAckRegionDUnitTest extends MultiVMRegionTestCase {
public Properties getDistributedSystemProperties() {
Properties p = new Properties();
- p.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- p.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ p.put(STATISTIC_SAMPLING_ENABLED, "true");
+ p.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
index 816ef6f..3104892 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
@@ -237,12 +237,12 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties p = new Properties();
- p.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- p.put(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "multicast");
+ p.put(STATISTIC_SAMPLING_ENABLED, "true");
+ p.put(STATISTIC_ARCHIVE_FILE, "multicast");
p.put(MCAST_PORT, mcastport);
p.put(MCAST_TTL, mcastttl);
p.put(LOCATORS, "localhost[" + locatorPort + "]");
- p.put(DistributionConfig.LOG_LEVEL_NAME, "info");
+ p.put(LOG_LEVEL, "info");
return p;
}
@@ -274,7 +274,7 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
locatorProps.setProperty(SystemConfigurationProperties.NAME, "LocatorWithMcast");
locatorProps.setProperty(MCAST_PORT, mcastport);
locatorProps.setProperty(MCAST_TTL, mcastttl);
- locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ locatorProps.setProperty(LOG_LEVEL, "info");
//locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, null, null,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
index 15a045c..969349f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.dunit.*;
@@ -28,6 +27,8 @@ import org.junit.experimental.categories.Category;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class DistributedNoAckRegionCCEDUnitTest extends DistributedNoAckRegionDUnitTest {
static volatile boolean ListenerBlocking;
@@ -39,11 +40,11 @@ public class DistributedNoAckRegionCCEDUnitTest extends DistributedNoAckRegionDU
@Override
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ p.put(CONSERVE_SOCKETS, "false");
if (distributedSystemID > 0) {
- p.put(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+distributedSystemID);
+ p.put(DISTRIBUTED_SYSTEM_ID, ""+distributedSystemID);
}
- p.put(DistributionConfig.SOCKET_BUFFER_SIZE_NAME, ""+2000000);
+ p.put(SOCKET_BUFFER_SIZE, ""+2000000);
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
index d054c9f..f068360 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
@@ -35,6 +35,8 @@ import org.junit.Ignore;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This test is only for GLOBAL REPLICATE Regions. Tests are
* similar to {@link DistributedAckRegionCCEDUnitTest}.
@@ -57,7 +59,7 @@ public class GlobalRegionCCEDUnitTest extends GlobalRegionDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ p.put(CONSERVE_SOCKETS, "false");
if (distributedSystemID > 0) {
p.put(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""
+ distributedSystemID);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
index 3b6fbda..679a6be 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/QueueMsgDUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.CachePerfStats;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.test.dunit.*;
@@ -27,6 +26,8 @@ import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Test to make sure message queuing works.
*
@@ -79,7 +80,7 @@ public class QueueMsgDUnitTest extends ReliabilityTestCase {
vm.invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "missing");
+ config.setProperty(ROLES, "missing");
getSystem(config);
}
});
@@ -219,7 +220,7 @@ public class QueueMsgDUnitTest extends ReliabilityTestCase {
vm.invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "pubFirst");
+ config.setProperty(ROLES, "pubFirst");
getSystem(config);
}
});
@@ -257,7 +258,7 @@ public class QueueMsgDUnitTest extends ReliabilityTestCase {
vm.invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "subFirst");
+ config.setProperty(ROLES, "subFirst");
getSystem(config);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
index 9c3498d..18dab44 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
@@ -115,14 +115,14 @@ public class ReconnectDUnitTest extends CacheTestCase
public Properties getDistributedSystemProperties() {
if (dsProperties == null) {
dsProperties = new Properties();
- dsProperties.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "20000");
- dsProperties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- dsProperties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "false");
- dsProperties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ dsProperties.put(MAX_WAIT_TIME_RECONNECT, "20000");
+ dsProperties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ dsProperties.put(DISABLE_AUTO_RECONNECT, "false");
+ dsProperties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
dsProperties.put(LOCATORS, "localHost[" + locatorPort + "]");
dsProperties.put(MCAST_PORT, "0");
- dsProperties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
- dsProperties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ dsProperties.put(MEMBER_TIMEOUT, "1000");
+ dsProperties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
}
return dsProperties;
}
@@ -198,8 +198,8 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
- props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
+ props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(MAX_NUM_RECONNECT_TRIES, "2");
// props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
Cache cache = new CacheFactory(props).create();
IgnoredException.addIgnoredException("com.gemstone.gemfire.ForcedDisconnectException||Possible loss of quorum");
@@ -267,9 +267,9 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
- props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
- props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
+ props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(MAX_WAIT_TIME_RECONNECT, "1000");
+ props.put(MAX_NUM_RECONNECT_TRIES, "2");
// props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
Cache cache = new CacheFactory(props).create();
Region myRegion = cache.getRegion("root/myRegion");
@@ -287,9 +287,9 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
final Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
- props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "5000");
- props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
+ props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(MAX_WAIT_TIME_RECONNECT, "5000");
+ props.put(MAX_NUM_RECONNECT_TRIES, "2");
props.put(START_LOCATOR, "localhost[" + secondLocPort + "]");
props.put(LOCATORS, props.get(LOCATORS) + ",localhost[" + secondLocPort + "]");
// props.put("log-file", "autoReconnectVM"+VM.getCurrentVMNum()+"_"+getPID()+".log");
@@ -482,10 +482,10 @@ public class ReconnectDUnitTest extends CacheTestCase
{
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
- props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
+ props.put(MAX_WAIT_TIME_RECONNECT, "1000");
+ props.put(MAX_NUM_RECONNECT_TRIES, "2");
props.put(LOCATORS, props.get(LOCATORS) + ",localhost[" + locPort + "]");
- props.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.put(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
Locator.startLocatorAndDS(secondLocPort, null, props);
} catch (IOException e) {
@@ -506,9 +506,9 @@ public class ReconnectDUnitTest extends CacheTestCase
// DebuggerSupport.waitForJavaDebugger(getLogWriter(), " about to create region");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
- props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
- props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "2");
+ props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "MyDisconnect-cache.xml");
+ props.put(MAX_WAIT_TIME_RECONNECT, "1000");
+ props.put(MAX_NUM_RECONNECT_TRIES, "2");
ReconnectDUnitTest.savedSystem = getSystem(props);
Cache cache = getCache();
Region myRegion = cache.getRegion("root/myRegion");
@@ -626,8 +626,8 @@ public class ReconnectDUnitTest extends CacheTestCase
locatorPort = locPort;
Properties config = getDistributedSystemProperties();
- config.put(DistributionConfig.ROLES_NAME, "");
- config.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ config.put(ROLES, "");
+ config.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
// config.put("log-file", "roleLossController.log");
//creating the DS
getSystem(config);
@@ -670,11 +670,11 @@ public class ReconnectDUnitTest extends CacheTestCase
LogWriterUtils.getLogWriter().info("####### STARTING THE REAL TEST ##########");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileLoc + fileSeparator + "RoleReconnect-cache.xml");
- props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "200");
+ props.put(CACHE_XML_FILE, xmlFileLoc + fileSeparator + "RoleReconnect-cache.xml");
+ props.put(MAX_WAIT_TIME_RECONNECT, "200");
final int timeReconnect = 3;
- props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "3");
- props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.put(MAX_NUM_RECONNECT_TRIES, "3");
+ props.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
// props.put("log-file", "roleLossVM0.log");
getSystem(props);
@@ -759,8 +759,8 @@ public class ReconnectDUnitTest extends CacheTestCase
locatorPort = locPort;
Properties config = getDistributedSystemProperties();
- config.put(DistributionConfig.ROLES_NAME, "");
- config.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ config.put(ROLES, "");
+ config.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
//creating the DS
getSystem(config);
@@ -892,10 +892,10 @@ public class ReconnectDUnitTest extends CacheTestCase
LogWriterUtils.getLogWriter().info("Starting the test and creating the cache and regions etc ...");
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.CACHE_XML_FILE_NAME, "RoleRegained.xml");
- props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "3000");
- props.put(DistributionConfig.MAX_NUM_RECONNECT_TRIES, "8");
- props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.put(CACHE_XML_FILE, "RoleRegained.xml");
+ props.put(MAX_WAIT_TIME_RECONNECT, "3000");
+ props.put(MAX_NUM_RECONNECT_TRIES, "8");
+ props.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
getSystem(props);
basicGetSystem().getLogWriter().info("<ExpectedException action=add>"
@@ -1043,8 +1043,7 @@ public class ReconnectDUnitTest extends CacheTestCase
public void run() {
locatorPort = locPort;
final Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.MAX_WAIT_TIME_FOR_RECONNECT_NAME, "1000");
-// props.put("log-file", "");
+ props.put(MAX_WAIT_TIME_RECONNECT, "1000");
dsProperties = props;
ReconnectDUnitTest.savedSystem = getSystem(props);
ReconnectDUnitTest.savedCache = (GemFireCacheImpl)getCache();
@@ -1094,8 +1093,8 @@ public class ReconnectDUnitTest extends CacheTestCase
// getSystem().disconnect();
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.put(DistributionConfig.ROLES_NAME, "RoleA");
+ props.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ props.put(ROLES, "RoleA");
getSystem(props);
getCache();
@@ -1144,8 +1143,8 @@ public class ReconnectDUnitTest extends CacheTestCase
LogWriterUtils.getLogWriter().info(startupMessage);
locatorPort = locPort;
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.put(DistributionConfig.ROLES_NAME, "RoleA");
+ props.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ props.put(ROLES, "RoleA");
getSystem(props);
getCache();
[03/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
index 28d401f..43c8de6 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientSimpleDUnitTest.java
@@ -16,11 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.InterestResultPolicy;
import com.gemstone.gemfire.cache.Region;
@@ -28,14 +23,7 @@ import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.ClientServerObserver;
@@ -43,16 +31,12 @@ import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.util.Iterator;
public class DurableClientSimpleDUnitTest extends DurableClientTestCase {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
index ca2415d..4111248 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientTestCase.java
@@ -16,23 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.Ignore;
-
-import junit.framework.Assert;
-import util.TestException;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.InterestResultPolicy;
import com.gemstone.gemfire.cache.Region;
@@ -40,35 +23,26 @@ import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.cq.CqQueryImpl;
import com.gemstone.gemfire.cache.query.internal.cq.CqService;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.internal.cache.ClientServerObserver;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InternalCache;
-import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import junit.framework.Assert;
+import org.junit.Ignore;
+import util.TestException;
+
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Class <code>DurableClientTestCase</code> tests durable client
@@ -177,7 +151,7 @@ public class DurableClientTestCase extends DistributedTestCase {
*/
public void testSimpleDurableClient2() {
final Properties jp = new Properties();
- jp.setProperty("gemfire.SPECIAL_DURABLE", "true");
+ jp.setProperty(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE", "true");
try {
// Start a server
@@ -1588,8 +1562,8 @@ public class DurableClientTestCase extends DistributedTestCase {
protected Properties getClientDistributedSystemPropertiesNonDurable(String durableClientId) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
return properties;
}
@@ -1597,8 +1571,8 @@ public class DurableClientTestCase extends DistributedTestCase {
protected Properties getClientDistributedSystemProperties(
String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
return properties;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
index 167cc3a..2a56dbf 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
@@ -41,6 +41,9 @@ import java.net.UnknownHostException;
import java.util.Collections;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Cache Server related management test cases
*/
@@ -236,8 +239,8 @@ public class CacheServerManagementDUnitTest extends LocatorTestBase {
protected void startLocator(Host vmHost, final int locatorPort, final String otherLocators) {
disconnectFromDS();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- props.setProperty(DistributionConfig.LOCATORS_NAME, otherLocators);
+ props.setProperty(MCAST_PORT, String.valueOf(0));
+ props.setProperty(LOCATORS, otherLocators);
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
index 6645129..ce230e2 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommandsDUnitTest.java
@@ -16,31 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
-
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-import javax.management.ObjectName;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.QueryService;
@@ -70,11 +47,25 @@ import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.jayway.awaitility.Awaitility;
-
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import javax.management.ObjectName;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.getDUnitLocatorPort;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.getServerHostName;
+
/**
* Dunit class for testing gemfire Client commands : list client , describe client
*
@@ -734,10 +725,10 @@ public class ClientCommandsDUnitTest extends CliCommandTestBase {
if (cache == null) {
Properties props = getNonDurableClientProps();
- props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
- props.setProperty("log-level", "fine");
- props.setProperty("statistic-archive-file", "client_" + OSProcess.getId() + ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.LOG_FILE_NAME, "client_" + OSProcess.getId() + ".log");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId() + ".gfs");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
getSystem(props);
@@ -798,14 +789,14 @@ public class ClientCommandsDUnitTest extends CliCommandTestBase {
protected Properties getNonDurableClientProps() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
return p;
}
protected Properties getServerProperties() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + getDUnitLocatorPort() + "]");
+ p.setProperty(LOCATORS, "localhost[" + getDUnitLocatorPort() + "]");
return p;
}
@@ -1072,10 +1063,10 @@ public class ClientCommandsDUnitTest extends CliCommandTestBase {
if (cache == null) {
Properties props = getNonDurableClientProps();
- props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
- props.setProperty("log-level", "fine");
- props.setProperty("statistic-archive-file", "client_" + OSProcess.getId() + ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.LOG_FILE_NAME, "client_" + OSProcess.getId() + ".log");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId() + ".gfs");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
index 37b716d..e059b87 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommandsDUnitTest.java
@@ -16,29 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
-
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
@@ -56,6 +37,17 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
+import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.getDUnitLocatorPort;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.getServerHostName;
@Category(DistributedTest.class)
public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
@@ -407,8 +399,8 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
protected Properties getClientProps(String durableClientId, String durableClientTimeout) {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
p.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
p.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
return p;
@@ -416,7 +408,7 @@ public class DurableClientCommandsDUnitTest extends CliCommandTestBase {
protected Properties getServerProperties() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+getDUnitLocatorPort()+"]");
+ p.setProperty(LOCATORS, "localhost[" + getDUnitLocatorPort() + "]");
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
index 9d7ffb9..8f8a2a7 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/ClientAuthzObjectModDUnitTest.java
@@ -16,21 +16,11 @@
*/
package com.gemstone.gemfire.security;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.security.SecurityTestUtils.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.Instantiator;
import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.security.FilterPostAuthorization;
import com.gemstone.gemfire.internal.security.FilterPreAuthorization;
import com.gemstone.gemfire.internal.security.ObjectWithAuthz;
@@ -41,6 +31,16 @@ import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Random;
+
+import static com.gemstone.gemfire.security.SecurityTestUtils.closeCache;
+import static com.gemstone.gemfire.security.SecurityTestUtils.getLocatorPort;
/**
* Tests for authorization callback that modify objects and callbacks from
@@ -212,13 +212,13 @@ public class ClientAuthzObjectModDUnitTest extends ClientAuthorizationTestCase {
private Properties buildProperties(final String authenticator, final Properties extraProps, final String preAccessor, final String postAccessor) {
Properties authProps = new Properties();
if (authenticator != null) {
- authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR_NAME, authenticator);
+ authProps.setProperty(SystemConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR, authenticator);
}
if (preAccessor != null) {
- authProps.setProperty(SECURITY_CLIENT_ACCESSOR_NAME, preAccessor);
+ authProps.setProperty(SystemConfigurationProperties.SECURITY_CLIENT_ACCESSOR, preAccessor);
}
if (postAccessor != null) {
- authProps.setProperty(SECURITY_CLIENT_ACCESSOR_PP_NAME, postAccessor);
+ authProps.setProperty(SystemConfigurationProperties.SECURITY_CLIENT_ACCESSOR_PP, postAccessor);
}
if (extraProps != null) {
authProps.putAll(extraProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiUserAPIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiUserAPIDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiUserAPIDUnitTest.java
index 9bbceff..28b3707 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiUserAPIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/security/MultiUserAPIDUnitTest.java
@@ -16,19 +16,6 @@
*/
package com.gemstone.gemfire.security;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.security.SecurityTestUtils.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.IOException;
-import java.util.Properties;
-import javax.net.ssl.SSLException;
-import javax.net.ssl.SSLHandshakeException;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.execute.FunctionService;
@@ -36,12 +23,24 @@ import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.CqException;
import com.gemstone.gemfire.cache.query.CqQuery;
import com.gemstone.gemfire.cache.query.Query;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
import com.gemstone.gemfire.security.generator.CredentialGenerator;
import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import javax.net.ssl.SSLException;
+import javax.net.ssl.SSLHandshakeException;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.security.SecurityTestUtils.NO_EXCEPTION;
+import static com.gemstone.gemfire.test.dunit.Assert.fail;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
@Category({ DistributedTest.class, SecurityTest.class })
public class MultiUserAPIDUnitTest extends ClientAuthorizationTestCase {
@@ -298,7 +297,7 @@ public class MultiUserAPIDUnitTest extends ClientAuthorizationTestCase {
}
if (authenticator != null) {
- authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR_NAME, authenticator);
+ authProps.setProperty(SystemConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR, authenticator);
}
return SecurityTestUtils.createCacheServer(authProps, javaProps, dsPort, locatorString, 0, NO_EXCEPTION);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
index ee4e5bb..88631b8 100644
--- a/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
+++ b/geode-lucene/src/main/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImpl.java
@@ -19,24 +19,19 @@
package com.gemstone.gemfire.cache.lucene.internal.repository;
-import java.io.IOException;
-import java.util.Iterator;
-
-import org.apache.logging.log4j.Logger;
-import org.apache.lucene.document.Document;
-import org.apache.lucene.index.IndexWriter;
-import org.apache.lucene.index.Term;
-import org.apache.lucene.search.IndexSearcher;
-import org.apache.lucene.search.Query;
-import org.apache.lucene.search.ScoreDoc;
-import org.apache.lucene.search.SearcherManager;
-import org.apache.lucene.search.TopDocs;
-
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.lucene.internal.LuceneIndexStats;
import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.LuceneSerializer;
import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.SerializerUtil;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+import org.apache.lucene.document.Document;
+import org.apache.lucene.index.IndexWriter;
+import org.apache.lucene.index.Term;
+import org.apache.lucene.search.*;
+
+import java.io.IOException;
/**
* A repository that writes to a single lucene index writer
@@ -44,7 +39,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
public class IndexRepositoryImpl implements IndexRepository {
private static final boolean APPLY_ALL_DELETES = System
- .getProperty("gemfire.IndexRepository.APPLY_ALL_DELETES", "true")
+ .getProperty(DistributionConfig.GEMFIRE_PREFIX + "IndexRepository.APPLY_ALL_DELETES", "true")
.equalsIgnoreCase("true");
private final IndexWriter writer;
@@ -52,7 +47,7 @@ public class IndexRepositoryImpl implements IndexRepository {
private final SearcherManager searcherManager;
private Region<?,?> region;
private LuceneIndexStats stats;
-
+
private static final Logger logger = LogService.getLogger();
public IndexRepositoryImpl(Region<?,?> region, IndexWriter writer, LuceneSerializer serializer, LuceneIndexStats stats) throws IOException {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIndexCreationOffHeapIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIndexCreationOffHeapIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIndexCreationOffHeapIntegrationTest.java
index 8f10c26..9867325 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIndexCreationOffHeapIntegrationTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIndexCreationOffHeapIntegrationTest.java
@@ -18,23 +18,22 @@
*/
package com.gemstone.gemfire.cache.lucene;
-import static com.gemstone.gemfire.cache.lucene.test.LuceneTestUtilities.*;
-import static org.junit.Assert.assertEquals;
-
-import java.util.function.Consumer;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.lucene.test.LuceneTestUtilities;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import org.junit.After;
-import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.function.Consumer;
+
+import static com.gemstone.gemfire.cache.lucene.test.LuceneTestUtilities.REGION_NAME;
+import static com.gemstone.gemfire.cache.lucene.test.LuceneTestUtilities.createIndex;
+import static org.junit.Assert.assertEquals;
+
/**
* Tests of lucene index creation that use off heap memory
*/
@@ -50,7 +49,7 @@ public class LuceneIndexCreationOffHeapIntegrationTest extends LuceneIntegration
@Override
protected CacheFactory getCacheFactory() {
CacheFactory factory = super.getCacheFactory();
- factory.set("off-heap-memory-size", "100m");
+ factory.set(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, "100m");
return factory;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIntegrationTest.java
index 0d71cbb..cb51ff5 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIntegrationTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/LuceneIntegrationTest.java
@@ -19,24 +19,16 @@
package com.gemstone.gemfire.cache.lucene;
-import static com.gemstone.gemfire.cache.lucene.test.LuceneTestUtilities.REGION_NAME;
-
-import java.io.File;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
-import com.gemstone.gemfire.test.junit.rules.DiskDirRule;
-
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import org.junit.After;
import org.junit.Before;
-import org.junit.Rule;
-import org.junit.rules.TestName;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class LuceneIntegrationTest {
@@ -60,9 +52,9 @@ public class LuceneIntegrationTest {
protected CacheFactory getCacheFactory() {
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
- cf.set("log-level", System.getProperty("logLevel", "info"));
- cf.set("locators", "");
+ cf.set(MCAST_PORT, "0");
+ cf.set(SystemConfigurationProperties.LOCATORS, "");
+ cf.set(SystemConfigurationProperties.LOG_LEVEL, System.getProperty("logLevel", "info"));
return cf;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java
index 70b39e7..1362a19 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneIndexRecoveryHAIntegrationTest.java
@@ -18,24 +18,7 @@
*/
package com.gemstone.gemfire.cache.lucene.internal;
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.lucene.LuceneIndex;
import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
import com.gemstone.gemfire.cache.lucene.internal.filesystem.FileSystemStats;
@@ -46,12 +29,22 @@ import com.gemstone.gemfire.internal.cache.BucketNotFoundException;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.standard.StandardAnalyzer;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class LuceneIndexRecoveryHAIntegrationTest {
-
- private static final String INDEX = "index";
- private static final String REGION = "indexedRegion";
String[] indexedFields = new String[] { "txt" };
HeterogeneousLuceneSerializer mapper = new HeterogeneousLuceneSerializer(indexedFields);
Analyzer analyzer = new StandardAnalyzer();
@@ -67,7 +60,7 @@ public class LuceneIndexRecoveryHAIntegrationTest {
analyzer = new StandardAnalyzer();
LuceneServiceImpl.registerDataSerializables();
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
indexStats = new LuceneIndexStats(cache.getDistributedSystem(), "INDEX-REGION");
fileSystemStats = new FileSystemStats(cache.getDistributedSystem(), "INDEX-REGION");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java
index a078910..67853f9 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/LuceneServiceImplIntegrationTest.java
@@ -19,8 +19,6 @@
package com.gemstone.gemfire.cache.lucene.internal;
-import static org.junit.Assert.*;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.client.ClientCache;
@@ -31,13 +29,16 @@ import com.gemstone.gemfire.cache.lucene.LuceneService;
import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
import com.gemstone.gemfire.cache.lucene.internal.distributed.LuceneFunction;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
@Category(IntegrationTest.class)
public class LuceneServiceImplIntegrationTest {
@@ -89,7 +90,7 @@ public class LuceneServiceImplIntegrationTest {
private ClientCache getClientCache() {
if (null == clientCache) {
- clientCache = new ClientCacheFactory().set("mcast-port", "0").create();
+ clientCache = new ClientCacheFactory().set(MCAST_PORT, "0").create();
}
else {
return clientCache;
@@ -99,7 +100,7 @@ public class LuceneServiceImplIntegrationTest {
private Cache getCache() {
if (null == cache) {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
}
return cache;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
index 90c6032..ad5b3a3 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
@@ -19,17 +19,20 @@
package com.gemstone.gemfire.cache.lucene.internal.repository;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
+import com.gemstone.gemfire.cache.lucene.*;
+import com.gemstone.gemfire.cache.lucene.internal.LuceneServiceImpl;
+import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
+import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollector;
+import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
+import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
+import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
+import com.gemstone.gemfire.cache.query.QueryException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.Field.Store;
@@ -46,31 +49,14 @@ import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
-import com.gemstone.gemfire.cache.lucene.LuceneIndex;
-import com.gemstone.gemfire.cache.lucene.LuceneQuery;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryProvider;
-import com.gemstone.gemfire.cache.lucene.LuceneQueryResults;
-import com.gemstone.gemfire.cache.lucene.LuceneService;
-import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
-import com.gemstone.gemfire.cache.lucene.internal.LuceneIndexStats;
-import com.gemstone.gemfire.cache.lucene.internal.LuceneServiceImpl;
-import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
-import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollector;
-import com.gemstone.gemfire.cache.lucene.internal.filesystem.ChunkKey;
-import com.gemstone.gemfire.cache.lucene.internal.filesystem.File;
-import com.gemstone.gemfire.cache.lucene.internal.filesystem.FileSystemStats;
-import com.gemstone.gemfire.cache.lucene.internal.repository.serializer.HeterogeneousLuceneSerializer;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Microbenchmark of the IndexRepository to compare an
@@ -110,8 +96,8 @@ public class IndexRepositoryImplPerformanceTest {
@Override
public void init() throws Exception {
- cache = new CacheFactory().set("mcast-port", "0")
- .set("log-level", "error")
+ cache = new CacheFactory().set(MCAST_PORT, "0")
+ .set(LOG_LEVEL, "error")
.create();
Region<String, File> fileRegion = cache.<String, File>createRegionFactory(RegionShortcut.REPLICATE).create("files");
Region<ChunkKey, byte[]> chunkRegion = cache.<ChunkKey, byte[]>createRegionFactory(RegionShortcut.REPLICATE).create("chunks");
@@ -173,8 +159,8 @@ public class IndexRepositoryImplPerformanceTest {
@Override
public void init() throws Exception {
- cache = new CacheFactory().set("mcast-port", "0")
- .set("log-level", "warning")
+ cache = new CacheFactory().set(MCAST_PORT, "0")
+ .set(LOG_LEVEL, "warning")
.create();
service = LuceneServiceProvider.get(cache);
service.createIndex("index", "/region", "text");
@@ -224,8 +210,8 @@ public class IndexRepositoryImplPerformanceTest {
@Override
public void init() throws Exception {
- cache = new CacheFactory().set("mcast-port", "0")
- .set("log-level", "warning")
+ cache = new CacheFactory().set(MCAST_PORT, "0")
+ .set(LOG_LEVEL, "warning")
.create();
final FileSystemStats stats = new FileSystemStats(cache.getDistributedSystem(), "stats");
RegionDirectory dir = new RegionDirectory(new ConcurrentHashMap<String, File>(), new ConcurrentHashMap<ChunkKey, byte[]>(), stats);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
index 0c9d500..28a364d 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlGeneratorIntegrationJUnitTest.java
@@ -19,17 +19,6 @@
package com.gemstone.gemfire.cache.lucene.internal.xml;
-import static org.junit.Assert.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.PrintWriter;
-import java.nio.charset.Charset;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
@@ -38,6 +27,17 @@ import com.gemstone.gemfire.cache.lucene.LuceneService;
import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
+import java.nio.charset.Charset;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class LuceneIndexXmlGeneratorIntegrationJUnitTest {
@@ -54,7 +54,7 @@ public class LuceneIndexXmlGeneratorIntegrationJUnitTest {
*/
@Test
public void generateWithFields() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
LuceneService service = LuceneServiceProvider.get(cache);
service.createIndex("index", "region", "a", "b", "c");
cache.createRegionFactory(RegionShortcut.PARTITION).create("region");
@@ -66,7 +66,7 @@ public class LuceneIndexXmlGeneratorIntegrationJUnitTest {
pw.flush();
cache.close();
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
byte[] bytes = baos.toByteArray();
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
index f2972d4..edeee3a 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/xml/LuceneIndexXmlParserIntegrationJUnitTest.java
@@ -19,29 +19,12 @@
package com.gemstone.gemfire.cache.lucene.internal.xml;
-import static org.junit.Assert.*;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.lucene.analysis.Analyzer;
-import org.apache.lucene.analysis.core.KeywordAnalyzer;
-import org.apache.lucene.analysis.core.SimpleAnalyzer;
-import org.apache.lucene.analysis.standard.ClassicAnalyzer;
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.lucene.LuceneIndex;
import com.gemstone.gemfire.cache.lucene.LuceneService;
import com.gemstone.gemfire.cache.lucene.LuceneServiceProvider;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.extension.Extension;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
@@ -49,6 +32,25 @@ import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlParser;
import com.gemstone.gemfire.internal.cache.xmlcache.RegionCreation;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
+import org.apache.lucene.analysis.Analyzer;
+import org.apache.lucene.analysis.core.KeywordAnalyzer;
+import org.apache.lucene.analysis.core.SimpleAnalyzer;
+import org.apache.lucene.analysis.standard.ClassicAnalyzer;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
public class LuceneIndexXmlParserIntegrationJUnitTest {
@@ -126,8 +128,8 @@ public class LuceneIndexXmlParserIntegrationJUnitTest {
@Test
public void createIndex() throws FileNotFoundException {
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
- cf.set("cache-xml-file", getXmlFileForTest());
+ cf.set(MCAST_PORT, "0");
+ cf.set(DistributionConfig.CACHE_XML_FILE_NAME, getXmlFileForTest());
Cache cache = cf.create();
LuceneService service = LuceneServiceProvider.get(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java
index 12efa1a..dbac007 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/testbed/GemFireDistributedSystem.java
@@ -24,6 +24,8 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+
/**
*
@@ -39,7 +41,7 @@ import java.util.Properties;
public class GemFireDistributedSystem {
private static final String SERVERS = "servers";
- private static final String LOCATORS = "locators";
+ private static final String LOCATORS_NAME = LOCATORS;
private static final String PEERS = "peers";
private static final String HOSTS = "hosts";
private static final String REGIONS = "regions";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
index 3759895..f4f3e40 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
@@ -18,39 +18,33 @@
*/
package com.vmware.gemfire.tools.pulse.tests;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnectorServer;
-import javax.management.remote.JMXConnectorServerFactory;
-import javax.management.remote.JMXServiceURL;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.security.shiro.CustomAuthRealm;
+import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
import com.gemstone.gemfire.management.internal.security.AccessControlMBean;
import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
import com.gemstone.gemfire.management.internal.security.MBeanServerWrapper;
import com.gemstone.gemfire.management.internal.security.ResourceConstants;
-import com.gemstone.gemfire.internal.security.shiro.CustomAuthRealm;
-import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
import com.vmware.gemfire.tools.pulse.internal.data.PulseConstants;
-
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.mgt.DefaultSecurityManager;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.realm.Realm;
+import javax.management.*;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXConnectorServerFactory;
+import javax.management.remote.JMXServiceURL;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
public class Server {
private static final String DEFAULT_HOST = "127.0.0.1"; //"localhost"
private static final int DEFAULT_PORT = 9999;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerIntegrationJUnitTest.java b/geode-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerIntegrationJUnitTest.java
index fe9da93..5174806 100755
--- a/geode-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerIntegrationJUnitTest.java
+++ b/geode-rebalancer/src/test/java/com/gemstone/gemfire/cache/util/AutoBalancerIntegrationJUnitTest.java
@@ -16,24 +16,6 @@
*/
package com.gemstone.gemfire.cache.util;
-import static com.jayway.awaitility.Awaitility.await;
-import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.hamcrest.Matchers.equalTo;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.GemFireConfigException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.util.AutoBalancer.CacheOperationFacade;
@@ -44,6 +26,22 @@ import com.gemstone.gemfire.distributed.internal.locks.DLockService;
import com.gemstone.gemfire.internal.HostStatSampler;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayInputStream;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.jayway.awaitility.Awaitility.await;
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.hamcrest.Matchers.equalTo;
+import static org.junit.Assert.*;
/**
* IntegrationTests for AutoBalancer that include usage of Cache, StatSampler
@@ -174,7 +172,7 @@ public class AutoBalancerIntegrationJUnitTest {
}
private GemFireCacheImpl createBasicCache() {
- return (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0").create();
+ return (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0").create();
}
private Callable<Boolean> isAlive(final HostStatSampler statSampler) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java b/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
index 8f5a045..fd7dd50 100644
--- a/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
+++ b/geode-spark-connector/geode-spark-connector/src/it/java/ittest/io/pivotal/geode/spark/connector/JavaApiIntegrationTest.java
@@ -58,7 +58,7 @@ public class JavaApiIntegrationTest extends JUnitSuite {
public static void setUpBeforeClass() throws Exception {
// start geode cluster, and spark context
Properties settings = new Properties();
- settings.setProperty("cache-xml-file", "src/it/resources/test-retrieve-regions.xml");
+ settings.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "src/it/resources/test-retrieve-regions.xml");
settings.setProperty("num-of-servers", Integer.toString(numServers));
int locatorPort = GeodeCluster$.MODULE$.start(settings);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java b/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
index e25b6c9..bbaed1d 100644
--- a/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorDiscovery.java
@@ -16,12 +16,7 @@
*/
package com.gemstone.gemfire.cache.client.internal.locator.wan;
-import java.io.IOException;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.WanLocatorDiscoverer;
import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
@@ -29,7 +24,10 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.tcp.ConnectionException;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorMembershipListener;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.util.concurrent.ConcurrentHashMap;
/**
* This class represent a runnable task which exchange the locator information
@@ -79,13 +77,13 @@ public class LocatorDiscovery{
* practice.
*/
private static final int FAILURE_MAP_MAXSIZE = Integer.getInteger(
- "gemfire.GatewaySender.FAILURE_MAP_MAXSIZE", 1000000);
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.FAILURE_MAP_MAXSIZE", 1000000);
/**
* The maximum interval for logging failures of the same event in millis.
*/
private static final int FAILURE_LOG_MAX_INTERVAL = Integer.getInteger(
- "gemfire.LocatorDiscovery.FAILURE_LOG_MAX_INTERVAL", 300000);
+ DistributionConfig.GEMFIRE_PREFIX + "LocatorDiscovery.FAILURE_LOG_MAX_INTERVAL", 300000);
public final boolean skipFailureLogging(DistributionLocatorId locatorId) {
boolean skipLogging = false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListenerImpl.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListenerImpl.java b/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListenerImpl.java
index 4a49764..5f4943d 100644
--- a/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListenerImpl.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListenerImpl.java
@@ -16,40 +16,21 @@
*/
package com.gemstone.gemfire.cache.client.internal.locator.wan;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorMembershipListener;
-import com.gemstone.gemfire.distributed.internal.WanLocatorDiscoverer;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorJoinMessage;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorJoinRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorJoinResponse;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorPingRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorPingResponse;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorRequest;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorResponse;
+import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
import com.gemstone.gemfire.internal.CopyOnWriteHashSet;
-import com.gemstone.gemfire.internal.DSFIDFactory;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
-import com.gemstone.gemfire.internal.cache.tier.Command;
-import com.gemstone.gemfire.internal.cache.tier.MessageType;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CommandInitializer;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
/**
* An implementation of
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/WanLocatorDiscovererImpl.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/WanLocatorDiscovererImpl.java b/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/WanLocatorDiscovererImpl.java
index f031143..cde1e15 100644
--- a/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/WanLocatorDiscovererImpl.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/WanLocatorDiscovererImpl.java
@@ -16,25 +16,18 @@
*/
package com.gemstone.gemfire.cache.client.internal.locator.wan;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ThreadFactory;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorDiscovery;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorMembershipListener;
-import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorJoinRequest;
import com.gemstone.gemfire.distributed.internal.WanLocatorDiscoverer;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
+import org.apache.logging.log4j.Logger;
+
+import java.util.StringTokenizer;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ThreadFactory;
public class WanLocatorDiscovererImpl implements WanLocatorDiscoverer{
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractRemoteGatewaySender.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractRemoteGatewaySender.java b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractRemoteGatewaySender.java
index 7e35df6..d45d5ef 100644
--- a/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractRemoteGatewaySender.java
+++ b/geode-wan/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractRemoteGatewaySender.java
@@ -16,29 +16,26 @@
*/
package com.gemstone.gemfire.internal.cache.wan;
-import java.io.IOException;
-import java.net.ConnectException;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorRequest;
import com.gemstone.gemfire.cache.client.internal.locator.wan.RemoteLocatorResponse;
import com.gemstone.gemfire.cache.wan.GatewayReceiver;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.WanLocatorDiscoverer;
+import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.util.Iterator;
+import java.util.StringTokenizer;
public abstract class AbstractRemoteGatewaySender extends AbstractGatewaySender {
private static final Logger logger = LogService.getLogger();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
index 2040e5f..22f5df4 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
@@ -16,34 +16,11 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.client.internal.LocatorDiscoveryCallbackAdapter;
import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
-import com.gemstone.gemfire.cache.wan.GatewayReceiver;
-import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
-import com.gemstone.gemfire.cache.wan.GatewaySender;
-import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
+import com.gemstone.gemfire.cache.wan.*;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
@@ -53,16 +30,14 @@ import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.cache.wan.InternalGatewaySenderFactory;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* @since GemFire 7.0.1
@@ -652,8 +627,8 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
private static void createCache(Integer locPort) {
UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort + "]");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
props.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -792,10 +767,10 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
props.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -859,8 +834,8 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
public static int createReceiver(int locPort) {
UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = test.getSystem(props);
@@ -952,12 +927,12 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
UpdateVersionDUnitTest test = new UpdateVersionDUnitTest(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
props.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
return port;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
index 0b1cd11..9710549 100755
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/CacheClientNotifierDUnitTest.java
@@ -16,48 +16,28 @@
*/
package com.gemstone.gemfire.internal.cache.wan;
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.UserSpecifiedRegionAttributes;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.ha.HAContainerRegion;
-import com.gemstone.gemfire.internal.cache.ha.HAContainerWrapper;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class CacheClientNotifierDUnitTest extends WANTestBase {
private static final int NUM_KEYS = 10;
@@ -244,11 +224,11 @@ public class CacheClientNotifierDUnitTest extends WANTestBase {
String regionName, String clientId, boolean isDurable) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
if (isDurable) {
- props.setProperty("durable-client-id", clientId);
- props.setProperty("durable-client-timeout", "" + 200);
+ props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, clientId);
+ props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + 200);
}
InternalDistributedSystem ds = test.getSystem(props);
[23/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexOnEntrySetJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexOnEntrySetJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexOnEntrySetJUnitTest.java
index e375b90..929b47f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexOnEntrySetJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexOnEntrySetJUnitTest.java
@@ -16,31 +16,22 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import java.text.ParseException;
-import java.util.Collection;
-import java.util.Iterator;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
+import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
+import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
-import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
-import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.Iterator;
@Category(IntegrationTest.class)
public class IndexOnEntrySetJUnitTest {
@@ -51,8 +42,8 @@ public class IndexOnEntrySetJUnitTest {
private String newValue = "NEW VALUE";
@Before
- public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ public void setUp() throws Exception {
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
index 4b6071c..af66b86 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/MultiRegionIndexUsageJUnitTest.java
@@ -21,42 +21,24 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.data.City;
-import com.gemstone.gemfire.cache.query.data.Country;
-import com.gemstone.gemfire.cache.query.data.District;
-import com.gemstone.gemfire.cache.query.data.State;
-import com.gemstone.gemfire.cache.query.data.Village;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.data.*;
import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
import com.gemstone.gemfire.cache.query.types.StructType;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
//TODO:TEST clean this up and add assertions
/**
@@ -131,11 +113,8 @@ public class MultiRegionIndexUsageJUnitTest {
@Before
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
- // if(!cache.isClosed()){
- // CacheUtils.log("111111111111 CACHE IS ALREADY OPEN 11111111111111");
- // }
cache = CacheFactory.create(ds);
/* create region containing Country objects */
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NegativeNumberQueriesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NegativeNumberQueriesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NegativeNumberQueriesJUnitTest.java
index 7111997..c202cc8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NegativeNumberQueriesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NegativeNumberQueriesJUnitTest.java
@@ -22,27 +22,19 @@
package com.gemstone.gemfire.cache.query.functional;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.data.Numbers;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.data.Numbers;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
// TODO:TEST clean this up and add assertions
/**
@@ -61,7 +53,7 @@ public class NegativeNumberQueriesJUnitTest {
@Before
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
/* create region with to contain Portfolio objects */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NumericQueryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NumericQueryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NumericQueryJUnitTest.java
index 3487ab9..017816d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NumericQueryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/NumericQueryJUnitTest.java
@@ -16,6 +16,21 @@
*/
package com.gemstone.gemfire.cache.query.functional;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.CacheUtils;
+import com.gemstone.gemfire.cache.query.Index;
+import com.gemstone.gemfire.cache.query.QueryService;
+import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.query.data.Numbers;
+import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
+import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import java.math.BigDecimal;
import java.math.BigInteger;
import java.text.ParseException;
@@ -24,30 +39,8 @@ import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import static org.junit.Assert.*;
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.data.Numbers;
-import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
-import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
/**
*
*
@@ -69,7 +62,7 @@ public class NumericQueryJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryUndefinedJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryUndefinedJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryUndefinedJUnitTest.java
index f77c51a..aa3a134 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryUndefinedJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/QueryUndefinedJUnitTest.java
@@ -19,17 +19,6 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.Serializable;
-import java.text.ParseException;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
@@ -37,8 +26,19 @@ import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.pdx.JSONFormatter;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.Serializable;
+import java.text.ParseException;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class QueryUndefinedJUnitTest implements Serializable {
@@ -47,7 +47,7 @@ public class QueryUndefinedJUnitTest implements Serializable {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/SelectToDateJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/SelectToDateJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/SelectToDateJUnitTest.java
index 40e1264..07293b9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/SelectToDateJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/SelectToDateJUnitTest.java
@@ -19,32 +19,25 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Iterator;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.Portfolio;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Iterator;
+
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class SelectToDateJUnitTest {
@@ -59,7 +52,7 @@ public class SelectToDateJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsyncIndexUpdaterThreadShutdownJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsyncIndexUpdaterThreadShutdownJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsyncIndexUpdaterThreadShutdownJUnitTest.java
index 8c3d09b..2b0df2e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsyncIndexUpdaterThreadShutdownJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsyncIndexUpdaterThreadShutdownJUnitTest.java
@@ -19,23 +19,17 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.index.IndexManager.IndexUpdaterThread;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Test create a region (Replicated OR Partitioned) and sets index maintenance
@@ -53,7 +47,7 @@ public class AsyncIndexUpdaterThreadShutdownJUnitTest {
@Test
public void testAsyncIndexUpdaterThreadShutdownForRR() {
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
RegionFactory rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
rf.setIndexMaintenanceSynchronous(false);
@@ -88,7 +82,7 @@ public class AsyncIndexUpdaterThreadShutdownJUnitTest {
@Test
public void testAsyncIndexUpdaterThreadShutdownForPR() {
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
RegionFactory rf = cache.createRegionFactory(RegionShortcut.PARTITION);
rf.setIndexMaintenanceSynchronous(false);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
index cb32555..49270bc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/AsynchIndexMaintenanceJUnitTest.java
@@ -19,31 +19,28 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.util.concurrent.CyclicBarrier;
-
import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.query.CacheUtils;
+import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.IndexType;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.data.Portfolio;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.ThreadUtils;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import java.util.HashSet;
-import java.util.Set;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.CyclicBarrier;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertFalse;
/**
*
@@ -95,8 +92,8 @@ public class AsynchIndexMaintenanceJUnitTest {
@Test
public void testIndexMaintenanceBasedOnThreshhold() throws Exception {
- System.getProperties().put("gemfire.AsynchIndexMaintenanceThreshold", "50");
- System.getProperties().put("gemfire.AsynchIndexMaintenanceInterval", "0");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceThreshold", "50");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceInterval", "0");
final Index ri = qs.createIndex("statusIndex",
IndexType.FUNCTIONAL, "p.getID", "/portfolio p");
for( int i=0; i< 49; ++i) {
@@ -118,8 +115,8 @@ public class AsynchIndexMaintenanceJUnitTest {
@Test
public void testIndexMaintenanceBasedOnTimeInterval() throws Exception {
- System.getProperties().put("gemfire.AsynchIndexMaintenanceThreshold", "-1");
- System.getProperties().put("gemfire.AsynchIndexMaintenanceInterval", "10000");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceThreshold", "-1");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceInterval", "10000");
final Index ri = (Index) qs.createIndex("statusIndex",
IndexType.FUNCTIONAL, "p.getID", "/portfolio p");
@@ -166,8 +163,8 @@ public class AsynchIndexMaintenanceJUnitTest {
@Test
public void testIndexMaintenanceBasedOnThresholdAsZero() throws Exception {
- System.getProperties().put("gemfire.AsynchIndexMaintenanceThreshold", "0");
- System.getProperties().put("gemfire.AsynchIndexMaintenanceInterval", "60000");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceThreshold", "0");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceInterval", "60000");
final Index ri = (Index) qs.createIndex("statusIndex",
IndexType.FUNCTIONAL, "p.getID", "/portfolio p");
for( int i=0; i<3 ; ++i) {
@@ -188,8 +185,8 @@ public class AsynchIndexMaintenanceJUnitTest {
@Test
public void testNoIndexMaintenanceBasedOnNegativeThresholdAndZeroSleepTime() throws Exception {
- System.getProperties().put("gemfire.AsynchIndexMaintenanceThreshold", "-1");
- System.getProperties().put("gemfire.AsynchIndexMaintenanceInterval", "0");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceThreshold", "-1");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceInterval", "0");
Index ri = (Index) qs.createIndex("statusIndex",
IndexType.FUNCTIONAL, "p.getID", "/portfolio p");
@@ -206,8 +203,8 @@ public class AsynchIndexMaintenanceJUnitTest {
@Test
public void testConcurrentIndexMaintenanceForNoDeadlocks() throws Exception {
- System.getProperties().put("gemfire.AsynchIndexMaintenanceThreshold", "700");
- System.getProperties().put("gemfire.AsynchIndexMaintenanceInterval", "500");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceThreshold", "700");
+ System.getProperties().put(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceInterval", "500");
qs.createIndex("statusIndex",
IndexType.FUNCTIONAL, "p.getID", "/portfolio p");
final int TOTAL_THREADS = 25;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexIndexMapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexIndexMapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexIndexMapJUnitTest.java
index f4e68c5..3ad2e82 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexIndexMapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexIndexMapJUnitTest.java
@@ -16,30 +16,22 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.text.ParseException;
-import java.util.HashMap;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.data.Portfolio;
+import com.gemstone.gemfire.cache.query.data.Position;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.cache.query.data.Position;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.text.ParseException;
+import java.util.HashMap;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class CompactRangeIndexIndexMapJUnitTest {
@@ -47,13 +39,13 @@ public class CompactRangeIndexIndexMapJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
@After
public void tearDown() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "false");
CacheUtils.closeCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
index 4550e82..3a03cea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CompactRangeIndexJUnitTest.java
@@ -16,26 +16,6 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import util.TestException;
-
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.QueryService;
@@ -46,6 +26,18 @@ import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery.TestHook;
import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import util.TestException;
+
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -61,7 +53,7 @@ public class CompactRangeIndexJUnitTest {
System.setProperty("index_elemarray_threshold", "3");
utils = new QueryTestUtils();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
utils.initializeQueryMap();
utils.createCache(props);
utils.createReplicateRegion("exampleRegion");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
index 6a49628..de87304 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest.java
@@ -19,15 +19,7 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.util.Collection;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.IndexStatistics;
import com.gemstone.gemfire.cache.query.data.Portfolio;
@@ -38,23 +30,14 @@ import com.gemstone.gemfire.cache.query.internal.index.MemoryIndexStore.MemoryIn
import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.Token;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Collection;
/**
* This test is similar to {@link ConcurrentIndexUpdateWithoutWLDUnitTest} except
@@ -93,7 +76,7 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends Dis
try {
Cache newCache = GemFireCacheImpl.getInstance();
if(null == newCache) {
- System.setProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
newCache = CacheFactory.create(getSystem());
}
PRQueryDUnitHelper.setCache(newCache);
@@ -104,7 +87,7 @@ public class ConcurrentIndexUpdateWithInplaceObjectModFalseDUnitTest extends Dis
} catch (Exception ex) {
Assert.fail("Checked exception while initializing cache??", ex);
} finally {
- System.clearProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
index 7aa3307..cd18314 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ConcurrentIndexUpdateWithoutWLDUnitTest.java
@@ -19,14 +19,7 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.util.ArrayList;
-import java.util.Collection;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.IndexStatistics;
import com.gemstone.gemfire.cache.query.data.Portfolio;
@@ -37,22 +30,13 @@ import com.gemstone.gemfire.cache.query.internal.index.MemoryIndexStore.MemoryIn
import com.gemstone.gemfire.cache.query.partitioned.PRQueryDUnitHelper;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.Token;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.Collection;
/**
*
@@ -99,7 +83,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
try {
Cache newCache = GemFireCacheImpl.getInstance();
if(null == newCache) {
- System.setProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
newCache = CacheFactory.create(getSystem());
}
PRQueryDUnitHelper.setCache(newCache);
@@ -110,7 +94,7 @@ public class ConcurrentIndexUpdateWithoutWLDUnitTest extends
} catch (Exception ex) {
Assert.fail("Checked exception while initializing cache??", ex);
} finally {
- System.clearProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
index 18c73dc..2b10bdc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexDUnitTest.java
@@ -16,42 +16,26 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.QueryTestUtils;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.data.Position;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class CopyOnReadIndexDUnitTest extends CacheTestCase {
@@ -621,14 +605,14 @@ public class CopyOnReadIndexDUnitTest extends CacheTestCase {
protected Properties getClientProps() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
return p;
}
protected Properties getServerProperties() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ p.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexJUnitTest.java
index 31f4dc1..df11c6d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/CopyOnReadIndexJUnitTest.java
@@ -16,24 +16,20 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import static org.junit.Assert.assertEquals;
-
-import java.util.HashMap;
-
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.data.Portfolio;
+import com.gemstone.gemfire.cache.query.data.Position;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.QueryTestUtils;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.cache.query.data.Position;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.HashMap;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
*
@@ -73,7 +69,7 @@ public class CopyOnReadIndexJUnitTest {
public void setUp() throws java.lang.Exception {
utils = new QueryTestUtils();
java.util.Properties p = new java.util.Properties();
- p.put("mcast-port", "0");
+ p.put(MCAST_PORT, "0");
utils.createCache(p);
utils.getCache().setCopyOnRead(true);
Portfolio.resetInstanceCount();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
index e22129c..55358f6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/DeclarativeIndexCreationJUnitTest.java
@@ -20,24 +20,25 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.util.Collection;
-import java.util.Properties;
-
-import junit.framework.Assert;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.util.test.TestUtil;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import junit.framework.Assert;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Collection;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -53,8 +54,8 @@ public class DeclarativeIndexCreationJUnitTest {
@Before
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("cache-xml-file", TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
- props.setProperty("mcast-port", "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexHintJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexHintJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexHintJUnitTest.java
index e64ceac..121a43d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexHintJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexHintJUnitTest.java
@@ -16,34 +16,25 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.ArrayList;
-import java.util.Set;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexExistsException;
-import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.functional.StructSetOrResultsSet;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
import com.gemstone.gemfire.cache.query.internal.QueryExecutionContext;
import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.ArrayList;
+import java.util.Set;
+
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class IndexHintJUnitTest {
@@ -51,7 +42,7 @@ public class IndexHintJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverJUnitTest.java
index c993b93..f57c1ed 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/IndexTrackingQueryObserverJUnitTest.java
@@ -19,33 +19,28 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Collection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.PartitionAttributesFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.IndexTrackingQueryObserver;
import com.gemstone.gemfire.cache.query.internal.IndexTrackingQueryObserver.IndexInfo;
import com.gemstone.gemfire.cache.query.internal.QueryObserver;
import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
import com.gemstone.gemfire.cache.query.internal.index.IndexTrackingQueryObserverDUnitTest.IndexTrackingTestHook;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Collection;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
*
@@ -63,7 +58,7 @@ public class IndexTrackingQueryObserverJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
QueryObserver observer = QueryObserverHolder.setInstance(new IndexTrackingQueryObserver());
}
@@ -77,7 +72,7 @@ public class IndexTrackingQueryObserverJUnitTest {
@Test
public void testIndexInfoOnPartitionedRegion() throws Exception{
//Query VERBOSE has to be true for the test
- assertEquals("true", System.getProperty("gemfire.Query.VERBOSE"));
+ assertEquals("true", System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE"));
//Create Partition Region
PartitionAttributesFactory paf = new PartitionAttributesFactory();
@@ -127,7 +122,7 @@ public class IndexTrackingQueryObserverJUnitTest {
@Test
public void testIndexInfoOnLocalRegion() throws Exception{
//Query VERBOSE has to be true for the test
- assertEquals("true", System.getProperty("gemfire.Query.VERBOSE"));
+ assertEquals("true", System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE"));
//Create Partition Region
AttributesFactory af = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
index b856007..457dcb3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/NewDeclarativeIndexCreationJUnitTest.java
@@ -19,25 +19,23 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.Collection;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheXmlException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.Collection;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -52,8 +50,8 @@ public class NewDeclarativeIndexCreationJUnitTest {
public void setUp() throws Exception {
//Read the Cache.xml placed in test.lib folder
Properties props = new Properties();
- props.setProperty("cache-xml-file", TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
- props.setProperty("mcast-port", "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), "cachequeryindex.xml"));
+ props.setProperty(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
}
@@ -156,8 +154,8 @@ public class NewDeclarativeIndexCreationJUnitTest {
public void testIndexCreationExceptionOnRegionWithNewDTD() throws IOException, URISyntaxException {
if (cache != null && !cache.isClosed()) cache.close();
Properties props = new Properties();
- props.setProperty("cache-xml-file", TestUtil.getResourcePath(getClass(), "cachequeryindexwitherror.xml"));
- props.setProperty("mcast-port", "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), "cachequeryindexwitherror.xml"));
+ props.setProperty(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(props);
try {
Cache cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
index 74abe21..6d030af 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PdxCopyOnReadQueryJUnitTest.java
@@ -16,18 +16,6 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-import junit.framework.TestCase;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
@@ -38,6 +26,14 @@ import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.PortfolioPdx;
import com.gemstone.gemfire.pdx.ReflectionBasedAutoSerializer;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
public class PdxCopyOnReadQueryJUnitTest {
@@ -53,7 +49,7 @@ public class PdxCopyOnReadQueryJUnitTest {
CacheFactory cf = new CacheFactory();
cf.setPdxSerializer(serializer);
cf.setPdxReadSerialized(false);
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
cache = cf.create();
cache.setCopyOnRead(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
index cee26ef..27c0616 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/ProgRegionCreationIndexUpdateTypeJUnitTest.java
@@ -20,22 +20,19 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
*
@@ -61,8 +58,8 @@ public class ProgRegionCreationIndexUpdateTypeJUnitTest{
@Test
public void testProgrammaticIndexUpdateType() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("log-level", "config");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
DistributedSystem ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
//Create a Region with index maintenance type as explicit synchronous
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
index 02e805b..3e91e66 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/PutAllWithIndexPerfDUnitTest.java
@@ -16,35 +16,26 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.query.data.PortfolioPdx;
-import com.gemstone.gemfire.cache.query.dunit.RemoteQueryDUnitTest;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -83,7 +74,7 @@ public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.put("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.put(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
Cache cache = new CacheFactory(config).create();
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -108,7 +99,7 @@ public class PutAllWithIndexPerfDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
ClientCache cache = new ClientCacheFactory().addPoolServer(host0, port).create();
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
index 99b8293..1749d43 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
@@ -16,22 +16,6 @@
*/
package com.gemstone.gemfire.cache.snapshot;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.examples.snapshot.MyObject;
import com.examples.snapshot.MyPdxSerializer;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -42,7 +26,20 @@ import com.gemstone.gemfire.cache.snapshot.RegionGenerator.SerializationType;
import com.gemstone.gemfire.cache.snapshot.SnapshotOptions.SnapshotFormat;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class RegionSnapshotJUnitTest extends SnapshotTestCase {
@@ -246,10 +243,10 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase {
public void testDSID() throws Exception {
cache.close();
- CacheFactory cf = new CacheFactory().set("mcast-port", "0")
- .set("log-level", "error")
+ CacheFactory cf = new CacheFactory().set(MCAST_PORT, "0")
+ .set(DistributionConfig.LOG_LEVEL_NAME, "error")
.setPdxSerializer(new MyPdxSerializer())
- .set("distributed-system-id", "1");
+ .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
cache = cf.create();
RegionType rt = RegionType.REPLICATE;
@@ -266,10 +263,10 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase {
cache.close();
// change the DSID from 1 -> 100
- CacheFactory cf2 = new CacheFactory().set("mcast-port", "0")
- .set("log-level", "error")
+ CacheFactory cf2 = new CacheFactory().set(MCAST_PORT, "0")
+ .set(DistributionConfig.LOG_LEVEL_NAME, "error")
.setPdxSerializer(new MyPdxSerializer())
- .set("distributed-system-id", "100");
+ .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "100");
cache = cf2.create();
final Map<Integer, Object> read = new HashMap<Integer, Object>();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
index b67caa7..3804ee4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/SnapshotTestCase.java
@@ -16,20 +16,22 @@
*/
package com.gemstone.gemfire.cache.snapshot;
+import com.examples.snapshot.MyObject;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.DiskStore;
+import com.gemstone.gemfire.cache.snapshot.RegionGenerator.SerializationType;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import org.junit.After;
+import org.junit.Before;
+
import java.io.File;
import java.io.FilenameFilter;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
-import org.junit.After;
-import org.junit.Before;
-
-import com.examples.snapshot.MyObject;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.snapshot.RegionGenerator.SerializationType;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class SnapshotTestCase {
protected File store;
@@ -49,8 +51,8 @@ public class SnapshotTestCase {
rgen = new RegionGenerator();
CacheFactory cf = new CacheFactory()
- .set("mcast-port", "0")
- .set("log-level", "error");
+ .set(MCAST_PORT, "0")
+ .set(DistributionConfig.LOG_LEVEL_NAME, "error");
cache = cf.create();
ds = cache.createDiskStoreFactory()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
index f222609..0c9dfaa 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
@@ -16,46 +16,28 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
import com.gemstone.gemfire.CopyHelper;
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.KeyInfo;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketVisitor;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
/**
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
index 771cd30..38e79cb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40255JUnitTest.java
@@ -16,17 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
@@ -34,6 +23,19 @@ import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
/**
*
@@ -69,8 +71,8 @@ public class Bug40255JUnitTest {
@Test
public void testResolveReplacePropertyStringForLonerCache(){
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
System.setProperty("gemfirePropertyFile", BUG_40255_PROPS);
props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, BUG_40255_XML);
System.setProperty(NESTED_ATTR_PROPERTY_STRING, NESTED_ATTR_PROPERTY_VALUE);
@@ -99,8 +101,8 @@ public class Bug40255JUnitTest {
@Test
public void testResolveReplacePropertyStringForNonLonerCache(){
Properties props = new Properties();
- props.setProperty("mcast-port", "10333");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "10333");
+ props.setProperty(LOCATORS, "");
System.setProperty("gemfirePropertyFile", BUG_40255_PROPS);
props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, BUG_40255_XML);
System.setProperty(NESTED_ATTR_PROPERTY_STRING, NESTED_ATTR_PROPERTY_VALUE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
index 77e0d30..9e9b2f5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug40662JUnitTest.java
@@ -16,24 +16,20 @@
*/
package com.gemstone.gemfire.cache30;
-import static org.junit.Assert.*;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
* Test for Bug no. 40662. To verify the default action being set in eviction
@@ -79,8 +75,8 @@ public class Bug40662JUnitTest {
@Before
protected void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, BUG_40662_XML);
this.ds = DistributedSystem.connect(props);
this.cache = CacheFactory.create(this.ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
index d005aec..7a4f87c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug44418JUnitTest.java
@@ -19,30 +19,25 @@
*/
package com.gemstone.gemfire.cache30;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.jayway.awaitility.core.ConditionTimeoutException;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static com.jayway.awaitility.Awaitility.with;
+import static org.junit.Assert.fail;
/**
* Test for Bug 44418.
@@ -145,8 +140,8 @@ public class Bug44418JUnitTest { // TODO: rename this test to non-ticket descrip
@Before
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
this.ds = DistributedSystem.connect(props);
this.cache = CacheFactory.create(this.ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
index ae14819..d595ab8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
@@ -16,21 +16,16 @@
*/
package com.gemstone.gemfire.cache30;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.regex.Pattern;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.util.Properties;
+import java.util.regex.Pattern;
/**
* Test to make sure cache close is working.
@@ -223,10 +218,10 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String baseLogName = "diskarito";
String logfile = baseLogName+".log";
- props.put("log-file", logfile);
- props.put("log-file-size-limit", "1");
+ props.put(DistributionConfig.LOG_FILE_NAME, logfile);
+ props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
DistributedSystem ds = this.getSystem(props);
- props.put("log-disk-space-limit", "200");
+ props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, "200");
for(int i=0;i<10;i++) {
ds = this.getSystem(props);
ds.disconnect();
@@ -242,10 +237,10 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String baseLogName = "restarto";
String logfile = baseLogName+".log";
- props.put("log-file", logfile);
- props.put("log-file-size-limit", "1");
- props.put("log-disk-space-limit", "200");
- props.put("log-level", "config");
+ props.put(DistributionConfig.LOG_FILE_NAME, logfile);
+ props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
+ props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, "200");
+ props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
InternalDistributedSystem ids = getSystem(props);
assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
ids.disconnect();
@@ -302,9 +297,9 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String baseLogName = "biscuits";
String logfile = baseLogName+".log";
- props.put("log-file", logfile);
- props.put("log-file-size-limit", "1");
- props.put("log-level", "config");
+ props.put(DistributionConfig.LOG_FILE_NAME, logfile);
+ props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
+ props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
DistributedSystem ds = getSystem(props);
InternalDistributedSystem ids = (InternalDistributedSystem) ds;
assertEquals(InternalLogWriter.INFO_LEVEL, ((InternalLogWriter)ids.getLogWriter()).getLogWriterLevel());
@@ -329,7 +324,7 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
* Ok now we have rolled and yada yada. Let's disconnect and reconnect with same name!
*/
int dsId = System.identityHashCode(ds);
- props.put("log-disk-space-limit", "200");
+ props.put(DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME, "200");
File f1m = new File(logfile);
assertTrue(f1m.exists());
@@ -379,9 +374,9 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
Properties props = new Properties();
String logfile = baseLogName+".log";
- props.put("log-file", logfile);
- props.put("log-file-size-limit", "1");
- props.put("log-level", "config");
+ props.put(DistributionConfig.LOG_FILE_NAME, logfile);
+ props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
+ props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
DistributedSystem ds = getSystem(props);
InternalDistributedSystem ids = (InternalDistributedSystem) ds;
@@ -414,11 +409,11 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
String logfile = baseLogName+".log";
String sec_logfile = "sec_"+baseLogName+".log";
- props.put("log-file", logfile);
- props.put("log-file-size-limit", "1");
- props.put("log-level", "config");
- props.put("security-log-file", sec_logfile);
- props.put("security-log-level", "config");
+ props.put(DistributionConfig.LOG_FILE_NAME, logfile);
+ props.put(DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME, "1");
+ props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(DistributionConfig.SECURITY_LOG_FILE_NAME, sec_logfile);
+ props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
DistributedSystem ds = getSystem(props);
InternalDistributedSystem ids = (InternalDistributedSystem) ds;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
index 56f0261..af604f2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheMapTxnDUnitTest.java
@@ -22,26 +22,13 @@
*/
package com.gemstone.gemfire.cache30;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.dunit.*;
+
import java.util.Properties;
import java.util.Set;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-
public class CacheMapTxnDUnitTest extends DistributedTestCase{
protected static Cache cache;
@@ -80,7 +67,7 @@ public class CacheMapTxnDUnitTest extends DistributedTestCase{
public static void createCache(){
try{
- // props.setProperty("mcast-port", "1234");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
// ds = DistributedSystem.connect(props);
ds = (new CacheMapTxnDUnitTest("temp")).getSystem(props);
cache = CacheFactory.create(ds);
[52/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 8033a41..702dda9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -60,24 +60,28 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* If set it must be unique in the ds.
* When set its used by tools to help identify the member.
* <p> The default value is: {@link #DEFAULT_NAME}.
+ *
* @return the system's name.
*/
- @ConfigAttributeGetter(name=NAME_NAME)
+ @ConfigAttributeGetter(name = NAME_NAME)
String getName();
/**
* Sets the member's name.
* <p> The name can not be changed while the system is running.
- * @throws IllegalArgumentException if the specified value is not acceptable.
+ *
+ * @throws IllegalArgumentException if the specified value is not acceptable.
* @throws com.gemstone.gemfire.UnmodifiableException if this attribute can not be modified.
- * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
- * when writing to the system's configuration file.
+ * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
+ * when writing to the system's configuration file.
*/
- @ConfigAttributeSetter(name=NAME_NAME)
+ @ConfigAttributeSetter(name = NAME_NAME)
void setName(String value);
- /** The name of the "name" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the "name" property
+ */
+ @ConfigAttribute(type = String.class)
String NAME_NAME = NAME;
/**
@@ -91,7 +95,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#mcast-port">"mcast-port"</a>
* property
*/
- @ConfigAttributeGetter(name=MCAST_PORT_NAME)
+ @ConfigAttributeGetter(name = MCAST_PORT_NAME)
int getMcastPort();
/**
@@ -99,10 +103,12 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#mcast-port">"mcast-port"</a>
* property
*/
- @ConfigAttributeSetter(name=MCAST_PORT_NAME)
+ @ConfigAttributeSetter(name = MCAST_PORT_NAME)
void setMcastPort(int value);
- /** The default value of the "mcastPort" property */
+ /**
+ * The default value of the "mcastPort" property
+ */
int DEFAULT_MCAST_PORT = 0;
/**
@@ -117,8 +123,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_MCAST_PORT = 65535;
- /** The name of the "mcastPort" property */
- @ConfigAttribute(type=Integer.class, min=MIN_MCAST_PORT, max=MAX_MCAST_PORT)
+ /**
+ * The name of the "mcastPort" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_MCAST_PORT, max = MAX_MCAST_PORT)
String MCAST_PORT_NAME = MCAST_PORT;
/**
@@ -137,7 +145,9 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
@ConfigAttributeSetter(name = TCP_PORT)
void setTcpPort(int value);
- /** The default value of the "tcpPort" property */
+ /**
+ * The default value of the "tcpPort" property
+ */
int DEFAULT_TCP_PORT = 0;
/**
@@ -152,8 +162,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_TCP_PORT = 65535;
- /** The name of the "tcpPort" property */
- @ConfigAttribute(type=Integer.class, min=MIN_TCP_PORT, max=MAX_TCP_PORT)
+ /**
+ * The name of the "tcpPort" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_TCP_PORT, max = MAX_TCP_PORT)
String TCP_PORT_NAME = TCP_PORT;
/**
@@ -172,11 +184,14 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
@ConfigAttributeSetter(name = MCAST_ADDRESS)
void setMcastAddress(InetAddress value);
- /** The name of the "mcastAddress" property */
- @ConfigAttribute(type=InetAddress.class)
+ /**
+ * The name of the "mcastAddress" property
+ */
+ @ConfigAttribute(type = InetAddress.class)
String MCAST_ADDRESS_NAME = MCAST_ADDRESS;
- /** The default value of the "mcastAddress" property.
+ /**
+ * The default value of the "mcastAddress" property.
* Current value is <code>239.192.81.1</code>
*/
InetAddress DEFAULT_MCAST_ADDRESS = AbstractDistributionConfig._getDefaultMcastAddress();
@@ -197,7 +212,9 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
@ConfigAttributeSetter(name = MCAST_TTL)
void setMcastTtl(int value);
- /** The default value of the "mcastTtl" property */
+ /**
+ * The default value of the "mcastTtl" property
+ */
int DEFAULT_MCAST_TTL = 32;
/**
@@ -212,8 +229,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_MCAST_TTL = 255;
- /** The name of the "mcastTtl" property */
- @ConfigAttribute(type=Integer.class, min=MIN_MCAST_TTL, max=MAX_MCAST_TTL)
+ /**
+ * The name of the "mcastTtl" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_MCAST_TTL, max = MAX_MCAST_TTL)
String MCAST_TTL_NAME = MCAST_TTL;
/**
@@ -232,11 +251,14 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
@ConfigAttributeSetter(name = BIND_ADDRESS)
void setBindAddress(String value);
- /** The name of the "bindAddress" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the "bindAddress" property
+ */
+ @ConfigAttribute(type = String.class)
String BIND_ADDRESS_NAME = BIND_ADDRESS;
- /** The default value of the "bindAddress" property.
+ /**
+ * The default value of the "bindAddress" property.
* Current value is an empty string <code>""</code>
*/
String DEFAULT_BIND_ADDRESS = "";
@@ -257,11 +279,14 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
@ConfigAttributeSetter(name = SERVER_BIND_ADDRESS)
void setServerBindAddress(String value);
- /** The name of the "serverBindAddress" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the "serverBindAddress" property
+ */
+ @ConfigAttribute(type = String.class)
String SERVER_BIND_ADDRESS_NAME = SERVER_BIND_ADDRESS;
- /** The default value of the "serverBindAddress" property.
+ /**
+ * The default value of the "serverBindAddress" property.
* Current value is an empty string <code>""</code>
*/
String DEFAULT_SERVER_BIND_ADDRESS = "";
@@ -278,28 +303,33 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* A locator list is optional and by default empty.
* Its used to by the system to locator other system nodes
* and to publish itself so it can be located by others.
+ *
* @param value must be of the form <code>hostName[portNum]</code>.
- * Multiple elements are allowed and must be seperated by a comma.
- * @throws IllegalArgumentException if the specified value is not acceptable.
+ * Multiple elements are allowed and must be seperated by a comma.
+ * @throws IllegalArgumentException if the specified value is not acceptable.
* @throws com.gemstone.gemfire.UnmodifiableException if this attribute can not be modified.
- * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
- * when writing to the system's configuration file.
+ * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
+ * when writing to the system's configuration file.
*/
@ConfigAttributeSetter(name = LOCATORS)
void setLocators(String value);
- /** The name of the "locators" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the "locators" property
+ */
+ @ConfigAttribute(type = String.class)
String LOCATORS_NAME = LOCATORS;
- /** The default value of the "locators" property */
+ /**
+ * The default value of the "locators" property
+ */
String DEFAULT_LOCATORS = "";
/**
* Locator wait time - how long to wait for a locator to start before giving up &
* throwing a GemFireConfigException
*/
- @ConfigAttribute(type=Integer.class)
+ @ConfigAttribute(type = Integer.class)
String LOCATOR_WAIT_TIME_NAME = LOCATOR_WAIT_TIME;
int DEFAULT_LOCATOR_WAIT_TIME = 0;
@@ -309,18 +339,19 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
@ConfigAttributeSetter(name = LOCATOR_WAIT_TIME)
void setLocatorWaitTime(int seconds);
-
-
+
/**
* returns the value of the <a href="../DistribytedSystem.html#start-locator">"start-locator"
* </a> property
*/
@ConfigAttributeGetter(name = START_LOCATOR)
String getStartLocator();
+
/**
* Sets the start-locator property. This is a string in the form
* bindAddress[port] and, if set, tells the distributed system to start
* a locator prior to connecting
+ *
* @param value must be of the form <code>hostName[portNum]</code>
*/
@ConfigAttributeSetter(name = START_LOCATOR)
@@ -329,65 +360,67 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* The name of the "start-locator" property
*/
- @ConfigAttribute(type=String.class)
+ @ConfigAttribute(type = String.class)
String START_LOCATOR_NAME = START_LOCATOR;
/**
* The default value of the "start-locator" property
*/
String DEFAULT_START_LOCATOR = "";
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#deploy-working-dir">"deploy-working-dir"</a> property
*/
- @ConfigAttributeGetter(name=DEPLOY_WORKING_DIR)
+ @ConfigAttributeGetter(name = DEPLOY_WORKING_DIR)
File getDeployWorkingDir();
-
+
/**
* Sets the system's deploy working directory.
- * @throws IllegalArgumentException if the specified value is not acceptable.
+ *
+ * @throws IllegalArgumentException if the specified value is not acceptable.
* @throws com.gemstone.gemfire.UnmodifiableException if this attribute can not be modified.
- * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
- * when writing to the system's configuration file.
+ * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
+ * when writing to the system's configuration file.
*/
- @ConfigAttributeSetter(name=DEPLOY_WORKING_DIR)
+ @ConfigAttributeSetter(name = DEPLOY_WORKING_DIR)
void setDeployWorkingDir(File value);
-
+
/**
* The name of the "deploy-working-dir" property.
*/
- @ConfigAttribute(type=File.class)
- String DEPLOY_WORKING_DIR = SystemConfigurationProperties.DEPLOY_WORKING_DIR;
-
+ @ConfigAttribute(type = File.class)
+ String DEPLOY_WORKING_DIR_NAME = SystemConfigurationProperties.DEPLOY_WORKING_DIR;
+
/**
- * Default will be the current working directory as determined by
+ * Default will be the current working directory as determined by
* <code>System.getProperty("user.dir")</code>.
*/
File DEFAULT_DEPLOY_WORKING_DIR = new File(".");
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#user-command-packages">"user-command-packages"</a> property
*/
- @ConfigAttributeGetter(name=USER_COMMAND_PACKAGES)
+ @ConfigAttributeGetter(name = USER_COMMAND_PACKAGES)
String getUserCommandPackages();
-
+
/**
* Sets the system's user command path.
- * @throws IllegalArgumentException if the specified value is not acceptable.
+ *
+ * @throws IllegalArgumentException if the specified value is not acceptable.
* @throws com.gemstone.gemfire.UnmodifiableException if this attribute can not be modified.
- * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
- * when writing to the system's configuration file.
+ * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
+ * when writing to the system's configuration file.
*/
- @ConfigAttributeSetter(name=USER_COMMAND_PACKAGES)
+ @ConfigAttributeSetter(name = USER_COMMAND_PACKAGES)
void setUserCommandPackages(String value);
-
+
/**
* The name of the "user-command-packages" property.
*/
- @ConfigAttribute(type=String.class)
- String USER_COMMAND_PACKAGES = SystemConfigurationProperties.USER_COMMAND_PACKAGES;
-
+ @ConfigAttribute(type = String.class)
+ String USER_COMMAND_PACKAGES_NAME = SystemConfigurationProperties.USER_COMMAND_PACKAGES;
+
/**
* The default value of the "user-command-packages" property
*/
@@ -398,25 +431,29 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#log-file">"log-file"</a> property
*
* @return <code>null</code> if logging information goes to standard
- * out
+ * out
*/
- @ConfigAttributeGetter(name=LOG_FILE_NAME)
+ @ConfigAttributeGetter(name = LOG_FILE)
File getLogFile();
+
/**
* Sets the system's log file.
* <p> Non-absolute log files are relative to the system directory.
* <p> The system log file can not be changed while the system is running.
- * @throws IllegalArgumentException if the specified value is not acceptable.
+ *
+ * @throws IllegalArgumentException if the specified value is not acceptable.
* @throws com.gemstone.gemfire.UnmodifiableException if this attribute can not be modified.
- * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
- * when writing to the system's configuration file.
+ * @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
+ * when writing to the system's configuration file.
*/
- @ConfigAttributeSetter(name=LOG_FILE_NAME)
+ @ConfigAttributeSetter(name = LOG_FILE)
void setLogFile(File value);
- /** The name of the "logFile" property */
- @ConfigAttribute(type=File.class)
+ /**
+ * The name of the "logFile" property
+ */
+ @ConfigAttribute(type = File.class)
String LOG_FILE_NAME = LOG_FILE;
/**
@@ -432,15 +469,16 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @see com.gemstone.gemfire.internal.logging.LogWriterImpl
*/
- @ConfigAttributeGetter(name=LOG_LEVEL_NAME)
+ @ConfigAttributeGetter(name = LOG_LEVEL)
int getLogLevel();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#log-level">"log-level"</a> property
*
* @see com.gemstone.gemfire.internal.logging.LogWriterImpl
*/
- @ConfigAttributeSetter(name=LOG_LEVEL_NAME)
+ @ConfigAttributeSetter(name = LOG_LEVEL)
void setLogLevel(int value);
/**
@@ -459,9 +497,11 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_LOG_LEVEL = InternalLogWriter.NONE_LEVEL;
- /** The name of the "logLevel" property */
+ /**
+ * The name of the "logLevel" property
+ */
// type is String because the config file contains "config", "debug", "fine" etc, not a code, but the setter/getter accepts int
- @ConfigAttribute(type=String.class)
+ @ConfigAttribute(type = String.class)
String LOG_LEVEL_NAME = LOG_LEVEL;
/**
@@ -469,19 +509,24 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#statistic-sampling-enabled">"statistic-sampling-enabled"</a>
* property
*/
- @ConfigAttributeGetter(name=STATISTIC_SAMPLING_ENABLED_NAME)
+ @ConfigAttributeGetter(name = STATISTIC_SAMPLING_ENABLED)
boolean getStatisticSamplingEnabled();
+
/**
* Sets StatisticSamplingEnabled
*/
- @ConfigAttributeSetter(name=STATISTIC_SAMPLING_ENABLED_NAME)
+ @ConfigAttributeSetter(name = STATISTIC_SAMPLING_ENABLED)
void setStatisticSamplingEnabled(boolean newValue);
- /** The name of the "statisticSamplingEnabled" property */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * The name of the "statisticSamplingEnabled" property
+ */
+ @ConfigAttribute(type = Boolean.class)
String STATISTIC_SAMPLING_ENABLED_NAME = STATISTIC_SAMPLING_ENABLED;
- /** The default value of the "statisticSamplingEnabled" property */
+ /**
+ * The default value of the "statisticSamplingEnabled" property
+ */
boolean DEFAULT_STATISTIC_SAMPLING_ENABLED = true;
/**
@@ -489,14 +534,15 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#statistic-sample-rate">"statistic-sample-rate"</a>
* property
*/
- @ConfigAttributeGetter(name=STATISTIC_SAMPLE_RATE_NAME)
+ @ConfigAttributeGetter(name = STATISTIC_SAMPLE_RATE)
int getStatisticSampleRate();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#statistic-sample-rate">"statistic-sample-rate"</a>
* property
*/
- @ConfigAttributeSetter(name=STATISTIC_SAMPLE_RATE_NAME)
+ @ConfigAttributeSetter(name = STATISTIC_SAMPLE_RATE)
void setStatisticSampleRate(int value);
/**
@@ -515,8 +561,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_STATISTIC_SAMPLE_RATE = 60000;
- /** The name of the "statisticSampleRate" property */
- @ConfigAttribute(type=Integer.class, min=MIN_STATISTIC_SAMPLE_RATE, max=MAX_STATISTIC_SAMPLE_RATE)
+ /**
+ * The name of the "statisticSampleRate" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_STATISTIC_SAMPLE_RATE, max = MAX_STATISTIC_SAMPLE_RATE)
String STATISTIC_SAMPLE_RATE_NAME = STATISTIC_SAMPLE_RATE;
/**
@@ -524,16 +572,19 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @return <code>null</code> if no file was specified
*/
- @ConfigAttributeGetter(name=STATISTIC_ARCHIVE_FILE_NAME)
+ @ConfigAttributeGetter(name = STATISTIC_ARCHIVE_FILE)
File getStatisticArchiveFile();
+
/**
* Sets the value of the <a href="../DistributedSystem.html#statistic-archive-file">"statistic-archive-file"</a> property.
*/
- @ConfigAttributeSetter(name=STATISTIC_ARCHIVE_FILE_NAME)
+ @ConfigAttributeSetter(name = STATISTIC_ARCHIVE_FILE)
void setStatisticArchiveFile(File value);
- /** The name of the "statisticArchiveFile" property */
- @ConfigAttribute(type=File.class)
+ /**
+ * The name of the "statisticArchiveFile" property
+ */
+ @ConfigAttribute(type = File.class)
String STATISTIC_ARCHIVE_FILE_NAME = STATISTIC_ARCHIVE_FILE;
/**
@@ -543,27 +594,31 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
File DEFAULT_STATISTIC_ARCHIVE_FILE = new File(""); // fix for bug 29786
-
/**
* Returns the value of the <a
* href="../DistributedSystem.html#cache-xml-file">"cache-xml-file"</a>
* property
*/
- @ConfigAttributeGetter(name=CACHE_XML_FILE_NAME)
+ @ConfigAttributeGetter(name = CACHE_XML_FILE)
File getCacheXmlFile();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#cache-xml-file">"cache-xml-file"</a>
* property
*/
- @ConfigAttributeSetter(name=CACHE_XML_FILE_NAME)
+ @ConfigAttributeSetter(name = CACHE_XML_FILE)
void setCacheXmlFile(File value);
- /** The name of the "cacheXmlFile" property */
- @ConfigAttribute(type=File.class)
+ /**
+ * The name of the "cacheXmlFile" property
+ */
+ @ConfigAttribute(type = File.class)
String CACHE_XML_FILE_NAME = CACHE_XML_FILE;
- /** The default value of the "cacheXmlFile" property */
+ /**
+ * The default value of the "cacheXmlFile" property
+ */
File DEFAULT_CACHE_XML_FILE = new File("cache.xml");
/**
@@ -571,16 +626,16 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#ack-wait-threshold">"ack-wait-threshold"</a>
* property
*/
- @ConfigAttributeGetter(name=ACK_WAIT_THRESHOLD_NAME)
+ @ConfigAttributeGetter(name = ACK_WAIT_THRESHOLD)
int getAckWaitThreshold();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#ack-wait-threshold">"ack-wait-threshold"</a>
* property
- * Setting this value too low will cause spurious alerts.
- */
- @ConfigAttributeSetter(name=ACK_WAIT_THRESHOLD_NAME)
+ * Setting this value too low will cause spurious alerts.
+ */
+ @ConfigAttributeSetter(name = ACK_WAIT_THRESHOLD)
void setAckWaitThreshold(int newThreshold);
/**
@@ -598,26 +653,27 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <p> Actual value of this constant is <code>MAX_INT</code> seconds.
*/
int MAX_ACK_WAIT_THRESHOLD = Integer.MAX_VALUE;
- /** The name of the "ackWaitThreshold" property */
- @ConfigAttribute(type=Integer.class, min=MIN_ACK_WAIT_THRESHOLD)
+ /**
+ * The name of the "ackWaitThreshold" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_ACK_WAIT_THRESHOLD)
String ACK_WAIT_THRESHOLD_NAME = ACK_WAIT_THRESHOLD;
-
/**
* Returns the value of the <a
* href="../DistributedSystem.html#ack-severe-alert-threshold">"ack-severe-alert-threshold"</a>
* property
*/
- @ConfigAttributeGetter(name=ACK_SEVERE_ALERT_THRESHOLD_NAME)
+ @ConfigAttributeGetter(name = ACK_SEVERE_ALERT_THRESHOLD)
int getAckSevereAlertThreshold();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#ack-severe-alert-threshold">"ack-severe-alert-threshold"</a>
* property
- * Setting this value too low will cause spurious forced disconnects.
- */
- @ConfigAttributeSetter(name=ACK_SEVERE_ALERT_THRESHOLD_NAME)
+ * Setting this value too low will cause spurious forced disconnects.
+ */
+ @ConfigAttributeSetter(name = ACK_SEVERE_ALERT_THRESHOLD)
void setAckSevereAlertThreshold(int newThreshold);
/**
@@ -637,8 +693,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <p> Actual value of this constant is <code>MAX_INT</code> seconds.
*/
int MAX_ACK_SEVERE_ALERT_THRESHOLD = Integer.MAX_VALUE;
- /** The name of the "ackSevereAlertThreshold" property */
- @ConfigAttribute(type=Integer.class, min=MIN_ACK_SEVERE_ALERT_THRESHOLD)
+ /**
+ * The name of the "ackSevereAlertThreshold" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_ACK_SEVERE_ALERT_THRESHOLD)
String ACK_SEVERE_ALERT_THRESHOLD_NAME = ACK_SEVERE_ALERT_THRESHOLD;
/**
@@ -646,14 +704,15 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#archive-file-size-limit">"archive-file-size-limit"</a>
* property
*/
- @ConfigAttributeGetter(name=ARCHIVE_FILE_SIZE_LIMIT_NAME)
+ @ConfigAttributeGetter(name = ARCHIVE_FILE_SIZE_LIMIT)
int getArchiveFileSizeLimit();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#archive-file-size-limit">"archive-file-size-limit"</a>
* property
*/
- @ConfigAttributeSetter(name=ARCHIVE_FILE_SIZE_LIMIT_NAME)
+ @ConfigAttributeSetter(name = ARCHIVE_FILE_SIZE_LIMIT)
void setArchiveFileSizeLimit(int value);
/**
@@ -672,22 +731,26 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_ARCHIVE_FILE_SIZE_LIMIT = 1000000;
- /** The name of the "ArchiveFileSizeLimit" property */
- @ConfigAttribute(type=Integer.class, min=MIN_ARCHIVE_FILE_SIZE_LIMIT, max=MAX_ARCHIVE_FILE_SIZE_LIMIT)
+ /**
+ * The name of the "ArchiveFileSizeLimit" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_ARCHIVE_FILE_SIZE_LIMIT, max = MAX_ARCHIVE_FILE_SIZE_LIMIT)
String ARCHIVE_FILE_SIZE_LIMIT_NAME = ARCHIVE_FILE_SIZE_LIMIT;
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#archive-disk-space-limit">"archive-disk-space-limit"</a>
* property
*/
- @ConfigAttributeGetter(name=ARCHIVE_DISK_SPACE_LIMIT_NAME)
+ @ConfigAttributeGetter(name = ARCHIVE_DISK_SPACE_LIMIT)
int getArchiveDiskSpaceLimit();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#archive-disk-space-limit">"archive-disk-space-limit"</a>
* property
*/
- @ConfigAttributeSetter(name=ARCHIVE_DISK_SPACE_LIMIT_NAME)
+ @ConfigAttributeSetter(name = ARCHIVE_DISK_SPACE_LIMIT)
void setArchiveDiskSpaceLimit(int value);
/**
@@ -706,22 +769,26 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_ARCHIVE_DISK_SPACE_LIMIT = 1000000;
- /** The name of the "ArchiveDiskSpaceLimit" property */
- @ConfigAttribute(type=Integer.class, min=MIN_ARCHIVE_DISK_SPACE_LIMIT, max=MAX_ARCHIVE_DISK_SPACE_LIMIT)
+ /**
+ * The name of the "ArchiveDiskSpaceLimit" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_ARCHIVE_DISK_SPACE_LIMIT, max = MAX_ARCHIVE_DISK_SPACE_LIMIT)
String ARCHIVE_DISK_SPACE_LIMIT_NAME = ARCHIVE_DISK_SPACE_LIMIT;
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#log-file-size-limit">"log-file-size-limit"</a>
* property
*/
- @ConfigAttributeGetter(name=LOG_FILE_SIZE_LIMIT_NAME)
+ @ConfigAttributeGetter(name = LOG_FILE_SIZE_LIMIT)
int getLogFileSizeLimit();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#log-file-size-limit">"log-file-size-limit"</a>
* property
*/
- @ConfigAttributeSetter(name=LOG_FILE_SIZE_LIMIT_NAME)
+ @ConfigAttributeSetter(name = LOG_FILE_SIZE_LIMIT)
void setLogFileSizeLimit(int value);
/**
@@ -740,8 +807,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_LOG_FILE_SIZE_LIMIT = 1000000;
- /** The name of the "LogFileSizeLimit" property */
- @ConfigAttribute(type=Integer.class, min=MIN_LOG_FILE_SIZE_LIMIT, max=MAX_LOG_FILE_SIZE_LIMIT)
+ /**
+ * The name of the "LogFileSizeLimit" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_LOG_FILE_SIZE_LIMIT, max = MAX_LOG_FILE_SIZE_LIMIT)
String LOG_FILE_SIZE_LIMIT_NAME = LOG_FILE_SIZE_LIMIT;
/**
@@ -749,14 +818,15 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#log-disk-space-limit">"log-disk-space-limit"</a>
* property
*/
- @ConfigAttributeGetter(name=LOG_DISK_SPACE_LIMIT_NAME)
+ @ConfigAttributeGetter(name = LOG_DISK_SPACE_LIMIT)
int getLogDiskSpaceLimit();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#log-disk-space-limit">"log-disk-space-limit"</a>
* property
*/
- @ConfigAttributeSetter(name=LOG_DISK_SPACE_LIMIT_NAME)
+ @ConfigAttributeSetter(name = LOG_DISK_SPACE_LIMIT)
void setLogDiskSpaceLimit(int value);
/**
@@ -775,129 +845,151 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_LOG_DISK_SPACE_LIMIT = 1000000;
- /** The name of the "LogDiskSpaceLimit" property */
- @ConfigAttribute(type=Integer.class, min=MIN_LOG_DISK_SPACE_LIMIT, max=MAX_LOG_DISK_SPACE_LIMIT)
+ /**
+ * The name of the "LogDiskSpaceLimit" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_LOG_DISK_SPACE_LIMIT, max = MAX_LOG_DISK_SPACE_LIMIT)
String LOG_DISK_SPACE_LIMIT_NAME = LOG_DISK_SPACE_LIMIT;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#ssl-enabled">"ssl-enabled"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #getClusterSSLEnabled} instead.
*/
- @ConfigAttributeGetter(name=SSL_ENABLED_NAME)
+ @ConfigAttributeGetter(name = SSL_ENABLED)
boolean getSSLEnabled();
/**
* The default ssl-enabled state.
* <p> Actual value of this constant is <code>false</code>.
+ *
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_ENABLED} instead.
*/
boolean DEFAULT_SSL_ENABLED = false;
-
- /** The name of the "SSLEnabled" property
- * @deprecated as of 8.0 use {@link #CLUSTER_SSL_ENABLED_NAME} instead.
+
+ /**
+ * The name of the "SSLEnabled" property
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_ENABLED} instead.
*/
- @ConfigAttribute(type=Boolean.class)
+ @ConfigAttribute(type = Boolean.class)
String SSL_ENABLED_NAME = SSL_ENABLED;
/**
* Sets the value of the <a
* href="../DistributedSystem.html#ssl-enabled">"ssl-enabled"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #setClusterSSLEnabled} instead.
*/
- @ConfigAttributeSetter(name=SSL_ENABLED_NAME)
+ @ConfigAttributeSetter(name = SSL_ENABLED)
void setSSLEnabled(boolean enabled);
/**
* Returns the value of the <a
* href="../DistributedSystem.html#ssl-protocols">"ssl-protocols"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #getClusterSSLProtocols} instead.
*/
- @ConfigAttributeGetter(name=SSL_PROTOCOLS_NAME)
+ @ConfigAttributeGetter(name = SSL_PROTOCOLS)
String getSSLProtocols();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#ssl-protocols">"ssl-protocols"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #setClusterSSLProtocols} instead.
*/
- @ConfigAttributeSetter(name=SSL_PROTOCOLS_NAME)
+ @ConfigAttributeSetter(name = SSL_PROTOCOLS)
void setSSLProtocols(String protocols);
/**
* The default ssl-protocols value.
* <p> Actual value of this constant is <code>any</code>.
+ *
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_PROTOCOLS} instead.
*/
String DEFAULT_SSL_PROTOCOLS = "any";
- /** The name of the "SSLProtocols" property
- * @deprecated as of 8.0 use {@link #CLUSTER_SSL_PROTOCOLS_NAME} instead.
+ /**
+ * The name of the "SSLProtocols" property
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_PROTOCOLS} instead.
*/
- @ConfigAttribute(type=String.class)
+ @ConfigAttribute(type = String.class)
String SSL_PROTOCOLS_NAME = SSL_PROTOCOLS;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#ssl-ciphers">"ssl-ciphers"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #getClusterSSLCiphers} instead.
*/
- @ConfigAttributeGetter(name=SSL_CIPHERS_NAME)
+ @ConfigAttributeGetter(name = SSL_CIPHERS)
String getSSLCiphers();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#ssl-ciphers">"ssl-ciphers"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #setClusterSSLCiphers} instead.
*/
- @ConfigAttributeSetter(name=SSL_CIPHERS_NAME)
+ @ConfigAttributeSetter(name = SSL_CIPHERS)
void setSSLCiphers(String ciphers);
- /**
+ /**
* The default ssl-ciphers value.
* <p> Actual value of this constant is <code>any</code>.
+ *
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_CIPHERS} instead.
*/
- String DEFAULT_SSL_CIPHERS = "any";
- /** The name of the "SSLCiphers" property
- * @deprecated as of 8.0 use {@link #CLUSTER_SSL_CIPHERS_NAME} instead.
+ String DEFAULT_SSL_CIPHERS = "any";
+ /**
+ * The name of the "SSLCiphers" property
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_CIPHERS} instead.
*/
- @ConfigAttribute(type=String.class)
+ @ConfigAttribute(type = String.class)
String SSL_CIPHERS_NAME = SSL_CIPHERS;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#ssl-require-authentication">"ssl-require-authentication"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #getClusterSSLRequireAuthentication} instead.
*/
- @ConfigAttributeGetter(name=SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeGetter(name = SSL_REQUIRE_AUTHENTICATION)
boolean getSSLRequireAuthentication();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#ssl-require-authentication">"ssl-require-authentication"</a>
* property.
+ *
* @deprecated as of 8.0 use {@link #setClusterSSLRequireAuthentication} instead.
*/
- @ConfigAttributeSetter(name=SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeSetter(name = SSL_REQUIRE_AUTHENTICATION)
void setSSLRequireAuthentication(boolean enabled);
- /**
+ /**
* The default ssl-require-authentication value.
* <p> Actual value of this constant is <code>true</code>.
+ *
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION} instead.
*/
- boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION = true;
- /** The name of the "SSLRequireAuthentication" property
- * @deprecated as of 8.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME} instead.
+ boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION = true;
+ /**
+ * The name of the "SSLRequireAuthentication" property
+ *
+ * @deprecated as of 8.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION} instead.
*/
- @ConfigAttribute(type=Boolean.class)
+ @ConfigAttribute(type = Boolean.class)
String SSL_REQUIRE_AUTHENTICATION_NAME = SSL_REQUIRE_AUTHENTICATION;
/**
@@ -905,32 +997,34 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#cluster-ssl-enabled">"cluster-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_ENABLED_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_ENABLED)
boolean getClusterSSLEnabled();
/**
+ * Sets the value of the <a
+ * href="../DistributedSystem.html#cluster-ssl-enabled">"cluster-ssl-enabled"</a>
+ * property.
+ */
+ @ConfigAttributeSetter(name = CLUSTER_SSL_ENABLED)
+ void setClusterSSLEnabled(boolean enabled);
+
+ /**
* The default cluster-ssl-enabled state.
* <p> Actual value of this constant is <code>false</code>.
*/
boolean DEFAULT_CLUSTER_SSL_ENABLED = false;
- /** The name of the "ClusterSSLEnabled" property */
- @ConfigAttribute(type=Boolean.class)
- String CLUSTER_SSL_ENABLED_NAME = CLUSTER_SSL_ENABLED;
-
/**
- * Sets the value of the <a
- * href="../DistributedSystem.html#cluster-ssl-enabled">"cluster-ssl-enabled"</a>
- * property.
+ * The name of the "ClusterSSLEnabled" property
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_ENABLED_NAME)
- void setClusterSSLEnabled(boolean enabled);
+ @ConfigAttribute(type = Boolean.class)
+ String CLUSTER_SSL_ENABLED_NAME = CLUSTER_SSL_ENABLED;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#cluster-ssl-protocols">"cluster-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_PROTOCOLS)
String getClusterSSLProtocols();
/**
@@ -938,7 +1032,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#cluster-ssl-protocols">"cluster-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_PROTOCOLS)
void setClusterSSLProtocols(String protocols);
/**
@@ -946,8 +1040,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <p> Actual value of this constant is <code>any</code>.
*/
String DEFAULT_CLUSTER_SSL_PROTOCOLS = "any";
- /** The name of the "ClusterSSLProtocols" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the "ClusterSSLProtocols" property
+ */
+ @ConfigAttribute(type = String.class)
String CLUSTER_SSL_PROTOCOLS_NAME = CLUSTER_SSL_PROTOCOLS;
/**
@@ -955,7 +1051,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#cluster-ssl-ciphers">"cluster-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_CIPHERS_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_CIPHERS)
String getClusterSSLCiphers();
/**
@@ -963,16 +1059,18 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#cluster-ssl-ciphers">"cluster-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_CIPHERS_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_CIPHERS)
void setClusterSSLCiphers(String ciphers);
- /**
+ /**
* The default cluster-ssl-ciphers value.
* <p> Actual value of this constant is <code>any</code>.
*/
- String DEFAULT_CLUSTER_SSL_CIPHERS = "any";
- /** The name of the "ClusterSSLCiphers" property */
- @ConfigAttribute(type=String.class)
+ String DEFAULT_CLUSTER_SSL_CIPHERS = "any";
+ /**
+ * The name of the "ClusterSSLCiphers" property
+ */
+ @ConfigAttribute(type = String.class)
String CLUSTER_SSL_CIPHERS_NAME = CLUSTER_SSL_CIPHERS;
/**
@@ -980,7 +1078,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#cluster-ssl-require-authentication">"cluster-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_REQUIRE_AUTHENTICATION)
boolean getClusterSSLRequireAuthentication();
/**
@@ -988,163 +1086,176 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#cluster-ssl-require-authentication">"cluster-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_REQUIRE_AUTHENTICATION)
void setClusterSSLRequireAuthentication(boolean enabled);
- /**
+ /**
* The default cluster-ssl-require-authentication value.
* <p> Actual value of this constant is <code>true</code>.
*/
- boolean DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION = true;
- /** The name of the "ClusterSSLRequireAuthentication" property */
- @ConfigAttribute(type=Boolean.class)
+ boolean DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION = true;
+ /**
+ * The name of the "ClusterSSLRequireAuthentication" property
+ */
+ @ConfigAttribute(type = Boolean.class)
String CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME = CLUSTER_SSL_REQUIRE_AUTHENTICATION;
-
/**
* Returns the value of the <a
* href="../DistributedSystem.html#cluster-ssl-keystore">"cluster-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_KEYSTORE)
String getClusterSSLKeyStore();
-
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#cluster-ssl-keystore">"cluster-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_KEYSTORE)
void setClusterSSLKeyStore(String keyStore);
-
+
/**
* The default cluster-ssl-keystore value.
* <p> Actual value of this constant is "".
*/
String DEFAULT_CLUSTER_SSL_KEYSTORE = "";
-
- /** The name of the "ClusterSSLKeyStore" property */
- @ConfigAttribute(type=String.class)
+
+ /**
+ * The name of the "ClusterSSLKeyStore" property
+ */
+ @ConfigAttribute(type = String.class)
String CLUSTER_SSL_KEYSTORE_NAME = CLUSTER_SSL_KEYSTORE;
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#cluster-ssl-keystore-type">"cluster-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_KEYSTORE_TYPE)
String getClusterSSLKeyStoreType();
-
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#cluster-ssl-keystore-type">"cluster-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_KEYSTORE_TYPE)
void setClusterSSLKeyStoreType(String keyStoreType);
-
+
/**
* The default cluster-ssl-keystore-type value.
* <p> Actual value of this constant is "".
*/
String DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE = "";
-
- /** The name of the "ClusterSSLKeyStoreType" property */
- @ConfigAttribute(type=String.class)
+
+ /**
+ * The name of the "ClusterSSLKeyStoreType" property
+ */
+ @ConfigAttribute(type = String.class)
String CLUSTER_SSL_KEYSTORE_TYPE_NAME = CLUSTER_SSL_KEYSTORE_TYPE;
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#cluster-ssl-keystore-password">"cluster-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_KEYSTORE_PASSWORD)
String getClusterSSLKeyStorePassword();
-
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#cluster-ssl-keystore-password">"cluster-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_KEYSTORE_PASSWORD)
void setClusterSSLKeyStorePassword(String keyStorePassword);
-
+
/**
* The default cluster-ssl-keystore-password value.
* <p> Actual value of this constant is "".
*/
String DEFAULT_CLUSTER_SSL_KEYSTORE_PASSWORD = "";
-
- /** The name of the "ClusterSSLKeyStorePassword" property */
- @ConfigAttribute(type=String.class)
+
+ /**
+ * The name of the "ClusterSSLKeyStorePassword" property
+ */
+ @ConfigAttribute(type = String.class)
String CLUSTER_SSL_KEYSTORE_PASSWORD_NAME = CLUSTER_SSL_KEYSTORE_PASSWORD;
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#cluster-ssl-truststore">"cluster-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_TRUSTSTORE)
String getClusterSSLTrustStore();
-
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#cluster-ssl-truststore">"cluster-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_TRUSTSTORE)
void setClusterSSLTrustStore(String trustStore);
-
+
/**
* The default cluster-ssl-truststore value.
* <p> Actual value of this constant is "".
*/
String DEFAULT_CLUSTER_SSL_TRUSTSTORE = "";
-
- /** The name of the "ClusterSSLTrustStore" property */
- @ConfigAttribute(type=String.class)
+
+ /**
+ * The name of the "ClusterSSLTrustStore" property
+ */
+ @ConfigAttribute(type = String.class)
String CLUSTER_SSL_TRUSTSTORE_NAME = CLUSTER_SSL_TRUSTSTORE;
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#cluster-ssl-truststore-password">"cluster-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name=CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = CLUSTER_SSL_TRUSTSTORE_PASSWORD)
String getClusterSSLTrustStorePassword();
-
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#cluster-ssl-truststore-password">"cluster-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name=CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = CLUSTER_SSL_TRUSTSTORE_PASSWORD)
void setClusterSSLTrustStorePassword(String trusStorePassword);
+
/**
* The default cluster-ssl-truststore-password value.
* <p> Actual value of this constant is "".
*/
String DEFAULT_CLUSTER_SSL_TRUSTSTORE_PASSWORD = "";
-
- /** The name of the "ClusterSSLKeyStorePassword" property */
- @ConfigAttribute(type=String.class)
+
+ /**
+ * The name of the "ClusterSSLKeyStorePassword" property
+ */
+ @ConfigAttribute(type = String.class)
String CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME = CLUSTER_SSL_TRUSTSTORE_PASSWORD;
-
-
- /** The name of an internal property that specifies a {@link
+
+ /**
+ * The name of an internal property that specifies a {@link
* com.gemstone.gemfire.i18n.LogWriterI18n} instance to log to.
- * Set this property with put(), not with setProperty()
+ * Set this property with put(), not with setProperty()
*
* @since GemFire 4.0 */
- public static final String LOG_WRITER_NAME = "log-writer";
+ String LOG_WRITER_NAME = "log-writer";
- /** The name of an internal property that specifies a
- * a DistributionConfigImpl that the locator is passing
- * in to a ds connect.
- * Set this property with put(), not with setProperty()
+ /**
+ * The name of an internal property that specifies a
+ * a DistributionConfigImpl that the locator is passing
+ * in to a ds connect.
+ * Set this property with put(), not with setProperty()
*
* @since GemFire 7.0 */
- public static final String DS_CONFIG_NAME = "ds-config";
+ String DS_CONFIG_NAME = "ds-config";
/**
* The name of an internal property that specifies whether
@@ -1153,7 +1264,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @since GemFire 8.1
*/
String DS_RECONNECTING_NAME = "ds-reconnecting";
-
+
/**
* The name of an internal property that specifies the
* quorum checker for the system that was forcibly disconnected.
@@ -1161,7 +1272,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* is used.
*/
String DS_QUORUM_CHECKER_NAME = "ds-quorum-checker";
-
+
/**
* The name of an internal property that specifies a {@link
* com.gemstone.gemfire.LogWriter} instance to log security messages to. Set
@@ -1171,7 +1282,8 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
String SECURITY_LOG_WRITER_NAME = "security-log-writer";
- /** The name of an internal property that specifies a
+ /**
+ * The name of an internal property that specifies a
* FileOutputStream associated with the internal property
* LOG_WRITER_NAME. If this property is set, the
* FileOutputStream will be closed when the distributed
@@ -1196,19 +1308,20 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#socket-lease-time">"socket-lease-time"</a>
* property
*/
- @ConfigAttributeGetter(name=SOCKET_LEASE_TIME_NAME)
+ @ConfigAttributeGetter(name = SOCKET_LEASE_TIME)
int getSocketLeaseTime();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#socket-lease-time">"socket-lease-time"</a>
* property
*/
- @ConfigAttributeSetter(name=SOCKET_LEASE_TIME_NAME)
+ @ConfigAttributeSetter(name = SOCKET_LEASE_TIME)
void setSocketLeaseTime(int value);
-
-
- /** The default value of the "socketLeaseTime" property */
+ /**
+ * The default value of the "socketLeaseTime" property
+ */
int DEFAULT_SOCKET_LEASE_TIME = 60000;
/**
* The minimum socketLeaseTime.
@@ -1221,8 +1334,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_SOCKET_LEASE_TIME = 600000;
- /** The name of the "socketLeaseTime" property */
- @ConfigAttribute(type=Integer.class, min=MIN_SOCKET_LEASE_TIME, max=MAX_SOCKET_LEASE_TIME)
+ /**
+ * The name of the "socketLeaseTime" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_SOCKET_LEASE_TIME, max = MAX_SOCKET_LEASE_TIME)
String SOCKET_LEASE_TIME_NAME = SOCKET_LEASE_TIME;
/**
@@ -1230,18 +1345,20 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#socket-buffer-size">"socket-buffer-size"</a>
* property
*/
- @ConfigAttributeGetter(name=SOCKET_BUFFER_SIZE_NAME)
+ @ConfigAttributeGetter(name = SOCKET_BUFFER_SIZE)
int getSocketBufferSize();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#socket-buffer-size">"socket-buffer-size"</a>
* property
*/
- @ConfigAttributeSetter(name=SOCKET_BUFFER_SIZE_NAME)
+ @ConfigAttributeSetter(name = SOCKET_BUFFER_SIZE)
void setSocketBufferSize(int value);
-
- /** The default value of the "socketBufferSize" property */
+ /**
+ * The default value of the "socketBufferSize" property
+ */
int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
/**
* The minimum socketBufferSize.
@@ -1257,17 +1374,18 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
boolean VALIDATE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "validateMessageSize");
int VALIDATE_CEILING = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "validateMessageSizeCeiling", 8 * 1024 * 1024).intValue();
- /** The name of the "socketBufferSize" property */
- @ConfigAttribute(type=Integer.class, min=MIN_SOCKET_BUFFER_SIZE, max=MAX_SOCKET_BUFFER_SIZE)
+ /**
+ * The name of the "socketBufferSize" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_SOCKET_BUFFER_SIZE, max = MAX_SOCKET_BUFFER_SIZE)
String SOCKET_BUFFER_SIZE_NAME = SOCKET_BUFFER_SIZE;
-
/**
* Get the value of the
* <a href="../DistributedSystem.html#mcast-send-buffer-size">"mcast-send-buffer-size"</a>
* property
*/
- @ConfigAttributeGetter(name=MCAST_SEND_BUFFER_SIZE_NAME)
+ @ConfigAttributeGetter(name = MCAST_SEND_BUFFER_SIZE)
int getMcastSendBufferSize();
/**
@@ -1275,16 +1393,14 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#mcast-send-buffer-size">"mcast-send-buffer-size"</a>
* property
*/
- @ConfigAttributeSetter(name=MCAST_SEND_BUFFER_SIZE_NAME)
+ @ConfigAttributeSetter(name = MCAST_SEND_BUFFER_SIZE)
void setMcastSendBufferSize(int value);
-
/**
* The default value of the corresponding property
*/
int DEFAULT_MCAST_SEND_BUFFER_SIZE = 65535;
-
/**
* The minimum size of the buffer, in bytes.
* <p> Actual value of this constant is <code>2048</code>.
@@ -1294,7 +1410,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* The name of the corresponding property
*/
- @ConfigAttribute(type=Integer.class, min=MIN_MCAST_SEND_BUFFER_SIZE)
+ @ConfigAttribute(type = Integer.class, min = MIN_MCAST_SEND_BUFFER_SIZE)
String MCAST_SEND_BUFFER_SIZE_NAME = MCAST_SEND_BUFFER_SIZE;
/**
@@ -1302,7 +1418,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#mcast-recv-buffer-size">"mcast-recv-buffer-size"</a>
* property
*/
- @ConfigAttributeGetter(name=MCAST_RECV_BUFFER_SIZE_NAME)
+ @ConfigAttributeGetter(name = MCAST_RECV_BUFFER_SIZE)
int getMcastRecvBufferSize();
/**
@@ -1310,10 +1426,9 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#mcast-recv-buffer-size">"mcast-recv-buffer-size"</a>
* property
*/
- @ConfigAttributeSetter(name=MCAST_RECV_BUFFER_SIZE_NAME)
+ @ConfigAttributeSetter(name = MCAST_RECV_BUFFER_SIZE)
void setMcastRecvBufferSize(int value);
-
/**
* The default value of the corresponding property
*/
@@ -1328,16 +1443,15 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* The name of the corresponding property
*/
- @ConfigAttribute(type=Integer.class, min=MIN_MCAST_RECV_BUFFER_SIZE)
+ @ConfigAttribute(type = Integer.class, min = MIN_MCAST_RECV_BUFFER_SIZE)
String MCAST_RECV_BUFFER_SIZE_NAME = MCAST_RECV_BUFFER_SIZE;
-
/**
* Get the value of the
* <a href="../DistributedSystem.html#mcast-flow-control">"mcast-flow-control"</a>
* property.
*/
- @ConfigAttributeGetter(name=MCAST_FLOW_CONTROL_NAME)
+ @ConfigAttributeGetter(name = MCAST_FLOW_CONTROL)
FlowControlParams getMcastFlowControl();
/**
@@ -1345,20 +1459,20 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#mcast-flow-control">"mcast-flow-control"</a>
* property
*/
- @ConfigAttributeSetter(name=MCAST_FLOW_CONTROL_NAME)
+ @ConfigAttributeSetter(name = MCAST_FLOW_CONTROL)
void setMcastFlowControl(FlowControlParams values);
/**
* The name of the corresponding property
*/
- @ConfigAttribute(type=FlowControlParams.class)
+ @ConfigAttribute(type = FlowControlParams.class)
String MCAST_FLOW_CONTROL_NAME = MCAST_FLOW_CONTROL;
/**
* The default value of the corresponding property
*/
FlowControlParams DEFAULT_MCAST_FLOW_CONTROL
- = new FlowControlParams(1048576, (float)0.25, 5000);
+ = new FlowControlParams(1048576, (float) 0.25, 5000);
/**
* The minimum byteAllowance for the mcast-flow-control setting of
@@ -1395,7 +1509,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#udp-fragment-size">"udp-fragment-size"</a>
* property.
*/
- @ConfigAttributeGetter(name=UDP_FRAGMENT_SIZE_NAME)
+ @ConfigAttributeGetter(name = UDP_FRAGMENT_SIZE)
int getUdpFragmentSize();
/**
@@ -1403,7 +1517,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#udp-fragment-size">"udp-fragment-size"</a>
* property
*/
- @ConfigAttributeSetter(name=UDP_FRAGMENT_SIZE_NAME)
+ @ConfigAttributeSetter(name = UDP_FRAGMENT_SIZE)
void setUdpFragmentSize(int value);
/**
@@ -1411,29 +1525,28 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int DEFAULT_UDP_FRAGMENT_SIZE = 60000;
- /** The minimum allowed udp-fragment-size setting of 1000
- */
+ /**
+ * The minimum allowed udp-fragment-size setting of 1000
+ */
int MIN_UDP_FRAGMENT_SIZE = 1000;
- /** The maximum allowed udp-fragment-size setting of 60000
- */
+ /**
+ * The maximum allowed udp-fragment-size setting of 60000
+ */
int MAX_UDP_FRAGMENT_SIZE = 60000;
/**
* The name of the corresponding property
*/
- @ConfigAttribute(type=Integer.class, min=MIN_UDP_FRAGMENT_SIZE, max=MAX_UDP_FRAGMENT_SIZE)
+ @ConfigAttribute(type = Integer.class, min = MIN_UDP_FRAGMENT_SIZE, max = MAX_UDP_FRAGMENT_SIZE)
String UDP_FRAGMENT_SIZE_NAME = UDP_FRAGMENT_SIZE;
-
-
-
/**
* Get the value of the
* <a href="../DistributedSystem.html#udp-send-buffer-size">"udp-send-buffer-size"</a>
* property
*/
- @ConfigAttributeGetter(name=UDP_SEND_BUFFER_SIZE_NAME)
+ @ConfigAttributeGetter(name = UDP_SEND_BUFFER_SIZE)
int getUdpSendBufferSize();
/**
@@ -1441,7 +1554,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#udp-send-buffer-size">"udp-send-buffer-size"</a>
* property
*/
- @ConfigAttributeSetter(name=UDP_SEND_BUFFER_SIZE_NAME)
+ @ConfigAttributeSetter(name = UDP_SEND_BUFFER_SIZE)
void setUdpSendBufferSize(int value);
/**
@@ -1458,7 +1571,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* The name of the corresponding property
*/
- @ConfigAttribute(type=Integer.class, min=MIN_UDP_SEND_BUFFER_SIZE)
+ @ConfigAttribute(type = Integer.class, min = MIN_UDP_SEND_BUFFER_SIZE)
String UDP_SEND_BUFFER_SIZE_NAME = UDP_SEND_BUFFER_SIZE;
/**
@@ -1466,7 +1579,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#udp-recv-buffer-size">"udp-recv-buffer-size"</a>
* property
*/
- @ConfigAttributeGetter(name=UDP_RECV_BUFFER_SIZE_NAME)
+ @ConfigAttributeGetter(name = UDP_RECV_BUFFER_SIZE)
int getUdpRecvBufferSize();
/**
@@ -1474,7 +1587,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#udp-recv-buffer-size">"udp-recv-buffer-size"</a>
* property
*/
- @ConfigAttributeSetter(name=UDP_RECV_BUFFER_SIZE_NAME)
+ @ConfigAttributeSetter(name = UDP_RECV_BUFFER_SIZE)
void setUdpRecvBufferSize(int value);
/**
@@ -1494,11 +1607,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MIN_UDP_RECV_BUFFER_SIZE = 2048;
-
/**
* The name of the corresponding property
*/
- @ConfigAttribute(type=Integer.class, min=MIN_UDP_RECV_BUFFER_SIZE)
+ @ConfigAttribute(type = Integer.class, min = MIN_UDP_RECV_BUFFER_SIZE)
String UDP_RECV_BUFFER_SIZE_NAME = UDP_RECV_BUFFER_SIZE;
/**
@@ -1506,28 +1618,32 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#disable-tcp">"disable-tcp"</a>
* property
*/
- @ConfigAttributeGetter(name=DISABLE_TCP_NAME)
+ @ConfigAttributeGetter(name = DISABLE_TCP)
boolean getDisableTcp();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#disable-tcp">"disable-tcp"</a>
* property.
*/
- @ConfigAttributeSetter(name=DISABLE_TCP_NAME)
+ @ConfigAttributeSetter(name = DISABLE_TCP)
void setDisableTcp(boolean newValue);
- /** The name of the corresponding property */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * The name of the corresponding property
+ */
+ @ConfigAttribute(type = Boolean.class)
String DISABLE_TCP_NAME = DISABLE_TCP;
- /** The default value of the corresponding property */
+ /**
+ * The default value of the corresponding property
+ */
boolean DEFAULT_DISABLE_TCP = false;
-
/**
* Turns on timing statistics for the distributed system
*/
- @ConfigAttributeSetter(name=ENABLE_TIME_STATISTICS_NAME)
+ @ConfigAttributeSetter(name = ENABLE_TIME_STATISTICS)
void setEnableTimeStatistics(boolean newValue);
/**
@@ -1535,22 +1651,25 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#enable-time-statistics">enable-time-statistics</a>
* property
*/
- @ConfigAttributeGetter(name=ENABLE_TIME_STATISTICS_NAME)
+ @ConfigAttributeGetter(name = ENABLE_TIME_STATISTICS)
boolean getEnableTimeStatistics();
- /** the name of the corresponding property */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * the name of the corresponding property
+ */
+ @ConfigAttribute(type = Boolean.class)
String ENABLE_TIME_STATISTICS_NAME = ENABLE_TIME_STATISTICS;
- /** The default value of the corresponding property */
+ /**
+ * The default value of the corresponding property
+ */
boolean DEFAULT_ENABLE_TIME_STATISTICS = false;
-
/**
- * Sets the value for
- <a href="../DistributedSystem.html#use-cluster-configuration">use-shared-configuration</a>
+ * Sets the value for
+ * <a href="../DistributedSystem.html#use-cluster-configuration">use-shared-configuration</a>
*/
- @ConfigAttributeSetter(name=USE_CLUSTER_CONFIGURATION_NAME)
+ @ConfigAttributeSetter(name = USE_CLUSTER_CONFIGURATION)
void setUseSharedConfiguration(boolean newValue);
/**
@@ -1558,21 +1677,25 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#use-cluster-configuration">use-cluster-configuration</a>
* property
*/
- @ConfigAttributeGetter(name=USE_CLUSTER_CONFIGURATION_NAME)
+ @ConfigAttributeGetter(name = USE_CLUSTER_CONFIGURATION)
boolean getUseSharedConfiguration();
- /** the name of the corresponding property */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * the name of the corresponding property
+ */
+ @ConfigAttribute(type = Boolean.class)
String USE_CLUSTER_CONFIGURATION_NAME = USE_CLUSTER_CONFIGURATION;
- /** The default value of the corresponding property */
+ /**
+ * The default value of the corresponding property
+ */
boolean DEFAULT_USE_CLUSTER_CONFIGURATION = true;
-
+
/**
- * Sets the value for
- <a href="../DistributedSystem.html#enable-cluster-configuration">enable-cluster-configuration</a>
+ * Sets the value for
+ * <a href="../DistributedSystem.html#enable-cluster-configuration">enable-cluster-configuration</a>
*/
- @ConfigAttributeSetter(name=ENABLE_CLUSTER_CONFIGURATION_NAME)
+ @ConfigAttributeSetter(name = ENABLE_CLUSTER_CONFIGURATION)
void setEnableClusterConfiguration(boolean newValue);
/**
@@ -1580,56 +1703,66 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#enable-cluster-configuration">enable-cluster-configuration</a>
* property
*/
- @ConfigAttributeGetter(name=ENABLE_CLUSTER_CONFIGURATION_NAME)
+ @ConfigAttributeGetter(name = ENABLE_CLUSTER_CONFIGURATION)
boolean getEnableClusterConfiguration();
- /** the name of the corresponding property */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * the name of the corresponding property
+ */
+ @ConfigAttribute(type = Boolean.class)
String ENABLE_CLUSTER_CONFIGURATION_NAME = ENABLE_CLUSTER_CONFIGURATION;
- /** The default value of the corresponding property */
+ /**
+ * The default value of the corresponding property
+ */
boolean DEFAULT_ENABLE_CLUSTER_CONFIGURATION = true;
- @ConfigAttribute(type=Boolean.class)
+ @ConfigAttribute(type = Boolean.class)
String LOAD_CLUSTER_CONFIG_FROM_DIR_NAME = LOAD_CLUSTER_CONFIGURATION_FROM_DIR;
boolean DEFAULT_LOAD_CLUSTER_CONFIG_FROM_DIR = false;
-
+
/**
- * Returns the value of
+ * Returns the value of
* <a href="../DistributedSystem.html#cluster-configuration-dir">cluster-configuration-dir</a>
* property
*/
- @ConfigAttributeGetter(name=LOAD_CLUSTER_CONFIG_FROM_DIR_NAME)
+ @ConfigAttributeGetter(name = LOAD_CLUSTER_CONFIGURATION_FROM_DIR)
boolean getLoadClusterConfigFromDir();
-
+
/**
- * Sets the value of
+ * Sets the value of
* <a href="../DistributedSystem.html#cluster-configuration-dir">cluster-configuration-dir</a>
* property
*/
- @ConfigAttributeSetter(name=LOAD_CLUSTER_CONFIG_FROM_DIR_NAME)
+ @ConfigAttributeSetter(name = LOAD_CLUSTER_CONFIGURATION_FROM_DIR)
void setLoadClusterConfigFromDir(boolean newValue);
- @ConfigAttribute(type=String.class)
- String CLUSTER_CONFIGURATION_DIR = SystemConfigurationProperties.CLUSTER_CONFIGURATION_DIR;
+ @ConfigAttribute(type = String.class)
+ String CLUSTER_CONFIGURATION_DIR_NAME = CLUSTER_CONFIGURATION_DIR;
String DEFAULT_CLUSTER_CONFIGURATION_DIR = System.getProperty("user.dir");
- @ConfigAttributeGetter(name=CLUSTER_CONFIGURATION_DIR)
+ @ConfigAttributeGetter(name = CLUSTER_CONFIGURATION_DIR)
String getClusterConfigDir();
- @ConfigAttributeSetter(name=CLUSTER_CONFIGURATION_DIR)
+
+ @ConfigAttributeSetter(name = CLUSTER_CONFIGURATION_DIR)
void setClusterConfigDir(String clusterConfigDir);
-
- /** Turns on network partition detection */
- @ConfigAttributeSetter(name=ENABLE_NETWORK_PARTITION_DETECTION_NAME)
+
+ /**
+ * Turns on network partition detection
+ */
+ @ConfigAttributeSetter(name = ENABLE_NETWORK_PARTITION_DETECTION)
void setEnableNetworkPartitionDetection(boolean newValue);
+
/**
* Returns the value of the enable-network-partition-detection property
*/
- @ConfigAttributeGetter(name=ENABLE_NETWORK_PARTITION_DETECTION_NAME)
+ @ConfigAttributeGetter(name = ENABLE_NETWORK_PARTITION_DETECTION)
boolean getEnableNetworkPartitionDetection();
- /** the name of the corresponding property */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * the name of the corresponding property
+ */
+ @ConfigAttribute(type = Boolean.class)
String ENABLE_NETWORK_PARTITION_DETECTION_NAME = ENABLE_NETWORK_PARTITION_DETECTION;
boolean DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION = false;
@@ -1638,7 +1771,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#member-timeout">"member-timeout"</a>
* property
*/
- @ConfigAttributeGetter(name=MEMBER_TIMEOUT_NAME)
+ @ConfigAttributeGetter(name = MEMBER_TIMEOUT)
int getMemberTimeout();
/**
@@ -1646,7 +1779,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <a href="../DistributedSystem.html#member-timeout">"member-timeout"</a>
* property
*/
- @ConfigAttributeSetter(name=MEMBER_TIMEOUT_NAME)
+ @ConfigAttributeSetter(name = MEMBER_TIMEOUT)
void setMemberTimeout(int value);
/**
@@ -1654,48 +1787,57 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int DEFAULT_MEMBER_TIMEOUT = 5000;
- /** The minimum member-timeout setting of 1000 milliseconds */
+ /**
+ * The minimum member-timeout setting of 1000 milliseconds
+ */
int MIN_MEMBER_TIMEOUT = 10;
- /**The maximum member-timeout setting of 600000 millieseconds */
+ /**
+ * The maximum member-timeout setting of 600000 millieseconds
+ */
int MAX_MEMBER_TIMEOUT = 600000;
/**
* The name of the corresponding property
*/
- @ConfigAttribute(type=Integer.class, min=MIN_MEMBER_TIMEOUT, max=MAX_MEMBER_TIMEOUT)
+ @ConfigAttribute(type = Integer.class, min = MIN_MEMBER_TIMEOUT, max = MAX_MEMBER_TIMEOUT)
String MEMBER_TIMEOUT_NAME = MEMBER_TIMEOUT;
- @ConfigAttribute(type=int[].class)
+ @ConfigAttribute(type = int[].class)
String MEMBERSHIP_PORT_RANGE_NAME = MEMBERSHIP_PORT_RANGE;
int[] DEFAULT_MEMBERSHIP_PORT_RANGE = new int[] { 1024, 65535 };
- @ConfigAttributeGetter(name=MEMBERSHIP_PORT_RANGE_NAME)
+ @ConfigAttributeGetter(name = MEMBERSHIP_PORT_RANGE)
int[] getMembershipPortRange();
- @ConfigAttributeSetter(name=MEMBERSHIP_PORT_RANGE_NAME)
+ @ConfigAttributeSetter(name = MEMBERSHIP_PORT_RANGE)
void setMembershipPortRange(int[] range);
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#conserve-sockets">"conserve-sockets"</a>
* property
*/
- @ConfigAttributeGetter(name=CONSERVE_SOCKETS_NAME)
+ @ConfigAttributeGetter(name = CONSERVE_SOCKETS)
boolean getConserveSockets();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#conserve-sockets">"conserve-sockets"</a>
* property.
*/
- @ConfigAttributeSetter(name=CONSERVE_SOCKETS_NAME)
+ @ConfigAttributeSetter(name = CONSERVE_SOCKETS)
void setConserveSockets(boolean newValue);
- /** The name of the "conserveSockets" property */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * The name of the "conserveSockets" property
+ */
+ @ConfigAttribute(type = Boolean.class)
String CONSERVE_SOCKETS_NAME = CONSERVE_SOCKETS;
- /** The default value of the "conserveSockets" property */
+ /**
+ * The default value of the "conserveSockets" property
+ */
boolean DEFAULT_CONSERVE_SOCKETS = true;
/**
@@ -1703,26 +1845,32 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#roles">"roles"</a>
* property
*/
- @ConfigAttributeGetter(name=ROLES_NAME)
+ @ConfigAttributeGetter(name = ROLES)
String getRoles();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#roles">"roles"</a>
* property.
*/
- @ConfigAttributeSetter(name=ROLES_NAME)
+ @ConfigAttributeSetter(name = ROLES)
void setRoles(String roles);
- /** The name of the "roles" property */
- @ConfigAttribute(type=String.class)
+
+ /**
+ * The name of the "roles" property
+ */
+ @ConfigAttribute(type = String.class)
String ROLES_NAME = ROLES;
- /** The default value of the "roles" property */
+ /**
+ * The default value of the "roles" property
+ */
String DEFAULT_ROLES = "";
-
/**
- * The name of the "max wait time for reconnect" property */
- @ConfigAttribute(type=Integer.class)
+ * The name of the "max wait time for reconnect" property
+ */
+ @ConfigAttribute(type = Integer.class)
String MAX_WAIT_TIME_FOR_RECONNECT_NAME = MAX_WAIT_TIME_RECONNECT;
/**
@@ -1732,37 +1880,37 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* Sets the max wait timeout, in milliseconds, for reconnect.
- * */
- @ConfigAttributeSetter(name=MAX_WAIT_TIME_FOR_RECONNECT_NAME)
+ */
+ @ConfigAttributeSetter(name = MAX_WAIT_TIME_RECONNECT)
void setMaxWaitTimeForReconnect(int timeOut);
/**
* Returns the max wait timeout, in milliseconds, for reconnect.
- * */
- @ConfigAttributeGetter(name=MAX_WAIT_TIME_FOR_RECONNECT_NAME)
+ */
+ @ConfigAttributeGetter(name = MAX_WAIT_TIME_RECONNECT)
int getMaxWaitTimeForReconnect();
/**
* The name of the "max number of tries for reconnect" property.
- * */
- @ConfigAttribute(type=Integer.class)
- String MAX_NUM_RECONNECT_TRIES = SystemConfigurationProperties.MAX_NUM_RECONNECT_TRIES;
+ */
+ @ConfigAttribute(type = Integer.class)
+ String MAX_NUM_RECONNECT_TRIES_NAME = MAX_NUM_RECONNECT_TRIES;
/**
- * Default value for MAX_NUM_RECONNECT_TRIES.
+ * Default value for MAX_NUM_RECONNECT_TRIES_NAME.
*/
int DEFAULT_MAX_NUM_RECONNECT_TRIES = 3;
/**
* Sets the max number of tries for reconnect.
- * */
- @ConfigAttributeSetter(name=MAX_NUM_RECONNECT_TRIES)
+ */
+ @ConfigAttributeSetter(name = MAX_NUM_RECONNECT_TRIES)
void setMaxNumReconnectTries(int tries);
/**
* Returns the value for max number of tries for reconnect.
- * */
- @ConfigAttributeGetter(name=MAX_NUM_RECONNECT_TRIES)
+ */
+ @ConfigAttributeGetter(name = MAX_NUM_RECONNECT_TRIES)
int getMaxNumReconnectTries();
// ------------------- Asynchronous Messaging Properties -------------------
@@ -1772,120 +1920,149 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#async-distribution-timeout">
* "async-distribution-timeout"</a> property.
*/
- @ConfigAttributeGetter(name=ASYNC_DISTRIBUTION_TIMEOUT_NAME)
+ @ConfigAttributeGetter(name = ASYNC_DISTRIBUTION_TIMEOUT)
int getAsyncDistributionTimeout();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#async-distribution-timeout">
* "async-distribution-timeout"</a> property.
*/
- @ConfigAttributeSetter(name=ASYNC_DISTRIBUTION_TIMEOUT_NAME)
+ @ConfigAttributeSetter(name = ASYNC_DISTRIBUTION_TIMEOUT)
void setAsyncDistributionTimeout(int newValue);
- /** The default value of "asyncDistributionTimeout" is <code>0</code>. */
+ /**
+ * The default value of "asyncDistributionTimeout" is <code>0</code>.
+ */
int DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT = 0;
- /** The minimum value of "asyncDistributionTimeout" is <code>0</code>. */
+ /**
+ * The minimum value of "asyncDistributionTimeout" is <code>0</code>.
+ */
int MIN_ASYNC_DISTRIBUTION_TIMEOUT = 0;
- /** The maximum value of "asyncDistributionTimeout" is <code>60000</code>. */
+ /**
+ * The maximum value of "asyncDistributionTimeout" is <code>60000</code>.
+ */
int MAX_ASYNC_DISTRIBUTION_TIMEOUT = 60000;
- /** The name of the "asyncDistributionTimeout" property */
- @ConfigAttribute(type=Integer.class, min=MIN_ASYNC_DISTRIBUTION_TIMEOUT, max=MAX_ASYNC_DISTRIBUTION_TIMEOUT)
+ /**
+ * The name of the "asyncDistributionTimeout" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_ASYNC_DISTRIBUTION_TIMEOUT, max = MAX_ASYNC_DISTRIBUTION_TIMEOUT)
String ASYNC_DISTRIBUTION_TIMEOUT_NAME = ASYNC_DISTRIBUTION_TIMEOUT;
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#async-queue-timeout">
* "async-queue-timeout"</a> property.
*/
- @ConfigAttributeGetter(name=ASYNC_QUEUE_TIMEOUT_NAME)
+ @ConfigAttributeGetter(name = ASYNC_QUEUE_TIMEOUT)
int getAsyncQueueTimeout();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#async-queue-timeout">
* "async-queue-timeout"</a> property.
*/
- @ConfigAttributeSetter(name=ASYNC_QUEUE_TIMEOUT_NAME)
+ @ConfigAttributeSetter(name = ASYNC_QUEUE_TIMEOUT)
void setAsyncQueueTimeout(int newValue);
- /** The default value of "asyncQueueTimeout" is <code>60000</code>. */
+ /**
+ * The default value of "asyncQueueTimeout" is <code>60000</code>.
+ */
int DEFAULT_ASYNC_QUEUE_TIMEOUT = 60000;
- /** The minimum value of "asyncQueueTimeout" is <code>0</code>. */
+ /**
+ * The minimum value of "asyncQueueTimeout" is <code>0</code>.
+ */
int MIN_ASYNC_QUEUE_TIMEOUT = 0;
- /** The maximum value of "asyncQueueTimeout" is <code>86400000</code>. */
+ /**
+ * The maximum value of "asyncQueueTimeout" is <code>86400000</code>.
+ */
int MAX_ASYNC_QUEUE_TIMEOUT = 86400000;
- /** The name of the "asyncQueueTimeout" property */
- @ConfigAttribute(type=Integer.class, min=MIN_ASYNC_QUEUE_TIMEOUT, max=MAX_ASYNC_QUEUE_TIMEOUT)
+ /**
+ * The name of the "asyncQueueTimeout" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_ASYNC_QUEUE_TIMEOUT, max = MAX_ASYNC_QUEUE_TIMEOUT)
String ASYNC_QUEUE_TIMEOUT_NAME = ASYNC_QUEUE_TIMEOUT;
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#async-max-queue-size">
* "async-max-queue-size"</a> property.
*/
- @ConfigAttributeGetter(name=ASYNC_MAX_QUEUE_SIZE_NAME)
+ @ConfigAttributeGetter(name = ASYNC_MAX_QUEUE_SIZE)
int getAsyncMaxQueueSize();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#async-max-queue-size">
* "async-max-queue-size"</a> property.
*/
- @ConfigAttributeSetter(name=ASYNC_MAX_QUEUE_SIZE_NAME)
+ @ConfigAttributeSetter(name = ASYNC_MAX_QUEUE_SIZE)
void setAsyncMaxQueueSize(int newValue);
- /** The default value of "asyncMaxQueueSize" is <code>8</code>. */
+ /**
+ * The default value of "asyncMaxQueueSize" is <code>8</code>.
+ */
int DEFAULT_ASYNC_MAX_QUEUE_SIZE = 8;
- /** The minimum value of "asyncMaxQueueSize" is <code>0</code>. */
+ /**
+ * The minimum value of "asyncMaxQueueSize" is <code>0</code>.
+ */
int MIN_ASYNC_MAX_QUEUE_SIZE = 0;
- /** The maximum value of "asyncMaxQueueSize" is <code>1024</code>. */
+ /**
+ * The maximum value of "asyncMaxQueueSize" is <code>1024</code>.
+ */
int MAX_ASYNC_MAX_QUEUE_SIZE = 1024;
/** The name of the "asyncMaxQueueSize" property */
@ConfigAttribute(type=Integer.class, min=MIN_ASYNC_MAX_QUEUE_SIZE, max=MAX_ASYNC_MAX_QUEUE_SIZE)
- public static final String ASYNC_MAX_QUEUE_SIZE_NAME = "async-max-queue-size";
+ String ASYNC_MAX_QUEUE_SIZE_NAME = "async-max-queue-size";
/** @since GemFire 5.7 */
@ConfigAttribute(type=String.class)
- public static final String CLIENT_CONFLATION_PROP_NAME = "conflate-events";
+ String CLIENT_CONFLATION_PROP_NAME = "conflate-events";
/** @since GemFire 5.7 */
- public static final String CLIENT_CONFLATION_PROP_VALUE_DEFAULT = "server";
+ String CLIENT_CONFLATION_PROP_VALUE_DEFAULT = "server";
/** @since GemFire 5.7 */
- public static final String CLIENT_CONFLATION_PROP_VALUE_ON = "true";
+ String CLIENT_CONFLATION_PROP_VALUE_ON = "true";
/** @since GemFire 5.7 */
- public static final String CLIENT_CONFLATION_PROP_VALUE_OFF = "false";
-
-
+ String CLIENT_CONFLATION_PROP_VALUE_OFF = "false";
+
+
/** @since Geode 1.0 */
@ConfigAttribute(type=Boolean.class)
String DISTRIBUTED_TRANSACTIONS_NAME = DISTRIBUTED_TRANSACTIONS;
boolean DEFAULT_DISTRIBUTED_TRANSACTIONS = false;
- @ConfigAttributeGetter(name=DISTRIBUTED_TRANSACTIONS_NAME)
+ @ConfigAttributeGetter(name = DISTRIBUTED_TRANSACTIONS)
boolean getDistributedTransactions();
- @ConfigAttributeSetter(name=DISTRIBUTED_TRANSACTIONS_NAME)
+ @ConfigAttributeSetter(name = DISTRIBUTED_TRANSACTIONS)
void setDistributedTransactions(boolean value);
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#conflate-events">"conflate-events"</a>
* property.
* @since GemFire 5.7
*/
- @ConfigAttributeGetter(name=CLIENT_CONFLATION_PROP_NAME)
+ @ConfigAttributeGetter(name = CONFLATE_EVENTS)
String getClientConflation();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#conflate-events">"conflate-events"</a>
* property.
* @since GemFire 5.7
*/
- @ConfigAttributeSetter(name=CLIENT_CONFLATION_PROP_NAME)
+ @ConfigAttributeSetter(name = CONFLATE_EVENTS)
void setClientConflation(String clientConflation);
// -------------------------------------------------------------------------
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#durable-client-id">"durable-client-id"</a>
* property.
*/
- @ConfigAttributeGetter(name=DURABLE_CLIENT_ID_NAME)
+ @ConfigAttributeGetter(name = DURABLE_CLIENT_ID)
String getDurableClientId();
/**
@@ -1893,11 +2070,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#durable-client-id">"durable-client-id"</a>
* property.
*/
- @ConfigAttributeSetter(name=DURABLE_CLIENT_ID_NAME)
+ @ConfigAttributeSetter(name = DURABLE_CLIENT_ID)
void setDurableClientId(String durableClientId);
- /** The name of the "durableClientId" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the "durableClientId" property
+ */
+ @ConfigAttribute(type = String.class)
String DURABLE_CLIENT_ID_NAME = DURABLE_CLIENT_ID;
/**
@@ -1911,7 +2090,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#durable-client-timeout">"durable-client-timeout"</a>
* property.
*/
- @ConfigAttributeGetter(name=DURABLE_CLIENT_TIMEOUT_NAME)
+ @ConfigAttributeGetter(name = DURABLE_CLIENT_TIMEOUT)
int getDurableClientTimeout();
/**
@@ -1919,11 +2098,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#durable-client-timeout">"durable-client-timeout"</a>
* property.
*/
- @ConfigAttributeSetter(name=DURABLE_CLIENT_TIMEOUT_NAME)
+ @ConfigAttributeSetter(name = DURABLE_CLIENT_TIMEOUT)
void setDurableClientTimeout(int durableClientTimeout);
- /** The name of the "durableClientTimeout" property */
- @ConfigAttribute(type=Integer.class)
+ /**
+ * The name of the "durableClientTimeout" property
+ */
+ @ConfigAttribute(type = Integer.class)
String DURABLE_CLIENT_TIMEOUT_NAME = DURABLE_CLIENT_TIMEOUT;
/**
@@ -1936,7 +2117,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user module name for client authentication initializer in <a
* href="../DistributedSystem.html#security-client-auth-init">"security-client-auth-init"</a>
*/
- @ConfigAttributeGetter(name=SECURITY_CLIENT_AUTH_INIT_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_AUTH_INIT)
String getSecurityClientAuthInit();
/**
@@ -1944,11 +2125,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-auth-init">"security-client-auth-init"</a>
* property.
*/
- @ConfigAttributeSetter(name=SECURITY_CLIENT_AUTH_INIT_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_AUTH_INIT)
void setSecurityClientAuthInit(String attValue);
- /** The name of user defined method name for "security-client-auth-init" property*/
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of user defined method name for "security-client-auth-init" property
+ */
+ @ConfigAttribute(type = String.class)
String SECURITY_CLIENT_AUTH_INIT_NAME = SECURITY_CLIENT_AUTH_INIT;
/**
@@ -1961,7 +2144,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user module name authenticating client credentials in <a
* href="../DistributedSystem.html#security-client-authenticator">"security-client-authenticator"</a>
*/
- @ConfigAttributeGetter(name=SECURITY_CLIENT_AUTHENTICATOR_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_AUTHENTICATOR_NAME)
String getSecurityClientAuthenticator();
/**
@@ -1969,11 +2152,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-authenticator">"security-client-authenticator"</a>
* property.
*/
- @ConfigAttributeSetter(name=SECURITY_CLIENT_AUTHENTICATOR_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_AUTHENTICATOR_NAME)
void setSecurityClientAuthenticator(String attValue);
- /** The name of factory method for "security-client-authenticator" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of factory method for "security-client-authenticator" property
+ */
+ @ConfigAttribute(type = String.class)
String SECURITY_CLIENT_AUTHENTICATOR_NAME = SECURITY_CLIENT_AUTHENTICATOR;
/**
@@ -1986,7 +2171,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns name of algorithm to use for Diffie-Hellman key exchange <a
* href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
*/
- @ConfigAttributeGetter(name=SECURITY_CLIENT_DHALGO_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_DHALGO_NAME)
String getSecurityClientDHAlgo();
/**
@@ -1994,14 +2179,14 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
* property.
*/
- @ConfigAttributeSetter(name=SECURITY_CLIENT_DHALGO_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_DHALGO_NAME)
void setSecurityClientDHAlgo(String attValue);
/**
* The name of the Diffie-Hellman symmetric algorithm "security-client-dhalgo"
* property.
*/
- @ConfigAttribute(type=String.class)
+ @ConfigAttribute(type = String.class)
String SECURITY_CLIENT_DHALGO_NAME = SECURITY_CLIENT_DHALGO;
/**
@@ -2016,7 +2201,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user defined method name for peer authentication initializer in <a
* href="../DistributedSystem.html#security-peer-auth-init">"security-peer-auth-init"</a>
*/
- @ConfigAttributeGetter(name=SECURITY_PEER_AUTH_INIT_NAME)
+ @ConfigAttributeGetter(name = SECURITY_PEER_AUTH_INIT_NAME)
String getSecurityPeerAuthInit();
/**
@@ -2024,11 +2209,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-peer-auth-init">"security-peer-auth-init"</a>
* property.
*/
- @ConfigAttributeSetter(name=SECURITY_PEER_AUTH_INIT_NAME)
+ @ConfigAttributeSetter(name = SECURITY_PEER_AUTH_INIT_NAME)
void setSecurityPeerAuthInit(String attValue);
- /** The name of user module for "security-peer-auth-init" property*/
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of user module for "security-peer-auth-init" property
+ */
+ @ConfigAttribute(type = String.class)
String SECURITY_PEER_AUTH_INIT_NAME = SECURITY_PEER_AUTH_INIT;
/**
@@ -2041,7 +2228,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user defined method name authenticating peer's credentials in <a
* href="../DistributedSystem.html#security-peer-authenticator">"security-peer-authenticator"</a>
*/
- @ConfigAttributeGetter(name=SECURITY_PEER_AUTHENTICATOR_NAME)
+ @ConfigAttributeGetter(name = SECURITY_PEER_AUTHENTICATOR_NAME)
String getSecurityPeerAuthenticator();
/**
@@ -2049,11 +2236,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-peer-authenticator">"security-peer-authenticator"</a>
* property.
*/
- @ConfigAttributeSetter(name=SECURITY_PEER_AUTHENTICATOR_NAME)
+ @ConfigAttributeSetter(name = SECURITY_PEER_AUTHENTICATOR_NAME)
void setSecurityPeerAuthenticator(String attValue);
- /** The name of user defined method for "security-peer-authenticator" property*/
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of user defined method for "security-peer-authenticator" property
+ */
+ @ConfigAttribute(type = String.class)
String SECURITY_PEER_AUTHENTICATOR_NAME = SECURITY_PEER_AUTHENTICATOR;
/**
@@ -2066,7 +2255,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user module name authorizing client credentials in <a
* href="../DistributedSystem.html#security-client-accessor">"security-client-accessor"</a>
*/
- @ConfigAttributeGetter(name=SECURITY_CLIENT_ACCESSOR_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_ACCESSOR_NAME)
String getSecurityClientAccessor();
/**
@@ -2074,11 +2263,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-accessor">"security-client-accessor"</a>
* property.
*/
- @ConfigAttributeSetter(name=SECURITY_CLIENT_ACCESSOR_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_ACCESSOR_NAME)
void setSecurityClientAccessor(String attValue);
- /** The name of the factory method for "security-client-accessor" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the factory method for "security-client-accessor" property
+ */
+ @ConfigAttribute(type = String.class)
String SECURITY_CLIENT_ACCESSOR_NAME = SECURITY_CLIENT_ACCESSOR;
/**
@@ -2091,7 +2282,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user module name authorizing client credentials in <a
* href="../DistributedSystem.html#security-client-accessor-pp">"security-client-accessor-pp"</a>
*/
- @ConfigAttributeGetter(name=SECURITY_CLIENT_ACCESSOR_PP_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_ACCESSOR_PP_NAME)
String getSecurityClientAccessorPP();
/**
@@ -2099,11 +2290,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-accessor-pp">"security-client-accessor-pp"</a>
* property.
*/
- @ConfigAttributeSetter(name=SECURITY_CLIENT_ACCESSOR_PP_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_ACCESSOR_PP_NAME)
void setSecurityClientAccessorPP(String attValue);
- /** The name of the factory method for "security-client-accessor-pp" property */
- @ConfigAttribute(type=String.class)
+ /**
+ * The name of the factory method for "security-client-accessor-pp" property
+ */
+ @ConfigAttribute(type = String.class)
String SECURITY_CLIENT_ACCESSOR_PP_NAME = SECURITY_CLIENT_ACCESSOR_PP;
/**
@@ -2117,16 +2310,15 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @return the current security log-level
*/
- @ConfigAttributeGetter(name=SECURITY_LOG_LEVEL_NAME)
+ @ConfigAttributeGetter(name = SECURITY_LOG_LEVEL_NAME)
int getSecurityLogLevel();
/**
* Set the log-level for security logging.
*
- * @param level
- * the new security log-level
+ * @param level the new security log-level
*/
- @ConfigAttributeSetter(name=SECURITY_LOG_LEVEL_NAME)
+ @ConfigAttributeSetter(name = SECURITY_LOG_LEVEL_NAME)
void setSecurityLogLevel(int level);
/**
@@ -2135,7 +2327,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* {@link DistributedSystem#getSecurityLogWriter()}
*/
// type is String because the config file "config", "debug", "fine" etc, but the setter getter accepts int
- @ConfigAttribute(type=String.class)
+ @ConfigAttribute(type = String.class)
String SECURITY_LOG_LEVEL_NAME = SECURITY_LOG_LEVEL;
/**
@@ -2143,7 +2335,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @return <code>null</code> if logging information goes to standard out
*/
- @ConfigAttributeGetter(name=SECURITY_LOG_FILE_NAME)
+ @ConfigAttributeGetter(name = SECURITY_LOG_FILE_NAME)
File getSecurityLogFile();
/**
@@ -2153,22 +2345,19 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* <p>
* The security log file can not be changed while the system is running.
*
- * @throws IllegalArgumentException
- * if the specified value is not acceptable.
- * @throws com.gemstone.gemfire.UnmodifiableException
- * if this attribute can not be modified.
- * @throws com.gemstone.ge
<TRUNCATED>
[02/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index 53e6cca..6e70d92 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -16,49 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.wan;
-import java.io.File;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentSkipListSet;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
@@ -71,13 +29,8 @@ import com.gemstone.gemfire.cache.persistence.PartitionOfflineException;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
-import com.gemstone.gemfire.cache.wan.GatewayQueueEvent;
-import com.gemstone.gemfire.cache.wan.GatewayReceiver;
-import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
-import com.gemstone.gemfire.cache.wan.GatewaySender;
+import com.gemstone.gemfire.cache.wan.*;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
-import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
-import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -88,21 +41,11 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.CacheConfig;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.CustomerIDPartitionResolver;
-import com.gemstone.gemfire.internal.cache.ForceReattemptException;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.RegionQueue;
-import com.gemstone.gemfire.internal.cache.execute.data.CustId;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.execute.data.*;
import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
-import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
import com.gemstone.gemfire.internal.cache.execute.data.Shipment;
-import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
import com.gemstone.gemfire.internal.cache.partitioned.PRLocallyDestroyedException;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerStats;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
@@ -114,19 +57,20 @@ import com.gemstone.gemfire.internal.cache.wan.serial.ConcurrentSerialGatewaySen
import com.gemstone.gemfire.internal.cache.wan.serial.SerialGatewaySenderQueue;
import com.gemstone.gemfire.pdx.SimpleClass;
import com.gemstone.gemfire.pdx.SimpleClass1;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
import com.jayway.awaitility.Awaitility;
+import java.io.File;
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.InetSocketAddress;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class WANTestBase extends DistributedTestCase{
protected static Cache cache;
@@ -214,7 +158,7 @@ public class WANTestBase extends DistributedTestCase{
public static void createLocator(int dsId, int port, Set<String> localLocatorsList, Set<String> remoteLocatorsList){
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
StringBuffer localLocatorBuffer = new StringBuffer(localLocatorsList.toString());
localLocatorBuffer.deleteCharAt(0);
@@ -222,8 +166,8 @@ public class WANTestBase extends DistributedTestCase{
String localLocator = localLocatorBuffer.toString();
localLocator = localLocator.replace(" ", "");
- props.setProperty(DistributionConfig.LOCATORS_NAME, localLocator);
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, localLocator);
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
StringBuffer remoteLocatorBuffer = new StringBuffer(remoteLocatorsList.toString());
remoteLocatorBuffer.deleteCharAt(0);
remoteLocatorBuffer.deleteCharAt(remoteLocatorBuffer.lastIndexOf("]"));
@@ -238,10 +182,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
return port;
}
@@ -251,10 +195,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
return port;
}
@@ -264,10 +208,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locatorPort + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + locatorPort + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
return port;
}
@@ -277,10 +221,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locatorPort + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + locatorPort + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
return port;
}
@@ -290,10 +234,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
@@ -303,10 +247,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
props.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + oldPort + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + oldPort + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + oldPort + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + oldPort + "],server=true,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
}
@@ -317,10 +261,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
@@ -332,10 +276,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + localPort + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + localPort + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
@@ -347,10 +291,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + localPort + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + localPort + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
@@ -905,8 +849,8 @@ public class WANTestBase extends DistributedTestCase{
public static void createCacheConserveSockets(Boolean conserveSockets,Integer locPort){
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort + "]");
props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, conserveSockets.toString());
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
@@ -921,8 +865,8 @@ public class WANTestBase extends DistributedTestCase{
props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
}
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort + "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
}
@@ -950,8 +894,8 @@ public class WANTestBase extends DistributedTestCase{
TestUtil.getResourcePath(WANTestBase.class, "/com/gemstone/gemfire/cache/client/internal/client.truststore"));
gemFireProps.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
- gemFireProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- gemFireProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ gemFireProps.setProperty(MCAST_PORT, "0");
+ gemFireProps.setProperty(LOCATORS, "localhost[" + locPort + "]");
LogWriterUtils.getLogWriter().info("Starting cache ds with following properties \n" + gemFireProps);
@@ -962,8 +906,8 @@ public class WANTestBase extends DistributedTestCase{
public static void createCache_PDX(Integer locPort){
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort + "]");
InternalDistributedSystem ds = test.getSystem(props);
CacheConfig cacheConfig = new CacheConfig();
cacheConfig.setPdxPersistent(true);
@@ -979,8 +923,8 @@ public class WANTestBase extends DistributedTestCase{
public static void createCache(Integer locPort1, Integer locPort2){
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort1
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort1
+ "],localhost[" + locPort2 + "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
@@ -989,7 +933,7 @@ public class WANTestBase extends DistributedTestCase{
public static void createCacheWithoutLocator(Integer mCastPort){
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, ""+mCastPort);
+ props.setProperty(MCAST_PORT, "" + mCastPort);
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
}
@@ -1993,9 +1937,9 @@ public class WANTestBase extends DistributedTestCase{
public static void createReceiverWithBindAddress(int locPort) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = test.getSystem(props);
@@ -2044,8 +1988,8 @@ public class WANTestBase extends DistributedTestCase{
TestUtil.getResourcePath(WANTestBase.class, "/com/gemstone/gemfire/cache/client/internal/cacheserver.truststore"));
gemFireProps.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
- gemFireProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- gemFireProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ gemFireProps.setProperty(MCAST_PORT, "0");
+ gemFireProps.setProperty(LOCATORS, "localhost[" + locPort + "]");
LogWriterUtils.getLogWriter().info("Starting cache ds with following properties \n" + gemFireProps);
@@ -2071,8 +2015,8 @@ public class WANTestBase extends DistributedTestCase{
public static void createReceiverAndServer(int locPort) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = test.getSystem(props);
@@ -2105,8 +2049,8 @@ public class WANTestBase extends DistributedTestCase{
public static int createServer(int locPort) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
@@ -2127,8 +2071,8 @@ public class WANTestBase extends DistributedTestCase{
String regionName) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
@@ -2161,8 +2105,8 @@ public class WANTestBase extends DistributedTestCase{
public static int createReceiver_PDX(int locPort) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort + "]");
InternalDistributedSystem ds = test.getSystem(props);
CacheConfig cacheConfig = new CacheConfig();
File pdxDir = new File(CacheTestCase.getDiskDir(), "pdx");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
index 315e9ca..27fb3c1 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/concurrent/ConcurrentWANPropogation_1_DUnitTest.java
@@ -21,6 +21,7 @@ import com.gemstone.gemfire.cache.EntryExistsException;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.wan.BatchException70;
import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
import com.gemstone.gemfire.test.dunit.AsyncInvocation;
@@ -530,18 +531,18 @@ public class ConcurrentWANPropogation_1_DUnitTest extends WANTestBase {
getTestMethodName() + "_RR_1", 1000 ));
} finally {
System.setProperty(
- "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
vm4.invoke(new CacheSerializableRunnable("UnSetting system property ") {
public void run2() throws CacheException {
System.setProperty(
- "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
}
});
vm5.invoke(new CacheSerializableRunnable("UnSetting system property ") {
public void run2() throws CacheException {
System.setProperty(
- "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
}
});
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
index 63e7266..104223e 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/disttx/DistTXWANDUnitTest.java
@@ -16,6 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.wan.disttx;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
@@ -34,7 +35,7 @@ public class DistTXWANDUnitTest extends WANTestBase {
Invoke.invokeInEveryVM(new SerializableCallable() {
@Override
public Object call() throws Exception {
- System.setProperty("gemfire.log-level", LogWriterUtils.getDUnitLogLevel());
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
return null;
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
index f0303b9..c4a0cea 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
@@ -16,26 +16,26 @@
*/
package com.gemstone.gemfire.internal.cache.wan.misc;
-import java.util.Properties;
-
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AuthInitialize;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.SecurityTestUtils;
-import com.gemstone.gemfire.security.generator.CredentialGenerator;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
-
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AuthInitialize;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import com.gemstone.gemfire.security.SecurityTestUtils;
+import com.gemstone.gemfire.security.generator.CredentialGenerator;
import com.gemstone.gemfire.security.generator.DummyCredentialGenerator;
import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
-
import org.apache.logging.log4j.Logger;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class NewWanAuthenticationDUnitTest extends WANTestBase {
private static final long serialVersionUID = 1L;
@@ -209,8 +209,8 @@ public class NewWanAuthenticationDUnitTest extends WANTestBase {
}
public static void createSecuredCache(Properties authProps, Object javaProps, Integer locPort) {
- authProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- authProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ authProps.setProperty(MCAST_PORT, "0");
+ authProps.setProperty(LOCATORS, "localhost[" + locPort + "]");
logger.info("Set the server properties to: " + authProps);
logger.info("Set the java properties to: " + javaProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
index 1f4d72c..fd41fe7 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/SenderWithTransportFilterDUnitTest.java
@@ -16,16 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.wan.misc;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.zip.Adler32;
-import java.util.zip.CheckedInputStream;
-import java.util.zip.CheckedOutputStream;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.DiskStore;
import com.gemstone.gemfire.cache.DiskStoreFactory;
@@ -33,13 +23,25 @@ import com.gemstone.gemfire.cache.wan.GatewayReceiver;
import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.wan.InternalGatewaySenderFactory;
import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
import com.gemstone.gemfire.test.dunit.VM;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.zip.Adler32;
+import java.util.zip.CheckedInputStream;
+import java.util.zip.CheckedOutputStream;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class SenderWithTransportFilterDUnitTest extends WANTestBase {
private static final long serialVersionUID = 1L;
@@ -101,8 +103,8 @@ public class SenderWithTransportFilterDUnitTest extends WANTestBase {
public static int createReceiverWithTransportFilters(int locPort) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANConfigurationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANConfigurationJUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANConfigurationJUnitTest.java
index 22c129e..4b2fc67 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANConfigurationJUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANConfigurationJUnitTest.java
@@ -16,36 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.wan.misc;
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
-
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
-import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
-import com.gemstone.gemfire.cache.wan.GatewayReceiver;
-import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
-import com.gemstone.gemfire.cache.wan.GatewaySender;
-import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
-import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
+import com.gemstone.gemfire.cache.wan.*;
import com.gemstone.gemfire.cache30.MyGatewayEventFilter1;
import com.gemstone.gemfire.cache30.MyGatewayTransportFilter1;
import com.gemstone.gemfire.cache30.MyGatewayTransportFilter2;
-import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.wan.GatewayReceiverException;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderException;
@@ -53,6 +30,16 @@ import com.gemstone.gemfire.internal.cache.wan.InternalGatewaySenderFactory;
import com.gemstone.gemfire.internal.cache.wan.MyGatewaySenderEventListener;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class WANConfigurationJUnitTest {
@@ -69,7 +56,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_GatewaySender_without_Locator() throws IOException {
try {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setParallel(true);
GatewaySender sender1 = fact.create("NYSender", 2);
@@ -94,7 +81,7 @@ public class WANConfigurationJUnitTest {
*/
@Test
public void test_SameGatewaySenderCreatedTwice() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
try {
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setParallel(true);
@@ -120,7 +107,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_SameGatewaySenderIdAddedTwice() {
try {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setParallel(true);
fact.setManualStart(true);
@@ -143,7 +130,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_GatewaySenderIdAndAsyncEventId() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
AttributesFactory factory = new AttributesFactory();
factory.addGatewaySenderId("ln");
factory.addGatewaySenderId("ny");
@@ -165,7 +152,7 @@ public class WANConfigurationJUnitTest {
*
*/
public void DIABLEB_DUE_TO_BUG51491_test_GatewaySender_Parallel_DistributedRegion() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setParallel(true);
fact.setManualStart(true);
@@ -186,7 +173,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_GatewaySender_Parallel_MultipleDispatherThread() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setParallel(true);
fact.setManualStart(true);
@@ -201,7 +188,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_GatewaySender_Serial_ZERO_DispatherThread() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setManualStart(true);
fact.setDispatcherThreads(0);
@@ -223,7 +210,7 @@ public class WANConfigurationJUnitTest {
*/
@Test
public void test_ValidateGatewayReceiverAttributes() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
int[] randomAvailableTCPPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
int port1 = randomAvailableTCPPorts[0];
int port2 = randomAvailableTCPPorts[1];
@@ -265,7 +252,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_ValidateGatewayReceiverStatus() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
int[] randomAvailableTCPPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
int port1 = randomAvailableTCPPorts[0];
int port2 = randomAvailableTCPPorts[1];
@@ -294,7 +281,7 @@ public class WANConfigurationJUnitTest {
*/
@Test
public void test_ValidateSerialGatewaySenderAttributes() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setManualStart(true);
fact.setBatchConflationEnabled(true);
@@ -348,7 +335,7 @@ public class WANConfigurationJUnitTest {
*/
@Test
public void test_ValidateParallelGatewaySenderAttributes() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
fact.setParallel(true);
fact.setManualStart(true);
@@ -400,7 +387,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_GatewaySenderWithGatewaySenderEventListener1() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
InternalGatewaySenderFactory fact = (InternalGatewaySenderFactory)cache.createGatewaySenderFactory();
AsyncEventListener listener = new MyGatewaySenderEventListener();
((InternalGatewaySenderFactory)fact).addAsyncEventListener(listener);
@@ -421,7 +408,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_GatewaySenderWithGatewaySenderEventListener2() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewaySenderFactory fact = cache.createGatewaySenderFactory();
AsyncEventListener listener = new MyGatewaySenderEventListener();
((InternalGatewaySenderFactory)fact).addAsyncEventListener(listener);
@@ -434,7 +421,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_ValidateGatwayReceiverAttributes() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
fact.setStartPort(50504);
fact.setMaximumTimeBetweenPings(1000);
@@ -471,7 +458,7 @@ public class WANConfigurationJUnitTest {
if (System.getProperty("os.name").equals("Mac OS X")) {
fail("Failing to avoid known hang on Mac OS X.");
}
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
fact.setStartPort(50504);
fact.setMaximumTimeBetweenPings(1000);
@@ -498,7 +485,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_ValidateGatwayReceiverDefaultStartPortAndDefaultEndPort() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
fact.setMaximumTimeBetweenPings(1000);
fact.setSocketBufferSize(4000);
@@ -522,7 +509,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_ValidateGatwayReceiverDefaultStartPortAndEndPortProvided() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
fact.setMaximumTimeBetweenPings(1000);
fact.setSocketBufferSize(4000);
@@ -546,7 +533,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_ValidateGatwayReceiverWithManualStartFALSE() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
fact.setMaximumTimeBetweenPings(1000);
fact.setSocketBufferSize(4000);
@@ -563,7 +550,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_ValidateGatwayReceiverWithStartPortAndDefaultEndPort() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
fact.setMaximumTimeBetweenPings(1000);
fact.setSocketBufferSize(4000);
@@ -587,7 +574,7 @@ public class WANConfigurationJUnitTest {
@Test
public void test_ValidateGatwayReceiverWithWrongEndPortProvided() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
try {
GatewayReceiverFactory fact = cache.createGatewayReceiverFactory();
fact.setMaximumTimeBetweenPings(1000);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
index bd0c118..249e189 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
@@ -16,12 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.wan.misc;
-import java.io.IOException;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
@@ -39,6 +35,11 @@ import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class WANLocatorServerDUnitTest extends WANTestBase {
static PoolImpl proxy;
@@ -95,11 +96,11 @@ public class WANLocatorServerDUnitTest extends WANTestBase {
Integer startingPort) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + 1);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port1
+ props.setProperty(LOCATORS, "localhost[" + port1
+ "],localhost[" + port2 + "],localhost[" + port3 + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["
+ props.setProperty(START_LOCATOR, "localhost["
+ startingPort
+ "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
@@ -108,8 +109,8 @@ public class WANLocatorServerDUnitTest extends WANTestBase {
public static void createReceiver(Integer port1, Integer port2, Integer port3) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port1
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + port1
+ "],localhost[" + port2 + "],localhost[" + port3 + "]");
InternalDistributedSystem ds = test.getSystem(props);
@@ -133,8 +134,8 @@ public class WANLocatorServerDUnitTest extends WANTestBase {
public static void createServer(Integer port1, Integer port2, Integer port3) {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port1
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + port1
+ "],localhost[" + port2 + "],localhost[" + port3 + "]");
InternalDistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
index 5e00c77..4be960b 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderOperationsDUnitTest.java
@@ -16,23 +16,16 @@
*/
package com.gemstone.gemfire.internal.cache.wan.parallel;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.GemFireIOException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
import com.gemstone.gemfire.internal.cache.tier.sockets.MessageTooLargeException;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderException;
import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.RMIException;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-import com.jayway.awaitility.Awaitility;
+import org.junit.experimental.categories.Category;
/**
* DUnit test for operations on ParallelGatewaySender
@@ -589,7 +582,8 @@ public class ParallelGatewaySenderOperationsDUnitTest extends WANTestBase {
private void setMaximumMessageSize(int maximumMessageSizeBytes) {
Message.MAX_MESSAGE_SIZE = maximumMessageSizeBytes;
- LogWriterUtils.getLogWriter().info("Set gemfire.client.max-message-size: " + System.getProperty("gemfire.client.max-message-size"));
+ LogWriterUtils.getLogWriter()
+ .info("Set gemfire.client.max-message-size: " + System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "client.max-message-size"));
}
private void createSendersReceiversAndPartitionedRegion(Integer lnPort, Integer nyPort, boolean createAccessors,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
index 7169b2e..eaa02b2 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/parallel/ParallelGatewaySenderQueueOverflowDUnitTest.java
@@ -16,16 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.wan.parallel;
-import java.io.File;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
@@ -33,7 +24,6 @@ import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
import com.gemstone.gemfire.cache30.MyGatewayEventFilter1;
import com.gemstone.gemfire.cache30.MyGatewayTransportFilter1;
import com.gemstone.gemfire.cache30.MyGatewayTransportFilter2;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.RegionQueue;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
@@ -43,6 +33,13 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.Wait;
+import java.io.File;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* DUnit for ParallelSenderQueue overflow operations.
*
@@ -380,8 +377,8 @@ public class ParallelGatewaySenderQueueOverflowDUnitTest extends WANTestBase {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + localLocPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + localLocPort + "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
@@ -443,8 +440,8 @@ public class ParallelGatewaySenderQueueOverflowDUnitTest extends WANTestBase {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + localLocPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + localLocPort + "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
index 190b381..a33c1ea 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueueDUnitTest.java
@@ -16,27 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache.wan.serial;
-import java.io.File;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
import com.gemstone.gemfire.cache.wan.GatewaySender;
+import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
import com.gemstone.gemfire.cache30.MyGatewayEventFilter1;
import com.gemstone.gemfire.cache30.MyGatewayTransportFilter1;
import com.gemstone.gemfire.cache30.MyGatewayTransportFilter2;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.RegionQueue;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
@@ -45,6 +33,15 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.Wait;
+import java.io.File;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class SerialGatewaySenderQueueDUnitTest extends WANTestBase{
@@ -214,8 +211,8 @@ public class SerialGatewaySenderQueueDUnitTest extends WANTestBase{
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost["
+ localLocPort + "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
@@ -278,8 +275,8 @@ public class SerialGatewaySenderQueueDUnitTest extends WANTestBase{
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + localLocPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + localLocPort + "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
index a9d0f29..67d8816 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialWANPropogationDUnitTest.java
@@ -16,23 +16,19 @@
*/
package com.gemstone.gemfire.internal.cache.wan.serial;
-import java.io.IOException;
-import java.util.Map;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.EntryExistsException;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.wan.BatchException70;
import com.gemstone.gemfire.internal.cache.wan.WANTestBase;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.Map;
public class SerialWANPropogationDUnitTest extends WANTestBase {
@@ -619,18 +615,18 @@ public class SerialWANPropogationDUnitTest extends WANTestBase {
getTestMethodName() + "_RR_1", 1000 ));
} finally {
System.setProperty(
- "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
vm4.invoke(new CacheSerializableRunnable("UnSetting system property ") {
public void run2() throws CacheException {
System.setProperty(
- "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
}
});
vm5.invoke(new CacheSerializableRunnable("UnSetting system property ") {
public void run2() throws CacheException {
System.setProperty(
- "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION", "False");
}
});
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
index 71b5910..bd69adc 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
@@ -16,26 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.management.remote.JMXConnectorServer;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.DiskStore;
import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
-import com.gemstone.gemfire.cache.wan.GatewayReceiver;
-import com.gemstone.gemfire.cache.wan.GatewayReceiverFactory;
-import com.gemstone.gemfire.cache.wan.GatewaySender;
+import com.gemstone.gemfire.cache.wan.*;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
-import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
-import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -44,11 +30,7 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import javax.management.remote.JMXConnectorServer;
import java.io.File;
@@ -58,6 +40,7 @@ import java.util.List;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
import static com.gemstone.gemfire.test.dunit.Assert.fail;
@@ -95,10 +78,10 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
public Integer createFirstLocatorWithDSId(int dsId) {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
InternalDistributedSystem ds = getSystem(props);
cache = CacheFactory.create(ds);
return port;
@@ -107,10 +90,10 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
public Integer createFirstRemoteLocator(int dsId, int remoteLocPort) {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
getSystem(props);
return port;
@@ -118,16 +101,16 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
public void createCache(Integer locPort){
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort + "]");
InternalDistributedSystem ds = getSystem(props);
cache = CacheFactory.create(ds);
}
public void createCacheWithGroups(Integer locPort, String groups){
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort + "]");
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
InternalDistributedSystem ds = getSystem(props);
cache = CacheFactory.create(ds);
@@ -218,8 +201,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
public int createAndStartReceiver(int locPort) {
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = getSystem(props);
@@ -241,8 +224,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
public int createReceiver(int locPort) {
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = getSystem(props);
@@ -258,8 +241,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
public int createReceiverWithGroup(int locPort, String groups) {
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
@@ -295,8 +278,8 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
public int createAndStartReceiverWithGroup(int locPort, String groups) {
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
index a4333c7..86ca1a3 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewayReceiverDUnitTest.java
@@ -16,19 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.wan.GatewayReceiver;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
@@ -36,6 +25,17 @@ import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
/**
* DUnit tests for 'create gateway-receiver' command.
@@ -55,8 +55,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -118,8 +118,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -175,8 +175,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -236,8 +236,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -300,8 +300,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -349,8 +349,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -405,8 +405,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -464,8 +464,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -523,8 +523,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -579,8 +579,8 @@ public class WanCommandCreateGatewayReceiverDUnitTest extends WANCommandTestBase
int punePort = (Integer)puneLocator.invoke(() -> getLocatorPort());
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
index 2ddbd04..ab07226 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
@@ -16,16 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
import com.gemstone.gemfire.distributed.DistributedMember;
@@ -37,6 +27,17 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
@Category(DistributedTest.class)
public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
@@ -63,9 +64,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -112,9 +113,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -184,9 +185,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -240,9 +241,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -315,9 +316,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() ->createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -388,9 +389,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -453,9 +454,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -518,9 +519,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -580,9 +581,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort + "]");
+ props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
Integer nyPort = (Integer) vm2.invoke(() -> createFirstRemoteLocator( 2, punePort ));
@@ -649,9 +650,9 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Integer punePort = (Integer) vm1.invoke(() -> createFirstLocatorWithDSId( 1 ));
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + punePort
+ props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
[40/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java
index 4016c7c..1d65311 100644
--- a/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java
+++ b/extensions/geode-modules-session/src/test/java/com/gemstone/gemfire/modules/session/internal/filter/SessionReplicationLocalCacheJUnitTest.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.modules.session.internal.filter;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.modules.session.filter.SessionCachingFilter;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.mockrunner.mock.web.MockFilterConfig;
@@ -37,9 +38,9 @@ public class SessionReplicationLocalCacheJUnitTest extends CommonTests {
WebMockObjectFactory factory = getWebMockObjectFactory();
MockFilterConfig config = factory.getMockFilterConfig();
- config.setInitParameter("gemfire.property.mcast-port", "0");
+ config.setInitParameter(DistributionConfig.GEMFIRE_PREFIX + "property.mcast-port", "0");
config.setInitParameter("cache-type", "peer-to-peer");
- config.setInitParameter("gemfire.cache.enable_local_cache", "true");
+ config.setInitParameter(DistributionConfig.GEMFIRE_PREFIX + "cache.enable_local_cache", "true");
factory.getMockServletContext().setContextPath(CONTEXT_PATH);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
index ea81309..481ec09 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
@@ -261,7 +261,7 @@ public abstract class AbstractCache {
logFile = new File("servers" + separator + weblogicName + separator +
"logs" + separator + logFileName);
} else {
- logFile = new File(System.getProperty("gemfire.logdir"), logFileName);
+ logFile = new File(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "logdir"), logFileName);
}
}
return logFile;
@@ -283,7 +283,7 @@ public abstract class AbstractCache {
statisticsArchiveFile = new File("servers" + separator + weblogicName + separator +
"logs" + separator + statisticsArchiveFileName);
} else {
- statisticsArchiveFile = new File(System.getProperty("gemfire.statisticsdir"), statisticsArchiveFileName);
+ statisticsArchiveFile = new File(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "statisticsdir"), statisticsArchiveFileName);
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
index 194a7c7..4f2d06d 100644
--- a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
+++ b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.modules.session;
import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
import com.gemstone.gemfire.modules.session.catalina.PeerToPeerCacheLifecycleListener;
@@ -36,6 +37,7 @@ import java.beans.PropertyChangeEvent;
import java.io.IOException;
import java.io.PrintWriter;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static junit.framework.Assert.*;
public abstract class TestSessionsBase {
@@ -56,8 +58,8 @@ public abstract class TestSessionsBase {
server = new EmbeddedTomcat("/test", port, "JVM-1");
PeerToPeerCacheLifecycleListener p2pListener = new PeerToPeerCacheLifecycleListener();
- p2pListener.setProperty("mcast-port", "0");
- p2pListener.setProperty("log-level", "config");
+ p2pListener.setProperty(MCAST_PORT, "0");
+ p2pListener.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
server.getEmbedded().addLifecycleListener(p2pListener);
sessionManager = manager;
sessionManager.setEnableCommitValve(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index 499c3e5..e04e012 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -16,51 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.nio.charset.Charset;
-import java.text.DateFormat;
-import java.text.MessageFormat;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedDeque;
-import java.util.concurrent.TimeUnit;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.management.Query;
-import javax.management.QueryExp;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.junit.FixMethodOrder;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.runners.MethodSorters;
-
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.distributed.AbstractLauncher.ServiceState;
import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
import com.gemstone.gemfire.distributed.LocatorLauncher;
@@ -82,7 +39,32 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.management.Query;
+import javax.management.QueryExp;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+import java.io.*;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.nio.charset.Charset;
+import java.text.DateFormat;
+import java.text.MessageFormat;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Queue;
+import java.util.Set;
+import java.util.concurrent.ConcurrentLinkedDeque;
+import java.util.concurrent.TimeUnit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
@@ -324,9 +306,9 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__DIR, pathname);
command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
command.addOption(CliStrings.START_LOCATOR__J,
- "-Dgemfire.jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
+ "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
CommandResult result = executeCommand(command.toString());
@@ -370,10 +352,10 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
command.addOption(CliStrings.START_LOCATOR__PORT, "0");
command.addOption(CliStrings.START_LOCATOR__PROPERTIES, gemfirePropertiesPathname);
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager=false");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-start=false");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager=false");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-start=false");
CommandResult result = executeCommand(command.toString());
@@ -396,10 +378,10 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__MEMBER_NAME, getClass().getSimpleName().concat("_").concat(getTestMethodName()));
command.addOption(CliStrings.START_LOCATOR__PORT, "0");
command.addOption(CliStrings.START_LOCATOR__SECURITY_PROPERTIES, gemfireSecurityPropertiesPathname);
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager=false");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-start=false");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager=false");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-start=false");
CommandResult result = executeCommand(command.toString());
@@ -492,9 +474,9 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__DIR, pathname);
command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
command.addOption(CliStrings.START_LOCATOR__J,
- "-Dgemfire.jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
+ "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + AvailablePortHelper.getRandomAvailableTCPPort());
CommandResult result = executeCommand(command.toString());
@@ -542,8 +524,8 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-port=" + jmxManagerPort);
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
CommandResult result = executeCommand(command.toString());
@@ -605,8 +587,8 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-port=" + jmxManagerPort);
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
CommandResult result = executeCommand(command.toString());
@@ -671,8 +653,8 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-port=" + jmxManagerPort);
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
CommandResult result = executeCommand(command.toString());
@@ -759,8 +741,8 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
command.addOption(CliStrings.START_LOCATOR__PORT, String.valueOf(locatorPort));
command.addOption(CliStrings.START_LOCATOR__ENABLE__SHARED__CONFIGURATION, Boolean.FALSE.toString());
command.addOption(CliStrings.START_LOCATOR__FORCE, Boolean.TRUE.toString());
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.http-service-port=0");
- command.addOption(CliStrings.START_LOCATOR__J, "-Dgemfire.jmx-manager-port=" + jmxManagerPort);
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "http-service-port=0");
+ command.addOption(CliStrings.START_LOCATOR__J, "-D" + DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port=" + jmxManagerPort);
CommandResult result = executeCommand(command.toString());
@@ -839,7 +821,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
IOUtils.tryGetCanonicalPathElseGetAbsolutePath(writeAndGetCacheXmlFile(workingDirectory)));
command.addOption(CliStrings.START_SERVER__INCLUDE_SYSTEM_CLASSPATH);
command.addOption(CliStrings.START_SERVER__J,
- "-Dgemfire." + DistributionConfig.START_LOCATOR_NAME + "=localhost[" + locatorPort + "]");
+ "-D" + DistributionConfig.GEMFIRE_PREFIX + "" + START_LOCATOR + "=localhost[" + locatorPort + "]");
CommandResult result = executeCommand(command.toString());
@@ -935,7 +917,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
}
private ClientCache setupClientCache(final String durableClientId, final int serverPort) {
- ClientCache clientCache = new ClientCacheFactory().set("durable-client-id", durableClientId).create();
+ ClientCache clientCache = new ClientCacheFactory().set(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId).create();
PoolFactory poolFactory = PoolManager.createFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
index 3d466b9..3fc1fcc 100755
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
@@ -16,24 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.Stack;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.GemFireException;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.ServerLauncher;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.DistributionLocator;
import com.gemstone.gemfire.internal.lang.StringUtils;
@@ -41,6 +27,17 @@ import com.gemstone.gemfire.internal.lang.SystemUtils;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* The LauncherLifecycleCommandsJUnitTest class is a test suite of test cases testing the contract and functionality of
@@ -103,11 +100,11 @@ public class LauncherLifecycleCommandsJUnitTest {
final Properties gemfireProperties = new Properties();
- gemfireProperties.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[11235]");
+ gemfireProperties.setProperty(LOCATORS, "localhost[11235]");
gemfireProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
gemfireProperties.setProperty(DistributionConfig.LOG_FILE_NAME, StringUtils.EMPTY_STRING);
- gemfireProperties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- gemfireProperties.setProperty(DistributionConfig.NAME_NAME, "tidepool");
+ gemfireProperties.setProperty(MCAST_PORT, "0");
+ gemfireProperties.setProperty(SystemConfigurationProperties.NAME, "tidepool");
getLauncherLifecycleCommands().addGemFireSystemProperties(commandLine, gemfireProperties);
@@ -118,10 +115,10 @@ public class LauncherLifecycleCommandsJUnitTest {
final String propertyValue = gemfireProperties.getProperty(propertyName);
if (StringUtils.isBlank(propertyValue)) {
for (final String systemProperty : commandLine) {
- assertFalse(systemProperty.startsWith("-Dgemfire.".concat(propertyName).concat("=")));
+ assertFalse(systemProperty.startsWith("-D" + DistributionConfig.GEMFIRE_PREFIX + "".concat(propertyName).concat("=")));
}
} else {
- assertTrue(commandLine.contains("-Dgemfire.".concat(propertyName).concat("=").concat(propertyValue)));
+ assertTrue(commandLine.contains("-D" + DistributionConfig.GEMFIRE_PREFIX + "".concat(propertyName).concat("=").concat(propertyValue)));
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
index 5f3bf1f..d03e211 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
@@ -16,31 +16,12 @@
*/
package com.gemstone.gemfire.management.internal.configuration;
-import static com.gemstone.gemfire.cache.RegionShortcut.*;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
-import static com.gemstone.gemfire.internal.FileUtil.*;
-import static com.gemstone.gemfire.internal.lang.StringUtils.*;
-import static com.gemstone.gemfire.management.internal.cli.CliUtil.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.IgnoredException.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.internal.ClassBuilder;
import com.gemstone.gemfire.internal.JarDeployer;
@@ -56,11 +37,32 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.apache.commons.io.FileUtils;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.cache.RegionShortcut.PARTITION;
+import static com.gemstone.gemfire.cache.RegionShortcut.REPLICATE;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static com.gemstone.gemfire.internal.FileUtil.delete;
+import static com.gemstone.gemfire.internal.FileUtil.deleteMatching;
+import static com.gemstone.gemfire.internal.lang.StringUtils.isBlank;
+import static com.gemstone.gemfire.management.internal.cli.CliUtil.getAllNormalMembers;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
@Category(DistributedTest.class)
public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
@@ -343,15 +345,15 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorLogPath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, locator1Name);
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "config");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_START_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(jmxHost));
- locatorProps.setProperty(JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
- locatorProps.setProperty(HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, locator1Name);
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(SystemConfigurationProperties.LOG_LEVEL, "config");
+ locatorProps.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "true");
+ locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER, "true");
+ locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER_START, "true");
+ locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER_BIND_ADDRESS, String.valueOf(jmxHost));
+ locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER_PORT, String.valueOf(jmxPort));
+ locatorProps.setProperty(SystemConfigurationProperties.HTTP_SERVICE_PORT, String.valueOf(httpPort));
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator1Port, locatorLogFile, null, locatorProps);
@@ -389,9 +391,9 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
@Override
public Object call() {
Properties localProps = new Properties();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locator1Port);
- localProps.setProperty(NAME_NAME, "DataMember");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(SystemConfigurationProperties.LOCATORS, "localhost:" + locator1Port);
+ localProps.setProperty(SystemConfigurationProperties.NAME, "DataMember");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
index c2a4cec..6861f64 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
@@ -16,42 +16,17 @@
*/
package com.gemstone.gemfire.rest.internal.web;
-import static org.junit.Assert.*;
-
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.text.SimpleDateFormat;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.annotation.Resource;
-
import com.fasterxml.jackson.core.JsonParser.Feature;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionService;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.GemFireVersion;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.management.internal.AgentUtil;
-import com.gemstone.gemfire.pdx.PdxInstance;
-import com.gemstone.gemfire.pdx.PdxReader;
-import com.gemstone.gemfire.pdx.PdxSerializable;
-import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.pdx.ReflectionBasedAutoSerializer;
+import com.gemstone.gemfire.pdx.*;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
@@ -68,6 +43,16 @@ import org.springframework.util.StringUtils;
import org.springframework.web.client.ResponseErrorHandler;
import org.springframework.web.client.RestTemplate;
+import javax.annotation.Resource;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+
/**
* The GemFireRestInterfaceTest class is a test suite of test cases testing the contract and functionality of the
* GemFire Developer REST API, mixing Java clients, this test GemFire's Cache Region API, along with
@@ -124,12 +109,12 @@ public class RestInterfaceJUnitTest {
.setPdxReadSerialized(true)
.setPdxIgnoreUnreadFields(false)
.set("name", getClass().getSimpleName())
- .set("mcast-port", "0")
- .set("log-level", "config")
- .set("http-service-bind-address", "localhost")
- .set("http-service-port", String.valueOf(getHttpServicePort()))
+ .set(MCAST_PORT, "0")
+ .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, "localhost")
+ .set(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(getHttpServicePort()))
//.set("http-service-ssl-enabled", "false")
- .set("start-dev-rest-api", "true")
+ .set(DistributionConfig.START_DEV_REST_API_NAME, "true")
.create();
RegionFactory<String, Object> peopleRegionFactory = gemfireCache.createRegionFactory();
@@ -149,11 +134,11 @@ public class RestInterfaceJUnitTest {
protected synchronized int getHttpServicePort() {
try {
- return Integer.parseInt(StringUtils.trimWhitespace(gemfireProperties.getProperty("http-service-port")));
+ return Integer.parseInt(StringUtils.trimWhitespace(gemfireProperties.getProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME)));
}
catch (NumberFormatException ignore) {
int httpServicePort = getHttpServicePort(DEFAULT_HTTP_SERVICE_PORT);
- gemfireProperties.setProperty("http-service-port", String.valueOf(httpServicePort));
+ gemfireProperties.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpServicePort));
return httpServicePort;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
index 4d0abcd..2eddddc 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPITestBase.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.rest.internal.web.controllers;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -110,7 +109,7 @@ public class RestAPITestBase extends DistributedTestCase {
Properties props = new Properties();
if (groups != null) {
- props.put("groups", groups);
+ props.put(DistributionConfig.GROUPS_NAME, groups);
}
props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
index aa61a17..8e0286a 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpsDUnitTest.java
@@ -50,6 +50,9 @@ import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Dunit Test containing inter - operations between REST Client and Gemfire cache client
*
@@ -178,8 +181,8 @@ public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
final ServerLoadProbe probe) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
+ props.setProperty(MCAST_PORT, String.valueOf(0));
+ props.setProperty(LOCATORS, locators);
props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(restServicerPort));
@@ -829,11 +832,11 @@ public class RestAPIsAndInterOpsDUnitTest extends LocatorTestBase {
, final ServerLoadProbe probe) throws IOException {
Properties props = new Properties();
props
- .setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
+ .setProperty(MCAST_PORT, String.valueOf(0));
+ props.setProperty(LOCATORS, locators);
- props.setProperty("jmx-manager", "true");
- props.setProperty("jmx-manager-start", "true");
+ props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
+ props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
final int httpPort = AvailablePortHelper.getRandomAvailableTCPPort();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
index fd6b312..c650e27 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsOnMembersFunctionExecutionDUnitTest.java
@@ -21,11 +21,10 @@ import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.execute.FunctionContext;
import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.rest.internal.web.RestFunctionTemplate;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.VM;
import org.apache.http.client.methods.CloseableHttpResponse;
import java.util.Properties;
@@ -75,7 +74,7 @@ public class RestAPIsOnMembersFunctionExecutionDUnitTest extends RestAPITestBase
final int servicePort = AvailablePortHelper.getRandomAvailableTCPPort();
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, memberName);
+ props.setProperty(SystemConfigurationProperties.NAME, memberName);
props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(servicePort));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
index d6889a7..1789c98 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsQueryAndFEJUnitTest.java
@@ -16,56 +16,32 @@
*/
package com.gemstone.gemfire.rest.internal.web.controllers;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.distributed.ServerLauncher;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.GemFireVersion;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.management.internal.AgentUtil;
import com.gemstone.gemfire.management.internal.ManagementConstants;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
+import junit.framework.TestCase;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.experimental.categories.Category;
-import org.springframework.http.HttpEntity;
-import org.springframework.http.HttpHeaders;
-import org.springframework.http.HttpMethod;
-import org.springframework.http.HttpStatus;
-import org.springframework.http.MediaType;
-import org.springframework.http.ResponseEntity;
+import org.springframework.http.*;
import org.springframework.util.StringUtils;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.HttpServerErrorException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
@Category(IntegrationTest.class)
public class RestAPIsQueryAndFEJUnitTest extends TestCase {
@@ -1339,12 +1315,12 @@ public class RestAPIsQueryAndFEJUnitTest extends TestCase {
String workingDirectory = System.getProperty("geode.build.dir", System.getProperty("user.dir"));
ServerLauncher serverLauncher = new ServerLauncher.Builder()
- .set("mcast-port", "0")
+ .set(MCAST_PORT, "0")
.setServerBindAddress(this.hostName)
.setServerPort(AvailablePortHelper.getRandomAvailableTCPPort())
- .set("start-dev-rest-api", "true")
- .set("http-service-port", String.valueOf(this.restServicePort))
- .set("http-service-bind-address", this.hostName)
+ .set(DistributionConfig.START_DEV_REST_API_NAME, "true")
+ .set(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(this.restServicePort))
+ .set(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, this.hostName)
.setPdxReadSerialized(true)
.setWorkingDirectory(workingDirectory)
.build();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index a311a26..604e3cf 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -29,7 +29,6 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.management.ManagementException;
-import com.gemstone.gemfire.management.ManagementTestBase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.NetworkUtils;
@@ -54,6 +53,9 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
*
* @since GemFire 8.0
@@ -94,8 +96,8 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
final Properties sslProperties, boolean clusterLevel) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(restServicePort));
@@ -273,18 +275,18 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
IgnoredException.addIgnoredException("com.gemstone.gemfire.management.ManagementException");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
- props.setProperty("jmx-manager", "true");
- props.setProperty("jmx-manager-start", "true");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
+ props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
Cache cache = null;
configureSSL(props, sslProperties, false);
while (true) {
try {
DistributedSystem ds = getSystem(props);
- System.out.println("Creating cache with http-service-port " + props.getProperty("http-service-port", "7070")
- + " and jmx-manager-port " + props.getProperty("jmx-manager-port", "1099"));
+ System.out.println("Creating cache with http-service-port " + props.getProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, "7070")
+ + " and jmx-manager-port " + props.getProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "1099"));
cache = CacheFactory.create(ds);
System.out.println("Successfully created cache.");
break;
@@ -304,8 +306,8 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
//try a different port
int httpServicePort = AvailablePortHelper.getRandomAvailableTCPPort();
int jmxManagerPort = AvailablePortHelper.getRandomAvailableTCPPort();
- props.setProperty("http-service-port", Integer.toString(httpServicePort));
- props.setProperty("jmx-manager-port", Integer.toString(jmxManagerPort));
+ props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, Integer.toString(httpServicePort));
+ props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, Integer.toString(jmxManagerPort));
System.out.println("Try a different http-service-port " + httpServicePort);
System.out.println("Try a different jmx-manager-port " + jmxManagerPort);
} else {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/SystemFailure.java b/geode-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
index c221167..61d73af 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
@@ -19,6 +19,7 @@
*/
package com.gemstone.gemfire;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.SystemFailureTestHook;
import com.gemstone.gemfire.internal.admin.remote.RemoteGfManagerAgent;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -334,7 +335,7 @@ public final class SystemFailure {
* <code>gemfire.WATCHDOG_WAIT</code>. The default is 15 sec.
*/
static public final int WATCHDOG_WAIT = Integer
- .getInteger("gemfire.WATCHDOG_WAIT", 15).intValue();
+ .getInteger(DistributionConfig.GEMFIRE_PREFIX + "WATCHDOG_WAIT", 15).intValue();
/**
* This is the watchdog thread
@@ -574,7 +575,7 @@ public final class SystemFailure {
* @guarded.By {@link #memorySync}
*/
static long minimumMemoryThreshold = Long.getLong(
- "gemfire.SystemFailure.chronic_memory_threshold", 1048576).longValue();
+ DistributionConfig.GEMFIRE_PREFIX + "SystemFailure.chronic_memory_threshold", 1048576).longValue();
/**
* This is the interval, in seconds, that the proctor
@@ -586,7 +587,7 @@ public final class SystemFailure {
* @see #setFailureMemoryThreshold(long)
*/
static final public long MEMORY_POLL_INTERVAL = Long.getLong(
- "gemfire.SystemFailure.MEMORY_POLL_INTERVAL", 1).longValue();
+ DistributionConfig.GEMFIRE_PREFIX + "SystemFailure.MEMORY_POLL_INTERVAL", 1).longValue();
/**
* This is the maximum amount of time, in seconds, that the proctor thread
@@ -600,7 +601,7 @@ public final class SystemFailure {
* @see #setFailureMemoryThreshold(long)
*/
static final public long MEMORY_MAX_WAIT = Long.getLong(
- "gemfire.SystemFailure.MEMORY_MAX_WAIT", 15).longValue();
+ DistributionConfig.GEMFIRE_PREFIX + "SystemFailure.MEMORY_MAX_WAIT", 15).longValue();
/**
* Flag that determines whether or not we monitor memory on our own.
@@ -613,7 +614,7 @@ public final class SystemFailure {
* @since GemFire 6.5
*/
static final public boolean MONITOR_MEMORY = Boolean.getBoolean(
- "gemfire.SystemFailure.MONITOR_MEMORY");
+ DistributionConfig.GEMFIRE_PREFIX + "SystemFailure.MONITOR_MEMORY");
/**
* Start the proctor thread, if it isn't already running.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/AdminDistributedSystemFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/AdminDistributedSystemFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/AdminDistributedSystemFactory.java
index 4416e42..49917b6 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/AdminDistributedSystemFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/AdminDistributedSystemFactory.java
@@ -16,15 +16,14 @@
*/
package com.gemstone.gemfire.admin;
-import com.gemstone.gemfire.admin.internal.DistributedSystemConfigImpl;
import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
+import com.gemstone.gemfire.admin.internal.DistributedSystemConfigImpl;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LocalLogWriter;
import java.util.Properties;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
index 5131f3c..726b228 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
@@ -17,12 +17,16 @@
package com.gemstone.gemfire.admin;
import com.gemstone.gemfire.admin.internal.InetAddressUtil;
-//import com.gemstone.gemfire.admin.jmx.AgentConfig;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-//import java.net.InetAddress;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
+//import com.gemstone.gemfire.admin.jmx.AgentConfig;
+//import java.net.InetAddress;
+
/**
* Configuration for defining a GemFire distributed system to
* administrate. This configuration includes information about the
@@ -64,54 +68,53 @@ public interface DistributedSystemConfig extends Cloneable {
* {@linkplain ManagedEntity managed entities} administered by the
* <code>DistributedSystem</code>. The XML file must conform to a
* <a href="doc-files/ds5_0.dtd">dtd</a>. */
- public static final String ENTITY_CONFIG_XML_FILE_NAME =
+ String ENTITY_CONFIG_XML_FILE_NAME =
"entity-config-xml-file";
/** The default value of the "entity-config-xml-file" property
* ("distributed-system.xml"). */
- public static final String DEFAULT_ENTITY_CONFIG_XML_FILE =
+ String DEFAULT_ENTITY_CONFIG_XML_FILE =
"distributed-system.xml";
/** The name of the "system-id" property */
- public static final String SYSTEM_ID_NAME = "system-id";
+ String SYSTEM_ID_NAME = "system-id";
/** The default value of the "system-id" property ("") */
- public static final String DEFAULT_SYSTEM_ID = "Default System";
+ String DEFAULT_SYSTEM_ID = "Default System";
/** The name of the "name" property. See {@link #getSystemName()}. */
- public static final String NAME_NAME = DistributionConfig.NAME_NAME;
+ String NAME_NAME = SystemConfigurationProperties.NAME;
/** The default value of the "name" property (""). See {@link #getSystemName()}. */
- public static final String DEFAULT_NAME = "";
+ String DEFAULT_NAME = "";
/** The name of the "mcastPort" property */
- public static final String MCAST_PORT_NAME =
- DistributionConfig.MCAST_PORT_NAME;
+ String MCAST_PORT_NAME =
+ MCAST_PORT;
/** The default value of the "mcastPort" property (10334) */
- public static final int DEFAULT_MCAST_PORT =
+ int DEFAULT_MCAST_PORT =
DistributionConfig.DEFAULT_MCAST_PORT;
/** The minimum mcastPort (0) */
- public static final int MIN_MCAST_PORT =
+ int MIN_MCAST_PORT =
DistributionConfig.MIN_MCAST_PORT;
/** The maximum mcastPort (65535) */
- public static final int MAX_MCAST_PORT =
+ int MAX_MCAST_PORT =
DistributionConfig.MAX_MCAST_PORT;
/** The name of the "mcastAddress" property */
- public static final String MCAST_ADDRESS_NAME =
- DistributionConfig.MCAST_ADDRESS_NAME;
+ String MCAST_ADDRESS_NAME = MCAST_ADDRESS;
/** The default value of the "mcastAddress" property (239.192.81.1). */
- public static final String DEFAULT_MCAST_ADDRESS =
+ String DEFAULT_MCAST_ADDRESS =
InetAddressUtil.toString(DistributionConfig.DEFAULT_MCAST_ADDRESS);
/** The name of the "membership-port-range" property
* @since GemFire 6.5
*/
- public static final String MEMBERSHIP_PORT_RANGE_NAME =
+ String MEMBERSHIP_PORT_RANGE_NAME =
DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME;
/**
@@ -119,36 +122,36 @@ public interface DistributedSystemConfig extends Cloneable {
* <p> Actual value is <code>[1024,65535]</code>.
* @since GemFire 6.5
*/
- public static final int[] DEFAULT_MEMBERSHIP_PORT_RANGE =
+ int[] DEFAULT_MEMBERSHIP_PORT_RANGE =
DistributionConfig.DEFAULT_MEMBERSHIP_PORT_RANGE;
/** settings for tcp-port
* @since GemFire 6.5
*/
- public static final String TCP_PORT_NAME = DistributionConfig.TCP_PORT_NAME;
+ String TCP_PORT_NAME = TCP_PORT;
/** The default value of the "tcpPort" property.
* <p> Actual value is <code>0</code>.
* @since GemFire 6.5
*/
- public static final int DEFAULT_TCP_PORT = DistributionConfig.DEFAULT_TCP_PORT;
+ int DEFAULT_TCP_PORT = DistributionConfig.DEFAULT_TCP_PORT;
/**
* The default AckWaitThreshold.
* <p> Actual value of this constant is <code>15</code> seconds.
*/
- public static final int DEFAULT_ACK_WAIT_THRESHOLD =
+ int DEFAULT_ACK_WAIT_THRESHOLD =
DistributionConfig.DEFAULT_ACK_WAIT_THRESHOLD;
/**
* The minimum AckWaitThreshold.
* <p> Actual value of this constant is <code>1</code> second.
*/
- public static final int MIN_ACK_WAIT_THRESHOLD =
+ int MIN_ACK_WAIT_THRESHOLD =
DistributionConfig.MIN_ACK_WAIT_THRESHOLD;
/**
* The maximum AckWaitThreshold.
* <p> Actual value of this constant is <code>MAX_INT</code> seconds.
*/
- public static final int MAX_ACK_WAIT_THRESHOLD =
+ int MAX_ACK_WAIT_THRESHOLD =
DistributionConfig.MIN_ACK_WAIT_THRESHOLD;
/**
@@ -156,132 +159,130 @@ public interface DistributedSystemConfig extends Cloneable {
* <p> Actual value of this constant is <code>0</code> seconds, which
* turns off forced disconnects based on ack wait periods.
*/
- public static final int DEFAULT_ACK_SEVERE_ALERT_THRESHOLD =
+ int DEFAULT_ACK_SEVERE_ALERT_THRESHOLD =
DistributionConfig.DEFAULT_ACK_SEVERE_ALERT_THRESHOLD;
/**
* The minimum ackSevereAlertThreshold.
* <p> Actual value of this constant is <code>0</code> second,
* which turns off forced disconnects based on ack wait periods.
*/
- public static final int MIN_ACK_SEVERE_ALERT_THRESHOLD =
+ int MIN_ACK_SEVERE_ALERT_THRESHOLD =
DistributionConfig.MIN_ACK_SEVERE_ALERT_THRESHOLD;
/**
* The maximum ackSevereAlertThreshold.
* <p> Actual value of this constant is <code>MAX_INT</code> seconds.
*/
- public static final int MAX_ACK_SEVERE_ALERT_THRESHOLD =
+ int MAX_ACK_SEVERE_ALERT_THRESHOLD =
DistributionConfig.MAX_ACK_SEVERE_ALERT_THRESHOLD;
/** The name of the "locators" property (comma-delimited host[port] list) */
- public static final String LOCATORS_NAME =
- DistributionConfig.LOCATORS_NAME;
+ String LOCATORS_NAME = LOCATORS;
/** The default value of the "locators" property ("") */
- public static final String DEFAULT_LOCATORS =
+ String DEFAULT_LOCATORS =
DistributionConfig.DEFAULT_LOCATORS;
/** The name of the "bindAddress" property */
- public static final String BIND_ADDRESS_NAME =
- DistributionConfig.BIND_ADDRESS_NAME;
+ String BIND_ADDRESS_NAME = BIND_ADDRESS;
/** The default value of the "bindAddress" property */
- public static final String DEFAULT_BIND_ADDRESS =
+ String DEFAULT_BIND_ADDRESS =
DistributionConfig.DEFAULT_BIND_ADDRESS;
/** The name of the remote-command property */
- public static final String REMOTE_COMMAND_NAME = "remote-command";
+ String REMOTE_COMMAND_NAME = "remote-command";
/** The default value of the remote-command property */
- public static final String DEFAULT_REMOTE_COMMAND =
+ String DEFAULT_REMOTE_COMMAND =
"rsh -n {HOST} {CMD}";
/** The name of the "SSLEnabled" property */
- public static final String SSL_ENABLED_NAME =
+ String SSL_ENABLED_NAME =
DistributionConfig.SSL_ENABLED_NAME;
/** The default ssl-enabled state (<code>false</code>) */
- public static final boolean DEFAULT_SSL_ENABLED =
+ boolean DEFAULT_SSL_ENABLED =
DistributionConfig.DEFAULT_SSL_ENABLED;
/** The name of the "SSLProtocols" property */
- public static final String SSL_PROTOCOLS_NAME =
+ String SSL_PROTOCOLS_NAME =
DistributionConfig.SSL_PROTOCOLS_NAME;
/** The default ssl-protocols value (<code>any</code>) */
- public static final String DEFAULT_SSL_PROTOCOLS =
+ String DEFAULT_SSL_PROTOCOLS =
DistributionConfig.DEFAULT_SSL_PROTOCOLS;
/** The name of the "SSLCiphers" property */
- public static final String SSL_CIPHERS_NAME =
+ String SSL_CIPHERS_NAME =
DistributionConfig.SSL_CIPHERS_NAME;
/** The default ssl-ciphers value. (<code>any</code>) */
- public static final String DEFAULT_SSL_CIPHERS =
+ String DEFAULT_SSL_CIPHERS =
DistributionConfig.DEFAULT_SSL_CIPHERS;
/** The name of the "SSLRequireAuthentication" property */
- public static final String SSL_REQUIRE_AUTHENTICATION_NAME =
+ String SSL_REQUIRE_AUTHENTICATION_NAME =
DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME;
/** The default ssl-require-authentication value (<code>true</code>) */
- public static final boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION =
+ boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION =
DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
/** The default disable-tcp value (<code>false</code>) */
- public static final boolean DEFAULT_DISABLE_TCP = DistributionConfig.DEFAULT_DISABLE_TCP;
+ boolean DEFAULT_DISABLE_TCP = DistributionConfig.DEFAULT_DISABLE_TCP;
/** The default enable-network-partition-detection setting (<code>false</code>) */
- public static final boolean DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION = DistributionConfig.DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION;
+ boolean DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION = DistributionConfig.DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION;
/** The default disable-auto-reconnect setting (<code>false</code>) */
- public static final boolean DEFAULT_DISABLE_AUTO_RECONNECT = DistributionConfig.DEFAULT_DISABLE_AUTO_RECONNECT;
+ boolean DEFAULT_DISABLE_AUTO_RECONNECT = DistributionConfig.DEFAULT_DISABLE_AUTO_RECONNECT;
/** The default failure-detection timeout period for member heart-beat responses */
- public static final int DEFAULT_MEMBER_TIMEOUT = DistributionConfig.DEFAULT_MEMBER_TIMEOUT;
+ int DEFAULT_MEMBER_TIMEOUT = DistributionConfig.DEFAULT_MEMBER_TIMEOUT;
/** The name of the "logFile" property */
- public static final String LOG_FILE_NAME = "log-file";
+ String LOG_FILE_NAME = DistributionConfig.LOG_FILE_NAME;
/** The default log-file value ("" which directs logging to standard
* output) */
- public static final String DEFAULT_LOG_FILE = "";
+ String DEFAULT_LOG_FILE = "";
/** The name of the "logLevel" property */
- public static final String LOG_LEVEL_NAME = "log-level";
+ String LOG_LEVEL_NAME = DistributionConfig.LOG_LEVEL_NAME;
/** The default log level ("config") */
- public static final String DEFAULT_LOG_LEVEL = "config";
+ String DEFAULT_LOG_LEVEL = "config";
/** The name of the "LogDiskSpaceLimit" property */
- public static final String LOG_DISK_SPACE_LIMIT_NAME =
- "log-disk-space-limit";
+ String LOG_DISK_SPACE_LIMIT_NAME =
+ DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME;
/** The default log disk space limit in megabytes (0) */
- public static final int DEFAULT_LOG_DISK_SPACE_LIMIT =
+ int DEFAULT_LOG_DISK_SPACE_LIMIT =
DistributionConfig.DEFAULT_LOG_DISK_SPACE_LIMIT;
/** The minimum log disk space limit in megabytes (0) */
- public static final int MIN_LOG_DISK_SPACE_LIMIT =
+ int MIN_LOG_DISK_SPACE_LIMIT =
DistributionConfig.MIN_LOG_DISK_SPACE_LIMIT;
/** The minimum log disk space limit in megabytes (1000000) */
- public static final int MAX_LOG_DISK_SPACE_LIMIT =
+ int MAX_LOG_DISK_SPACE_LIMIT =
DistributionConfig.MAX_LOG_DISK_SPACE_LIMIT;
/** The name of the "LogFileSizeLimit" property */
- public static final String LOG_FILE_SIZE_LIMIT_NAME =
- "log-file-size-limit";
+ String LOG_FILE_SIZE_LIMIT_NAME =
+ DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME;
/** The default log file size limit in megabytes (0) */
- public static final int DEFAULT_LOG_FILE_SIZE_LIMIT =
+ int DEFAULT_LOG_FILE_SIZE_LIMIT =
DistributionConfig.DEFAULT_LOG_FILE_SIZE_LIMIT;
/** The minimum log file size limit in megabytes (0) */
- public static final int MIN_LOG_FILE_SIZE_LIMIT =
+ int MIN_LOG_FILE_SIZE_LIMIT =
DistributionConfig.MIN_LOG_FILE_SIZE_LIMIT;
/** The minimum log file size limit in megabytes (1000000) */
- public static final int MAX_LOG_FILE_SIZE_LIMIT =
+ int MAX_LOG_FILE_SIZE_LIMIT =
DistributionConfig.MAX_LOG_FILE_SIZE_LIMIT;
/**
@@ -293,14 +294,14 @@ public interface DistributedSystemConfig extends Cloneable {
* when the config is created. Note that the resource MBeans actually refresh
* and hit the DS only if there is an RMI client connected
* */
- public static final String REFRESH_INTERVAL_NAME =
+ String REFRESH_INTERVAL_NAME =
"refresh-interval";
/**
* The default "refreshInterval" in seconds which will apply to
* REFRESH_INTERVAL_NAME property. The default value is 15 secs
* */
- public static final int DEFAULT_REFRESH_INTERVAL = 15;
+ int DEFAULT_REFRESH_INTERVAL = 15;
////////////////////// Instance Methods //////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/GemFireMemberStatus.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/GemFireMemberStatus.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/GemFireMemberStatus.java
index 0e3f4f5..1b544a8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/GemFireMemberStatus.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/GemFireMemberStatus.java
@@ -16,16 +16,6 @@
*/
package com.gemstone.gemfire.admin;
-import java.io.IOException;
-import java.io.Serializable;
-import java.net.InetAddress;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.client.PoolManager;
@@ -39,16 +29,15 @@ import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedM
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.admin.ClientHealthMonitoringRegion;
import com.gemstone.gemfire.internal.admin.remote.ClientHealthStats;
-import com.gemstone.gemfire.internal.cache.CacheClientStatus;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.HARegion;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionStatus;
-import com.gemstone.gemfire.internal.cache.RegionStatus;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
+import java.io.IOException;
+import java.io.Serializable;
+import java.net.InetAddress;
+import java.util.*;
+
/**
* Class <code>GemFireMemberStatus</code> provides the status of a specific
* GemFire member VM. This VM can be a peer, a client, a server and/or a
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
index 4a78c0a..9438d91 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
@@ -16,64 +16,20 @@
*/
package com.gemstone.gemfire.admin.internal;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.FutureTask;
-
-import com.gemstone.gemfire.distributed.internal.*;
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.admin.AdminException;
+import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.admin.Alert;
-import com.gemstone.gemfire.admin.AlertLevel;
import com.gemstone.gemfire.admin.AlertListener;
-import com.gemstone.gemfire.admin.BackupStatus;
-import com.gemstone.gemfire.admin.CacheServer;
-import com.gemstone.gemfire.admin.CacheServerConfig;
-import com.gemstone.gemfire.admin.CacheVm;
-import com.gemstone.gemfire.admin.ConfigurationParameter;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.DistributionLocator;
-import com.gemstone.gemfire.admin.DistributionLocatorConfig;
-import com.gemstone.gemfire.admin.GemFireHealth;
-import com.gemstone.gemfire.admin.ManagedEntity;
-import com.gemstone.gemfire.admin.ManagedEntityConfig;
-import com.gemstone.gemfire.admin.OperationCancelledException;
-import com.gemstone.gemfire.admin.RuntimeAdminException;
-import com.gemstone.gemfire.admin.SystemMember;
-import com.gemstone.gemfire.admin.SystemMemberCacheListener;
-import com.gemstone.gemfire.admin.SystemMembershipEvent;
-import com.gemstone.gemfire.admin.SystemMembershipListener;
import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.FutureCancelledException;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.Banner;
-import com.gemstone.gemfire.internal.admin.ApplicationVM;
-import com.gemstone.gemfire.internal.admin.GemFireVM;
-import com.gemstone.gemfire.internal.admin.GfManagerAgent;
-import com.gemstone.gemfire.internal.admin.GfManagerAgentConfig;
-import com.gemstone.gemfire.internal.admin.GfManagerAgentFactory;
-import com.gemstone.gemfire.internal.admin.SSLConfig;
-import com.gemstone.gemfire.internal.admin.remote.CompactRequest;
-import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
-import com.gemstone.gemfire.internal.admin.remote.MissingPersistentIDsRequest;
-import com.gemstone.gemfire.internal.admin.remote.PrepareRevokePersistentIDRequest;
-import com.gemstone.gemfire.internal.admin.remote.RemoteApplicationVM;
-import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
-import com.gemstone.gemfire.internal.admin.remote.RevokePersistentIDRequest;
-import com.gemstone.gemfire.internal.admin.remote.ShutdownAllRequest;
+import com.gemstone.gemfire.internal.admin.*;
+import com.gemstone.gemfire.internal.admin.remote.*;
import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberPattern;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
@@ -84,6 +40,16 @@ import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender;
import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppenders;
import com.gemstone.gemfire.internal.util.concurrent.FutureResult;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Represents a GemFire distributed system for remote administration/management.
@@ -598,13 +564,13 @@ implements com.gemstone.gemfire.admin.AdminDistributedSystem,
// set some config parms to match this system...
ConfigurationParameter[] configParms = new ConfigurationParameter[] {
new ConfigurationParameterImpl(
- DistributionConfig.MCAST_PORT_NAME,
+ MCAST_PORT,
Integer.valueOf(this.config.getMcastPort())),
new ConfigurationParameterImpl(
- DistributionConfig.LOCATORS_NAME,
+ LOCATORS,
this.config.getLocators()),
new ConfigurationParameterImpl(
- DistributionConfig.MCAST_ADDRESS_NAME,
+ MCAST_ADDRESS,
InetAddressUtil.toInetAddress(this.config.getMcastAddress())),
new ConfigurationParameterImpl(
DistributionConfig.DISABLE_TCP_NAME,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
index 8a3d707..524578d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
@@ -18,10 +18,10 @@ package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.internal.admin.GemFireVM;
import com.gemstone.gemfire.internal.admin.remote.RemoteApplicationVM;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
/**
* Implements the administrative interface to a cache server.
@@ -142,7 +142,7 @@ public class CacheServerImpl extends ManagedSystemMemberImpl
String file = this.getConfig().getCacheXMLFile();
if (file != null && file.length() > 0) {
sb.append(" ");
- sb.append(com.gemstone.gemfire.distributed.internal.DistributionConfig.CACHE_XML_FILE_NAME);
+ sb.append(DistributionConfig.CACHE_XML_FILE_NAME);
sb.append("=");
sb.append(file);
}
[15/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
index 62fae10..4d69eb3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
@@ -16,12 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -33,13 +27,16 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.internal.AvailablePort.Keeper;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests the GridAdvisor
@@ -85,9 +82,9 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
+ host0 + "[" + port2 + "]";
final Properties dsProps = new Properties();
- dsProps.setProperty("locators", locators);
- dsProps.setProperty("mcast-port", "0");
- dsProps.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ dsProps.setProperty(LOCATORS, locators);
+ dsProps.setProperty(MCAST_PORT, "0");
+ dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
keeper1.release();
@@ -123,9 +120,9 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
new SerializableRunnable("Connect to " + locators) {
public void run() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
- dsProps.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
};
@@ -419,8 +416,8 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
new SerializableRunnable("Disconnect from " + locators) {
public void run() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
DistributedSystem.connect(props).disconnect();
}
};
@@ -594,9 +591,9 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
+ host0 + "[" + port2 + "]";
final Properties dsProps = new Properties();
- dsProps.setProperty("locators", locators);
- dsProps.setProperty("mcast-port", "0");
- dsProps.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ dsProps.setProperty(LOCATORS, locators);
+ dsProps.setProperty(MCAST_PORT, "0");
+ dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
keeper1.release();
@@ -631,20 +628,20 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
vm1.invoke(new SerializableRunnable("Connect to " + locators) {
public void run() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
- props.setProperty("groups", "bs1Group1, bs1Group2");
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.GROUPS_NAME, "bs1Group1, bs1Group2");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
});
vm2.invoke(new SerializableRunnable("Connect to " + locators) {
public void run() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
- props.setProperty("groups", "bs2Group1, bs2Group2");
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.GROUPS_NAME, "bs2Group1, bs2Group2");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java
index d4581b2..59ea3e7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/HAOverflowMemObjectSizerDUnitTest.java
@@ -19,17 +19,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -43,6 +33,13 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Tests the size of clientUpdateMessageImpl with the size calculated by
* {@link com.gemstone.gemfire.internal.cache.lru.MemLRUCapacityController} for HA overFlow
@@ -159,8 +156,8 @@ public class HAOverflowMemObjectSizerDUnitTest extends DistributedTestCase {
public static void createCacheClient(Integer port1, String host)
throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAOverflowMemObjectSizerDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
index 8091fe7..cbba60b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
@@ -16,33 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminDistributedSystemFactory;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.BackupStatus;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
+import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassBuilder;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.JarClassLoader;
@@ -50,13 +31,10 @@ import com.gemstone.gemfire.internal.JarDeployer;
import com.gemstone.gemfire.internal.cache.persistence.BackupManager;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.internal.util.TransformUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.*;
+import java.util.*;
/**
* Tests for the incremental backup feature.
@@ -89,7 +67,7 @@ public class IncrementalBackupDUnitTest extends CacheTestCase {
private final SerializableRunnable createRegions = new SerializableRunnable() {
@Override
public void run() {
- Cache cache = getCache(new CacheFactory().set("log-level", LogWriterUtils.getDUnitLogLevel()));
+ Cache cache = getCache(new CacheFactory().set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()));
cache.createDiskStoreFactory().setDiskDirs(getDiskDirs()).create("fooStore");
cache.createDiskStoreFactory().setDiskDirs(getDiskDirs()).create("barStore");
getRegionFactory(cache).setDiskStoreName("fooStore").create("fooRegion");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
index 57372b2..4180a75 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
@@ -16,30 +16,28 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.Future;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Properties;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
* Test of interrupting threads doing disk writes to see the effect.
@@ -72,12 +70,12 @@ public class InterruptDiskJUnitTest {
@Before
public void setUp() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "config"); // to keep diskPerf logs smaller
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-archive-file", "stats.gfs");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
File diskStore = new File("diskStore");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
index 0761962..eaa6f57 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.util.Properties;
public class InterruptsConserveSocketsFalseDUnitTest extends
@@ -28,7 +30,7 @@ public class InterruptsConserveSocketsFalseDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty("conserve-sockets", "false");
+ props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
index 72cf04f..6e59e06 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
@@ -16,34 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
+import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
-import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* This is a test verifies region is LIFO enabled by ENTRY COUNT verifies correct stats updating
@@ -91,9 +80,9 @@ public class LIFOEvictionAlgoEnabledRegionJUnitTest {
*/
private static void initializeVM() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "info"); // to keep diskPerf logs smaller
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
distributedSystem = DistributedSystem.connect(props);
cache = CacheFactory.create(distributedSystem);
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
index 0460481..4376c88 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
@@ -16,16 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
+import com.gemstone.gemfire.internal.cache.lru.LRUClockNode;
+import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
+import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.FixMethodOrder;
@@ -33,21 +31,13 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runners.MethodSorters;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
-import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.gemstone.gemfire.internal.cache.lru.LRUClockNode;
-import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
+import java.io.File;
+import java.util.Arrays;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* This is a test verifies region is LIFO enabled by MEMORY verifies correct
@@ -103,9 +93,9 @@ public class LIFOEvictionAlgoMemoryEnabledRegionJUnitTest {
*/
private static void initializeVM() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "info"); // to keep diskPerf logs smaller
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
distributedSystem = DistributedSystem.connect(props);
cache = CacheFactory.create(distributedSystem);
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java
index 7c27e8f..b250cf0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapClearGIIDUnitTest.java
@@ -21,26 +21,12 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
/**
*
@@ -76,7 +62,7 @@ public class MapClearGIIDUnitTest extends CacheTestCase {
/* public static void createCacheVM0() throws Exception {
InitialImageOperation.slowImageProcessing = 200;
Properties mprops = new Properties();
- // mprops.setProperty("mcast-port", "7777");
+ // mprops.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "7777");
ds = (new MapClearGIIDUnitTest("Clear")).getSystem(mprops);
//ds = DistributedSystem.connect(props);
@@ -88,7 +74,7 @@ public class MapClearGIIDUnitTest extends CacheTestCase {
public static void createCacheVM1() throws Exception {
Properties mprops = new Properties();
- // mprops.setProperty("mcast-port", "7777");
+ // mprops.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "7777");
ds = (new MapClearGIIDUnitTest("Clear")).getSystem(mprops);
// ds = DistributedSystem.connect(null);
cache = CacheFactory.create(ds);
@@ -187,7 +173,7 @@ public class MapClearGIIDUnitTest extends CacheTestCase {
InitialImageOperation.slowImageProcessing = 10;
InitialImageOperation.slowImageSleeps = 0;
Properties mprops = new Properties();
- // mprops.setProperty("mcast-port", "7777");
+ // mprops.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "7777");
getSystem(mprops);
//ds = DistributedSystem.connect(props);
@@ -201,7 +187,7 @@ public class MapClearGIIDUnitTest extends CacheTestCase {
public void run2() throws CacheException
{
Properties mprops = new Properties();
- // mprops.setProperty("mcast-port", "7777");
+ // mprops.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "7777");
getSystem(mprops);
// ds = DistributedSystem.connect(null);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterfaceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterfaceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterfaceJUnitTest.java
index e3a3324..7591e66 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterfaceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MapInterfaceJUnitTest.java
@@ -16,30 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.*;
-
-import org.junit.After;
-import org.junit.Before;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.Assert;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class MapInterfaceJUnitTest {
@@ -47,8 +39,8 @@ public class MapInterfaceJUnitTest {
@Test
public void testLocalClear() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = null;
Region region = null;
@@ -100,8 +92,8 @@ public class MapInterfaceJUnitTest {
@Test
public void testLocalPutAll() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = null;
Region region = null;
@@ -159,8 +151,8 @@ public class MapInterfaceJUnitTest {
public void testBeforeRegionClearCallBack() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = null;
Region region = null;
@@ -231,8 +223,8 @@ public class MapInterfaceJUnitTest {
public void testSetValue() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = null;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MultipleOplogsRollingFeatureJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MultipleOplogsRollingFeatureJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MultipleOplogsRollingFeatureJUnitTest.java
index 6ac9e60..4a5967e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MultipleOplogsRollingFeatureJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/MultipleOplogsRollingFeatureJUnitTest.java
@@ -16,15 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
+import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import static org.junit.Assert.*;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
/**
* The test will verify <br>
* 1. Multiple oplogs are being rolled at once <br>
@@ -60,7 +60,7 @@ public class MultipleOplogsRollingFeatureJUnitTest extends
@Test
public void testMultipleRolling()
{
- System.setProperty("gemfire.MAX_OPLOGS_PER_COMPACTION", "17");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "MAX_OPLOGS_PER_COMPACTION", "17");
try {
deleteFiles();
diskProps.setMaxOplogSize(450);
@@ -157,7 +157,7 @@ public class MultipleOplogsRollingFeatureJUnitTest extends
ex.printStackTrace();
fail("testMultipleRolling: test failed due to " + ex);
} finally {
- System.clearProperty("gemfire.MAX_OPLOGS_PER_COMPACTION");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "MAX_OPLOGS_PER_COMPACTION");
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
index e0b8b2f..1b63aec 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/NetSearchMessagingDUnitTest.java
@@ -16,33 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.DistributionMessage;
import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
import com.gemstone.gemfire.internal.cache.SearchLoadAndWriteProcessor.NetSearchRequestMessage;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
public class NetSearchMessagingDUnitTest extends CacheTestCase {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
index d93aa89..e51a35c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
@@ -25,13 +23,9 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
/**
* Performs eviction dunit tests for off-heap memory.
@@ -58,8 +52,8 @@ public class OffHeapEvictionDUnitTest extends EvictionDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
- Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "200m");
+ Properties properties = super.getDistributedSystemProperties();
+ properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "200m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
index 3fb883b..1fa1fca 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -26,6 +24,8 @@ import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Performs eviction stat dunit tests for off-heap regions.
* @since Geode 1.0
@@ -54,8 +54,8 @@ public class OffHeapEvictionStatsDUnitTest extends EvictionStatsDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
- Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ Properties properties = super.getDistributedSystemProperties();
+ properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
index 129d942..38123be 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
@@ -16,21 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-
-import junit.framework.TestCase;
-
import com.examples.snapshot.MyObject;
import com.examples.snapshot.MyPdxSerializer;
import com.gemstone.gemfire.cache.Cache;
@@ -40,9 +25,19 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.snapshot.RegionGenerator;
import com.gemstone.gemfire.cache.snapshot.RegionGenerator.RegionType;
import com.gemstone.gemfire.cache.snapshot.RegionGenerator.SerializationType;
-import com.gemstone.gemfire.cache.snapshot.SnapshotIterator;
-import com.gemstone.gemfire.cache.snapshot.SnapshotReader;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.HashMap;
+import java.util.Map;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class OfflineSnapshotJUnitTest {
@@ -126,8 +121,8 @@ public class OfflineSnapshotJUnitTest {
public void reset() {
CacheFactory cf = new CacheFactory()
- .set("mcast-port", "0")
- .set("log-level", "error")
+ .set(MCAST_PORT, "0")
+ .set(DistributionConfig.LOG_LEVEL_NAME, "error")
.setPdxSerializer(new MyPdxSerializer())
.setPdxPersistent(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
index 21f5c05..78b0d61 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
@@ -16,18 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.DeltaTestImpl;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
@@ -39,6 +29,8 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Properties;
+
/**
*
* Tests the P2P delta propagation functionality.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRConcurrentMapOpsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRConcurrentMapOpsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRConcurrentMapOpsJUnitTest.java
index e1f6c50..e755dc0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRConcurrentMapOpsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRConcurrentMapOpsJUnitTest.java
@@ -16,29 +16,18 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Tests ConcurrentMap operations on a PartitionedRegion on a single node.
@@ -88,7 +77,7 @@ public class PRConcurrentMapOpsJUnitTest {
public void setUp() {
if (cache == null) {
Properties dsProps = new Properties();
- dsProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ dsProps.setProperty(MCAST_PORT, "0");
// Connect to a DS and create a Cache.
sys = DistributedSystem.connect(dsProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryJUnitTest.java
index 31c8db8..3a839f1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryJUnitTest.java
@@ -16,26 +16,18 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
-
-import junit.framework.TestCase;
+import java.util.Properties;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
* Tests memory allocation operations on a PartitionedRegion on a single node.
@@ -62,7 +54,7 @@ public class PRDataStoreMemoryJUnitTest {
protected Properties getDistributedSystemProperties() {
Properties dsProps = new Properties();
- dsProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ dsProps.setProperty(MCAST_PORT, "0");
return dsProps;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
index 5dbce01..597b7e8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
@@ -16,14 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
/**
* Tests PartitionedRegion DataStore currentAllocatedMemory operation.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
index 5529981..b0e1fe6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
@@ -16,10 +16,10 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import java.util.Properties;
+
/**
* Test all the PartitionedRegion api calls when ConserveSockets is set to false
* @since GemFire 5.0
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
index 749e451..d2309cd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
@@ -16,38 +16,17 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Iterator;
-import java.util.List;
-import java.util.NoSuchElementException;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.PartitionedRegionStorageException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketVisitor;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -501,7 +480,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends
private final Cache createLonerCacheWithEnforceUniqueHost() {
Cache myCache = null;
try {
- System.setProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
myCache = CacheFactory.create(getLonerSystemWithEnforceUniqueHost());
} catch (CacheExistsException e) {
Assert.fail("the cache already exists", e);
@@ -512,7 +491,7 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends
} catch (Exception ex) {
Assert.fail("Checked exception while initializing cache??", ex);
} finally {
- System.clearProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
}
return myCache;
}
@@ -528,8 +507,8 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends
*/
private final InternalDistributedSystem getLonerSystemWithEnforceUniqueHost() {
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
- props.put(DistributionConfig.LOCATORS_NAME, "");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
props.put(DistributionConfig.ENFORCE_UNIQUE_HOST_NAME, "true");
props.put(DistributionConfig.REDUNDANCY_ZONE_NAME, "zone1");
return getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
index 8503b43..25aeccb 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
@@ -16,16 +16,17 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheException;
+import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.util.test.TestUtil;
+import java.util.Properties;
+
/**
* This class tests regions created by xml files
*/
@@ -49,8 +50,8 @@ public class PartitionedRegionCacheXMLExampleDUnitTest extends
Properties props = new Properties();
String xmlfilepath = TestUtil.getResourcePath(getClass(), "PartitionRegionCacheExample1.xml");
- props.setProperty("cache-xml-file", xmlfilepath);
-
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, xmlfilepath);
+
getSystem(props);
cache = getCache();
}
@@ -104,7 +105,7 @@ public class PartitionedRegionCacheXMLExampleDUnitTest extends
Properties props = new Properties();
String xmlfilepath = TestUtil.getResourcePath(getClass(), "PartitionRegionCacheExample2.xml");
- props.setProperty("cache-xml-file", xmlfilepath);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, xmlfilepath);
getSystem(props);
cache = getCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStoreJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStoreJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStoreJUnitTest.java
index ed73991..2a5f4a1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStoreJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStoreJUnitTest.java
@@ -16,41 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverAdapter;
+import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverHolder;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.internal.logging.PureLogWriter;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverAdapter;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverHolder;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* This test checks functionality of the PartitionedRegionDatastore on a sinle
@@ -75,7 +57,7 @@ public class PartitionedRegionDataStoreJUnitTest
@Before
public void setUp() {
Properties dsProps = new Properties();
- dsProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ dsProps.setProperty(MCAST_PORT, "0");
// Connect to a DS and create a Cache.
sys = DistributedSystem.connect(dsProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
index ce10abb..4e36ea8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionEvictionDUnitTest.java
@@ -16,43 +16,24 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.ObjectSizerImpl;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
import com.gemstone.gemfire.internal.cache.lru.HeapLRUCapacityController;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
public class PartitionedRegionEvictionDUnitTest extends CacheTestCase {
public PartitionedRegionEvictionDUnitTest(final String name) {
@@ -190,7 +171,7 @@ public class PartitionedRegionEvictionDUnitTest extends CacheTestCase {
protected void raiseFakeNotification() {
((GemFireCacheImpl) getCache()).getHeapEvictor().testAbortAfterLoopCount = 1;
HeapMemoryMonitor.setTestDisableMemoryUpdates(true);
- System.setProperty("gemfire.memoryEventTolerance", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "memoryEventTolerance", "0");
setEvictionPercentage(85);
HeapMemoryMonitor hmm = ((GemFireCacheImpl) getCache()).getResourceManager().getHeapMonitor();
@@ -202,7 +183,7 @@ public class PartitionedRegionEvictionDUnitTest extends CacheTestCase {
protected void cleanUpAfterFakeNotification() {
((GemFireCacheImpl) getCache()).getHeapEvictor().testAbortAfterLoopCount = Integer.MAX_VALUE;
HeapMemoryMonitor.setTestDisableMemoryUpdates(false);
- System.clearProperty("gemfire.memoryEventTolerance");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "memoryEventTolerance");
}
public void testHeapLRUWithLocalDestroy() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
index da894a4..246a862 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.EvictionAttributes;
import com.gemstone.gemfire.cache.RegionAttributes;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Tests PartitionedRegion localMaxMemory with Off-Heap memory.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
index 48f88e8..e1ae38a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
@@ -26,6 +24,8 @@ import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
public class PartitionedRegionOffHeapEvictionDUnitTest extends
PartitionedRegionEvictionDUnitTest {
@@ -50,8 +50,8 @@ public class PartitionedRegionOffHeapEvictionDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
- Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ Properties properties = super.getDistributedSystemProperties();
+ properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
index a2dafbf..b661b3e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
@@ -16,14 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -33,6 +26,8 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Properties;
+
public class PartitionedRegionRedundancyZoneDUnitTest extends CacheTestCase {
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index 65cc7eb..f358be0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -16,38 +16,9 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.TimeUnit;
-
-import com.jayway.awaitility.Awaitility;
-import org.jgroups.blocks.locking.AwaitInfo;
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.ClientMetadataService;
@@ -69,17 +40,23 @@ import com.gemstone.gemfire.internal.cache.execute.data.CustId;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.jayway.awaitility.Awaitility;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
@@ -176,7 +153,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
Properties props = new Properties();
props = new Properties();
- props.setProperty("locators", locString);
+ props.setProperty(LOCATORS, locString);
CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
"PartitionedRegionSingleHopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1103,8 +1080,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
public static void createClientWithoutPRSingleHopEnabled(int port0) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
"PartitionedRegionSingleHopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1585,8 +1562,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
public static void createClient(int port0) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
"PartitionedRegionSingleHopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1611,8 +1588,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
public static void createClient(int port0, int port1) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
"PartitionedRegionSingleHopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1637,8 +1614,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
public static void createClientWithLocator(String host, int port0) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
"PartitionedRegionSingleHopDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1662,8 +1639,8 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
public static void createClient(int port0, int port1, int port2, int port3) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopDUnitTest(
"PartitionedRegionSingleHopDUnitTest");
DistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
index 2680d04..d2b319b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
@@ -19,18 +19,11 @@
*/
package com.gemstone.gemfire.internal.cache;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.ClientMetadataService;
import com.gemstone.gemfire.cache.client.internal.ClientPartitionAdvisor;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -41,19 +34,8 @@ import com.gemstone.gemfire.internal.cache.execute.data.CustId;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-
-import java.io.File;
+import com.gemstone.gemfire.test.dunit.*;
+
import java.io.IOException;
import java.util.List;
import java.util.Map;
@@ -61,6 +43,9 @@ import java.util.Map.Entry;
import java.util.Properties;
import java.util.StringTokenizer;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
*
*/
@@ -802,9 +787,9 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
Properties props = new Properties();
props = new Properties();
- props.setProperty("locators", locator);
-
- System.setProperty("gemfire.PoolImpl.honourServerGroupsInPRSingleHop", "true");
+ props.setProperty(LOCATORS, locator);
+
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.honourServerGroupsInPRSingleHop", "true");
CacheTestCase test = new PartitionedRegionSingleHopWithServerGroupDUnitTest(
"PartitionedRegionSingleHopWithServerGroupDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -888,9 +873,9 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
Properties props = new Properties();
props = new Properties();
- props.setProperty("locators", locator);
-
- System.setProperty("gemfire.PoolImpl.honourServerGroupsInPRSingleHop", "true");
+ props.setProperty(LOCATORS, locator);
+
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.honourServerGroupsInPRSingleHop", "true");
CacheTestCase test = new PartitionedRegionSingleHopWithServerGroupDUnitTest(
"PartitionedRegionSingleHopWithServerGroupDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1025,8 +1010,8 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
public static void createClientWithLocator(String host, int port0, String group) {
Properties props = new Properties();
props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.LOG_FILE_NAME, "");
CacheTestCase test = new PartitionedRegionSingleHopWithServerGroupDUnitTest(
"PartitionedRegionSingleHopWithServerGroupDUnitTest");
@@ -1051,8 +1036,8 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
public static void create2ClientWithLocator(String host, int port0, String group1, String group2) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopWithServerGroupDUnitTest(
"PartitionedRegionSingleHopWithServerGroupDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1080,8 +1065,8 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
public static void createClientWith3PoolLocator(String host, int port0, String group1, String group2,String group3) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopWithServerGroupDUnitTest(
"PartitionedRegionSingleHopWithServerGroupDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1339,8 +1324,8 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
public static void createClientWithLocatorWithoutSystemProperty(String host, int port0, String group) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PartitionedRegionSingleHopWithServerGroupDUnitTest(
"PartitionedRegionSingleHopWithServerGroupDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1636,7 +1621,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
public static void startLocatorInVM(final int locatorPort) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
props.setProperty(DistributionConfig.LOG_FILE_NAME, "");
@@ -1654,10 +1639,10 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
}
public static void resetHonourServerGroupsInPRSingleHop() {
- System.setProperty("gemfire.PoolImpl.honourServerGroupsInPRSingleHop", "False");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.honourServerGroupsInPRSingleHop", "False");
}
public static void setHonourServerGroupsInPRSingleHop() {
- System.setProperty("gemfire.PoolImpl.honourServerGroupsInPRSingleHop", "True");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.honourServerGroupsInPRSingleHop", "True");
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestHelper.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestHelper.java
index d4b489a..b434565 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestHelper.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionTestHelper.java
@@ -16,28 +16,18 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.Serializable;
-import java.util.Properties;
-
-import org.junit.Assert;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.types.ObjectType;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import org.junit.Assert;
+
+import java.io.Serializable;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
@@ -214,8 +204,8 @@ public class PartitionedRegionTestHelper
{
if (cache == null) {
Properties dsp = new Properties();
- dsp.setProperty("mcast-port", "0");
- dsp.setProperty("locators", "");
+ dsp.setProperty(MCAST_PORT, "0");
+ dsp.setProperty(LOCATORS, "");
DistributedSystem sys = DistributedSystem.connect(dsp);
try {
cache = CacheFactory.create(sys);
[05/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/ConcurrentStartTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/ConcurrentStartTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/ConcurrentStartTest.java
index 6c11c96..6b91763 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/ConcurrentStartTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/ConcurrentStartTest.java
@@ -16,8 +16,12 @@
*/
package com.gemstone.gemfire.redis;
-import static org.junit.Assert.assertFalse;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -25,12 +29,9 @@ import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertFalse;
@Category(IntegrationTest.class)
public class ConcurrentStartTest {
@@ -63,8 +64,8 @@ public class ConcurrentStartTest {
@Test
public void testCachefulStart() throws InterruptedException {
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
- cf.set("locators", "");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
this.cache = cf.create();
runNServers(numServers);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
index c0da54b..fed4803 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/HashesJUnitTest.java
@@ -16,30 +16,24 @@
*/
package com.gemstone.gemfire.redis;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-
import redis.clients.jedis.Jedis;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class HashesJUnitTest {
@@ -54,9 +48,9 @@ public class HashesJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set("log-level", "error");
- cf.set("mcast-port", "0");
- cf.set("locators", "");
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
cache = cf.create();
port = AvailablePortHelper.getRandomAvailableTCPPort();
server = new GemFireRedisServer("localhost", port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
index 6548777..17a2c3f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/ListsJUnitTest.java
@@ -16,27 +16,27 @@
*/
package com.gemstone.gemfire.redis;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Random;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.AfterClass;
-import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-
import redis.clients.jedis.Jedis;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class ListsJUnitTest {
@@ -52,9 +52,9 @@ public class ListsJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set("log-level", "error");
- cf.set("mcast-port", "0");
- cf.set("locators", "");
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
cache = cf.create();
port = AvailablePortHelper.getRandomAvailableTCPPort();
server = new GemFireRedisServer("localhost", port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
index 23f202d..0ed99bd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/RedisDistDUnitTest.java
@@ -16,23 +16,20 @@
*/
package com.gemstone.gemfire.redis;
-import java.util.Random;
-
-import org.junit.experimental.categories.Category;
-import redis.clients.jedis.Jedis;
-
import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+import redis.clients.jedis.Jedis;
+
+import java.util.Random;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class RedisDistDUnitTest extends DistributedTestCase {
@@ -84,11 +81,11 @@ public class RedisDistDUnitTest extends DistributedTestCase {
int port = ports[VM.getCurrentVMNum()];
CacheFactory cF = new CacheFactory();
String locator = SocketCreator.getLocalHost().getHostName() + "[" + locatorPort + "]";
- cF.set("log-level", LogWriterUtils.getDUnitLogLevel());
- cF.set("redis-bind-address", localHost);
- cF.set("redis-port", ""+port);
- cF.set("mcast-port", "0");
- cF.set("locators", locator);
+ cF.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ cF.set(SystemConfigurationProperties.REDIS_BIND_ADDRESS, localHost);
+ cF.set(SystemConfigurationProperties.REDIS_PORT, "" + port);
+ cF.set(MCAST_PORT, "0");
+ cF.set(LOCATORS, locator);
cF.create();
return Integer.valueOf(port);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
index 9da65e7..28c35bf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/SetsJUnitTest.java
@@ -16,27 +16,28 @@
*/
package com.gemstone.gemfire.redis;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Random;
-import java.util.Set;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-
import redis.clients.jedis.Jedis;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Random;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class SetsJUnitTest {
@@ -52,9 +53,9 @@ public class SetsJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set("log-level", "error");
- cf.set("mcast-port", "0");
- cf.set("locators", "");
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
cache = cf.create();
port = AvailablePortHelper.getRandomAvailableTCPPort();
server = new GemFireRedisServer("localhost", port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
index e7dbec8..90b2827 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/SortedSetsJUnitTest.java
@@ -16,36 +16,26 @@
*/
package com.gemstone.gemfire.redis;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.AbstractMap;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Random;
-import java.util.Set;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-
import redis.clients.jedis.Jedis;
import redis.clients.jedis.Tuple;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.util.*;
+import java.util.Map.Entry;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class SortedSetsJUnitTest {
@@ -60,9 +50,9 @@ public class SortedSetsJUnitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set("log-level", "error");
- cf.set("mcast-port", "0");
- cf.set("locators", "");
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
cache = cf.create();
port = AvailablePortHelper.getRandomAvailableTCPPort();
server = new GemFireRedisServer("localhost", port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
index d273e89..8939e0b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/StringsJunitTest.java
@@ -16,30 +16,24 @@
*/
package com.gemstone.gemfire.redis;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Random;
-import java.util.Set;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-
import redis.clients.jedis.Jedis;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class StringsJunitTest {
@@ -55,9 +49,9 @@ public class StringsJunitTest {
rand = new Random();
CacheFactory cf = new CacheFactory();
//cf.set("log-file", "redis.log");
- cf.set("log-level", "error");
- cf.set("mcast-port", "0");
- cf.set("locators", "");
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
cache = cf.create();
port = AvailablePortHelper.getRandomAvailableTCPPort();
server = new GemFireRedisServer("localhost", port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestUtils.java
index 89a0a15..1ee8768 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthenticationTestUtils.java
@@ -16,13 +16,13 @@
*/
package com.gemstone.gemfire.security;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.security.SecurityTestUtils.*;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.cache.Region;
import java.util.Properties;
-import com.gemstone.gemfire.cache.Region;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.SECURITY_CLIENT_AUTHENTICATOR;
+import static com.gemstone.gemfire.security.SecurityTestUtils.*;
+import static org.junit.Assert.assertNotNull;
/**
* Extracted from ClientAuthenticationDUnitTest
@@ -41,7 +41,7 @@ public abstract class ClientAuthenticationTestUtils {
}
if (authenticator != null) {
- authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR_NAME, authenticator);
+ authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR, authenticator);
}
return SecurityTestUtils.createCacheServer(authProps, javaProps, locatorPort, locatorString, 0, NO_EXCEPTION);
@@ -56,7 +56,7 @@ public abstract class ClientAuthenticationTestUtils {
}
if (authenticator != null) {
- authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR_NAME, authenticator);
+ authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR, authenticator);
}
SecurityTestUtils.createCacheServer(authProps, javaProps, locatorPort, locatorString, serverPort, NO_EXCEPTION);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
index 22c4cb2..4131fd4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/ClientAuthorizationTestCase.java
@@ -18,44 +18,12 @@
*/
package com.gemstone.gemfire.security;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePort.*;
-import static com.gemstone.gemfire.security.SecurityTestUtils.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-import com.gemstone.gemfire.cache.DynamicRegionFactory;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.client.ServerConnectivityException;
import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqEvent;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.internal.AvailablePort.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.internal.AvailablePort.Keeper;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.AbstractRegionEntry;
import com.gemstone.gemfire.internal.cache.LocalRegion;
@@ -68,6 +36,17 @@ import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import java.util.*;
+import java.util.concurrent.Callable;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
+import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
+import static com.gemstone.gemfire.security.SecurityTestUtils.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
/**
* Base class for tests for authorization from client to server. It contains
* utility functions for the authorization tests from client to server.
@@ -186,13 +165,13 @@ public abstract class ClientAuthorizationTestCase extends JUnit4DistributedTestC
protected static Properties buildProperties(final String authenticator, final String accessor, final boolean isAccessorPP, final Properties extraAuthProps, final Properties extraAuthzProps) {
Properties authProps = new Properties();
if (authenticator != null) {
- authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR_NAME, authenticator);
+ authProps.setProperty(SECURITY_CLIENT_AUTHENTICATOR, authenticator);
}
if (accessor != null) {
if (isAccessorPP) {
- authProps.setProperty(SECURITY_CLIENT_ACCESSOR_PP_NAME, accessor);
+ authProps.setProperty(SECURITY_CLIENT_ACCESSOR_PP, accessor);
} else {
- authProps.setProperty(SECURITY_CLIENT_ACCESSOR_NAME, accessor);
+ authProps.setProperty(SECURITY_CLIENT_ACCESSOR, accessor);
}
}
return concatProperties(new Properties[] { authProps, extraAuthProps, extraAuthzProps });
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
index 6970ef2..cd11c7a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/P2PAuthenticationDUnitTest.java
@@ -18,23 +18,9 @@
*/
package com.gemstone.gemfire.security;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePort.*;
-import static com.gemstone.gemfire.security.SecurityTestUtils.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.IgnoredException.*;
-import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.Properties;
-import javax.net.ssl.SSLHandshakeException;
-
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
@@ -50,6 +36,22 @@ import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import javax.net.ssl.SSLHandshakeException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
+import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
+import static com.gemstone.gemfire.security.SecurityTestUtils.startLocator;
+import static com.gemstone.gemfire.security.SecurityTestUtils.stopLocator;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.getIPLiteral;
+import static com.gemstone.gemfire.test.dunit.Wait.pause;
/**
* Tests peer to peer authentication in Gemfire
@@ -89,10 +91,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
int port = getRandomAvailablePort(SOCKET);
Properties props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "26753");
- props.setProperty(LOCATORS_NAME, getIPLiteral() + "[" + port + "]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create");
- props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(MCAST_PORT, "26753");
+ props.setProperty(SystemConfigurationProperties.LOCATORS, getIPLiteral() + "[" + port + "]");
+ props.setProperty(SystemConfigurationProperties.SECURITY_PEER_AUTH_INIT, UserPasswordAuthInit.class.getName() + ".create");
+ props.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
try {
Locator.startLocatorAndDS(port, null, null, props);
@@ -104,10 +106,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
// Also try setting the authenticator
props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "26753");
- props.setProperty(LOCATORS_NAME, getIPLiteral() +"[" + port + "]");
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, LdapUserAuthenticator.class.getName() + ".create");
- props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(MCAST_PORT, "26753");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + port + "]");
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, LdapUserAuthenticator.class.getName() + ".create");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
Locator.startLocatorAndDS(port, null, null, props);
@@ -118,8 +120,8 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
}
props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "26753");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create");
+ props.setProperty(MCAST_PORT, "26753");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, UserPasswordAuthInit.class.getName() + ".create");
try {
getSystem(props);
@@ -131,8 +133,8 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
// Also try setting the authenticator
props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "26753");
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, LdapUserAuthenticator.class.getName() + ".create");
+ props.setProperty(MCAST_PORT, "26753");
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, LdapUserAuthenticator.class.getName() + ".create");
try {
getSystem(props);
@@ -155,10 +157,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
assertNull(gen.getJavaProperties());
Properties props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getIPLiteral() + "[" + locatorPort + "]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, "Incorrect_AuthInitialize");
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, gen.getAuthenticator());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + locatorPort + "]");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, "Incorrect_AuthInitialize");
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, gen.getAuthenticator());
startTheLocator(props, gen.getJavaProperties(), locatorPort);
@@ -187,10 +189,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
assertNull(gen.getJavaProperties());
Properties props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getIPLiteral() +"["+locatorPort+"]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, gen.getAuthInit());
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, "xyz");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + locatorPort + "]");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, gen.getAuthInit());
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, "xyz");
startTheLocator(props, null, locatorPort);
@@ -218,10 +220,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
assertNull(gen.getSystemProperties());
Properties props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getIPLiteral() +"["+locatorPort+"]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, gen.getAuthInit());
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, gen.getAuthenticator());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + locatorPort + "]");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, gen.getAuthInit());
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, gen.getAuthenticator());
startTheLocator(props, null, locatorPort);
@@ -249,10 +251,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
assertNotNull(gen.getValidCredentials(1));
Properties props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getIPLiteral() +"["+locatorPort+"]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, gen.getAuthInit());
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, gen.getAuthenticator());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + locatorPort + "]");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, gen.getAuthInit());
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, gen.getAuthenticator());
props.putAll(gen.getValidCredentials(1));
startTheLocator(props, gen.getJavaProperties(), locatorPort);
@@ -283,10 +285,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
assertNotNull(gen.getValidCredentials(3));
Properties props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getIPLiteral() +"["+locatorPort+"]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, gen.getAuthInit());
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, gen.getAuthenticator());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + locatorPort + "]");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, gen.getAuthInit());
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, gen.getAuthenticator());
props.putAll(gen.getValidCredentials(1));
startTheLocator(props, null, locatorPort);
@@ -354,8 +356,8 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
int port = getRandomAvailablePort(SOCKET);
final String locators = getIPLiteral() +"["+port+"]";
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, authInit);
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, authenticator);
+ props.setProperty(SECURITY_PEER_AUTH_INIT, authInit);
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, authenticator);
Properties credentials = gen.getValidCredentials(1);
Properties javaProps = gen.getJavaProperties();
props.putAll(credentials);
@@ -367,10 +369,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
// Start the first peer with different authenticator
props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, locators);
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, authInit);
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, authenticator2);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(SECURITY_PEER_AUTH_INIT, authInit);
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, authenticator2);
credentials = gen.getValidCredentials(3);
Properties javaProps2 = gen2.getJavaProperties();
@@ -381,10 +383,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
// Start the second peer with the same authenticator as locator
props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, locators);
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, authInit);
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, authenticator);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(SECURITY_PEER_AUTH_INIT, authInit);
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, authenticator);
credentials = gen.getValidCredentials(7);
javaProps = gen.getJavaProperties();
@@ -457,8 +459,8 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
Properties credentials = gen.getValidCredentials(1);
Properties props = new Properties();
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, authInit);
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, gen.getAuthenticator());
+ props.setProperty(SECURITY_PEER_AUTH_INIT, authInit);
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, gen.getAuthenticator());
props.putAll(credentials);
startTheLocator(props, null, locatorPort);
@@ -466,10 +468,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
try {
// Start the first peer with huge credentials
props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getIPLiteral() +"["+locatorPort+"]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, authInit);
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, gen.getAuthenticator());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + locatorPort + "]");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, authInit);
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, gen.getAuthenticator());
String hugeStr = "20KString";
for (int i = 0; i <= 20000; i++) {
@@ -489,10 +491,10 @@ public class P2PAuthenticationDUnitTest extends JUnit4DistributedTestCase {
// Start the second peer with the same authenticator as locator
props = new Properties();
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getIPLiteral() +"["+locatorPort+"]");
- props.setProperty(SECURITY_PEER_AUTH_INIT_NAME, authInit);
- props.setProperty(SECURITY_PEER_AUTHENTICATOR_NAME, gen.getAuthenticator());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getIPLiteral() + "[" + locatorPort + "]");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, authInit);
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, gen.getAuthenticator());
credentials = gen.getValidCredentials(7);
props.putAll(credentials);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtils.java
index e992dd0..56da24a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/SecurityTestUtils.java
@@ -18,59 +18,8 @@
*/
package com.gemstone.gemfire.security;
-import static com.gemstone.gemfire.cache30.ClientServerTestCase.*;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePort.*;
-import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
-import static com.gemstone.gemfire.test.dunit.Assert.assertFalse;
-import static com.gemstone.gemfire.test.dunit.Assert.assertNotNull;
-import static com.gemstone.gemfire.test.dunit.Assert.assertNull;
-import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
-import static com.gemstone.gemfire.test.dunit.Assert.fail;
-import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import javax.net.ServerSocketFactory;
-import javax.net.SocketFactory;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLContextSpi;
-import javax.net.ssl.SSLServerSocketFactory;
-import javax.net.ssl.SSLSocketFactory;
-import javax.net.ssl.TrustManager;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DynamicRegionFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.NoAvailableServersException;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.ServerConnectivityException;
-import com.gemstone.gemfire.cache.client.ServerOperationException;
-import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.ProxyCache;
import com.gemstone.gemfire.cache.execute.Execution;
@@ -83,6 +32,7 @@ import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.pdx.PdxReader;
import com.gemstone.gemfire.pdx.PdxSerializable;
import com.gemstone.gemfire.pdx.PdxWriter;
@@ -90,6 +40,28 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import javax.net.ServerSocketFactory;
+import javax.net.SocketFactory;
+import javax.net.ssl.*;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.*;
+import java.util.concurrent.Callable;
+
+import static com.gemstone.gemfire.cache30.ClientServerTestCase.configureConnectionPoolWithNameAndFactory;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
+import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.getDUnitLocatorPort;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.getIPLiteral;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
/**
* Contains utility methods for setting up servers/clients for authentication
* and authorization tests.
@@ -213,14 +185,14 @@ public final class SecurityTestUtils {
if (authProps == null) {
authProps = new Properties();
}
- authProps.setProperty(MCAST_PORT_NAME, "0");
+ authProps.setProperty(MCAST_PORT, "0");
if (locatorString != null && locatorString.length() > 0) {
- authProps.setProperty(LOCATORS_NAME, locatorString);
- authProps.setProperty(START_LOCATOR_NAME, getIPLiteral() + "[" + locatorPort + ']');
+ authProps.setProperty(LOCATORS, locatorString);
+ authProps.setProperty(START_LOCATOR, getIPLiteral() + "[" + locatorPort + ']');
} else {
- authProps.setProperty("locators", "localhost["+getDUnitLocatorPort()+"]");
+ authProps.setProperty(LOCATORS, "localhost[" + getDUnitLocatorPort() + "]");
}
- authProps.setProperty(SECURITY_LOG_LEVEL_NAME, "finest");
+ authProps.setProperty(SECURITY_LOG_LEVEL, "finest");
getLogWriter().info("Set the server properties to: " + authProps);
getLogWriter().info("Set the java properties to: " + javaProps);
@@ -308,12 +280,12 @@ public final class SecurityTestUtils {
if (authProps == null) {
authProps = new Properties();
}
- authProps.setProperty(MCAST_PORT_NAME, "0");
- authProps.setProperty(LOCATORS_NAME, "");
- authProps.setProperty(SECURITY_LOG_LEVEL_NAME, "finest");
+ authProps.setProperty(MCAST_PORT, "0");
+ authProps.setProperty(LOCATORS, "");
+ authProps.setProperty(SECURITY_LOG_LEVEL, "finest");
// TODO (ashetkar) Add " && (!multiUserAuthMode)" below.
if (authInitModule != null) {
- authProps.setProperty(SECURITY_CLIENT_AUTH_INIT_NAME, authInitModule);
+ authProps.setProperty(SECURITY_CLIENT_AUTH_INIT, authInitModule);
}
SecurityTestUtils tmpInstance = new SecurityTestUtils("temp");
@@ -418,20 +390,20 @@ public final class SecurityTestUtils {
if (authProps[0] == null) {
authProps[0] = new Properties();
}
- authProps[0].setProperty(MCAST_PORT_NAME, "0");
- authProps[0].setProperty(LOCATORS_NAME, "");
- authProps[0].setProperty(SECURITY_LOG_LEVEL_NAME, "finest");
+ authProps[0].setProperty(MCAST_PORT, "0");
+ authProps[0].setProperty(LOCATORS, "");
+ authProps[0].setProperty(SECURITY_LOG_LEVEL, "finest");
Properties props = new Properties();
if (authInitModule != null) {
- authProps[0].setProperty(SECURITY_CLIENT_AUTH_INIT_NAME, authInitModule);
- props.setProperty(SECURITY_CLIENT_AUTH_INIT_NAME, authInitModule);
+ authProps[0].setProperty(SECURITY_CLIENT_AUTH_INIT, authInitModule);
+ props.setProperty(SECURITY_CLIENT_AUTH_INIT, authInitModule);
}
if (durableClientId != null) {
- props.setProperty(DURABLE_CLIENT_ID_NAME, durableClientId);
- props.setProperty(DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(DEFAULT_DURABLE_CLIENT_TIMEOUT));
+ props.setProperty(DURABLE_CLIENT_ID, durableClientId);
+ props.setProperty(DURABLE_CLIENT_TIMEOUT, String.valueOf(DistributionConfig.DEFAULT_DURABLE_CLIENT_TIMEOUT));
}
SecurityTestUtils tmpInstance = new SecurityTestUtils("temp");
@@ -516,9 +488,9 @@ public final class SecurityTestUtils {
if (extraProps != null) {
authProps.putAll(extraProps);
}
- authProps.setProperty(MCAST_PORT_NAME, "0");
- authProps.setProperty(LOCATORS_NAME, getIPLiteral() + "[" + port + "]");
- authProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ authProps.setProperty(MCAST_PORT, "0");
+ authProps.setProperty(LOCATORS, getIPLiteral() + "[" + port + "]");
+ authProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
clearStaticSSLContext();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
index 7bdcd9a..2b3a427 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
@@ -16,12 +16,6 @@
*/
package com.gemstone.gemfire.security.generator;
-import java.security.Principal;
-import java.util.Properties;
-import java.util.Random;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.tier.sockets.HandShake;
import com.gemstone.gemfire.internal.logging.LogService;
@@ -29,6 +23,11 @@ import com.gemstone.gemfire.security.templates.LdapUserAuthenticator;
import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.util.test.TestUtil;
+import org.apache.logging.log4j.Logger;
+
+import java.security.Principal;
+import java.util.Properties;
+import java.util.Random;
public class LdapUserCredentialGenerator extends CredentialGenerator {
@@ -67,7 +66,7 @@ public class LdapUserCredentialGenerator extends CredentialGenerator {
if (serverAuthEnabled) {
String keyStoreFile = TestUtil.getResourcePath(LdapUserCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/gemfire1.keystore");
extraProps.setProperty(HandShake.PRIVATE_KEY_FILE_PROP, keyStoreFile);
- extraProps.setProperty(HandShake.PRIVATE_KEY_ALIAS_PROP, "gemfire1");
+ extraProps.setProperty(HandShake.PRIVATE_KEY_ALIAS_PROP, DistributionConfig.GEMFIRE_PREFIX);
extraProps.setProperty(HandShake.PRIVATE_KEY_PASSWD_PROP, "gemfire");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
index 6f7cf29..14f1f80 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/SSLCredentialGenerator.java
@@ -16,16 +16,16 @@
*/
package com.gemstone.gemfire.security.generator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import org.apache.logging.log4j.Logger;
+
import java.io.File;
import java.io.IOException;
import java.security.Principal;
import java.util.Properties;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-
public class SSLCredentialGenerator extends CredentialGenerator {
private static final Logger logger = LogService.getLogger();
@@ -113,10 +113,10 @@ public class SSLCredentialGenerator extends CredentialGenerator {
private Properties getSSLProperties() {
Properties props = new Properties();
- props.setProperty("ssl-enabled", "true");
- props.setProperty("ssl-require-authentication", "true");
- props.setProperty("ssl-ciphers", "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
- props.setProperty("ssl-protocols", "TLSv1");
+ props.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
+ props.setProperty(DistributionConfig.SSL_CIPHERS_NAME, "SSL_RSA_WITH_3DES_EDE_CBC_SHA");
+ props.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, "TLSv1");
return props;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java
index 06a4997..1240533 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/UserPasswordWithExtraPropsAuthInit.java
@@ -16,14 +16,15 @@
*/
package com.gemstone.gemfire.security.generator;
-import java.util.Iterator;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.security.AuthInitialize;
import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
+import java.util.Iterator;
+import java.util.Properties;
+
/**
* An {@link AuthInitialize} implementation that obtains the user name and
* password as the credentials from the given set of properties. If
@@ -35,7 +36,7 @@ import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
*/
public class UserPasswordWithExtraPropsAuthInit extends UserPasswordAuthInit {
- public static final String SECURITY_PREFIX = "security-";
+ public static final String SECURITY_PREFIX = DistributionConfig.SECURITY_PREFIX_NAME;
public static final String EXTRA_PROPS = "security-keep-extra-props";
public static AuthInitialize create() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
index 9f69dab..fa54b7a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
@@ -16,13 +16,6 @@
*/
package com.gemstone.gemfire.test.dunit;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -30,6 +23,13 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManage
import com.gemstone.gemfire.internal.InternalDataSerializer;
import com.gemstone.gemfire.internal.InternalInstantiator;
+import java.io.File;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import static org.junit.Assert.assertEquals;
+
/**
* <code>DistributedTestUtils</code> provides static utility methods that
* affect the runtime environment or artifacts generated by a DistributedTest.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
index 9556af2..0a482d4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/LogWriterUtils.java
@@ -16,10 +16,6 @@
*/
package com.gemstone.gemfire.test.dunit;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
@@ -28,6 +24,9 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LogWriterFactory;
import com.gemstone.gemfire.internal.logging.ManagerLogWriter;
import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
+import org.apache.logging.log4j.Logger;
+
+import java.util.Properties;
/**
* <code>LogWriterUtils</code> provides static utility methods to access a
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NetworkUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NetworkUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NetworkUtils.java
index d83aecd..dec882e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NetworkUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/NetworkUtils.java
@@ -16,10 +16,11 @@
*/
package com.gemstone.gemfire.test.dunit;
-import java.net.UnknownHostException;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.SocketCreator;
+import java.net.UnknownHostException;
+
/**
* <code>NetworkUtils</code> provides static utility methods to perform
* network DNS lookups or similar actions.
@@ -63,7 +64,7 @@ public class NetworkUtils {
* @return the host name
*/
public static String getServerHostName(final Host host) {
- String serverBindAddress = System.getProperty("gemfire.server-bind-address");
+ String serverBindAddress = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "server-bind-address");
return serverBindAddress != null ? serverBindAddress : host.getHostName();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
index 1d517bc..ea8e02c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/cache/internal/JUnit4CacheTestCase.java
@@ -21,6 +21,7 @@ import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -41,6 +42,8 @@ import java.util.Arrays;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* This class is the base class for all distributed tests using JUnit 4 that
* require the creation of a {@link Cache}.
@@ -89,11 +92,11 @@ public class JUnit4CacheTestCase extends JUnit4DistributedTestCase implements Ca
private final void createCache(final boolean client, final CacheFactory factory) {
synchronized(JUnit4CacheTestCase.class) {
try {
- System.setProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
Cache newCache;
if (client) {
- System.setProperty("gemfire.locators", "");
- System.setProperty("gemfire.mcast-port", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "locators", "");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
newCache = (Cache)new ClientCacheFactory(getSystem().getProperties()).create();
} else {
if(factory == null) {
@@ -116,9 +119,9 @@ public class JUnit4CacheTestCase extends JUnit4DistributedTestCase implements Ca
} catch (Exception ex) {
Assert.fail("Checked exception while initializing cache??", ex);
} finally {
- System.clearProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
- System.clearProperty("gemfire.locators");
- System.clearProperty("gemfire.mcast-port");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "locators");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT);
}
}
}
@@ -130,7 +133,7 @@ public class JUnit4CacheTestCase extends JUnit4DistributedTestCase implements Ca
public final Cache createLonerCache() {
synchronized(JUnit4CacheTestCase.class) {
try {
- System.setProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
Cache newCache = CacheFactory.create(getLonerSystem());
cache = newCache;
} catch (CacheExistsException e) {
@@ -142,7 +145,7 @@ public class JUnit4CacheTestCase extends JUnit4DistributedTestCase implements Ca
} catch (Exception ex) {
Assert.fail("Checked exception while initializing cache??", ex);
} finally {
- System.clearProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
}
return cache;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
index e5c3df7..06019b8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/internal/JUnit4DistributedTestCase.java
@@ -16,22 +16,6 @@
*/
package com.gemstone.gemfire.test.dunit.internal;
-import static org.junit.Assert.*;
-
-import java.io.Serializable;
-import java.text.DecimalFormat;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-
import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
@@ -47,11 +31,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.admin.ClientStatsManager;
-import com.gemstone.gemfire.internal.cache.DiskStoreObserver;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.HARegion;
-import com.gemstone.gemfire.internal.cache.InitialImageOperation;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
@@ -59,13 +39,22 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.management.internal.cli.LogWrapper;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.dunit.standalone.DUnitLauncher;
import com.gemstone.gemfire.test.junit.rules.serializable.SerializableTestName;
+import org.apache.logging.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+
+import java.io.Serializable;
+import java.text.DecimalFormat;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
/**
* This class is the base class for all distributed tests using JUnit 4.
@@ -249,8 +238,8 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
*/
public final InternalDistributedSystem getLonerSystem() {
Properties props = getDistributedSystemProperties();
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
- props.put(DistributionConfig.LOCATORS_NAME, "");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
return getSystem(props);
}
@@ -565,7 +554,7 @@ public abstract class JUnit4DistributedTestCase implements DistributedTestFixtur
Message.MAX_MESSAGE_SIZE = Message.DEFAULT_MAX_MESSAGE_SIZE;
// clear system properties -- keep alphabetized
- System.clearProperty("gemfire.log-level");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "log-level");
System.clearProperty("jgroups.resolve_dns");
if (InternalDistributedSystem.systemAttemptingReconnect != null) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index 8249996..094095f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -16,43 +16,11 @@
*/
package com.gemstone.gemfire.test.dunit.standalone;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.InetAddress;
-import java.net.URISyntaxException;
-import java.nio.channels.FileChannel;
-import java.nio.charset.Charset;
-import java.rmi.AccessException;
-import java.rmi.AlreadyBoundException;
-import java.rmi.NotBoundException;
-import java.rmi.Remote;
-import java.rmi.RemoteException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.rmi.server.UnicastRemoteObject;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.core.LoggerContext;
-import org.apache.logging.log4j.core.appender.FileAppender;
-import org.apache.logging.log4j.core.config.LoggerConfig;
-import org.apache.logging.log4j.core.layout.PatternLayout;
-import org.junit.Assert;
-
import batterytest.greplogs.ExpectedStrings;
import batterytest.greplogs.LogConsumer;
-import hydra.MethExecutorResult;
-
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.logging.LogService;
@@ -60,6 +28,30 @@ import com.gemstone.gemfire.test.dunit.DUnitEnv;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
+import hydra.MethExecutorResult;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.core.LoggerContext;
+import org.apache.logging.log4j.core.appender.FileAppender;
+import org.apache.logging.log4j.core.config.LoggerConfig;
+import org.apache.logging.log4j.core.layout.PatternLayout;
+import org.junit.Assert;
+
+import java.io.*;
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.net.URISyntaxException;
+import java.nio.channels.FileChannel;
+import java.nio.charset.Charset;
+import java.rmi.*;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* A class to build a fake test configuration and launch some DUnit VMS.
@@ -92,10 +84,10 @@ public class DUnitLauncher {
public static final boolean LOCATOR_LOG_TO_DISK = Boolean.getBoolean("locatorLogToDisk");
static final String MASTER_PARAM = "DUNIT_MASTER";
- public static final String RMI_PORT_PARAM = "gemfire.DUnitLauncher.RMI_PORT";
- static final String VM_NUM_PARAM = "gemfire.DUnitLauncher.VM_NUM";
+ public static final String RMI_PORT_PARAM = DistributionConfig.GEMFIRE_PREFIX + "DUnitLauncher.RMI_PORT";
+ static final String VM_NUM_PARAM = DistributionConfig.GEMFIRE_PREFIX + "DUnitLauncher.VM_NUM";
- private static final String LAUNCHED_PROPERTY = "gemfire.DUnitLauncher.LAUNCHED";
+ private static final String LAUNCHED_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "DUnitLauncher.LAUNCHED";
private static Master master;
@@ -218,11 +210,11 @@ public class DUnitLauncher {
public static Properties getDistributedSystemProperties() {
Properties p = new Properties();
- p.setProperty("locators", getLocatorString());
- p.setProperty("mcast-port", "0");
- p.setProperty("enable-cluster-configuration", "false");
- p.setProperty("use-cluster-configuration", "false");
- p.setProperty("log-level", LOG_LEVEL);
+ p.setProperty(LOCATORS, getLocatorString());
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ p.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
+ p.setProperty(DistributionConfig.LOG_LEVEL_NAME, LOG_LEVEL);
return p;
}
@@ -259,10 +251,10 @@ public class DUnitLauncher {
Properties p = getDistributedSystemProperties();
// I never want this locator to end up starting a jmx manager
// since it is part of the unit test framework
- p.setProperty("jmx-manager", "false");
+ p.setProperty(DistributionConfig.JMX_MANAGER_NAME, "false");
//Disable the shared configuration on this locator.
//Shared configuration tests create their own locator
- p.setProperty("enable-cluster-configuration", "false");
+ p.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
//Tell the locator it's the first in the system for
//faster boot-up
System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
@@ -295,7 +287,7 @@ public class DUnitLauncher {
addSuspectFileAppender(workspaceDir);
//Free off heap memory when disconnecting from the distributed system
- System.setProperty("gemfire.free-off-heap-memory", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "free-off-heap-memory", "true");
//indicate that this CM is controlled by the eclipse dunit.
System.setProperty(LAUNCHED_PROPERTY, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
index 1e78bff..797e96a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/ProcessManager.java
@@ -16,12 +16,12 @@
*/
package com.gemstone.gemfire.test.dunit.standalone;
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.io.PrintStream;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.internal.FileUtil;
+import org.apache.commons.io.FileUtils;
+
+import java.io.*;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.rmi.AccessException;
@@ -33,12 +33,6 @@ import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import org.apache.commons.io.FileUtils;
-
-import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.internal.logging.LogService;
-
/**
*
*/
@@ -55,28 +49,28 @@ public class ProcessManager {
this.namingPort = namingPort;
this.registry = registry;
}
-
+
public synchronized void launchVM(int vmNum) throws IOException {
- if(processes.containsKey(vmNum)) {
+ if (processes.containsKey(vmNum)) {
throw new IllegalStateException("VM " + vmNum + " is already running.");
}
-
+
String[] cmd = buildJavaCommand(vmNum, namingPort);
System.out.println("Executing " + Arrays.asList(cmd));
File workingDir = getVMDir(vmNum);
try {
FileUtil.delete(workingDir);
- } catch(IOException e) {
+ } catch (IOException e) {
//This delete is occasionally failing on some platforms, maybe due to a lingering
//process. Allow the process to be launched anyway.
- System.err.println("Unable to delete " + workingDir + ". Currently contains "
- + Arrays.asList(workingDir.list()));
+ System.err.println("Unable to delete " + workingDir + ". Currently contains "
+ + Arrays.asList(workingDir.list()));
}
workingDir.mkdirs();
if (log4jConfig != null) {
FileUtils.copyFileToDirectory(log4jConfig, workingDir);
}
-
+
//TODO - delete directory contents, preferably with commons io FileUtils
Process process = Runtime.getRuntime().exec(cmd, null, workingDir);
pendingVMs++;
@@ -89,26 +83,26 @@ public class ProcessManager {
public static File getVMDir(int vmNum) {
return new File(DUnitLauncher.DUNIT_DIR, "vm" + vmNum);
}
-
+
public synchronized void killVMs() {
- for(ProcessHolder process : processes.values()) {
- if(process != null) {
+ for (ProcessHolder process : processes.values()) {
+ if (process != null) {
process.kill();
}
}
}
-
+
public synchronized boolean hasLiveVMs() {
- for(ProcessHolder process : processes.values()) {
- if(process != null && process.isAlive()) {
+ for (ProcessHolder process : processes.values()) {
+ if (process != null && process.isAlive()) {
return true;
}
}
return false;
}
-
+
public synchronized void bounce(int vmNum) {
- if(!processes.containsKey(vmNum)) {
+ if (!processes.containsKey(vmNum)) {
throw new IllegalStateException("No such process " + vmNum);
}
try {
@@ -120,15 +114,15 @@ public class ProcessManager {
throw new RuntimeException("Unable to restart VM " + vmNum, e);
}
}
-
+
private void linkStreams(final int vmNum, final ProcessHolder holder, final InputStream in, final PrintStream out) {
Thread ioTransport = new Thread() {
public void run() {
BufferedReader reader = new BufferedReader(new InputStreamReader(in));
- String vmName = (vmNum==-2)? "[locator]" : "[vm_"+vmNum+"]";
+ String vmName = (vmNum == -2) ? "[locator]" : "[vm_" + vmNum + "]";
try {
String line = reader.readLine();
- while(line != null) {
+ while (line != null) {
if (line.length() == 0) {
out.println();
} else {
@@ -137,8 +131,8 @@ public class ProcessManager {
}
line = reader.readLine();
}
- } catch(Exception e) {
- if(!holder.isKilled()) {
+ } catch (Exception e) {
+ if (!holder.isKilled()) {
out.println("Error transporting IO from child process");
e.printStackTrace(out);
}
@@ -151,7 +145,7 @@ public class ProcessManager {
}
private String[] buildJavaCommand(int vmNum, int namingPort) {
- String cmd = System.getProperty( "java.home" ) + File.separator + "bin" + File.separator + "java";
+ String cmd = System.getProperty("java.home") + File.separator + "bin" + File.separator + "java";
String classPath = System.getProperty("java.class.path");
//String tmpDir = System.getProperty("java.io.tmpdir");
String agent = getAgentString();
@@ -165,7 +159,7 @@ public class ProcessManager {
String jdkSuspend = vmNum == suspendVM ? "y" : "n";
ArrayList<String> cmds = new ArrayList<String>();
cmds.add(cmd);
- cmds.add("-classpath");
+ cmds.add("-classpath");
cmds.add(classPath);
cmds.add("-D" + DUnitLauncher.RMI_PORT_PARAM + "=" + namingPort);
cmds.add("-D" + DUnitLauncher.VM_NUM_PARAM + "=" + vmNum);
@@ -174,15 +168,15 @@ public class ProcessManager {
cmds.add("-D" + InternalLocator.INHIBIT_DM_BANNER + "=true");
}
cmds.add("-DlogLevel=" + DUnitLauncher.LOG_LEVEL);
- if (DUnitLauncher.LOG4J!=null) {
- cmds.add("-Dlog4j.configurationFile="+DUnitLauncher.LOG4J);
+ if (DUnitLauncher.LOG4J != null) {
+ cmds.add("-Dlog4j.configurationFile=" + DUnitLauncher.LOG4J);
}
cmds.add("-Djava.library.path=" + System.getProperty("java.library.path"));
cmds.add("-Xrunjdwp:transport=dt_socket,server=y,suspend=" + jdkSuspend + jdkDebug);
cmds.add("-XX:+HeapDumpOnOutOfMemoryError");
cmds.add("-Xmx512m");
- cmds.add("-Dgemfire.DEFAULT_MAX_OPLOG_SIZE=10");
- cmds.add("-Dgemfire.disallowMcastDefaults=true");
+ cmds.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "DEFAULT_MAX_OPLOG_SIZE=10");
+ cmds.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "disallowMcastDefaults=true");
cmds.add("-ea");
cmds.add("-XX:+PrintGC");
cmds.add("-XX:+PrintGCDetails");
@@ -191,10 +185,10 @@ public class ProcessManager {
cmds.add(ChildVM.class.getName());
String[] rst = new String[cmds.size()];
cmds.toArray(rst);
-
+
return rst;
}
-
+
/**
* Get the java agent passed to this process and pass it to the child VMs.
* This was added to support jacoco code coverage reports
@@ -202,8 +196,8 @@ public class ProcessManager {
private String getAgentString() {
RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
if (runtimeBean != null) {
- for(String arg: runtimeBean.getInputArguments()) {
- if(arg.contains("-javaagent:")) {
+ for (String arg : runtimeBean.getInputArguments()) {
+ if (arg.contains("-javaagent:")) {
//HACK for gradle bug GRADLE-2859. Jacoco is passing a relative path
//That won't work when we pass this to dunit VMs in a different
//directory
@@ -213,7 +207,7 @@ public class ProcessManager {
}
}
}
-
+
return "-DdummyArg=true";
}
@@ -221,24 +215,24 @@ public class ProcessManager {
pendingVMs--;
this.notifyAll();
}
-
+
public synchronized boolean waitForVMs(long timeout) throws InterruptedException {
long end = System.currentTimeMillis() + timeout;
- while(pendingVMs > 0) {
+ while (pendingVMs > 0) {
long remaining = end - System.currentTimeMillis();
- if(remaining <= 0) {
+ if (remaining <= 0) {
return false;
}
this.wait(remaining);
}
-
+
return true;
}
-
+
private static class ProcessHolder {
private final Process process;
private volatile boolean killed = false;
-
+
public ProcessHolder(Process process) {
this.process = process;
}
@@ -246,7 +240,7 @@ public class ProcessManager {
public void kill() {
this.killed = true;
process.destroy();
-
+
}
public Process getProcess() {
@@ -256,7 +250,7 @@ public class ProcessManager {
public boolean isKilled() {
return killed;
}
-
+
public boolean isAlive() {
return !killed && process.isAlive();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/JUnit4OverridingGetPropertiesDisconnectsAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/JUnit4OverridingGetPropertiesDisconnectsAllDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/JUnit4OverridingGetPropertiesDisconnectsAllDUnitTest.java
index 113099d..ed6fe0c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/JUnit4OverridingGetPropertiesDisconnectsAllDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/JUnit4OverridingGetPropertiesDisconnectsAllDUnitTest.java
@@ -16,17 +16,16 @@
*/
package com.gemstone.gemfire.test.dunit.tests;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Invoke.*;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Invoke.invokeInEveryVM;
/**
* Verifies that overriding {@code getDistributedSystemProperties} results
@@ -48,7 +47,7 @@ public class JUnit4OverridingGetPropertiesDisconnectsAllDUnitTest extends JUnit4
@Override
public final Properties getDistributedSystemProperties() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java
index fb4b4fe..bde503b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/tests/OverridingGetPropertiesDisconnectsAllDUnitTest.java
@@ -16,15 +16,12 @@
*/
package com.gemstone.gemfire.test.dunit.tests;
-import static com.gemstone.gemfire.test.dunit.Invoke.*;
+import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import java.util.Properties;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Invoke.invokeInEveryVM;
/**
* Verifies that overriding {@code getDistributedSystemProperties} results
@@ -49,7 +46,7 @@ public class OverridingGetPropertiesDisconnectsAllDUnitTest extends DistributedT
@Override
public final Properties getDistributedSystemProperties() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java b/geode-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java
index 16734b5..323c281 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/fake/Fakes.java
@@ -16,13 +16,6 @@
*/
package com.gemstone.gemfire.test.fake;
-import static org.mockito.Mockito.*;
-
-import java.io.File;
-import java.net.UnknownHostException;
-
-import org.junit.Assert;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.Statistics;
@@ -37,6 +30,11 @@ import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import java.io.File;
+import java.net.UnknownHostException;
+
+import static org.mockito.Mockito.*;
+
/**
* Factory methods for fake objects for use in test.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
index 1ea5fe6..674437e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/golden/GoldenTestCase.java
@@ -16,16 +16,18 @@
*/
package com.gemstone.gemfire.test.golden;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.process.ProcessWrapper;
+import org.apache.logging.log4j.core.config.ConfigurationFactory;
+import org.junit.After;
+import org.junit.Before;
+
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import org.apache.logging.log4j.core.config.ConfigurationFactory;
-import org.junit.After;
-import org.junit.Before;
-
-import com.gemstone.gemfire.test.process.ProcessWrapper;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test framework for launching processes and comparing output to expected golden output.
@@ -121,8 +123,8 @@ public abstract class GoldenTestCase {
protected final Properties createProperties() {
Properties properties = new Properties();
- properties.setProperty("gemfire.mcast-port", "0");
- properties.setProperty("gemfire.log-level", "warning");
+ properties.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
+ properties.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, "warning");
properties.setProperty("file.encoding", "UTF-8");
return editProperties(properties);
}
[45/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
index 4d69eb3..f0bbb9b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
@@ -35,8 +35,7 @@ import java.util.Arrays;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests the GridAdvisor
@@ -77,81 +76,81 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
final Keeper bsKeeper4 = freeTCPPorts.get(5);
final int bsPort4 = bsKeeper4.getPort();
- final String host0 = NetworkUtils.getServerHostName(host);
- final String locators = host0 + "[" + port1 + "]" + ","
- + host0 + "[" + port2 + "]";
+ final String host0 = NetworkUtils.getServerHostName(host);
+ final String locators = host0 + "[" + port1 + "]" + ","
+ + host0 + "[" + port2 + "]";
final Properties dsProps = new Properties();
dsProps.setProperty(LOCATORS, locators);
dsProps.setProperty(MCAST_PORT, "0");
- dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
-
+ dsProps.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+
keeper1.release();
vm0.invoke(new SerializableRunnable("Start locator on " + port1) {
- public void run() {
- File logFile = new File(getUniqueName() + "-locator" + port1
- + ".log");
- try {
- Locator.startLocatorAndDS(port1, logFile, null, dsProps, true, true, null);
- } catch (IOException ex) {
- Assert.fail("While starting locator on port " + port1, ex);
- }
+ public void run() {
+ File logFile = new File(getUniqueName() + "-locator" + port1
+ + ".log");
+ try {
+ Locator.startLocatorAndDS(port1, logFile, null, dsProps, true, true, null);
+ } catch (IOException ex) {
+ Assert.fail("While starting locator on port " + port1, ex);
}
- });
-
+ }
+ });
+
//try { Thread.currentThread().sleep(4000); } catch (InterruptedException ie) { }
-
+
keeper2.release();
vm3.invoke(new SerializableRunnable("Start locators on " + port2) {
- public void run() {
- File logFile = new File(getUniqueName() + "-locator" +
- port2 + ".log");
- try {
- Locator.startLocatorAndDS(port2, logFile, null, dsProps, true, true, "locator2HNFC");
+ public void run() {
+ File logFile = new File(getUniqueName() + "-locator" +
+ port2 + ".log");
+ try {
+ Locator.startLocatorAndDS(port2, logFile, null, dsProps, true, true, "locator2HNFC");
- } catch (IOException ex) {
- Assert.fail("While starting locator on port " + port2, ex);
- }
+ } catch (IOException ex) {
+ Assert.fail("While starting locator on port " + port2, ex);
}
- });
+ }
+ });
SerializableRunnable connect =
- new SerializableRunnable("Connect to " + locators) {
+ new SerializableRunnable("Connect to " + locators) {
public void run() {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ dsProps.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
};
vm1.invoke(connect);
vm2.invoke(connect);
SerializableRunnable startBS1 =
- new SerializableRunnable("start bridgeServer on " + bsPort1) {
- public void run() {
- try {
- Cache c = CacheFactory.getAnyInstance();
- CacheServer bs = c.addCacheServer();
- bs.setPort(bsPort1);
- bs.setGroups(new String[] {"bs1Group1", "bs1Group2"});
- bs.start();
- } catch (IOException ex) {
- RuntimeException re = new RuntimeException();
- re.initCause(ex);
- throw re;
+ new SerializableRunnable("start bridgeServer on " + bsPort1) {
+ public void run() {
+ try {
+ Cache c = CacheFactory.getAnyInstance();
+ CacheServer bs = c.addCacheServer();
+ bs.setPort(bsPort1);
+ bs.setGroups(new String[] { "bs1Group1", "bs1Group2" });
+ bs.start();
+ } catch (IOException ex) {
+ RuntimeException re = new RuntimeException();
+ re.initCause(ex);
+ throw re;
+ }
}
- }
- };
- SerializableRunnable startBS3 =
+ };
+ SerializableRunnable startBS3 =
new SerializableRunnable("start bridgeServer on " + bsPort3) {
public void run() {
try {
Cache c = CacheFactory.getAnyInstance();
CacheServer bs = c.addCacheServer();
bs.setPort(bsPort3);
- bs.setGroups(new String[] {"bs3Group1", "bs3Group2"});
+ bs.setGroups(new String[] { "bs3Group1", "bs3Group2" });
bs.start();
} catch (IOException ex) {
RuntimeException re = new RuntimeException();
@@ -172,7 +171,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
Cache c = CacheFactory.getAnyInstance();
CacheServer bs = c.addCacheServer();
bs.setPort(bsPort2);
- bs.setGroups(new String[] {"bs2Group1", "bs2Group2"});
+ bs.setGroups(new String[] { "bs2Group1", "bs2Group2" });
bs.start();
} catch (IOException ex) {
RuntimeException re = new RuntimeException();
@@ -188,7 +187,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
Cache c = CacheFactory.getAnyInstance();
CacheServer bs = c.addCacheServer();
bs.setPort(bsPort4);
- bs.setGroups(new String[] {"bs4Group1", "bs4Group2"});
+ bs.setGroups(new String[] { "bs4Group1", "bs4Group2" });
bs.start();
} catch (IOException ex) {
RuntimeException re = new RuntimeException();
@@ -200,220 +199,220 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
// verify that locators know about each other
vm0.invoke(new SerializableRunnable("Verify other locator on " + port2) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port2, cp.getPort());
- assertEquals("locator2HNFC", cp.getHost());
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port2, cp.getPort());
+ assertEquals("locator2HNFC", cp.getHost());
+ }
- others = ca.fetchBridgeServers();
- assertEquals(4, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort1) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs3Group1", "bs3Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs4Group1", "bs4Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ others = ca.fetchBridgeServers();
+ assertEquals(4, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort1) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs3Group1", "bs3Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs4Group1", "bs4Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
}
- });
+ }
+ });
vm3.invoke(new SerializableRunnable("Verify other locator on " + port1) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port1, cp.getPort());
- }
- others = ca.fetchBridgeServers();
- assertEquals(4, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort1) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs3Group1", "bs3Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs4Group1", "bs4Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port1, cp.getPort());
}
- });
+ others = ca.fetchBridgeServers();
+ assertEquals(4, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort1) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs3Group1", "bs3Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs4Group1", "bs4Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
+ }
+ }
+ });
vm1.invoke(new SerializableRunnable("Verify bridge server view on " + bsPort1 + " and on " + bsPort3) {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchBridgeServers();
- LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
- assertEquals(3, others.size());
- others = bsa.fetchControllers();
- assertEquals(2, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port1) {
- // ok
- } else if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchBridgeServers();
+ LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
+ assertEquals(3, others.size());
+ others = bsa.fetchControllers();
+ assertEquals(2, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port1) {
+ // ok
+ } else if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
vm2.invoke(new SerializableRunnable("Verify bridge server view on " + bsPort2 + " and on " + bsPort4) {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchBridgeServers();
- LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
- assertEquals(3, others.size());
- others = bsa.fetchControllers();
- assertEquals(2, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port1) {
- // ok
- } else if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchBridgeServers();
+ LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
+ assertEquals(3, others.size());
+ others = bsa.fetchControllers();
+ assertEquals(2, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port1) {
+ // ok
+ } else if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
SerializableRunnable stopBS =
- new SerializableRunnable("stop bridge server") {
+ new SerializableRunnable("stop bridge server") {
public void run() {
Cache c = CacheFactory.getAnyInstance();
List bslist = c.getCacheServers();
assertEquals(2, bslist.size());
- CacheServer bs = (CacheServer)bslist.get(0);
+ CacheServer bs = (CacheServer) bslist.get(0);
bs.stop();
}
};
vm1.invoke(stopBS);
-
+
// now check to see if everyone else noticed him going away
vm0.invoke(new SerializableRunnable("Verify other locator on " + port2) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port2, cp.getPort());
- assertEquals("locator2HNFC", cp.getHost());
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port2, cp.getPort());
+ assertEquals("locator2HNFC", cp.getHost());
+ }
- others = ca.fetchBridgeServers();
- assertEquals(3, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs3Group1", "bs3Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs4Group1", "bs4Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ others = ca.fetchBridgeServers();
+ assertEquals(3, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs3Group1", "bs3Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs4Group1", "bs4Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
}
- });
+ }
+ });
vm3.invoke(new SerializableRunnable("Verify other locator on " + port1) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port1, cp.getPort());
- }
- others = ca.fetchBridgeServers();
- assertEquals(3, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs3Group1", "bs3Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs4Group1", "bs4Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port1, cp.getPort());
+ }
+ others = ca.fetchBridgeServers();
+ assertEquals(3, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs3Group1", "bs3Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs4Group1", "bs4Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
}
- });
+ }
+ });
SerializableRunnable disconnect =
- new SerializableRunnable("Disconnect from " + locators) {
+ new SerializableRunnable("Disconnect from " + locators) {
public void run() {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
@@ -421,8 +420,8 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
DistributedSystem.connect(props).disconnect();
}
};
- SerializableRunnable stopLocator =
- new SerializableRunnable("Stop locator") {
+ SerializableRunnable stopLocator =
+ new SerializableRunnable("Stop locator") {
public void run() {
assertTrue(Locator.hasLocator());
Locator.getLocator().stop();
@@ -434,74 +433,74 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
// now make sure everyone else saw the locator go away
vm3.invoke(new SerializableRunnable("Verify locator stopped ") {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(0, others.size());
- }
- });
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(0, others.size());
+ }
+ });
vm2.invoke(new SerializableRunnable("Verify bridge server saw locator stop") {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchControllers();
- assertEquals(1, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchControllers();
+ assertEquals(1, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
vm1.invoke(new SerializableRunnable("Verify bridge server saw locator stop") {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- if (i == 0) {
- // skip this one since it is stopped
- continue;
- }
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchControllers();
- assertEquals(1, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ if (i == 0) {
+ // skip this one since it is stopped
+ continue;
+ }
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchControllers();
+ assertEquals(1, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
SerializableRunnable restartBS =
- new SerializableRunnable("restart bridge server") {
+ new SerializableRunnable("restart bridge server") {
public void run() {
try {
Cache c = CacheFactory.getAnyInstance();
List bslist = c.getCacheServers();
assertEquals(2, bslist.size());
- CacheServer bs = (CacheServer)bslist.get(0);
+ CacheServer bs = (CacheServer) bslist.get(0);
bs.setHostnameForClients("nameForClients");
bs.start();
} catch (IOException ex) {
@@ -513,56 +512,57 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
};
// restart bridge server 1 and see if controller sees it
vm1.invoke(restartBS);
-
+
vm3.invoke(new SerializableRunnable("Verify bridge server restart ") {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- assertEquals(0, ca.fetchControllers().size());
- List others = ca.fetchBridgeServers();
- assertEquals(4, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort1) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- assertEquals("nameForClients", bsp.getHost());
- } else if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- assertFalse(bsp.getHost().equals("nameForClients"));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs3Group1", "bs3Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs4Group1", "bs4Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ assertEquals(0, ca.fetchControllers().size());
+ List others = ca.fetchBridgeServers();
+ assertEquals(4, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort1) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ assertEquals("nameForClients", bsp.getHost());
+ } else if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ assertFalse(bsp.getHost().equals("nameForClients"));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs3Group1", "bs3Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs4Group1", "bs4Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
}
- });
+ }
+ });
vm1.invoke(disconnect);
vm2.invoke(disconnect);
// now make sure controller saw all bridge servers stop
vm3.invoke(new SerializableRunnable("Verify locator stopped ") {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- assertEquals(0, ca.fetchControllers().size());
- assertEquals(0, ca.fetchBridgeServers().size());
- }
- });
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ assertEquals(0, ca.fetchControllers().size());
+ assertEquals(0, ca.fetchBridgeServers().size());
+ }
+ });
vm3.invoke(stopLocator);
}
+
public void test2by2usingGroups() throws Exception {
disconnectAllFromDS();
@@ -586,44 +586,44 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
final Keeper bsKeeper4 = freeTCPPorts.get(5);
final int bsPort4 = bsKeeper4.getPort();
- final String host0 = NetworkUtils.getServerHostName(host);
- final String locators = host0 + "[" + port1 + "]" + ","
- + host0 + "[" + port2 + "]";
+ final String host0 = NetworkUtils.getServerHostName(host);
+ final String locators = host0 + "[" + port1 + "]" + ","
+ + host0 + "[" + port2 + "]";
final Properties dsProps = new Properties();
dsProps.setProperty(LOCATORS, locators);
dsProps.setProperty(MCAST_PORT, "0");
- dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
-
+ dsProps.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+
keeper1.release();
vm0.invoke(new SerializableRunnable("Start locators on " + port1) {
- public void run() {
- File logFile = new File(getUniqueName() + "-locator" + port1
- + ".log");
- try {
- Locator.startLocatorAndDS(port1, logFile, null, dsProps, true, true, null);
- } catch (IOException ex) {
- Assert.fail("While starting locator on port " + port1, ex);
- }
+ public void run() {
+ File logFile = new File(getUniqueName() + "-locator" + port1
+ + ".log");
+ try {
+ Locator.startLocatorAndDS(port1, logFile, null, dsProps, true, true, null);
+ } catch (IOException ex) {
+ Assert.fail("While starting locator on port " + port1, ex);
}
- });
-
+ }
+ });
+
//try { Thread.currentThread().sleep(4000); } catch (InterruptedException ie) { }
-
+
keeper2.release();
vm3.invoke(new SerializableRunnable("Start locators on " + port2) {
- public void run() {
- File logFile = new File(getUniqueName() + "-locator" +
- port2 + ".log");
- try {
- Locator.startLocatorAndDS(port2, logFile, null, dsProps, true, true, "locator2HNFC");
+ public void run() {
+ File logFile = new File(getUniqueName() + "-locator" +
+ port2 + ".log");
+ try {
+ Locator.startLocatorAndDS(port2, logFile, null, dsProps, true, true, "locator2HNFC");
- } catch (IOException ex) {
- Assert.fail("While starting locator on port " + port2, ex);
- }
+ } catch (IOException ex) {
+ Assert.fail("While starting locator on port " + port2, ex);
}
- });
+ }
+ });
vm1.invoke(new SerializableRunnable("Connect to " + locators) {
public void run() {
@@ -631,7 +631,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
props.setProperty(DistributionConfig.GROUPS_NAME, "bs1Group1, bs1Group2");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
});
@@ -641,27 +641,27 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
props.setProperty(DistributionConfig.GROUPS_NAME, "bs2Group1, bs2Group2");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
});
SerializableRunnable startBS1 =
- new SerializableRunnable("start bridgeServer on " + bsPort1) {
- public void run() {
- try {
- Cache c = CacheFactory.getAnyInstance();
- CacheServer bs = c.addCacheServer();
- bs.setPort(bsPort1);
- bs.start();
- } catch (IOException ex) {
- RuntimeException re = new RuntimeException();
- re.initCause(ex);
- throw re;
+ new SerializableRunnable("start bridgeServer on " + bsPort1) {
+ public void run() {
+ try {
+ Cache c = CacheFactory.getAnyInstance();
+ CacheServer bs = c.addCacheServer();
+ bs.setPort(bsPort1);
+ bs.start();
+ } catch (IOException ex) {
+ RuntimeException re = new RuntimeException();
+ re.initCause(ex);
+ throw re;
+ }
}
- }
- };
- SerializableRunnable startBS3 =
+ };
+ SerializableRunnable startBS3 =
new SerializableRunnable("start bridgeServer on " + bsPort3) {
public void run() {
try {
@@ -714,305 +714,305 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
// verify that locators know about each other
vm0.invoke(new SerializableRunnable("Verify other locator on " + port2) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port2, cp.getPort());
- assertEquals("locator2HNFC", cp.getHost());
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port2, cp.getPort());
+ assertEquals("locator2HNFC", cp.getHost());
+ }
- others = ca.fetchBridgeServers();
- assertEquals(4, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort1) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ others = ca.fetchBridgeServers();
+ assertEquals(4, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort1) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
}
- });
+ }
+ });
vm3.invoke(new SerializableRunnable("Verify other locator on " + port1) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port1, cp.getPort());
- }
- others = ca.fetchBridgeServers();
- assertEquals(4, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort1) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port1, cp.getPort());
}
- });
+ others = ca.fetchBridgeServers();
+ assertEquals(4, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort1) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
+ }
+ }
+ });
vm1.invoke(new SerializableRunnable("Verify bridge server view on " + bsPort1 + " and on " + bsPort3) {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchBridgeServers();
- LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
- assertEquals(3, others.size());
- others = bsa.fetchControllers();
- assertEquals(2, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port1) {
- // ok
- } else if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchBridgeServers();
+ LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
+ assertEquals(3, others.size());
+ others = bsa.fetchControllers();
+ assertEquals(2, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port1) {
+ // ok
+ } else if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
vm2.invoke(new SerializableRunnable("Verify bridge server view on " + bsPort2 + " and on " + bsPort4) {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchBridgeServers();
- LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
- assertEquals(3, others.size());
- others = bsa.fetchControllers();
- assertEquals(2, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port1) {
- // ok
- } else if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchBridgeServers();
+ LogWriterUtils.getLogWriter().info("found these bridgeservers in " + advisee + ": " + others);
+ assertEquals(3, others.size());
+ others = bsa.fetchControllers();
+ assertEquals(2, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port1) {
+ // ok
+ } else if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
SerializableRunnable stopBS =
- new SerializableRunnable("stop bridge server") {
+ new SerializableRunnable("stop bridge server") {
public void run() {
Cache c = CacheFactory.getAnyInstance();
List bslist = c.getCacheServers();
assertEquals(2, bslist.size());
- CacheServer bs = (CacheServer)bslist.get(0);
+ CacheServer bs = (CacheServer) bslist.get(0);
bs.stop();
}
};
vm1.invoke(stopBS);
-
+
// now check to see if everyone else noticed him going away
vm0.invoke(new SerializableRunnable("Verify other locator on " + port2) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port2, cp.getPort());
- assertEquals("locator2HNFC", cp.getHost());
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port2, cp.getPort());
+ assertEquals("locator2HNFC", cp.getHost());
+ }
- others = ca.fetchBridgeServers();
- assertEquals(3, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ others = ca.fetchBridgeServers();
+ assertEquals(3, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
}
- });
+ }
+ });
vm3.invoke(new SerializableRunnable("Verify other locator on " + port1) {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(1, others.size());
- {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(0);
- assertEquals(port1, cp.getPort());
- }
- others = ca.fetchBridgeServers();
- assertEquals(3, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(1, others.size());
+ {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(0);
+ assertEquals(port1, cp.getPort());
}
- });
+ others = ca.fetchBridgeServers();
+ assertEquals(3, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
+ }
+ }
+ });
SerializableRunnable disconnect =
- new SerializableRunnable("Disconnect from " + locators) {
+ new SerializableRunnable("Disconnect from " + locators) {
public void run() {
InternalDistributedSystem.getAnyInstance().disconnect();
}
};
- SerializableRunnable stopLocator =
- new SerializableRunnable("Stop locator") {
- public void run() {
- assertTrue(Locator.hasLocator());
- Locator.getLocator().stop();
- assertFalse(Locator.hasLocator());
- }
- };
+ SerializableRunnable stopLocator =
+ new SerializableRunnable("Stop locator") {
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ Locator.getLocator().stop();
+ assertFalse(Locator.hasLocator());
+ }
+ };
vm0.invoke(stopLocator);
// now make sure everyone else saw the locator go away
vm3.invoke(new SerializableRunnable("Verify locator stopped ") {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- List others = ca.fetchControllers();
- assertEquals(0, others.size());
- }
- });
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ List others = ca.fetchControllers();
+ assertEquals(0, others.size());
+ }
+ });
vm2.invoke(new SerializableRunnable("Verify bridge server saw locator stop") {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchControllers();
- assertEquals(1, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchControllers();
+ assertEquals(1, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
vm1.invoke(new SerializableRunnable("Verify bridge server saw locator stop") {
- public void run() {
- Cache c = CacheFactory.getAnyInstance();
- List bslist = c.getCacheServers();
- assertEquals(2, bslist.size());
- for (int i=0; i < bslist.size(); i++) {
- DistributionAdvisee advisee = (DistributionAdvisee)bslist.get(i);
- if (i == 0) {
- // skip this one since it is stopped
- continue;
- }
- CacheServerAdvisor bsa = (CacheServerAdvisor)advisee.getDistributionAdvisor();
- List others = bsa.fetchControllers();
- assertEquals(1, others.size());
- for (int j=0; j < others.size(); j++) {
- ControllerAdvisor.ControllerProfile cp =
- (ControllerAdvisor.ControllerProfile)others.get(j);
- if (cp.getPort() == port2) {
- assertEquals("locator2HNFC", cp.getHost());
- // ok
- } else {
- fail("unexpected port " + cp.getPort() + " in " + cp);
- }
+ public void run() {
+ Cache c = CacheFactory.getAnyInstance();
+ List bslist = c.getCacheServers();
+ assertEquals(2, bslist.size());
+ for (int i = 0; i < bslist.size(); i++) {
+ DistributionAdvisee advisee = (DistributionAdvisee) bslist.get(i);
+ if (i == 0) {
+ // skip this one since it is stopped
+ continue;
+ }
+ CacheServerAdvisor bsa = (CacheServerAdvisor) advisee.getDistributionAdvisor();
+ List others = bsa.fetchControllers();
+ assertEquals(1, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ ControllerAdvisor.ControllerProfile cp =
+ (ControllerAdvisor.ControllerProfile) others.get(j);
+ if (cp.getPort() == port2) {
+ assertEquals("locator2HNFC", cp.getHost());
+ // ok
+ } else {
+ fail("unexpected port " + cp.getPort() + " in " + cp);
}
}
}
- });
+ }
+ });
SerializableRunnable restartBS =
- new SerializableRunnable("restart bridge server") {
+ new SerializableRunnable("restart bridge server") {
public void run() {
try {
Cache c = CacheFactory.getAnyInstance();
List bslist = c.getCacheServers();
assertEquals(2, bslist.size());
- CacheServer bs = (CacheServer)bslist.get(0);
+ CacheServer bs = (CacheServer) bslist.get(0);
bs.setHostnameForClients("nameForClients");
bs.start();
} catch (IOException ex) {
@@ -1024,54 +1024,54 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
};
// restart bridge server 1 and see if controller sees it
vm1.invoke(restartBS);
-
+
vm3.invoke(new SerializableRunnable("Verify bridge server restart ") {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- assertEquals(0, ca.fetchControllers().size());
- List others = ca.fetchBridgeServers();
- assertEquals(4, others.size());
- for (int j=0; j < others.size(); j++) {
- CacheServerAdvisor.CacheServerProfile bsp =
- (CacheServerAdvisor.CacheServerProfile)others.get(j);
- if (bsp.getPort() == bsPort1) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- assertEquals("nameForClients", bsp.getHost());
- } else if (bsp.getPort() == bsPort2) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- assertFalse(bsp.getHost().equals("nameForClients"));
- } else if (bsp.getPort() == bsPort3) {
- assertEquals(Arrays.asList(new String[] {"bs1Group1", "bs1Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else if (bsp.getPort() == bsPort4) {
- assertEquals(Arrays.asList(new String[] {"bs2Group1", "bs2Group2"}),
- Arrays.asList(bsp.getGroups()));
- } else {
- fail("unexpected port " + bsp.getPort() + " in " + bsp);
- }
- }
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ assertEquals(0, ca.fetchControllers().size());
+ List others = ca.fetchBridgeServers();
+ assertEquals(4, others.size());
+ for (int j = 0; j < others.size(); j++) {
+ CacheServerAdvisor.CacheServerProfile bsp =
+ (CacheServerAdvisor.CacheServerProfile) others.get(j);
+ if (bsp.getPort() == bsPort1) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ assertEquals("nameForClients", bsp.getHost());
+ } else if (bsp.getPort() == bsPort2) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ assertFalse(bsp.getHost().equals("nameForClients"));
+ } else if (bsp.getPort() == bsPort3) {
+ assertEquals(Arrays.asList(new String[] { "bs1Group1", "bs1Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else if (bsp.getPort() == bsPort4) {
+ assertEquals(Arrays.asList(new String[] { "bs2Group1", "bs2Group2" }),
+ Arrays.asList(bsp.getGroups()));
+ } else {
+ fail("unexpected port " + bsp.getPort() + " in " + bsp);
+ }
}
- });
+ }
+ });
vm1.invoke(disconnect);
vm2.invoke(disconnect);
// now make sure controller saw all bridge servers stop
vm3.invoke(new SerializableRunnable("Verify locator stopped ") {
- public void run() {
- assertTrue(Locator.hasLocator());
- InternalLocator l = (InternalLocator)Locator.getLocator();
- DistributionAdvisee advisee = l.getServerLocatorAdvisee();
- ControllerAdvisor ca = (ControllerAdvisor)advisee.getDistributionAdvisor();
- assertEquals(0, ca.fetchControllers().size());
- assertEquals(0, ca.fetchBridgeServers().size());
- }
- });
+ public void run() {
+ assertTrue(Locator.hasLocator());
+ InternalLocator l = (InternalLocator) Locator.getLocator();
+ DistributionAdvisee advisee = l.getServerLocatorAdvisee();
+ ControllerAdvisor ca = (ControllerAdvisor) advisee.getDistributionAdvisor();
+ assertEquals(0, ca.fetchControllers().size());
+ assertEquals(0, ca.fetchBridgeServers().size());
+ }
+ });
vm3.invoke(stopLocator);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
index cbba60b..aed01c1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/IncrementalBackupDUnitTest.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassBuilder;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.JarClassLoader;
@@ -36,6 +35,8 @@ import com.gemstone.gemfire.test.dunit.*;
import java.io.*;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests for the incremental backup feature.
*/
@@ -67,7 +68,7 @@ public class IncrementalBackupDUnitTest extends CacheTestCase {
private final SerializableRunnable createRegions = new SerializableRunnable() {
@Override
public void run() {
- Cache cache = getCache(new CacheFactory().set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel()));
+ Cache cache = getCache(new CacheFactory().set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel()));
cache.createDiskStoreFactory().setDiskDirs(getDiskDirs()).create("fooStore");
cache.createDiskStoreFactory().setDiskDirs(getDiskDirs()).create("barStore");
getRegionFactory(cache).setDiskStoreName("fooStore").create("fooRegion");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
index 4180a75..440bbf6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptDiskJUnitTest.java
@@ -34,8 +34,7 @@ import java.util.Properties;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicLong;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -72,10 +71,10 @@ public class InterruptDiskJUnitTest {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "stats.gfs");
+ props.setProperty(LOG_LEVEL, "config"); // to keep diskPerf logs smaller
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "stats.gfs");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
File diskStore = new File("diskStore");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
index eaa6f57..95dd4a3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/InterruptsConserveSocketsFalseDUnitTest.java
@@ -16,7 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import java.util.Properties;
@@ -30,7 +30,7 @@ public class InterruptsConserveSocketsFalseDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ props.setProperty(CONSERVE_SOCKETS, "false");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
index 6e59e06..4c3b709 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoEnabledRegionJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -30,8 +29,7 @@ import org.junit.experimental.categories.Category;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -82,7 +80,7 @@ public class LIFOEvictionAlgoEnabledRegionJUnitTest {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
+ props.setProperty(LOG_LEVEL, "info"); // to keep diskPerf logs smaller
distributedSystem = DistributedSystem.connect(props);
cache = CacheFactory.create(distributedSystem);
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
index 4376c88..6fca17d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/LIFOEvictionAlgoMemoryEnabledRegionJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
import com.gemstone.gemfire.internal.cache.lru.LRUClockNode;
import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
@@ -35,8 +34,7 @@ import java.io.File;
import java.util.Arrays;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -95,7 +93,7 @@ public class LIFOEvictionAlgoMemoryEnabledRegionJUnitTest {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
+ props.setProperty(LOG_LEVEL, "info"); // to keep diskPerf logs smaller
distributedSystem = DistributedSystem.connect(props);
cache = CacheFactory.create(distributedSystem);
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
index 38123be..7f5f5b0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OfflineSnapshotJUnitTest.java
@@ -25,7 +25,6 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.snapshot.RegionGenerator;
import com.gemstone.gemfire.cache.snapshot.RegionGenerator.RegionType;
import com.gemstone.gemfire.cache.snapshot.RegionGenerator.SerializationType;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
@@ -37,7 +36,7 @@ import java.io.FilenameFilter;
import java.util.HashMap;
import java.util.Map;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(IntegrationTest.class)
public class OfflineSnapshotJUnitTest {
@@ -122,7 +121,7 @@ public class OfflineSnapshotJUnitTest {
public void reset() {
CacheFactory cf = new CacheFactory()
.set(MCAST_PORT, "0")
- .set(DistributionConfig.LOG_LEVEL_NAME, "error")
+ .set(LOG_LEVEL, "error")
.setPdxSerializer(new MyPdxSerializer())
.setPdxPersistent(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
index b0e1fe6..6a6e2ba 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionAPIConserveSocketsFalseDUnitTest.java
@@ -16,7 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import java.util.Properties;
@@ -37,7 +37,7 @@ public class PartitionedRegionAPIConserveSocketsFalseDUnitTest extends
public Properties getDistributedSystemProperties()
{
Properties ret = new Properties();
- ret.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ ret.setProperty(CONSERVE_SOCKETS, "false");
return ret;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
index 25aeccb..5621829 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionCacheXMLExampleDUnitTest.java
@@ -20,11 +20,12 @@ import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.util.test.TestUtil;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import java.util.Properties;
/**
@@ -50,7 +51,7 @@ public class PartitionedRegionCacheXMLExampleDUnitTest extends
Properties props = new Properties();
String xmlfilepath = TestUtil.getResourcePath(getClass(), "PartitionRegionCacheExample1.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, xmlfilepath);
+ props.setProperty(CACHE_XML_FILE, xmlfilepath);
getSystem(props);
cache = getCache();
@@ -105,7 +106,7 @@ public class PartitionedRegionCacheXMLExampleDUnitTest extends
Properties props = new Properties();
String xmlfilepath = TestUtil.getResourcePath(getClass(), "PartitionRegionCacheExample2.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, xmlfilepath);
+ props.setProperty(CACHE_XML_FILE, xmlfilepath);
getSystem(props);
cache = getCache();
}
[13/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
index 7d2c0ef..80e3c1b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRFunctionExecutionDUnitTest.java
@@ -16,67 +16,29 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryOperation;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
-import com.gemstone.gemfire.internal.cache.EntrySnapshot;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalDataSet;
-import com.gemstone.gemfire.internal.cache.PartitionAttributesImpl;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.execute.data.CustId;
import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.Serializable;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class PRFunctionExecutionDUnitTest extends
PartitionedRegionDUnitTestCase {
@@ -104,8 +66,8 @@ public class PRFunctionExecutionDUnitTest extends
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = getSystem(props);
assertNotNull(ds);
@@ -3000,7 +2962,7 @@ public class PRFunctionExecutionDUnitTest extends
assertNotNull(ds);
ds.disconnect();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = (InternalDistributedSystem)DistributedSystem.connect(props);
DM dm = ds.getDistributionManager();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
index 4b36b79..6a63c68 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/BlockingHARegionJUnitTest.java
@@ -16,26 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-
-import junit.framework.TestCase;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.test.dunit.ThreadUtils;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class BlockingHARegionJUnitTest
@@ -46,7 +42,7 @@ public class BlockingHARegionJUnitTest
public void setUp() throws Exception
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
if (cache != null) {
cache.close(); // fault tolerance
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
index 92cf5af..3b52d81 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug36853EventsExpiryDUnitTest.java
@@ -16,30 +16,21 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Properties;
-
-import junit.framework.Assert;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+import junit.framework.Assert;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is a bug test for 36853 (Expiry logic in HA is used to expire early data
@@ -168,8 +159,8 @@ public class Bug36853EventsExpiryDUnitTest extends CacheTestCase
public static void createClientCache(String hostName, Integer port)
throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new Bug36853EventsExpiryDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
index 02f7014..1c17476 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
@@ -16,40 +16,27 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class Bug48571DUnitTest extends DistributedTestCase {
@@ -143,12 +130,12 @@ public class Bug48571DUnitTest extends DistributedTestCase {
public static int createServerCache() throws Exception {
Properties props = new Properties();
- props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
- props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
- props.setProperty("log-level", "info");
- props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+ props.setProperty(DistributionConfig.LOG_FILE_NAME, "server_" + OSProcess.getId() + ".log");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "server_" + OSProcess.getId()
+ ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
CacheFactory cf = new CacheFactory(props);
DistributedSystem ds = new Bug48571DUnitTest("Bug48571DUnitTest").getSystem(props);
@@ -173,16 +160,16 @@ public class Bug48571DUnitTest extends DistributedTestCase {
public static void createClientCache(Host host, Integer port) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, "durable-48571");
props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
- props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
- props.setProperty("log-level", "info");
- props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
+ props.setProperty(DistributionConfig.LOG_FILE_NAME, "client_" + OSProcess.getId() + ".log");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId()
+ ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
ClientCacheFactory ccf = new ClientCacheFactory(props);
ccf.setPoolSubscriptionEnabled(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
index fef1ef9..ca27715 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
@@ -27,6 +25,7 @@ import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -36,6 +35,8 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Properties;
+
@SuppressWarnings("serial")
public class Bug48879DUnitTest extends DistributedTestCase {
@@ -75,7 +76,7 @@ public class Bug48879DUnitTest extends DistributedTestCase {
public static void closeCache() throws Exception {
HARegionQueue.threadIdExpiryTime = 300;
- System.setProperty("gemfire.MessageTimeToLive", "180");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "MessageTimeToLive", "180");
if (cache != null) {
cache.close();
}
@@ -85,7 +86,7 @@ public class Bug48879DUnitTest extends DistributedTestCase {
public static Integer createCacheServer()
throws Exception {
Bug48879DUnitTest test = new Bug48879DUnitTest("Bug48879DUnitTest");
- System.setProperty("gemfire.MessageTimeToLive", "30");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "MessageTimeToLive", "30");
cache = (GemFireCacheImpl)CacheFactory.create(test.getSystem());
HARegionQueue.threadIdExpiryTime = (SLEEP_TIME/1000) - 10;
cache.setMessageSyncInterval(SLEEP_TIME/500);
@@ -106,9 +107,9 @@ public class Bug48879DUnitTest extends DistributedTestCase {
throws Exception {
Properties props = new Properties();
- props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId()
+ ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
DistributedSystem ds = new Bug48879DUnitTest("Bug48879DUnitTest").getSystem(props);
ds.disconnect();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
index 8096f7d..ab912a8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/EventIdOptimizationDUnitTest.java
@@ -16,40 +16,27 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.Connection;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.client.internal.QueueStateImpl.SequenceIdAndExpirationObject;
+import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.EventIDHolder;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
-import com.gemstone.gemfire.cache.client.internal.Connection;
-import com.gemstone.gemfire.cache.client.internal.QueueStateImpl.SequenceIdAndExpirationObject;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This test verifies that eventId, while being sent across the network ( client
@@ -226,8 +213,8 @@ public class EventIdOptimizationDUnitTest extends DistributedTestCase
public static void createClientCache1(String hostName, Integer port) throws Exception
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new EventIdOptimizationDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
@@ -249,8 +236,8 @@ public class EventIdOptimizationDUnitTest extends DistributedTestCase
public static void createClientCache2(String hostName, Integer port) throws Exception
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new EventIdOptimizationDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
ClientServerTestCase.configureConnectionPool(factory, hostName, port.intValue(),-1, true, -1, 2, null);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
index 542036b..eb54d73 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/FailoverDUnitTest.java
@@ -16,38 +16,25 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-
-
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -128,8 +115,8 @@ public class FailoverDUnitTest extends DistributedTestCase
PORT1 = port1.intValue();
PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new FailoverDUnitTest("temp").createCache(props);
/*props.setProperty("retryAttempts", "5");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
index cb57216..e0ba099 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HABugInPutDUnitTest.java
@@ -16,22 +16,10 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-
-
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -39,6 +27,11 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* This Dunit test is to verify the bug in put() operation. When the put is invoked on the server
* and NotifyBySubscription is false then it follows normal path and then again calls put of region
@@ -146,8 +139,8 @@ public class HABugInPutDUnitTest extends DistributedTestCase
int PORT1 = port1.intValue();
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HABugInPutDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
index a45734f..5e3f926 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAClearDUnitTest.java
@@ -16,33 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.CacheObserverAdapter;
import com.gemstone.gemfire.internal.cache.CacheObserverHolder;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is the Dunit test to verify clear and destroyRegion operation in
@@ -598,8 +588,8 @@ public class HAClearDUnitTest extends DistributedTestCase
boolean isListenerAttached = listenerAttached.booleanValue();
boolean isRegisterInterest = registerInterest.booleanValue();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAClearDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
index 5d0ee0f..346f37d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAConflationDUnitTest.java
@@ -16,33 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is Targetted conflation Dunit test.
@@ -308,8 +295,8 @@ public class HAConflationDUnitTest extends CacheTestCase
{
int PORT1 = port1.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAConflationDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
ClientServerTestCase.configureConnectionPool(factory, host, new int[] { PORT1 }, true, -1, -1, null);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
index 540270a..efd6ff7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADuplicateDUnitTest.java
@@ -16,33 +16,21 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-
-
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is the Dunit test to verify the duplicates after the fail over
@@ -265,8 +253,8 @@ public class HADuplicateDUnitTest extends DistributedTestCase
int PORT1 = port1.intValue();
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HADuplicateDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
ClientServerTestCase.configureConnectionPool(factory, hostName, new int[] {PORT1,PORT2}, true, -1, 2, null);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
index 79ad0de..fd09917 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAEventIdPropagationDUnitTest.java
@@ -16,29 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.QueueStateImpl.SequenceIdAndExpirationObject;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
@@ -46,14 +30,15 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.RegionEventImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -164,8 +149,8 @@ public class HAEventIdPropagationDUnitTest extends DistributedTestCase
{
int PORT1 = port1.intValue();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAEventIdPropagationDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
PoolImpl pi = (PoolImpl)ClientServerTestCase.configureConnectionPool(factory, hostName, new int[] {PORT1}, true, -1, 2, null);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
index ba1cd61..0eb589a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HAGIIDUnitTest.java
@@ -17,45 +17,30 @@
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.EventID;
+import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.RegionEventImpl;
-import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientTombstoneMessage;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Client is connected to S1 which has a slow dispatcher. Puts are made on S1. Then S2 is started
@@ -180,8 +165,8 @@ public class HAGIIDUnitTest extends DistributedTestCase
int PORT1 = port1.intValue();
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAGIIDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
ClientServerTestCase.configureConnectionPool(factory, host, new int[] {PORT1,PORT2}, true, -1, 2, null, 1000, -1, false, -1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
index 1c7b0d0..4acc174 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQAddOperationJUnitTest.java
@@ -16,39 +16,28 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.Conflatable;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.test.dunit.ThreadUtils;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.Assert;
+import org.apache.logging.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Test to verify Add operation to HARegion Queue with and without conflation.
@@ -119,7 +108,7 @@ public class HARQAddOperationJUnitTest
*/
private Cache createCache() throws CacheException
{
- return new CacheFactory().set("mcast-port", "0").create();
+ return new CacheFactory().set(MCAST_PORT, "0").create();
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
index 5772406..ec8b646 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARQueueNewImplDUnitTest.java
@@ -19,49 +19,27 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.io.File;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.ha.HAContainerMap;
-import com.gemstone.gemfire.internal.cache.ha.HAContainerRegion;
-import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessage;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
import com.gemstone.gemfire.internal.cache.tier.sockets.HAEventWrapper;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-
+import com.gemstone.gemfire.test.dunit.*;
import util.TestException;
+import java.io.File;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This DUnit contains various tests to ensure new implementation of ha region
* queues works as expected.
@@ -143,7 +121,7 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
}
private void createCache(Properties props) throws Exception {
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
DistributedSystem ds = getSystem(props);
ds.disconnect();
ds = getSystem(props);
@@ -207,8 +185,8 @@ public class HARQueueNewImplDUnitTest extends DistributedTestCase {
CacheServerTestUtil.disableShufflingOfEndpoints();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HARQueueNewImplDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
ClientServerTestCase.configureConnectionPool(factory, host, port1
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionJUnitTest.java
index ffb0c02..425a20d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionJUnitTest.java
@@ -16,40 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.internal.cache.EntryEventImpl;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.HARegion;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import junit.framework.Assert;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.GatewayException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.HARegion;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* Test verifies the properties of a HARegion which allows localPuts and
@@ -98,7 +81,7 @@ public class HARegionJUnitTest
GatewayException, CacheExistsException,
RegionExistsException
{
- return new CacheFactory().set("mcast-port", "0").create();
+ return new CacheFactory().set(MCAST_PORT, "0").create();
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
index b7fae40..b2dbc0b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
@@ -16,46 +16,31 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CyclicBarrier;
-
-import junit.framework.Assert;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.Conflatable;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.RegionQueue;
import com.gemstone.gemfire.test.dunit.ThreadUtils;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.Assert;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.CyclicBarrier;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* This is a test for the APIs of a HARegionQueue and verifies that the head,
@@ -121,7 +106,7 @@ public class HARegionQueueJUnitTest
*/
private Cache createCache() throws CacheException
{
- return new CacheFactory().set("mcast-port", "0").create();
+ return new CacheFactory().set(MCAST_PORT, "0").create();
}
/**
@@ -1979,7 +1964,7 @@ public class HARegionQueueJUnitTest
cache.close();
ds.disconnect();
Properties props = new Properties();
- props.put("log-level", "config");
+ props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
//props.put("mcast-port","11111");
try {
cache= CacheFactory.create(DistributedSystem.connect(props));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStartStopJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
index 6dc2d9f..f20e610 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStartStopJUnitTest.java
@@ -19,23 +19,23 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.RegionQueue;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
*
@@ -54,8 +54,8 @@ public class HARegionQueueStartStopJUnitTest
private Cache createCache() throws CacheException
{
final Properties props = new Properties();
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
return CacheFactory.create(DistributedSystem.connect(props));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStatsJUnitTest.java
index 04a2f1f..ac72788 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueStatsJUnitTest.java
@@ -16,25 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.internal.cache.Conflatable;
+import com.gemstone.gemfire.internal.cache.EventID;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.internal.cache.Conflatable;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
/**
* JUnit test for verifying the proper functioning of HARegionQueue related
@@ -83,7 +78,7 @@ public class HARegionQueueStatsJUnitTest
*/
private Cache createCache() throws CacheException
{
- return new CacheFactory().set("mcast-port", "0").create();
+ return new CacheFactory().set(MCAST_PORT, "0").create();
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
index 0f12155..f641199 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
@@ -16,17 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.net.SocketException;
-import java.util.Properties;
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -37,14 +28,13 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.net.SocketException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class HASlowReceiverDUnitTest extends DistributedTestCase {
protected static Cache cache = null;
@@ -147,8 +137,8 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
CacheServerTestUtil.disableShufflingOfEndpoints();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HASlowReceiverDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
index 36ba2e9..4dbf631 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/OperationsPropagationDUnitTest.java
@@ -16,30 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -195,8 +185,8 @@ public class OperationsPropagationDUnitTest extends DistributedTestCase
{
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new OperationsPropagationDUnitTest("temp").createCache(props);
props.setProperty("retryAttempts", "2");
props.setProperty("endpoints", "ep1="+host+":" + PORT2);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/PutAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/PutAllDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/PutAllDUnitTest.java
index 5f3c9cd..4dcbad1 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/PutAllDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/PutAllDUnitTest.java
@@ -16,37 +16,26 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.QueueStateImpl.SequenceIdAndExpirationObject;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -178,8 +167,8 @@ public class PutAllDUnitTest extends DistributedTestCase
{
int PORT1 = port1.intValue();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new PutAllDUnitTest("temp").createCache(props);
props.setProperty("retryAttempts", "2");
props.setProperty("endpoints", "ep1="+host+":" + PORT1);
@@ -209,8 +198,8 @@ public class PutAllDUnitTest extends DistributedTestCase
{
int PORT1 = port1.intValue();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new PutAllDUnitTest("temp").createCache(props);
props.setProperty("retryAttempts", "2");
props.setProperty("endpoints", "ep1="+host+":" + PORT1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/StatsBugDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/StatsBugDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/StatsBugDUnitTest.java
index 0565387..0713bb9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/StatsBugDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/StatsBugDUnitTest.java
@@ -16,31 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is Dunit test for bug 36109. This test has a cache-client having a primary
@@ -322,8 +313,8 @@ public class StatsBugDUnitTest extends DistributedTestCase
private static Properties createProperties1()
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
index 8f556dc..806ff2b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
@@ -16,31 +16,17 @@
*/
package com.gemstone.gemfire.internal.cache.locks;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.CommitConflictException;
import com.gemstone.gemfire.distributed.DistributedLockService;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.locks.DLockRecoverGrantorProcessor;
import com.gemstone.gemfire.distributed.internal.locks.DLockService;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.cache.TXRegionLockRequestImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.*;
/**
* This class tests distributed ownership via the DistributedLockService api.
@@ -664,7 +650,7 @@ public class TXLockServiceDUnitTest extends DistributedTestCase {
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/LRUClockJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/LRUClockJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/LRUClockJUnitTest.java
index 2fd169a..1fba537 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/LRUClockJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/LRUClockJUnitTest.java
@@ -16,30 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.lru;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheExistsException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAlgorithm;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
import com.gemstone.gemfire.internal.cache.PlaceHolderDiskRegion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/** This class tests the LRUCapacityController's core clock algorithm. */
@Category(IntegrationTest.class)
@@ -51,10 +43,10 @@ public class LRUClockJUnitTest extends junit.framework.TestCase {
static Properties sysProps = new Properties();
static {
- //sysProps.setProperty("mcast-port", String.valueOf(unusedPort));
+ //sysProps.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, String.valueOf(unusedPort));
// a loner is all this test needs
- sysProps.setProperty("mcast-port", "0");
- sysProps.setProperty("locators", "");
+ sysProps.setProperty(MCAST_PORT, "0");
+ sysProps.setProperty(LOCATORS, "");
}
public LRUClockJUnitTest( String name ) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/TransactionsWithOverflowTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/TransactionsWithOverflowTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/TransactionsWithOverflowTest.java
index fc906b6..7dfd3ef 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/TransactionsWithOverflowTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/lru/TransactionsWithOverflowTest.java
@@ -27,6 +27,9 @@ import org.junit.rules.TestName;
import java.io.File;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Test for transactional operations on overflowed data
*/
@@ -67,8 +70,8 @@ public class TransactionsWithOverflowTest {
private Cache getCache() {
if (cache == null) {
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port","0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
cache = new CacheFactory(props).create();
}
return cache;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
index e91891d..5617ca2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
@@ -16,18 +16,11 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
@@ -35,11 +28,13 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.RegionEntry;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
* TODO This doesn't really test the optimised RI behaviour but only that RI
@@ -237,12 +232,12 @@ public class Bug43684DUnitTest extends DistributedTestCase {
public static Integer createServerCache(Boolean isReplicated, Boolean isPrimaryEmpty) throws Exception {
DistributedTestCase.disconnectFromDS();
Properties props = new Properties();
- props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
// props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
-// props.setProperty("log-level", "fine");
- props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
+ // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "server_" + OSProcess.getId()
+ ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
CacheFactory cf = new CacheFactory(props);
cache = (GemFireCacheImpl)cf.create();
@@ -267,10 +262,10 @@ public class Bug43684DUnitTest extends DistributedTestCase {
DistributedTestCase.disconnectFromDS();
Properties props = new Properties();
// props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
-// props.setProperty("log-level", "fine");
- props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
+ // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId()
+ ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
ClientCacheFactory ccf = new ClientCacheFactory(props);
ccf.addPoolServer(host.getHostName(), port).setPoolSubscriptionEnabled(true);
cache = (GemFireCacheImpl)ccf.create();
[64/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/07ba2864
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/07ba2864
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/07ba2864
Branch: refs/heads/develop
Commit: 07ba2864f4cbdb5f44ecf3e6b54da8feaa890cec
Parents: 690ca40
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Jun 1 20:22:59 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../internal/security/JSONAuthorization.java | 26 ++------------------
.../internal/security/MultiUserDUnitTest.java | 4 +--
2 files changed, 4 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/07ba2864/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
index 2582bc1..8893a99 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
@@ -43,26 +43,6 @@ import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.operations.OperationContext;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.security.AccessControl;
-import com.gemstone.gemfire.security.AuthenticationFailedException;
-import com.gemstone.gemfire.security.Authenticator;
-import com.gemstone.gemfire.security.NotAuthorizedException;
-import com.gemstone.gemfire.util.test.TestUtil;
-import org.json.JSONArray;
-import org.json.JSONException;
-import org.json.JSONObject;
-
-import javax.management.remote.JMXPrincipal;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.security.Principal;
-import java.util.*;
import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@@ -116,10 +96,8 @@ public class JSONAuthorization implements AccessControl, Authenticator {
user.pwd = user.name;
}
- JSONArray ops = obj.getJSONArray(ROLES);
- for (int j = 0; j < ops.length(); j++) {
- String roleName = ops.getString(j);
- user.roles.add(roleMap.get(roleName));
+ for (JsonNode r : u.get(ROLES)) {
+ user.roles.add(roleMap.get(r.asText()));
}
acl.put(user.name, user);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/07ba2864/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
index 010db07..c20f5df 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
@@ -51,8 +51,8 @@ public class MultiUserDUnitTest extends CliCommandTestBase {
public void testMultiUser() throws IOException, JSONException, InterruptedException {
Properties properties = new Properties();
properties.put(NAME, MultiUserDUnitTest.class.getSimpleName());
- properties.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
- properties.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
+ properties.put(SECURITY_CLIENT_AUTHENTICATOR, JSONAuthorization.class.getName() + ".create");
+ properties.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create");
// set up vm_0 the secure jmx manager
Object[] results = setUpJMXManagerOnVM(0, properties, "cacheServer.json");
[49/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
index d12a31c..54bc4a4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityListenerDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.RegionRoleListenerAdapter;
import com.gemstone.gemfire.distributed.Role;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
@@ -27,6 +26,7 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests the functionality of the {@link RegionRoleListener} class.
*
@@ -64,7 +64,7 @@ public class RegionReliabilityListenerDUnitTest extends ReliabilityTestCase {
Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp[vm]);
+ config.setProperty(ROLES, rolesProp[vm]);
getSystem(config);
}
});
@@ -83,7 +83,7 @@ public class RegionReliabilityListenerDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
index db3fedd..21e77d8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RegionReliabilityTestCase.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.util.RegionMembershipListenerAdapter;
import com.gemstone.gemfire.distributed.Role;
import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
@@ -36,6 +35,8 @@ import java.io.ByteArrayOutputStream;
import java.util.*;
import java.util.concurrent.locks.Lock;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests region reliability defined by MembershipAttributes.
*
@@ -70,7 +71,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
}
}
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesValue.toString());
+ config.setProperty(ROLES, rolesValue.toString());
return getSystem(config);
}
@@ -430,7 +431,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -516,7 +517,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -597,7 +598,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -655,7 +656,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -738,7 +739,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -826,7 +827,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -869,7 +870,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -933,7 +934,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -1005,7 +1006,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -1047,7 +1048,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -1169,7 +1170,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
@@ -1334,7 +1335,7 @@ public abstract class RegionReliabilityTestCase extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
index eee3071..385b79b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RequiredRolesDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.Role;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalRole;
import com.gemstone.gemfire.test.dunit.*;
@@ -28,6 +27,8 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the functionality of the {@link RequiredRoles} class.
*
@@ -64,7 +65,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
@@ -126,7 +127,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp[vm]);
+ config.setProperty(ROLES, rolesProp[vm]);
getSystem(config);
}
});
@@ -134,7 +135,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
@@ -304,7 +305,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
Host.getHost(0).getVM(vm).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp[vm]);
+ config.setProperty(ROLES, rolesProp[vm]);
getSystem(config);
}
});
@@ -312,7 +313,7 @@ public class RequiredRolesDUnitTest extends ReliabilityTestCase {
// connect controller to system...
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
getSystem(config);
// create region in controller...
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
index 51ab9c6..02d89ac 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/RolePerformanceDUnitTest.java
@@ -17,13 +17,14 @@
package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the performance of Regions when Roles are assigned.
*
@@ -115,7 +116,7 @@ public class RolePerformanceDUnitTest extends CacheTestCase {
public void run() {
Properties config = new Properties();
if (assignRoles) {
- config.setProperty(DistributionConfig.ROLES_NAME, vmRoles[vm][0]);
+ config.setProperty(ROLES, vmRoles[vm][0]);
}
getSystem(config);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
index de24694..79d90d4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/SlowRecDUnitTest.java
@@ -35,6 +35,8 @@ import java.util.LinkedList;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Test to make sure slow receiver queuing is working
*
@@ -250,7 +252,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "1");
doCreateOtherVm(p, false);
int repeatCount = 2;
@@ -326,7 +328,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "1");
doCreateOtherVm(p, false);
forceQueuing(r);
@@ -396,7 +398,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "2");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "2");
doCreateOtherVm(p, false);
forceQueuing(r);
@@ -448,7 +450,7 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "1");
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "1");
doCreateOtherVm(p, false);
{
VM vm = getOtherVm();
@@ -645,8 +647,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1"); // 1 meg
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1"); // 1 meg
doCreateOtherVm(p, false);
@@ -717,8 +719,8 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "500"); // 500 ms
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "500"); // 500 ms
doCreateOtherVm(p, true);
@@ -946,9 +948,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "86400000"); // max value
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
@@ -1153,9 +1155,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, "5");
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, "5");
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "86400000"); // max value
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
@@ -1309,9 +1311,9 @@ public class SlowRecDUnitTest extends CacheTestCase {
// create receiver in vm0 with queuing enabled
final Properties p = new Properties();
- p.setProperty(DistributionConfig.ASYNC_DISTRIBUTION_TIMEOUT_NAME, String.valueOf(1000 * 4)); // 4 sec
- p.setProperty(DistributionConfig.ASYNC_QUEUE_TIMEOUT_NAME, "86400000"); // max value
- p.setProperty(DistributionConfig.ASYNC_MAX_QUEUE_SIZE_NAME, "1024"); // max value
+ p.setProperty(ASYNC_DISTRIBUTION_TIMEOUT, String.valueOf(1000 * 4)); // 4 sec
+ p.setProperty(ASYNC_QUEUE_TIMEOUT, "86400000"); // max value
+ p.setProperty(ASYNC_MAX_QUEUE_SIZE, "1024"); // max value
getOtherVm().invoke(new CacheSerializableRunnable("Create other vm") {
public void run2() throws CacheException {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
index e1aabc0..ba5a04d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
@@ -31,7 +31,6 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ResourceEvent;
import com.gemstone.gemfire.distributed.internal.ResourceEventsListener;
import com.gemstone.gemfire.distributed.internal.locks.DLockBatch;
@@ -55,6 +54,8 @@ import java.util.List;
import java.util.Properties;
import java.util.concurrent.CountDownLatch;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
//import com.gemstone.gemfire.internal.cache.locks.TXLockId;
public class TXDistributedDUnitTest extends CacheTestCase {
@@ -493,7 +494,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
@Override
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ p.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
index 3537232..09317c6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
@@ -34,8 +34,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
/**
@@ -63,7 +62,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.ROLES_NAME, "");
+ config.setProperty(ROLES, "");
config.setProperty(DistributionConfig.GROUPS_NAME, "");
config.setProperty(SystemConfigurationProperties.NAME, "");
@@ -123,7 +122,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
+ config.setProperty(ROLES, rolesProp);
config.setProperty(DistributionConfig.GROUPS_NAME, groupsProp);
InternalDistributedSystem system = getSystem(config);
@@ -195,7 +194,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
public void run() {
//disconnectFromDS();
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, vmRoles[vm]);
+ config.setProperty(ROLES, vmRoles[vm]);
getSystem(config);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
index 455e8ae..6fb1702 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
@@ -16,13 +16,10 @@
*/
package com.gemstone.gemfire.distributed;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-
import java.io.PrintStream;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This program is used to measure the amount of time it takes to
@@ -102,7 +99,7 @@ public class DistributedSystemConnectPerf {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(LOG_LEVEL, "info");
props.setProperty(LOCATORS,
"localhost[" + port + "]");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
index e267e41..1d8bb7d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
@@ -73,7 +73,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
Properties p = getDistributedSystemProperties();
p.put(LOCATORS, "");
p.put(START_LOCATOR, "localhost[" + locatorPort + "]");
- p.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+ p.put(DISABLE_TCP, "true");
InternalDistributedSystem ds = (InternalDistributedSystem)DistributedSystem.connect(p);
try {
// construct a member ID that will represent a departed member
@@ -142,7 +142,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
// set a flow-control property for the test (bug 37562)
- config.setProperty(DistributionConfig.MCAST_FLOW_CONTROL_NAME, "3000000,0.20,3000");
+ config.setProperty(MCAST_FLOW_CONTROL, "3000000,0.20,3000");
DistributedSystem system1 = DistributedSystem.connect(config);
DistributedSystem system2 = DistributedSystem.connect(config);
@@ -160,7 +160,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.MCAST_FLOW_CONTROL_NAME, "3000000,0.20,3000");
+ config.setProperty(MCAST_FLOW_CONTROL, "3000000,0.20,3000");
DistributedSystem system1 = DistributedSystem.connect(config);
@@ -192,7 +192,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
DistributedSystem system1 = DistributedSystem.connect(config);
system1.disconnect();
int time = DistributionConfig.DEFAULT_ACK_WAIT_THRESHOLD + 17;
- config.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME,
+ config.put(ACK_WAIT_THRESHOLD,
String.valueOf(time));
DistributedSystem system2 = DistributedSystem.connect(config);
system2.disconnect();
@@ -293,7 +293,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
int unicastPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
config.put(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
// Minimum 3 ports required in range for UDP, FD_SOCK and TcpConduit.
- config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME,
+ config.setProperty(MEMBERSHIP_PORT_RANGE,
""+unicastPort+"-"+(unicastPort+2));
InternalDistributedSystem system = getSystem(config);
DistributionManager dm = (DistributionManager)system.getDistributionManager();
@@ -338,7 +338,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
int portRange = 3;
int portStartRange = getPortRange(portRange);
int portEndRange = portStartRange + portRange - 1;
- config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, "" + (portStartRange) + "-" + (portEndRange));
+ config.setProperty(MEMBERSHIP_PORT_RANGE, "" + (portStartRange) + "-" + (portEndRange));
InternalDistributedSystem system = getSystem(config);
Cache cache = CacheFactory.create(system);
cache.addCacheServer();
@@ -363,7 +363,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
final int unicastPort = socketPorts[0];
config.setProperty(MCAST_PORT, String.valueOf(mcastPort));
config.setProperty(START_LOCATOR, "localhost[" + socketPorts[1] + "]");
- config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME,
+ config.setProperty(MEMBERSHIP_PORT_RANGE,
""+unicastPort+"-"+(unicastPort+2));
InternalDistributedSystem system = (InternalDistributedSystem)DistributedSystem.connect(config);
try {
@@ -407,7 +407,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "");
+ config.setProperty(CACHE_XML_FILE, "");
DistributedSystem sys = DistributedSystem.connect(config);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 8506620..95592f2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -136,18 +136,18 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(START_LOCATOR, locators);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- properties.put(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, "com.gemstone.gemfire.distributed.AuthInitializer.create");
- properties.put(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, "com.gemstone.gemfire.distributed.MyAuthenticator.create");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- properties.put(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ properties.put(SECURITY_PEER_AUTH_INIT, "com.gemstone.gemfire.distributed.AuthInitializer.create");
+ properties.put(SECURITY_PEER_AUTHENTICATOR, "com.gemstone.gemfire.distributed.MyAuthenticator.create");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
+ properties.put(USE_CLUSTER_CONFIGURATION, "false");
system = (InternalDistributedSystem) DistributedSystem.connect(properties);
InternalDistributedMember mbr = system.getDistributedMember();
assertEquals("expected the VM to have NORMAL vmKind",
DistributionManager.NORMAL_DM_TYPE, system.getDistributedMember().getVmKind());
properties.remove(START_LOCATOR);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
properties.put(LOCATORS, locators);
SerializableRunnable startSystem = new SerializableRunnable("start system") {
public void run() {
@@ -206,7 +206,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
});
properties.put(START_LOCATOR, locators);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
system = (InternalDistributedSystem) DistributedSystem.connect(properties);
System.out.println("done connecting distributed system. Membership view is " +
MembershipManagerHelper.getMembershipManager(system).getView());
@@ -270,11 +270,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableCallable startLocator1 = new SerializableCallable("start locator1") {
@Override
@@ -377,7 +377,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
File logFile = new File("");
@@ -493,12 +493,12 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
// properties.put("log-level", "fine");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
final String uname = getUniqueName();
@@ -626,10 +626,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable stopLocator = getStopLocatorRunnable();
@@ -771,11 +771,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable stopLocator = getStopLocatorRunnable();
@@ -908,10 +908,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties properties = new Properties();
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable disconnect =
new SerializableRunnable("Disconnect from " + locators) {
@@ -1093,8 +1093,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
try {
Properties locProps = new Properties();
locProps.setProperty(MCAST_PORT, "0");
- locProps.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
- locProps.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ locProps.setProperty(MEMBER_TIMEOUT, "1000");
+ locProps.put(ENABLE_CLUSTER_CONFIGURATION, "false");
Locator.startLocatorAndDS(port, logFile, locProps);
} catch (IOException ex) {
@@ -1111,7 +1111,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
+ props.setProperty(MEMBER_TIMEOUT, "1000");
DistributedSystem.connect(props);
}
};
@@ -1121,7 +1121,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
+ props.setProperty(MEMBER_TIMEOUT, "1000");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
@@ -1189,8 +1189,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties props = new Properties();
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ props.put(ENABLE_CLUSTER_CONFIGURATION, "false");
SerializableRunnable connect =
new SerializableRunnable("Connect to " + locators) {
@@ -1324,7 +1324,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties dsProps = new Properties();
dsProps.setProperty(LOCATORS, locators);
dsProps.setProperty(MCAST_PORT, "0");
- dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
vm0.invoke(new SerializableRunnable("Start locator on " + port1) {
public void run() {
@@ -1441,9 +1441,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties dsProps = new Properties();
dsProps.setProperty(LOCATORS, locators);
- dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- dsProps.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ dsProps.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ dsProps.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ dsProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
startLocatorSync(vm0, new Object[] { port1, dsProps });
startLocatorSync(vm1, new Object[] { port2, dsProps });
@@ -1651,10 +1651,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
Locator.startLocatorAndDS(port1, logFile, null, props);
} catch (IOException ex) {
@@ -1669,10 +1669,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
Locator.startLocatorAndDS(port2, logFile, null, props);
} catch (IOException ex) {
com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port2, ex);
@@ -1686,9 +1686,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
DistributedSystem.connect(props);
}
};
@@ -1699,9 +1699,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(mcastport));
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
props.setProperty(MCAST_TTL, "0");
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
WaitCriterion ev = new WaitCriterion() {
@@ -1753,7 +1753,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
system.disconnect();
} finally {
@@ -1798,7 +1798,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
DistributedSystem.connect(props);
}
};
@@ -1832,7 +1832,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
final Properties p = new Properties();
p.setProperty(LOCATORS, Host.getHost(0).getHostName() + "[" + port1 + "]");
p.setProperty(MCAST_PORT, "0");
- p.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ p.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
if (stateFile.exists()) {
stateFile.delete();
}
@@ -1917,7 +1917,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
System.setProperty("p2p.joinTimeout", "1000");
Properties locProps = new Properties();
locProps.put(MCAST_PORT, "0");
- locProps.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ locProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
Locator.startLocatorAndDS(port, logFile, locProps);
} catch (IOException ex) {
com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port, ex);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 46cd55f..63e0514 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -40,7 +40,7 @@ import java.lang.management.ManagementFactory;
import java.net.BindException;
import java.net.InetAddress;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -73,7 +73,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0")
.build();
@@ -89,7 +89,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
assertNotNull(distributedSystem);
assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
- assertEquals("config", distributedSystem.getProperties().getProperty(DistributionConfig.LOG_LEVEL_NAME));
+ assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
} catch (Throwable e) {
this.errorCollector.addError(e);
@@ -117,7 +117,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
try {
@@ -169,7 +169,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -222,7 +222,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -272,7 +272,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setMemberName(getUniqueName())
.setPort(this.locatorPort)
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertTrue(builder.getForce());
this.launcher = builder.build();
@@ -340,7 +340,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
assertEquals(this.locatorPort, this.launcher.getPort().intValue());
@@ -422,7 +422,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setMemberName(getUniqueName())
.setPort(this.locatorPort)
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -499,7 +499,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
int pid = 0;
@@ -551,7 +551,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.build();
RuntimeException expected = null;
@@ -613,7 +613,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -676,7 +676,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -739,7 +739,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -791,7 +791,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config");
+ .set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
this.launcher = builder.build();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
index 8b87539..d222ca5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
@@ -51,6 +51,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
@@ -980,7 +981,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getAbsolutePath());
command.add("-cp");
command.add(System.getProperty("java.class.path"));
- command.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "mcast-port=0");
+ command.add("-D" + DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT+"=0");
command.add(LocatorLauncher.class.getName());
command.add(LocatorLauncher.Command.START.getName());
command.add(LocatorLauncherForkingProcess.class.getSimpleName() + "_Locator");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
index 466b818..0dee924 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
@@ -29,8 +29,7 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests the setting of Roles in a DistributedSystem
@@ -62,7 +61,7 @@ public class RoleDUnitTest extends DistributedTestCase {
distributionProperties = new Properties();
distributionProperties.setProperty(MCAST_PORT, "0");
distributionProperties.setProperty(LOCATORS, "");
- distributionProperties.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
+ distributionProperties.setProperty(ROLES, rolesProp);
InternalDistributedSystem system = getSystem(distributionProperties);
try {
@@ -107,8 +106,8 @@ public class RoleDUnitTest extends DistributedTestCase {
public void run() {
disconnectFromDS();
Properties config = new Properties();
- config.setProperty(DistributionConfig.ROLES_NAME, vmRoles[vm]);
- config.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ config.setProperty(ROLES, vmRoles[vm]);
+ config.setProperty(LOG_LEVEL, "fine");
distributionProperties = config;
getSystem();
}
@@ -158,7 +157,7 @@ public class RoleDUnitTest extends DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
+ config.setProperty(ROLES, rolesProp);
distributionProperties = config;
InternalDistributedSystem system = getSystem();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index e8c1afb..b48a797 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.distributed;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Scope;
@@ -91,7 +93,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0")
.build();
@@ -109,7 +111,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
assertNotNull(distributedSystem);
assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
- assertEquals("config", distributedSystem.getProperties().getProperty(DistributionConfig.LOG_LEVEL_NAME));
+ assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
@@ -141,7 +143,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -197,7 +199,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -252,7 +254,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -301,7 +303,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -357,7 +359,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -414,7 +416,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setForce(true)
.setMemberName(getUniqueName())
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
assertTrue(builder.getForce());
@@ -489,7 +491,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
CacheXmlGenerator.generate(creation, pw);
pw.close();
- System.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.getCanonicalPath());
+ System.setProperty(CACHE_XML_FILE, cacheXmlFile.getCanonicalPath());
// start server
final Builder builder = new Builder()
@@ -497,7 +499,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setServerPort(freeTCPPorts[1])
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -558,7 +560,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
CacheXmlGenerator.generate(creation, pw);
pw.close();
- System.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.getCanonicalPath());
+ System.setProperty(CACHE_XML_FILE, cacheXmlFile.getCanonicalPath());
// start server
final Builder builder = new Builder()
@@ -566,7 +568,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setServerPort(this.serverPort)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -616,7 +618,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -695,7 +697,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setDisableDefaultServer(true)
.setMemberName(getUniqueName())
.setRedirectOutput(true)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -777,7 +779,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setServerPort(freeTCPPort)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -837,7 +839,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -903,7 +905,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -969,7 +971,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
@@ -1026,7 +1028,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0");
assertFalse(builder.getForce());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
index c2ccf2f..a3508d3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
@@ -47,6 +47,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
@@ -643,7 +644,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
// launch server and specify a different port
final List<String> jvmArguments = getJvmArguments();
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + DistributionConfig.CACHE_XML_FILE_NAME + "=" + cacheXmlFile.getCanonicalPath());
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + CACHE_XML_FILE + "=" + cacheXmlFile.getCanonicalPath());
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
@@ -728,7 +729,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
// launch server and specify a different port
final List<String> jvmArguments = getJvmArguments();
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + DistributionConfig.CACHE_XML_FILE_NAME + "=" + cacheXmlFile.getCanonicalPath());
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + CACHE_XML_FILE + "=" + cacheXmlFile.getCanonicalPath());
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
@@ -1298,8 +1299,8 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
@Override
protected List<String> getJvmArguments() {
final List<String> jvmArguments = new ArrayList<String>();
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "log-level=config");
- jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "mcast-port=0");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.LOG_LEVEL+"=config");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.MCAST_PORT+"=0");
return jvmArguments;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
index 7eaa5e2..1da0de4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
@@ -26,6 +26,8 @@ import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class Bug40751DUnitTest extends CacheTestCase {
@@ -97,7 +99,7 @@ public class Bug40751DUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties props = new Properties();
System.setProperty("p2p.oldIO", "true");
- props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "true");
+ props.setProperty(CONSERVE_SOCKETS, "true");
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "12333");
// props.setProperty(DistributionConfig.DISABLE_TCP_NAME, "true");
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
index 99fd245..97c3a63 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.distributed.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
@@ -194,7 +196,7 @@ public class ConsoleDistributionManagerDUnitTest
String[] attNames = conf.getAttributeNames();
boolean foundIt = false;
for (int j=0; j<attNames.length; j++) {
- if (attNames[j].equals(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME)) {
+ if (attNames[j].equals(STATISTIC_SAMPLING_ENABLED)) {
foundIt = true;
assertEquals(conf.getAttribute(attNames[j]), "true");
break;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 6a23679..da367d7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.distributed.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.UnmodifiableException;
import com.gemstone.gemfire.internal.ConfigSource;
@@ -138,7 +140,7 @@ public class DistributionConfigJUnitTest {
assertTrue(setter.getName().startsWith("set"));
assertEquals(setter.getParameterCount(), 1);
- if (!(attr.equalsIgnoreCase(DistributionConfig.LOG_LEVEL_NAME) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+ if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
Class clazz = attributes.get(attr).type();
try {
setter.invoke(mock(DistributionConfig.class), any(clazz));
@@ -158,7 +160,7 @@ public class DistributionConfigJUnitTest {
assertTrue(getter.getName().startsWith("get"));
assertEquals(getter.getParameterCount(), 0);
- if (!(attr.equalsIgnoreCase(DistributionConfig.LOG_LEVEL_NAME) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+ if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
Class clazz = attributes.get(attr).type();
Class returnClass = getter.getReturnType();
if (returnClass.isPrimitive()) {
@@ -205,10 +207,10 @@ public class DistributionConfigJUnitTest {
@Test
public void testGetAttributeObject() {
- assertEquals(config.getAttributeObject(DistributionConfig.LOG_LEVEL_NAME), "config");
+ assertEquals(config.getAttributeObject(LOG_LEVEL), "config");
assertEquals(config.getAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME), "config");
assertEquals(config.getAttributeObject(DistributionConfig.REDUNDANCY_ZONE_NAME), "");
- assertEquals(config.getAttributeObject(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME).getClass(), Boolean.class);
+ assertEquals(config.getAttributeObject(ENABLE_CLUSTER_CONFIGURATION).getClass(), Boolean.class);
}
@Test
@@ -250,16 +252,16 @@ public class DistributionConfigJUnitTest {
}
assertEquals(modifiables.size(), 10);
- assertEquals(modifiables.get(0), DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME);
- assertEquals(modifiables.get(1), DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME);
+ assertEquals(modifiables.get(0), ARCHIVE_DISK_SPACE_LIMIT);
+ assertEquals(modifiables.get(1), ARCHIVE_FILE_SIZE_LIMIT);
assertEquals(modifiables.get(2), DistributionConfig.HTTP_SERVICE_PORT_NAME);
assertEquals(modifiables.get(3), DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME);
- assertEquals(modifiables.get(4), DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME);
- assertEquals(modifiables.get(5), DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME);
- assertEquals(modifiables.get(6), DistributionConfig.LOG_LEVEL_NAME);
- assertEquals(modifiables.get(7), DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
- assertEquals(modifiables.get(8), DistributionConfig.STATISTIC_SAMPLE_RATE_NAME);
- assertEquals(modifiables.get(9), DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME);
+ assertEquals(modifiables.get(4), LOG_DISK_SPACE_LIMIT);
+ assertEquals(modifiables.get(5), LOG_FILE_SIZE_LIMIT);
+ assertEquals(modifiables.get(6), LOG_LEVEL);
+ assertEquals(modifiables.get(7), STATISTIC_ARCHIVE_FILE);
+ assertEquals(modifiables.get(8), STATISTIC_SAMPLE_RATE);
+ assertEquals(modifiables.get(9), STATISTIC_SAMPLING_ENABLED);
}
@Test(expected = IllegalArgumentException.class)
@@ -269,7 +271,7 @@ public class DistributionConfigJUnitTest {
@Test(expected = UnmodifiableException.class)
public void testSetUnmodifiableAttributeObject() {
- config.setAttributeObject(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, 0, ConfigSource.api());
+ config.setAttributeObject(ARCHIVE_DISK_SPACE_LIMIT, 0, ConfigSource.api());
}
@Test
@@ -286,7 +288,7 @@ public class DistributionConfigJUnitTest {
@Test
public void testLogLevel() {
config.modifiable = true;
- config.setAttribute(DistributionConfig.LOG_LEVEL_NAME, "config", ConfigSource.api());
+ config.setAttribute(LOG_LEVEL, "config", ConfigSource.api());
assertEquals(config.getLogLevel(), 700);
config.setAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "debug", ConfigSource.api());
@@ -327,7 +329,7 @@ public class DistributionConfigJUnitTest {
props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
// add another non-security property to verify it won't get put in the security properties
- props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, 2);
+ props.put(ACK_WAIT_THRESHOLD, 2);
DistributionConfig config = new DistributionConfigImpl(props);
assertEquals(config.getSecurityProps().size(), 3);
@@ -340,7 +342,7 @@ public class DistributionConfigJUnitTest {
props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
// add another non-security property to verify it won't get put in the security properties
- props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, 2);
+ props.put(ACK_WAIT_THRESHOLD, 2);
props.put("security-username", "testName");
DistributionConfig config = new DistributionConfigImpl(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
index 325b3a2..c78c077 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
@@ -36,8 +36,7 @@ import org.junit.Assert;
import java.net.InetAddress;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.BIND_ADDRESS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This class tests the functionality of the {@link
@@ -248,13 +247,13 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
// in order to set a small ack-wait-threshold, we have to remove the
// system property established by the dunit harness
String oldAckWait = (String)System.getProperties()
- .remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
+ .remove(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD);
try {
final Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "3");
- props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "3");
+ props.setProperty(ACK_WAIT_THRESHOLD, "3");
+ props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "3");
props.setProperty(SystemConfigurationProperties.NAME, "putter");
getSystem(props);
@@ -313,7 +312,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
}
finally {
if (oldAckWait != null) {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD, oldAckWait);
}
}
}
@@ -390,13 +389,13 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
// in order to set a small ack-wait-threshold, we have to remove the
// system property established by the dunit harness
String oldAckWait = (String)System.getProperties()
- .remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
+ .remove(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD);
try {
final Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0"); // loner
- props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
- props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "5");
+ props.setProperty(ACK_WAIT_THRESHOLD, "5");
+ props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "5");
props.setProperty(SystemConfigurationProperties.NAME, "putter");
getSystem(props);
@@ -485,7 +484,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
}
finally {
if (oldAckWait != null) {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD, oldAckWait);
}
}
}
@@ -501,8 +500,8 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
props.setProperty(MCAST_PORT, "0"); // loner
// use a valid address that's not proper for this machine
props.setProperty(BIND_ADDRESS, "www.yahoo.com");
- props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
- props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "5");
+ props.setProperty(ACK_WAIT_THRESHOLD, "5");
+ props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "5");
try {
getSystem(props);
} catch (IllegalArgumentException e) {
[26/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
index 7fda9f7..4aec26d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
@@ -85,6 +85,21 @@ import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.TrustManagerFactory;
+import java.io.*;
+import java.net.ConnectException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.KeyStore;
+import java.util.*;
+import java.util.Map.Entry;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
*
* @since GemFire 7.0
@@ -310,8 +325,8 @@ public class ShellCommands implements CommandMarker {
if (!sslConfigProps.containsKey(DistributionConfig.CLUSTER_SSL_ENABLED_NAME)) {
sslConfigProps.put(DistributionConfig.SSL_ENABLED_NAME, String.valueOf(true));
}
- sslConfigProps.put(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- sslConfigProps.put(DistributionConfig.LOCATORS_NAME, "");
+ sslConfigProps.put(MCAST_PORT, String.valueOf(0));
+ sslConfigProps.put(LOCATORS, "");
String sslInfoLogMsg = "Connecting to Locator via SSL.";
if (useSsl) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/AlterRuntimeConfigFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/AlterRuntimeConfigFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/AlterRuntimeConfigFunction.java
index c031ca0..6b5fc75 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/AlterRuntimeConfigFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/AlterRuntimeConfigFunction.java
@@ -16,10 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.cli.functions;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -32,6 +28,10 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.management.internal.cli.CliUtil;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
/****
*
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
index 04b9299..3dd0eb5 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
@@ -16,21 +16,20 @@
*/
package com.gemstone.gemfire.management.internal.cli.functions;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionContext;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.InternalEntity;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.LogWriterImpl;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
+import org.apache.logging.log4j.Level;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashMap;
+import java.util.Map;
/**
@@ -57,7 +56,7 @@ public class ChangeLogLevelFunction implements Function, InternalEntity {
final String logLevel = (String) args[0];
Level log4jLevel = LogWriterLogger.logWriterNametoLog4jLevel(logLevel);
logwriterLogger.setLevel(log4jLevel);
- System.setProperty("gemfire.log-level", logLevel);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, logLevel);
// LOG:CONFIG:
logger.info(LogMarker.CONFIG, "GFSH Changed log level to {}", log4jLevel);
result.put(cache.getDistributedSystem().getDistributedMember().getId(), "New log level is " + log4jLevel);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
index 5caacab..be511d9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberConfigInformationFunction.java
@@ -16,19 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.functions;
-import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Declarable;
import com.gemstone.gemfire.cache.execute.FunctionAdapter;
import com.gemstone.gemfire.cache.execute.FunctionContext;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -42,6 +31,10 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.management.internal.cli.domain.MemberConfigurationInfo;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.util.*;
+
/****
*
*
@@ -61,7 +54,7 @@ public class GetMemberConfigInformationFunction extends FunctionAdapter implemen
Cache cache = CacheFactory.getAnyInstance();
InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem();
- DistributionConfig config = system.getConfig();
+ DistributionConfig config = system.getConfig();
DistributionConfigImpl distConfigImpl = ((DistributionConfigImpl) config);
MemberConfigurationInfo memberConfigInfo = new MemberConfigurationInfo();
@@ -117,7 +110,7 @@ public class GetMemberConfigInformationFunction extends FunctionAdapter implemen
cacheServerAttributes.put("message-time-to-live", Integer.toString(cacheServer.getMessageTimeToLive()));
cacheServerAttributes.put("notify-by-subscription", Boolean.toString(cacheServer.getNotifyBySubscription()));
cacheServerAttributes.put("port", Integer.toString(cacheServer.getPort()));
- cacheServerAttributes.put("socket-buffer-size", Integer.toString(cacheServer.getSocketBufferSize()));
+ cacheServerAttributes.put(DistributionConfig.SOCKET_BUFFER_SIZE_NAME, Integer.toString(cacheServer.getSocketBufferSize()));
cacheServerAttributes.put("load-poll-interval", Long.toString(cacheServer.getLoadPollInterval()));
cacheServerAttributes.put("tcp-no-delay", Boolean.toString(cacheServer.getTcpNoDelay()));
@@ -167,7 +160,7 @@ public class GetMemberConfigInformationFunction extends FunctionAdapter implemen
csAttributesDefault.put("message-time-to-live", Integer.toString(CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE));
csAttributesDefault.put("notify-by-subscription", Boolean.toString(CacheServer.DEFAULT_NOTIFY_BY_SUBSCRIPTION));
csAttributesDefault.put("port", Integer.toString(CacheServer.DEFAULT_PORT));
- csAttributesDefault.put("socket-buffer-size", Integer.toString(CacheServer.DEFAULT_SOCKET_BUFFER_SIZE));
+ csAttributesDefault.put(DistributionConfig.SOCKET_BUFFER_SIZE_NAME, Integer.toString(CacheServer.DEFAULT_SOCKET_BUFFER_SIZE));
csAttributesDefault.put("load-poll-interval", Long.toString(CacheServer.DEFAULT_LOAD_POLL_INTERVAL));
return csAttributesDefault;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberInformationFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberInformationFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberInformationFunction.java
index a3af1f7..e8d4efe 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberInformationFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/GetMemberInformationFunction.java
@@ -16,14 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.cli.functions;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryMXBean;
-import java.lang.management.MemoryUsage;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -40,6 +32,13 @@ import com.gemstone.gemfire.management.internal.cli.CliUtil;
import com.gemstone.gemfire.management.internal.cli.domain.CacheServerInfo;
import com.gemstone.gemfire.management.internal.cli.domain.MemberInformation;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+import java.lang.management.MemoryUsage;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
/***
*
* since 7.0
@@ -86,7 +85,7 @@ public class GetMemberInformationFunction extends FunctionAdapter implements Int
*/
InternalDistributedSystem system = (InternalDistributedSystem) cache.getDistributedSystem();
- DistributionConfig config = system.getConfig();
+ DistributionConfig config = system.getConfig();
String serverBindAddress = config.getServerBindAddress();
MemoryMXBean memoryMXBean = ManagementFactory.getMemoryMXBean();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
index 0e2508a..bf71373 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
@@ -16,23 +16,20 @@
*/
package com.gemstone.gemfire.management.internal.cli.help.utils;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.management.cli.CliMetaData;
+import com.gemstone.gemfire.management.internal.cli.help.format.*;
import com.gemstone.gemfire.management.internal.cli.modes.CommandModes;
import com.gemstone.gemfire.management.internal.cli.modes.CommandModes.CommandMode;
-import com.gemstone.gemfire.management.internal.cli.help.format.Block;
-import com.gemstone.gemfire.management.internal.cli.help.format.DataNode;
-import com.gemstone.gemfire.management.internal.cli.help.format.Help;
-import com.gemstone.gemfire.management.internal.cli.help.format.NewHelp;
-import com.gemstone.gemfire.management.internal.cli.help.format.Row;
import com.gemstone.gemfire.management.internal.cli.parser.Argument;
import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
import com.gemstone.gemfire.management.internal.cli.parser.Option;
import com.gemstone.gemfire.management.internal.cli.parser.SyntaxConstants;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
/**
* @since GemFire 7.0
*/
@@ -77,7 +74,7 @@ public class HelpUtils {
public static Help getHelp(CommandTarget commandTarget) {
List<Block> blocks = new ArrayList<Block>();
// First we will have the block for NAME of the command
- blocks.add(block(NAME_NAME, row(commandTarget.getCommandName())));
+ blocks.add(block(SystemConfigurationProperties.NAME, row(commandTarget.getCommandName())));
// Now add synonyms if any
if (commandTarget.getSynonyms() != null) {
blocks.add(block(SYNONYMS_NAME, row(commandTarget.getSynonyms())));
@@ -189,7 +186,7 @@ public class HelpUtils {
public static NewHelp getNewHelp(CommandTarget commandTarget, boolean withinShell) {
DataNode root = new DataNode(null, new ArrayList<DataNode>());
// First we will have the block for NAME of the command
- DataNode name = new DataNode(NAME_NAME, new ArrayList<DataNode>());
+ DataNode name = new DataNode(SystemConfigurationProperties.NAME, new ArrayList<DataNode>());
name.addChild(new DataNode(commandTarget.getCommandName(), null));
root.addChild(name);
if (withinShell) {// include availabilty info
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
index 1a0f2ae..88a4044 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/i18n/CliStrings.java
@@ -16,15 +16,18 @@
*/
package com.gemstone.gemfire.management.internal.cli.i18n;
-import java.text.MessageFormat;
-
import com.gemstone.gemfire.cache.PartitionAttributesFactory;
import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
+import java.text.MessageFormat;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**-*
* Contains 'String' constants used as key to the Localized strings to be used
* in classes under <code>com.gemstone.gemfire.management.internal.cli</code>
@@ -270,26 +273,26 @@ public class CliStrings {
public static final String ALTER_RUNTIME_CONFIG__MEMBER__HELP = "Name/Id of the member in whose configuration will be altered.";
public static final String ALTER_RUNTIME_CONFIG__GROUP = "group";
public static final String ALTER_RUNTIME_CONFIG__GROUP__HELP = "Group of members whose configuration will be altered.";
- public static final String ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT = DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME;
+ public static final String ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT = ARCHIVE_FILE_SIZE_LIMIT;
public static final String ALTER_RUNTIME_CONFIG__ARCHIVE__FILE__SIZE__LIMIT__HELP = "Archive file size limit. Valid values are (in megabytes): "
+ DistributionConfig.MIN_ARCHIVE_FILE_SIZE_LIMIT + " - " + DistributionConfig.MAX_ARCHIVE_FILE_SIZE_LIMIT + ".";
- public static final String ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT = DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME;
+ public static final String ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT = ARCHIVE_DISK_SPACE_LIMIT;
public static final String ALTER_RUNTIME_CONFIG__ARCHIVE__DISK__SPACE__LIMIT__HELP = "Archive disk space limit. Valid values are (in megabytes): "
+ DistributionConfig.MIN_ARCHIVE_DISK_SPACE_LIMIT + " - " + DistributionConfig.MAX_ARCHIVE_DISK_SPACE_LIMIT + ".";
- public static final String ALTER_RUNTIME_CONFIG__LOG__FILE__SIZE__LIMIT = DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME;
+ public static final String ALTER_RUNTIME_CONFIG__LOG__FILE__SIZE__LIMIT = LOG_FILE_SIZE_LIMIT;
public static final String ALTER_RUNTIME_CONFIG__LOG__FILE__SIZE__LIMIT__HELP = "Log file size limit. Valid values are (in megabytes): "
+ DistributionConfig.MIN_LOG_FILE_SIZE_LIMIT + " - " + DistributionConfig.MAX_LOG_FILE_SIZE_LIMIT + ".";
- public static final String ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT = DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME;
+ public static final String ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT = LOG_DISK_SPACE_LIMIT;
public static final String ALTER_RUNTIME_CONFIG__LOG__DISK__SPACE__LIMIT__HELP = "Log disk space limit. Valid values are (in megabytes): "
+ DistributionConfig.MIN_LOG_DISK_SPACE_LIMIT + " - " + DistributionConfig.MAX_LOG_DISK_SPACE_LIMIT + ".";
- public static final String ALTER_RUNTIME_CONFIG__LOG__LEVEL = DistributionConfig.LOG_LEVEL_NAME;
+ public static final String ALTER_RUNTIME_CONFIG__LOG__LEVEL = LOG_LEVEL;
public static final String ALTER_RUNTIME_CONFIG__LOG__LEVEL__HELP = "Log level. Valid values are: none, error, info, config , warning, severe, fine, finer and finest.";
public static final String ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLING__ENABLED = "enable-statistics";
public static final String ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLING__ENABLED__HELP = "Whether statistic sampling should be enabled. Valid values are: true and false.";
- public static final String ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLE__RATE = DistributionConfig.STATISTIC_SAMPLE_RATE_NAME;
+ public static final String ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLE__RATE = STATISTIC_SAMPLE_RATE;
public static final String ALTER_RUNTIME_CONFIG__STATISTIC__SAMPLE__RATE__HELP = "Statistic sampling rate. Valid values are (in milliseconds): "
+ DistributionConfig.MIN_STATISTIC_SAMPLE_RATE + " - " + DistributionConfig.MAX_STATISTIC_SAMPLE_RATE + ".";
- public static final String ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE = DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME;
+ public static final String ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE = STATISTIC_ARCHIVE_FILE;
public static final String ALTER_RUNTIME_CONFIG__STATISTIC__ARCHIVE__FILE__HELP = "File to which the statistics will be written.";
public static final String ALTER_RUNTIME_CONFIG__COPY__ON__READ = CacheXml.COPY_ON_READ;
@@ -360,7 +363,7 @@ public class CliStrings {
/* connect command */
public static final String CONNECT = "connect";
public static final String CONNECT__HELP = "Connect to a jmx-manager either directly or via a Locator. If connecting via a Locator, and a jmx-manager doesn't already exist, the Locator will start one.";
- public static final String CONNECT__JMX_MANAGER = "jmx-manager";
+ public static final String CONNECT__JMX_MANAGER = JMX_MANAGER;
public static final String CONNECT__JMX_MANAGER__HELP = "Network address of the jmx-manager in the form: host[port].";
public static final String CONNECT__LOCATOR = "locator";
public static final String CONNECT__LOCATOR__HELP = "Network address of the Locator in the form: host[port].";
@@ -941,7 +944,7 @@ public class CliStrings {
public static final String EXPORT_LOGS__GROUP = "group";
public static final String EXPORT_LOGS__GROUP__HELP = "Group of members whose log files will be exported.";
public static final String EXPORT_LOGS__MSG__CANNOT_EXECUTE = "Cannot execute";
- public static final String EXPORT_LOGS__LOGLEVEL = "log-level";
+ public static final String EXPORT_LOGS__LOGLEVEL = DistributionConfig.LOG_LEVEL_NAME;
public static final String EXPORT_LOGS__LOGLEVEL__HELP = "Minimum level of log entries to export. Valid values are: none, error, info, config , fine, finer and finest. The default is \"info\".";
public static final String EXPORT_LOGS__UPTO_LOGLEVEL = "only-log-level";
public static final String EXPORT_LOGS__UPTO_LOGLEVEL__HELP = "Whether to only include those entries that exactly match the --log-level specified.";
@@ -1490,7 +1493,7 @@ public class CliStrings {
public static final String CREATE_GATEWAYRECEIVER__BINDADDRESS__HELP = "The IP address or host name that the receiver's socket will listen on for client connections.";
public static final String CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS = "maximum-time-between-pings";
public static final String CREATE_GATEWAYRECEIVER__MAXTIMEBETWEENPINGS__HELP = "The maximum amount of time between client pings.";
- public static final String CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE = "socket-buffer-size";
+ public static final String CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE = SOCKET_BUFFER_SIZE;
public static final String CREATE_GATEWAYRECEIVER__SOCKETBUFFERSIZE__HELP = "The buffer size in bytes of the socket connection for this GatewayReceiver.";
public static final String CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER = "gateway-transport-filter";
public static final String CREATE_GATEWAYRECEIVER__GATEWAYTRANSPORTFILTER__HELP = "The fully qualified class names of GatewayTransportFilters (separated by comma) to be added to the GatewayReceiver. e.g. gateway-transport-filter=com.user.filters.MyFilter1,com.user.filters.MyFilters2";
@@ -1522,7 +1525,7 @@ public class CliStrings {
public static final String CREATE_GATEWAYSENDER__PARALLEL__HELP = "Whether this is Parallel GatewaySender.";
public static final String CREATE_GATEWAYSENDER__MANUALSTART = "manual-start";
public static final String CREATE_GATEWAYSENDER__MANUALSTART__HELP = "Whether manual start is to be enabled or the sender will start automatically after creation.";
- public static final String CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE = "socket-buffer-size";
+ public static final String CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE = SOCKET_BUFFER_SIZE;
public static final String CREATE_GATEWAYSENDER__SOCKETBUFFERSIZE__HELP = "The buffer size of the socket connection between this GatewaySender and its receiving GatewayReceiver.";
public static final String CREATE_GATEWAYSENDER__SOCKETREADTIMEOUT = "socket-read-timeout";
public static final String CREATE_GATEWAYSENDER__SOCKETREADTIMEOUT__HELP = "The amount of time in milliseconds that a socket read between a sending GatewaySender and its receiving GatewayReceiver will block.";
@@ -1621,13 +1624,13 @@ public class CliStrings {
public static final String START_LOCATOR__HOSTNAME_FOR_CLIENTS__HELP = "Hostname or IP address that will be sent to clients so they can connect to this Locator. The default is the bind-address of the Locator.";
public static final String START_LOCATOR__INCLUDE_SYSTEM_CLASSPATH = "include-system-classpath";
public static final String START_LOCATOR__INCLUDE_SYSTEM_CLASSPATH__HELP = "Includes the System CLASSPATH on the Locator's CLASSPATH. The System CLASSPATH is not included by default.";
- public static final String START_LOCATOR__LOCATORS = "locators";
+ public static final String START_LOCATOR__LOCATORS = LOCATORS;
public static final String START_LOCATOR__LOCATORS__HELP = "Sets the list of Locators used by this Locator to join the appropriate GemFire cluster.";
- public static final String START_LOCATOR__LOG_LEVEL = "log-level";
+ public static final String START_LOCATOR__LOG_LEVEL = LOG_LEVEL;
public static final String START_LOCATOR__LOG_LEVEL__HELP = "Sets the level of output logged to the Locator log file. Possible values for log-level include: finest, finer, fine, config, info, warning, severe, none.";
- public static final String START_LOCATOR__MCAST_ADDRESS = "mcast-address";
+ public static final String START_LOCATOR__MCAST_ADDRESS = MCAST_ADDRESS;
public static final String START_LOCATOR__MCAST_ADDRESS__HELP = "The IP address or hostname used to bind the UPD socket for multi-cast networking so the Locator can communicate other members in the GemFire cluster using a common multicast address and port. If mcast-port is zero, then mcast-address is ignored.";
- public static final String START_LOCATOR__MCAST_PORT = "mcast-port";
+ public static final String START_LOCATOR__MCAST_PORT = MCAST_PORT;
public static final String START_LOCATOR__MCAST_PORT__HELP = "Sets the port used for multi-cast networking so the Locator can communicate with other members of the GemFire cluster. A zero value disables mcast.";
public static final String START_LOCATOR__MEMBER_NAME = "name";
public static final String START_LOCATOR__MEMBER_NAME__HELP = "The member name to give this Locator in the GemFire cluster.";
@@ -1650,7 +1653,7 @@ public class CliStrings {
public static final String START_LOCATOR__CONNECT = "connect";
public static final String START_LOCATOR__CONNECT__HELP = "When connect is set to false , Gfsh does not automatically connect to the locator which is started using this command.";
public static final String START_LOCATOR__USE__0__TO__CONNECT = "Please use \"{0}\" to connect Gfsh to the locator.";
- public static final String START_LOCATOR__ENABLE__SHARED__CONFIGURATION = "enable-cluster-configuration";
+ public static final String START_LOCATOR__ENABLE__SHARED__CONFIGURATION = ENABLE_CLUSTER_CONFIGURATION;
public static final String START_LOCATOR__ENABLE__SHARED__CONFIGURATION__HELP = "When " + START_LOCATOR__ENABLE__SHARED__CONFIGURATION + " is set to true, locator hosts and serves cluster configuration.";
public static final String START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM = "load-cluster-configuration-from-dir";
public static final String START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM__HELP = "When \" " + START_LOCATOR__LOAD__SHARED_CONFIGURATION__FROM__FILESYSTEM + " \" is set to true, the locator loads the cluster configuration from the \""+ SharedConfiguration.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME + "\" directory.";
@@ -1688,7 +1691,7 @@ public class CliStrings {
public static final String START_SERVER__ASSIGN_BUCKETS__HELP = "Whether to assign buckets to the partitioned regions of the cache on server start.";
public static final String START_SERVER__BIND_ADDRESS = "bind-address";
public static final String START_SERVER__BIND_ADDRESS__HELP = "The IP address on which the Server will be bound. By default, the Server is bound to all local addresses.";
- public static final String START_SERVER__CACHE_XML_FILE = "cache-xml-file";
+ public static final String START_SERVER__CACHE_XML_FILE = CACHE_XML_FILE;
public static final String START_SERVER__CACHE_XML_FILE__HELP = "Specifies the name of the XML file or resource to initialize the cache with when it is created.";
public static final String START_SERVER__CLASSPATH = "classpath";
public static final String START_SERVER__CLASSPATH__HELP = "Location of user application classes required by the Server. The user classpath is prepended to the Server's classpath.";
@@ -1698,7 +1701,7 @@ public class CliStrings {
public static final String START_SERVER__DISABLE_DEFAULT_SERVER__HELP = "Whether the Cache Server will be started by default.";
public static final String START_SERVER__DISABLE_EXIT_WHEN_OUT_OF_MEMORY = "disable-exit-when-out-of-memory";
public static final String START_SERVER__DISABLE_EXIT_WHEN_OUT_OF_MEMORY_HELP = "Prevents the JVM from exiting when an OutOfMemoryError occurs.";
- public static final String START_SERVER__ENABLE_TIME_STATISTICS = "enable-time-statistics";
+ public static final String START_SERVER__ENABLE_TIME_STATISTICS = ENABLE_TIME_STATISTICS;
public static final String START_SERVER__ENABLE_TIME_STATISTICS__HELP = "Causes additional time-based statistics to be gathered for GemFire operations.";
public static final String START_SERVER__FORCE = "force";
public static final String START_SERVER__FORCE__HELP = "Whether to allow the PID file from a previous Cache Server run to be overwritten.";
@@ -1710,55 +1713,55 @@ public class CliStrings {
public static final String START_SERVER__INITIAL_HEAP__HELP = "Initial size of the heap in the same format as the JVM -Xms parameter.";
public static final String START_SERVER__J = "J";
public static final String START_SERVER__J__HELP = "Argument passed to the JVM on which the server will run. For example, --J=-Dfoo.bar=true will set the system property \"foo.bar\" to \"true\".";
- public static final String START_SERVER__LOCATORS = "locators";
+ public static final String START_SERVER__LOCATORS = LOCATORS;
public static final String START_SERVER__LOCATORS__HELP = "Sets the list of Locators used by the Cache Server to join the appropriate GemFire cluster.";
- public static final String START_SERVER__LOCK_MEMORY = "lock-memory";
+ public static final String START_SERVER__LOCK_MEMORY = SystemConfigurationProperties.LOCK_MEMORY;
public static final String START_SERVER__LOCK_MEMORY__HELP = "Causes GemFire to lock heap and off-heap memory pages into RAM. This prevents the operating system from swapping the pages out to disk, which can cause severe performance degradation. When you use this option, also configure the operating system limits for locked memory.";
public static final String START_SERVER__LOCATOR_WAIT_TIME = "locator-wait-time";
public static final String START_SERVER__LOCATOR_WAIT_TIME_HELP = "Sets the number of seconds the server will wait for a locator to become available during startup before giving up.";
- public static final String START_SERVER__LOG_LEVEL = "log-level";
+ public static final String START_SERVER__LOG_LEVEL = LOG_LEVEL;
public static final String START_SERVER__LOG_LEVEL__HELP = "Sets the level of output logged to the Cache Server log file. Possible values for log-level include: finest, finer, fine, config, info, warning, severe, none.";
public static final String START_SERVER__MAXHEAP = "max-heap";
public static final String START_SERVER__MAXHEAP__HELP = "Maximum size of the heap in the same format as the JVM -Xmx parameter.";
- public static final String START_SERVER__MCAST_ADDRESS = "mcast-address";
+ public static final String START_SERVER__MCAST_ADDRESS = MCAST_ADDRESS;
public static final String START_SERVER__MCAST_ADDRESS__HELP = "The IP address or hostname used to bind the UPD socket for multi-cast networking so the Cache Server can communicate with other members in the GemFire cluster. If mcast-port is zero, then mcast-address is ignored.";
- public static final String START_SERVER__MCAST_PORT = "mcast-port";
+ public static final String START_SERVER__MCAST_PORT = MCAST_PORT;
public static final String START_SERVER__MCAST_PORT__HELP = "Sets the port used for multi-cast networking so the Cache Server can communicate with other members of the GemFire cluster. A zero value disables mcast.";
public static final String START_SERVER__NAME = "name";
public static final String START_SERVER__NAME__HELP = "The member name to give this Cache Server in the GemFire cluster.";
- public static final String START_SERVER__MEMCACHED_PORT = "memcached-port";
+ public static final String START_SERVER__MEMCACHED_PORT = MEMCACHED_PORT;
public static final String START_SERVER__MEMCACHED_PORT__HELP = "Sets the port that the GemFire memcached service listens on for memcached clients.";
- public static final String START_SERVER__MEMCACHED_PROTOCOL = "memcached-protocol";
+ public static final String START_SERVER__MEMCACHED_PROTOCOL = MEMCACHED_PROTOCOL;
public static final String START_SERVER__MEMCACHED_PROTOCOL__HELP = "Sets the protocol that the GemFire memcached service uses (ASCII or BINARY).";
- public static final String START_SERVER__MEMCACHED_BIND_ADDRESS = "memcached-bind-address";
+ public static final String START_SERVER__MEMCACHED_BIND_ADDRESS = MEMCACHED_BIND_ADDRESS;
public static final String START_SERVER__MEMCACHED_BIND_ADDRESS__HELP = "Sets the IP address the GemFire memcached service listens on for memcached clients. The default is to bind to the first non-loopback address for this machine.";
- public static final String START_SERVER__OFF_HEAP_MEMORY_SIZE = "off-heap-memory-size";
+ public static final String START_SERVER__OFF_HEAP_MEMORY_SIZE = SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE;
public static final String START_SERVER__OFF_HEAP_MEMORY_SIZE__HELP = "The total size of off-heap memory specified as off-heap-memory-size=<n>[g|m]. <n> is the size. [g|m] indicates whether the size should be interpreted as gigabytes or megabytes. A non-zero size causes that much memory to be allocated from the operating system and reserved for off-heap use.";
public static final String START_SERVER__PROPERTIES = "properties-file";
public static final String START_SERVER__PROPERTIES__HELP = "The gemfire.properties file for configuring the Cache Server's distributed system. The file's path can be absolute or relative to the gfsh working directory.";
- public static final String START_SERVER__REDIS_PORT = "redis-port";
+ public static final String START_SERVER__REDIS_PORT = SystemConfigurationProperties.REDIS_PORT;
public static final String START_SERVER__REDIS_PORT__HELP = "Sets the port that the GemFire Redis service listens on for Redis clients.";
- public static final String START_SERVER__REDIS_BIND_ADDRESS = "redis-bind-address";
+ public static final String START_SERVER__REDIS_BIND_ADDRESS = SystemConfigurationProperties.REDIS_BIND_ADDRESS;
public static final String START_SERVER__REDIS_BIND_ADDRESS__HELP = "Sets the IP address the GemFire Redis service listens on for Redis clients. The default is to bind to the first non-loopback address for this machine.";
- public static final String START_SERVER__REDIS_PASSWORD = "redis-password";
+ public static final String START_SERVER__REDIS_PASSWORD = SystemConfigurationProperties.REDIS_PASSWORD;
public static final String START_SERVER__REDIS_PASSWORD__HELP = "Sets the authentication password for GemFireRedisServer";
public static final String START_SERVER__SECURITY_PROPERTIES = "security-properties-file";
public static final String START_SERVER__SECURITY_PROPERTIES__HELP = "The gfsecurity.properties file for configuring the Server's security configuration in the distributed system. The file's path can be absolute or relative to gfsh directory.";
public static final String START_SERVER__REBALANCE = "rebalance";
public static final String START_SERVER__REBALANCE__HELP = "Whether to initiate rebalancing across the GemFire cluster.";
- public static final String START_SERVER__SERVER_BIND_ADDRESS = "server-bind-address";
+ public static final String START_SERVER__SERVER_BIND_ADDRESS = SERVER_BIND_ADDRESS;
public static final String START_SERVER__SERVER_BIND_ADDRESS__HELP = "The IP address that this distributed system's server sockets in a client-server topology will be bound. If set to an empty string then all of the local machine's addresses will be listened on.";
public static final String START_SERVER__SERVER_PORT = "server-port";
public static final String START_SERVER__SERVER_PORT__HELP = "The port that the distributed system's server sockets in a client-server topology will listen on. The default server-port is "
+ CacheServer.DEFAULT_PORT + ".";
public static final String START_SERVER__SPRING_XML_LOCATION = "spring-xml-location";
public static final String START_SERVER__SPRING_XML_LOCATION_HELP = "Specifies the location of a Spring XML configuration file(s) for bootstrapping and configuring a GemFire Server.";
- public static final String START_SERVER__STATISTIC_ARCHIVE_FILE = "statistic-archive-file";
+ public static final String START_SERVER__STATISTIC_ARCHIVE_FILE = STATISTIC_ARCHIVE_FILE;
public static final String START_SERVER__STATISTIC_ARCHIVE_FILE__HELP = "The file that statistic samples are written to. An empty string (default) disables statistic archival.";
// public static final String START_SERVER__START_LOCATOR = "start-locator";
// public static final String START_SERVER__START_LOCATOR__HELP =
// "To start embedded Locator with given endpoints in the format: host[port]. If no endpoints are given defaults (localhost[10334]) are assumed.";
- public static final String START_SERVER__USE_CLUSTER_CONFIGURATION = "use-cluster-configuration";
+ public static final String START_SERVER__USE_CLUSTER_CONFIGURATION = USE_CLUSTER_CONFIGURATION;
public static final String START_SERVER__USE_CLUSTER_CONFIGURATION__HELP = "When set to true, the server requests the configuration from locator's cluster configuration service.";
public static final String START_SERVER__GENERAL_ERROR_MESSAGE = "An error occurred while attempting to start a GemFire Cache Server: %1$s";
public static final String START_SERVER__PROCESS_TERMINATED_ABNORMALLY_ERROR_MESSAGE = "The Cache Server process terminated unexpectedly with exit status %1$d. Please refer to the log file in %2$s for full details.%n%n%3$s";
@@ -1809,9 +1812,8 @@ public class CliStrings {
public static final String START_SERVER__MESSAGE__TIME__TO__LIVE = "message-time-to-live";
public static final String START_SERVER__MESSAGE__TIME__TO__LIVE__HELP = "Sets the time (in seconds ) after which a message in the client queue will expire";
-
-
- public static final String START_SERVER__SOCKET__BUFFER__SIZE = "socket-buffer-size";
+
+ public static final String START_SERVER__SOCKET__BUFFER__SIZE = SOCKET_BUFFER_SIZE;
public static final String START_SERVER__SOCKET__BUFFER__SIZE__HELP = "Sets the buffer size in bytes of the socket connection for this CacheServer. The default is 32768 bytes.";
public static final String START_SERVER__TCP__NO__DELAY = "tcp-no-delay";
@@ -2048,7 +2050,7 @@ public class CliStrings {
//List durable cqs
public static final String LIST_DURABLE_CQS = "list durable-cqs";
- public static final String LIST_DURABLE_CQS__DURABLECLIENTID = "durable-client-id";
+ public static final String LIST_DURABLE_CQS__DURABLECLIENTID = DURABLE_CLIENT_ID;
public static final String LIST_DURABLE_CQS__DURABLECLIENTID__HELP = "The id used to identify the durable client";
public static final String LIST_DURABLE_CQS__HELP = "List durable client cqs associated with the specified durable client id.";
public static final String LIST_DURABLE_CQS__MEMBER = "member";
@@ -2068,7 +2070,7 @@ public class CliStrings {
public static final String CLOSE_DURABLE_CQS__HELP = "Closes the durable cq registered by the durable client and drains events held for the durable cq from the subscription queue.";
public static final String CLOSE_DURABLE_CQS__NAME = "durable-cq-name";
public static final String CLOSE_DURABLE_CQS__NAME__HELP = "Name of the cq to be closed.";
- public static final String CLOSE_DURABLE_CQS__DURABLE__CLIENT__ID = "durable-client-id";
+ public static final String CLOSE_DURABLE_CQS__DURABLE__CLIENT__ID = DURABLE_CLIENT_ID;
public static final String CLOSE_DURABLE_CQS__DURABLE__CLIENT__ID__HELP = "The id of the durable client";
public static final String CLOSE_DURABLE_CQS__MEMBER = "member";
public static final String CLOSE_DURABLE_CQS__MEMBER__HELP = "Name/Id of the member for which the durable client is registered and the cq to be closed.";
@@ -2081,7 +2083,7 @@ public class CliStrings {
//Close Durable Clients
public static final String CLOSE_DURABLE_CLIENTS = "close durable-client";
public static final String CLOSE_DURABLE_CLIENTS__HELP = "Attempts to close the durable client, the client must be disconnected.";
- public static final String CLOSE_DURABLE_CLIENTS__CLIENT__ID = "durable-client-id";
+ public static final String CLOSE_DURABLE_CLIENTS__CLIENT__ID = DURABLE_CLIENT_ID;
public static final String CLOSE_DURABLE_CLIENTS__CLIENT__ID__HELP = "The id used to identify the durable client.";
public static final String CLOSE_DURABLE_CLIENTS__MEMBER = "member";
public static final String CLOSE_DURABLE_CLIENTS__MEMBER__HELP = "Name/Id of the member for which the durable client is to be closed.";
@@ -2092,7 +2094,7 @@ public class CliStrings {
public static final String COUNT_DURABLE_CQ_EVENTS = "show subscription-queue-size";
public static final String COUNT_DURABLE_CQ_EVENTS__HELP = "Shows the number of events in the subscription queue. If a cq name is provided, counts the number of events in the subscription queue for the specified cq.";
- public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE__CLIENT__ID = "durable-client-id";
+ public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE__CLIENT__ID = DURABLE_CLIENT_ID;
public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE__CLIENT__ID__HELP = "The id used to identify the durable client.";
public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE__CQ__NAME = "durable-cq-name";
public static final String COUNT_DURABLE_CQ_EVENTS__DURABLE__CQ__NAME__HELP = "The name that identifies the cq.";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
index bbb0841..d199648 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
@@ -16,38 +16,7 @@
*/
package com.gemstone.gemfire.management.internal.cli.shell;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.text.MessageFormat;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.atomic.AtomicBoolean;
-import javax.management.AttributeNotFoundException;
-import javax.management.InstanceNotFoundException;
-import javax.management.JMX;
-import javax.management.MBeanException;
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-import javax.management.QueryExp;
-import javax.management.ReflectionException;
-import javax.management.remote.JMXConnectionNotification;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXServiceURL;
-import javax.rmi.ssl.SslRMIClientSocketFactory;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.util.ArrayUtils;
import com.gemstone.gemfire.internal.util.IOUtils;
@@ -61,6 +30,22 @@ import com.gemstone.gemfire.management.internal.cli.LogWrapper;
import com.gemstone.gemfire.management.internal.cli.commands.ShellCommands;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
+import javax.management.*;
+import javax.management.remote.JMXConnectionNotification;
+import javax.management.remote.JMXConnector;
+import javax.management.remote.JMXConnectorFactory;
+import javax.management.remote.JMXServiceURL;
+import javax.rmi.ssl.SslRMIClientSocketFactory;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.text.MessageFormat;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.atomic.AtomicBoolean;
+
/**
* OperationInvoker JMX Implementation
*
@@ -124,7 +109,7 @@ public class JmxOperationInvoker implements OperationInvoker {
Entry<String, String> entry = it.next();
String key = entry.getKey();
String value = entry.getValue();
- if (key.startsWith("javax.") || key.startsWith("cluster-ssl") || key.startsWith("jmx-manager-ssl") ) {
+ if (key.startsWith("javax.") || key.startsWith("cluster-ssl") || key.startsWith(DistributionConfig.JMX_MANAGER_SSL_NAME)) {
key = checkforSystemPropertyPrefix(entry.getKey());
if((key.equals(Gfsh.SSL_ENABLED_CIPHERS) || key.equals(Gfsh.SSL_ENABLED_PROTOCOLS)) && "any".equals(value)){
continue;
@@ -239,7 +224,7 @@ public class JmxOperationInvoker implements OperationInvoker {
String returnKey = key;
if (key.startsWith("javax."))
returnKey = key;
- if (key.startsWith("cluster-ssl") || key.startsWith("jmx-manager-ssl")) {
+ if (key.startsWith("cluster-ssl") || key.startsWith(DistributionConfig.JMX_MANAGER_SSL_NAME)) {
if (key.endsWith("keystore")) {
returnKey = Gfsh.SSL_KEYSTORE;
} else if (key.endsWith("keystore-password")) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/DtdResolver.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/DtdResolver.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/DtdResolver.java
index 83ed68c..d986e8a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/DtdResolver.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/configuration/utils/DtdResolver.java
@@ -16,18 +16,18 @@
*/
package com.gemstone.gemfire.management.internal.configuration.utils;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
+import org.apache.commons.io.FileUtils;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
+
import java.io.File;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
-import org.apache.commons.io.FileUtils;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
-
/******
* This class is used to resolve the location of DTD.
* During development time the dtd for the latest version is not published
@@ -43,7 +43,7 @@ public class DtdResolver implements EntityResolver{
{
if (!isHttpUrlOK(systemId)) {
URL dtdURL = getClass().getResource(CacheXml.LATEST_DTD_LOCATION);
- File dtd = new File("gemfire.dtd");
+ File dtd = new File(DistributionConfig.GEMFIRE_PREFIX + "dtd");
FileUtils.copyURLToFile(dtdURL, dtd);
InputSource inputSource = new InputSource(FileUtils.openInputStream(dtd));
FileUtils.deleteQuietly(dtd);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DurableClientCommandsController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DurableClientCommandsController.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DurableClientCommandsController.java
index 28c7f49..3bf07d0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DurableClientCommandsController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DurableClientCommandsController.java
@@ -16,16 +16,12 @@
*/
package com.gemstone.gemfire.management.internal.web.controllers;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-
import org.springframework.stereotype.Controller;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RequestMethod;
-import org.springframework.web.bind.annotation.RequestParam;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
/**
* The DurableClientCommandsController class implements GemFire Management REST API web service endpoints for the
@@ -48,7 +44,7 @@ public class DurableClientCommandsController extends AbstractCommandsController
@RequestMapping(method = RequestMethod.GET, value = "/durable-clients/{durable-client-id}/cqs")
@ResponseBody
- public String listDurableClientContinuousQueries(@PathVariable("durable-client-id") final String durableClientId,
+ public String listDurableClientContinuousQueries(@PathVariable(SystemConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
@RequestParam(value = CliStrings.LIST_DURABLE_CQS__MEMBER, required = false) final String memberNameId,
@RequestParam(value = CliStrings.LIST_DURABLE_CQS__GROUP, required = false) final String[] groups)
{
@@ -69,7 +65,7 @@ public class DurableClientCommandsController extends AbstractCommandsController
@RequestMapping(method = RequestMethod.GET, value = "/durable-clients/{durable-client-id}/cqs/events")
@ResponseBody
- public String countDurableClientContinuousQueryEvents(@PathVariable("durable-client-id") final String durableClientId,
+ public String countDurableClientContinuousQueryEvents(@PathVariable(SystemConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
@RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER, required = false) final String memberNameId,
@RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP, required = false) final String[] groups)
{
@@ -78,7 +74,7 @@ public class DurableClientCommandsController extends AbstractCommandsController
@RequestMapping(method = RequestMethod.GET, value = "/durable-clients/{durable-client-id}/cqs/{durable-cq-name}/events")
@ResponseBody
- public String countDurableClientContinuousQueryEvents(@PathVariable("durable-client-id") final String durableClientId,
+ public String countDurableClientContinuousQueryEvents(@PathVariable(SystemConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
@PathVariable("durable-cq-name") final String durableCqName,
@RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__MEMBER, required = false) final String memberNameId,
@RequestParam(value = CliStrings.COUNT_DURABLE_CQ_EVENTS__GROUP, required = false) final String[] groups)
@@ -112,7 +108,7 @@ public class DurableClientCommandsController extends AbstractCommandsController
@RequestMapping(method = RequestMethod.POST, value = "/durable-clients/{durable-client-id}", params = "op=close")
@ResponseBody
- public String closeDurableClient(@PathVariable("durable-client-id") final String durableClientId,
+ public String closeDurableClient(@PathVariable(SystemConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
@RequestParam(value = CliStrings.CLOSE_DURABLE_CLIENTS__MEMBER, required = false) final String memberNameId,
@RequestParam(value = CliStrings.CLOSE_DURABLE_CLIENTS__GROUP, required = false) final String[] groups)
{
@@ -133,7 +129,7 @@ public class DurableClientCommandsController extends AbstractCommandsController
@RequestMapping(method = RequestMethod.POST, value = "/durable-clients/{durable-client-id}/cqs/{durable-cq-name}", params = "op=close")
@ResponseBody
- public String closeDurableContinuousQuery(@PathVariable("durable-client-id") final String durableClientId,
+ public String closeDurableContinuousQuery(@PathVariable(SystemConfigurationProperties.DURABLE_CLIENT_ID) final String durableClientId,
@PathVariable("durable-cq-name")final String durableCqName,
@RequestParam(value = CliStrings.CLOSE_DURABLE_CQS__MEMBER, required = false) final String memberNameId,
@RequestParam(value = CliStrings.CLOSE_DURABLE_CQS__GROUP, required = false) final String[] groups)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptor.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptor.java
index cefec91..13face2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/support/LoginHandlerInterceptor.java
@@ -16,22 +16,22 @@
*/
package com.gemstone.gemfire.management.internal.web.controllers.support;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Map;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
import com.gemstone.gemfire.management.internal.security.ResourceConstants;
import com.gemstone.gemfire.security.Authenticator;
-import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
-
import org.apache.logging.log4j.Logger;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
+
/**
* The GetEnvironmentHandlerInterceptor class handles extracting Gfsh environment variables encoded in the HTTP request
* message as request parameters.
@@ -59,7 +59,7 @@ public class LoginHandlerInterceptor extends HandlerInterceptorAdapter {
protected static final String ENVIRONMENT_VARIABLE_REQUEST_PARAMETER_PREFIX = "vf.gf.env.";
- protected static final String SECURITY_VARIABLE_REQUEST_HEADER_PREFIX = "security-";
+ protected static final String SECURITY_VARIABLE_REQUEST_HEADER_PREFIX = DistributionConfig.SECURITY_PREFIX_NAME;
public static Map<String, String> getEnvironment() {
return ENV.get();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/AutoSerializableManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/AutoSerializableManager.java b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/AutoSerializableManager.java
index 5d66622..f8ed28d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/AutoSerializableManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/AutoSerializableManager.java
@@ -16,6 +16,17 @@
*/
package com.gemstone.gemfire.pdx.internal;
+import com.gemstone.gemfire.CancelException;
+import com.gemstone.gemfire.cache.RegionService;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.CopyOnWriteHashSet;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.util.concurrent.CopyOnWriteWeakHashMap;
+import com.gemstone.gemfire.pdx.*;
+import com.gemstone.gemfire.pdx.internal.unsafe.UnsafeWrapper;
+import org.apache.logging.log4j.Logger;
+
import java.io.Externalizable;
import java.io.ObjectOutputStream;
import java.io.Serializable;
@@ -23,36 +34,11 @@ import java.lang.ref.WeakReference;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
+import java.util.*;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.regex.Pattern;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.cache.RegionService;
-import com.gemstone.gemfire.internal.CopyOnWriteHashSet;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.util.concurrent.CopyOnWriteWeakHashMap;
-import com.gemstone.gemfire.pdx.FieldType;
-import com.gemstone.gemfire.pdx.NonPortableClassException;
-import com.gemstone.gemfire.pdx.PdxReader;
-import com.gemstone.gemfire.pdx.PdxSerializationException;
-import com.gemstone.gemfire.pdx.PdxWriter;
-import com.gemstone.gemfire.pdx.ReflectionBasedAutoSerializer;
-import com.gemstone.gemfire.pdx.internal.unsafe.UnsafeWrapper;
-
/**
* The core of auto serialization which is used in both aspect and
* reflection-based auto-serialization. This simple manager class is a singleton
@@ -95,7 +81,7 @@ public class AutoSerializableManager {
* testing as well as possibly debugging future customer issues.
*/
private static final String NO_HARDCODED_EXCLUDES_PARAM =
- "gemfire.auto.serialization.no.hardcoded.excludes";
+ DistributionConfig.GEMFIRE_PREFIX + "auto.serialization.no.hardcoded.excludes";
private boolean noHardcodedExcludes =
Boolean.getBoolean(NO_HARDCODED_EXCLUDES_PARAM);
@@ -595,16 +581,16 @@ public class AutoSerializableManager {
static {
UnsafeWrapper tmp = null;
// only use Unsafe if SAFE was not explicitly requested
- if (!Boolean.getBoolean("gemfire.AutoSerializer.SAFE")) {
+ if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "AutoSerializer.SAFE")) {
try {
tmp = new UnsafeWrapper();
// only throw an exception if UNSAFE was explicitly requested
} catch (RuntimeException ex) {
- if (Boolean.getBoolean("gemfire.AutoSerializer.UNSAFE")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "AutoSerializer.UNSAFE")) {
throw ex;
}
} catch (Error ex) {
- if (Boolean.getBoolean("gemfire.AutoSerializer.UNSAFE")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "AutoSerializer.UNSAFE")) {
throw ex;
}
}
@@ -1905,8 +1891,8 @@ public class AutoSerializableManager {
autoClassInfo.setSerializedType(w.getAutoPdxType());
}
}
-
- private static final boolean USE_CONSTRUCTOR = !Boolean.getBoolean("gemfire.autopdx.ignoreConstructor");
+
+ private static final boolean USE_CONSTRUCTOR = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "autopdx.ignoreConstructor");
/**
* Using the given PdxReader, recreate the given object.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxWriterImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxWriterImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxWriterImpl.java
index 9a08909..1f40a4d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxWriterImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxWriterImpl.java
@@ -16,27 +16,21 @@
*/
package com.gemstone.gemfire.pdx.internal;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.Date;
-
import com.gemstone.gemfire.InternalGemFireException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.DSCODE;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.InternalDataSerializer;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSource;
-import com.gemstone.gemfire.pdx.FieldType;
-import com.gemstone.gemfire.pdx.PdxFieldAlreadyExistsException;
-import com.gemstone.gemfire.pdx.PdxFieldDoesNotExistException;
-import com.gemstone.gemfire.pdx.PdxInstance;
-import com.gemstone.gemfire.pdx.PdxSerializable;
-import com.gemstone.gemfire.pdx.PdxSerializationException;
-import com.gemstone.gemfire.pdx.PdxUnreadFields;
-import com.gemstone.gemfire.pdx.PdxWriter;
+import com.gemstone.gemfire.pdx.*;
import com.gemstone.gemfire.pdx.internal.AutoSerializableManager.AutoClassInfo;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.Date;
+
/**
* A new instance of this class is created for each (nested) instance of
* {@link PdxSerializable}. But it may share the underlying instance
@@ -89,7 +83,7 @@ public class PdxWriterImpl implements PdxWriter {
* This property should only be set when debugging new code since it will slow down
* pdx serialization.
*/
- private static final boolean sysPropDoExtraPdxValidation = Boolean.getBoolean("gemfire.validatePdxWriters");
+ private static final boolean sysPropDoExtraPdxValidation = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "validatePdxWriters");
private boolean doExtraValidation = sysPropDoExtraPdxValidation;
public PdxWriterImpl(TypeRegistry tr, Object pdx, PdxOutputStream out) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
index 4a77018..22b964f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/pdx/internal/TypeRegistry.java
@@ -16,15 +16,11 @@
*/
package com.gemstone.gemfire.pdx.internal;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.DiskStore;
import com.gemstone.gemfire.cache.DiskStoreFactory;
import com.gemstone.gemfire.cache.wan.GatewaySender;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.InternalDataSerializer;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -35,13 +31,17 @@ import com.gemstone.gemfire.internal.util.concurrent.CopyOnWriteWeakHashMap;
import com.gemstone.gemfire.pdx.PdxSerializationException;
import com.gemstone.gemfire.pdx.PdxSerializer;
import com.gemstone.gemfire.pdx.ReflectionBasedAutoSerializer;
+import org.apache.logging.log4j.Logger;
+
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
public class TypeRegistry {
private static final Logger logger = LogService.getLogger();
-
- private static final boolean DISABLE_TYPE_REGISTRY
- = Boolean.getBoolean("gemfire.TypeRegistry.DISABLE_PDX_REGISTRY");
+
+ private static final boolean DISABLE_TYPE_REGISTRY
+ = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "TypeRegistry.DISABLE_PDX_REGISTRY");
private final Map<Integer, PdxType> idToType = new CopyOnWriteHashMap<Integer, PdxType>();
private final Map<PdxType, Integer> typeToId = new CopyOnWriteHashMap<PdxType, Integer>();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java b/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
index 1114a68..47402a7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/redis/GemFireRedisServer.java
@@ -16,15 +16,18 @@
*/
package com.gemstone.gemfire.redis;
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.hll.HyperLogLogPlus;
+import com.gemstone.gemfire.internal.redis.*;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.buffer.PooledByteBufAllocator;
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelFuture;
-import io.netty.channel.ChannelInitializer;
-import io.netty.channel.ChannelOption;
-import io.netty.channel.ChannelPipeline;
-import io.netty.channel.EventLoopGroup;
-import io.netty.channel.ServerChannel;
+import io.netty.channel.*;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.oio.OioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
@@ -38,34 +41,9 @@ import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.util.Collection;
import java.util.Map.Entry;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledFuture;
-import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.redis.ByteArrayWrapper;
-import com.gemstone.gemfire.internal.redis.ByteToCommandDecoder;
-import com.gemstone.gemfire.internal.redis.Coder;
-import com.gemstone.gemfire.internal.redis.ExecutionHandlerContext;
-import com.gemstone.gemfire.internal.redis.RedisDataType;
-import com.gemstone.gemfire.internal.redis.RegionProvider;
-import com.gemstone.gemfire.internal.hll.HyperLogLogPlus;
-
/**
* The GemFireRedisServer is a server that understands the Redis protocol. As
* commands are sent to the server, each command is picked up by a thread,
@@ -405,7 +383,7 @@ public class GemFireRedisServer {
if (c == null) {
CacheFactory cacheFactory = new CacheFactory();
if (logLevel != null)
- cacheFactory.set("log-level", logLevel);
+ cacheFactory.set(DistributionConfig.LOG_LEVEL_NAME, logLevel);
c = cacheFactory.create();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/resources/com/gemstone/gemfire/internal/i18n/StringIdResourceBundle_ja.txt
----------------------------------------------------------------------
diff --git a/geode-core/src/main/resources/com/gemstone/gemfire/internal/i18n/StringIdResourceBundle_ja.txt b/geode-core/src/main/resources/com/gemstone/gemfire/internal/i18n/StringIdResourceBundle_ja.txt
index 041e5f3..a20426b 100644
--- a/geode-core/src/main/resources/com/gemstone/gemfire/internal/i18n/StringIdResourceBundle_ja.txt
+++ b/geode-core/src/main/resources/com/gemstone/gemfire/internal/i18n/StringIdResourceBundle_ja.txt
@@ -2763,7 +2763,7 @@
3958 = <vmarg> \u8d77\u52d5\u3057\u305fCacheServer VM\u306b\u6e21\u3055\u308c\u308bVM\u30aa\u30d7\u30b7\u30e7\u30f3\u3002\u4f8b: -J-Xmx1024M\uff081 GB\u306e\u30d2\u30fc\u30d7\u306e\u5834\u5408\uff09
3959 = <dir> \u30ad\u30e3\u30c3\u30b7\u30e5\u30fb\u30b5\u30fc\u30d0\u30fc\u304c\u5b9f\u884c\u3055\u308c\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3002\u30c7\u30d5\u30a9\u30eb\u30c8\u306f\u73fe\u5728\u306e\u30c7\u30a3\u30ec\u30af\u30c8\u30ea
3960 = <classpath> \u30ad\u30e3\u30c3\u30b7\u30e5\u30fb\u30b5\u30fc\u30d0\u30fc\u3067\u5fc5\u8981\u306a\u30e6\u30fc\u30b6\u30fc\u30fb\u30af\u30e9\u30b9\u306e\u5834\u6240\u3002\u3053\u306e\u30d1\u30b9\u306f\u3001\u73fe\u5728\u306eclasspath\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002
-3961 = <attName> "mcast-port"\u3084"cache-xml-file"\u306a\u3069\u306e\u5206\u6563\u30b7\u30b9\u30c6\u30e0\u5c5e\u6027\u3002
+3961 = <attName> DistributionConfig.MCAST_PORT_NAME\u3084"cache-xml-file"\u306a\u3069\u306e\u5206\u6563\u30b7\u30b9\u30c6\u30e0\u5c5e\u6027\u3002
3962 = GemFire CacheServer VM\u3092\u505c\u6b62\u3057\u307e\u3059
3963 = GemFire CacheServer VM\u306e\u30b9\u30c6\u30fc\u30bf\u30b9\u304a\u3088\u3073\u30d7\u30ed\u30bb\u30b9ID\u3092\u901a\u77e5\u3057\u307e\u3059
3964 = \u30b5\u30fc\u30d0\u30fc\u30fb\u30d7\u30ed\u30bb\u30b9\u8d77\u52d5\u4e2d\u306e\u30a8\u30e9\u30fc\u3002
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/CopyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/CopyJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/CopyJUnitTest.java
index 2944d8e..421ac7e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/CopyJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/CopyJUnitTest.java
@@ -16,22 +16,22 @@
*/
package com.gemstone.gemfire;
-import static org.junit.Assert.*;
-
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.*;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.pdx.WritablePdxInstance;
-import com.gemstone.gemfire.cache.util.*;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Tests the functionality of the {@link CopyHelper#copy} method
@@ -51,7 +51,7 @@ public class CopyJUnitTest {
private void createCache(boolean copyOnRead) throws CacheException {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
+ p.setProperty(MCAST_PORT, "0"); // loner
this.cache = CacheFactory.create(DistributedSystem.connect(p));
this.cache.setCopyOnRead(copyOnRead);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
index ca0cb47..bccf229 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/DiskInstantiatorsJUnitTest.java
@@ -16,22 +16,26 @@
*/
package com.gemstone.gemfire;
-import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.distributed.*;
-import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.InternalInstantiator;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import java.util.Properties;
-import java.io.*;
-
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
+
/**
* This class makes sure that instantatiors are persisted to disk
* and can be recovered.
@@ -71,9 +75,9 @@ public class DiskInstantiatorsJUnitTest {
private void connect() throws CacheException {
Properties cfg = new Properties();
- cfg.setProperty("mcast-port", "0");
- cfg.setProperty("locators", "");
- cfg.setProperty("statistic-sampling-enabled", "false");
+ cfg.setProperty(MCAST_PORT, "0");
+ cfg.setProperty(LOCATORS, "");
+ cfg.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
this.ds = DistributedSystem.connect(cfg);
this.c = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
index 5e55ac0..30b5c27 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
@@ -16,18 +16,20 @@
*/
package com.gemstone.gemfire;
-import static org.junit.Assert.*;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.*;
-
-import java.util.*;
-
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.TestName;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+
/**
* This is an abstract superclass for classes that test GemFire. It
* has setUp() and tearDown() methods that create and initialize a
@@ -44,9 +46,9 @@ public abstract class GemFireTestCase {
public void setUp() throws Exception {
Properties p = new Properties();
// make it a loner
- p.setProperty("mcast-port", "0");
- p.setProperty("locators", "");
- p.setProperty(DistributionConfig.NAME_NAME, getName());
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
+ p.setProperty(SystemConfigurationProperties.NAME, getName());
DistributedSystem.connect(p);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/JtaNoninvolvementJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/JtaNoninvolvementJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/JtaNoninvolvementJUnitTest.java
index ad56bab..a24708d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/JtaNoninvolvementJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/JtaNoninvolvementJUnitTest.java
@@ -16,27 +16,25 @@
*/
package com.gemstone.gemfire;
-import static org.junit.Assert.*;
-
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.jndi.JNDIInvoker;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import java.util.*;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import javax.naming.NamingException;
-import javax.transaction.UserTransaction;
-
import org.junit.After;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runners.MethodSorters;
+import javax.transaction.UserTransaction;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+
/**
* Ensure that the ignoreJTA Region setting works
*
@@ -53,7 +51,7 @@ public class JtaNoninvolvementJUnitTest {
private void createCache(boolean copyOnRead) throws CacheException {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
+ p.setProperty(MCAST_PORT, "0"); // loner
this.cache = CacheFactory.create(DistributedSystem.connect(p));
AttributesFactory af = new AttributesFactory();
@@ -161,7 +159,7 @@ public class JtaNoninvolvementJUnitTest {
public void test002IgnoreJTASysProp() throws Exception {
javax.transaction.UserTransaction ut = null;
try {
- System.setProperty("gemfire.ignoreJTA", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "ignoreJTA", "true");
createCache(false);
ut =
(UserTransaction) cache.getJNDIContext().lookup("java:/UserTransaction");
@@ -173,7 +171,7 @@ public class JtaNoninvolvementJUnitTest {
} finally {
closeCache();
cache = null;
- System.setProperty("gemfire.ignoreJTA", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "ignoreJTA", "false");
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
index 700ea4f..5ccbc98 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
@@ -17,12 +17,15 @@
package com.gemstone.gemfire;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
-import java.util.*;
+import java.util.Properties;
-import org.junit.experimental.categories.Category;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests the functionality of JOM {@link Statistics}.
@@ -37,11 +40,11 @@ public class LocalStatisticsJUnitTest extends StatisticsTestCase {
protected DistributedSystem getSystem() {
if (this.system == null) {
Properties props = new Properties();
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("statistic-archive-file", "StatisticsTestCase-localTest.gfs");
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty(DistributionConfig.NAME_NAME, getName());
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "StatisticsTestCase-localTest.gfs");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(SystemConfigurationProperties.NAME, getName());
this.system = DistributedSystem.connect(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
index eab238e..bbc485f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
@@ -16,23 +16,27 @@
*/
package com.gemstone.gemfire;
-import static org.junit.Assert.*;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
-import com.gemstone.gemfire.internal.*;
-import com.gemstone.gemfire.distributed.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.internal.OSProcess;
+import com.gemstone.gemfire.internal.PureJavaMode;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import java.util.Properties;
-import java.net.*;
-
import org.junit.After;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+
/**
* This class makes sure an isolated "loner" distribution manager
* can be created and do some cache functions.
@@ -56,9 +60,9 @@ public class LonerDMJUnitTest {
DistributedSystem ds = null;
Cache c = null;
Properties cfg = new Properties();
- cfg.setProperty("mcast-port", "0");
- cfg.setProperty("locators", "");
- cfg.setProperty("statistic-sampling-enabled", "false");
+ cfg.setProperty(MCAST_PORT, "0");
+ cfg.setProperty(LOCATORS, "");
+ cfg.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
for (int i=0; i < 2; i++) {
start = System.currentTimeMillis();
@@ -109,10 +113,10 @@ public class LonerDMJUnitTest {
DistributedSystem ds = null;
Cache c = null;
Properties cfg = new Properties();
- cfg.setProperty("mcast-port", "0");
- cfg.setProperty("locators", "");
- cfg.setProperty("statistic-sampling-enabled", "true");
- cfg.setProperty("statistic-archive-file", "lonerStats.gfs");
+ cfg.setProperty(MCAST_PORT, "0");
+ cfg.setProperty(LOCATORS, "");
+ cfg.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ cfg.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "lonerStats.gfs");
for (int i=0; i < 1; i++) {
start = System.currentTimeMillis();
@@ -162,10 +166,10 @@ public class LonerDMJUnitTest {
String name = "Foo";
Properties cfg = new Properties();
- cfg.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- cfg.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ cfg.setProperty(MCAST_PORT, "0");
+ cfg.setProperty(LOCATORS, "");
cfg.setProperty(DistributionConfig.ROLES_NAME, "lonelyOne");
- cfg.setProperty(DistributionConfig.NAME_NAME, name);
+ cfg.setProperty(SystemConfigurationProperties.NAME, name);
DistributedSystem ds = DistributedSystem.connect(cfg);
System.out.println("MemberId = " + ds.getMemberId());
assertEquals(host.toString(), ds.getDistributedMember().getHost());
[62/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/ff81dbfc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/ff81dbfc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/ff81dbfc
Branch: refs/heads/develop
Commit: ff81dbfc6fe193f30d9607fa39be6c8f72b56688
Parents: 8975cbd
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue May 31 12:02:27 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../LauncherLifecycleCommandsJUnitTest.java | 2 +-
.../SharedConfigurationEndToEndDUnitTest.java | 4 +--
.../gemfire/admin/DistributedSystemConfig.java | 2 +-
.../gemfire/distributed/AbstractLauncher.java | 2 +-
.../gemfire/distributed/LocatorLauncher.java | 6 ++--
.../gemfire/distributed/ServerLauncher.java | 6 ++--
.../SystemConfigurationProperties.java | 4 +--
.../internal/AbstractDistributionConfig.java | 2 +-
.../internal/DistributionConfig.java | 2 +-
.../internal/DistributionConfigImpl.java | 4 +--
.../internal/SharedConfiguration.java | 4 ++-
.../internal/cli/help/utils/HelpUtils.java | 4 +--
.../com/gemstone/gemfire/GemFireTestCase.java | 2 +-
.../gemfire/LocalStatisticsJUnitTest.java | 2 +-
.../com/gemstone/gemfire/LonerDMJUnitTest.java | 2 +-
.../functional/IndexCreationJUnitTest.java | 12 ++++----
.../DistributedMulticastRegionDUnitTest.java | 2 +-
.../distributed/AbstractLauncherTest.java | 32 ++++++++++----------
.../distributed/DistributedMemberDUnitTest.java | 14 ++++-----
.../LocatorLauncherIntegrationTest.java | 2 +-
.../LocatorLauncherLocalIntegrationTest.java | 24 +++++++--------
.../distributed/LocatorLauncherTest.java | 6 ++--
.../ServerLauncherIntegrationTest.java | 2 +-
.../ServerLauncherLocalIntegrationTest.java | 2 +-
.../gemfire/distributed/ServerLauncherTest.java | 6 ++--
.../internal/DistributionManagerDUnitTest.java | 8 ++---
.../InternalDistributedSystemJUnitTest.java | 4 +--
.../cache/DiskRegCacheXmlJUnitTest.java | 2 +-
.../DiskRegCachexmlGeneratorJUnitTest.java | 2 +-
...ributedRegionFunctionExecutionDUnitTest.java | 2 +-
.../cli/HeadlessGfshIntegrationTest.java | 2 +-
.../cli/commands/CliCommandTestBase.java | 4 +--
.../cli/commands/ConfigCommandsDUnitTest.java | 20 ++++++------
...eateAlterDestroyRegionCommandsDUnitTest.java | 8 ++---
.../cli/commands/DeployCommandsDUnitTest.java | 14 ++++-----
.../commands/DiskStoreCommandsDUnitTest.java | 14 ++++-----
.../cli/commands/FunctionCommandsDUnitTest.java | 14 ++++-----
.../commands/GemfireDataCommandsDUnitTest.java | 2 +-
...WithCacheLoaderDuringCacheMissDUnitTest.java | 4 +--
.../cli/commands/IndexCommandsDUnitTest.java | 4 +--
...stAndDescribeDiskStoreCommandsDUnitTest.java | 4 +--
.../ListAndDescribeRegionDUnitTest.java | 2 +-
.../cli/commands/ListIndexCommandDUnitTest.java | 4 +--
.../cli/commands/MemberCommandsDUnitTest.java | 2 +-
.../MiscellaneousCommandsDUnitTest.java | 4 +--
...laneousCommandsExportLogsPart3DUnitTest.java | 2 +-
.../cli/commands/QueueCommandsDUnitTest.java | 6 ++--
.../SharedConfigurationCommandsDUnitTest.java | 4 +--
.../cli/commands/ShowMetricsDUnitTest.java | 6 ++--
.../cli/commands/ShowStackTraceDUnitTest.java | 2 +-
.../SharedConfigurationDUnitTest.java | 8 ++---
.../SharedConfigurationUsingDirDUnitTest.java | 2 +-
.../JsonAuthorizationCacheStartRule.java | 2 +-
.../internal/security/ShiroCacheStartRule.java | 2 +-
54 files changed, 151 insertions(+), 153 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
index b97cef3..97251a6 100755
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
@@ -103,7 +103,7 @@ public class LauncherLifecycleCommandsJUnitTest {
gemfireProperties.setProperty(LOG_LEVEL, "config");
gemfireProperties.setProperty(LOG_FILE, StringUtils.EMPTY_STRING);
gemfireProperties.setProperty(MCAST_PORT, "0");
- gemfireProperties.setProperty(SystemConfigurationProperties.NAME, "tidepool");
+ gemfireProperties.setProperty(NAME, "tidepool");
getLauncherLifecycleCommands().addGemFireSystemProperties(commandLine, gemfireProperties);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
index d03e211..5c3d99f 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
@@ -345,7 +345,7 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorLogPath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, locator1Name);
+ locatorProps.setProperty(NAME, locator1Name);
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(SystemConfigurationProperties.LOG_LEVEL, "config");
locatorProps.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "true");
@@ -393,7 +393,7 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(SystemConfigurationProperties.LOCATORS, "localhost:" + locator1Port);
- localProps.setProperty(SystemConfigurationProperties.NAME, "DataMember");
+ localProps.setProperty(NAME, "DataMember");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
index a060c96..1c53e42 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
@@ -81,7 +81,7 @@ public interface DistributedSystemConfig extends Cloneable {
String DEFAULT_SYSTEM_ID = "Default System";
/** The name of the "name" property. See {@link #getSystemName()}. */
- String NAME_NAME = SystemConfigurationProperties.NAME;
+ String NAME_NAME = NAME;
/** The default value of the "name" property (""). See {@link #getSystemName()}. */
String DEFAULT_NAME = "";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
index 9be157c..cc27a03 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
@@ -285,7 +285,7 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
}
if (!StringUtils.isBlank(getMemberName())) {
- distributedSystemProperties.setProperty(SystemConfigurationProperties.NAME, getMemberName());
+ distributedSystemProperties.setProperty(NAME, getMemberName());
}
// Set any other GemFire Distributed System/Distribution Config directory-based properties as necessary
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
index 1e350e7..f759886 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
@@ -1711,9 +1711,9 @@ public final class LocatorLauncher extends AbstractLauncher<String> {
protected void validateOnStart() {
if (Command.START.equals(getCommand())) {
if (StringUtils.isBlank(getMemberName())
- && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME)
- && !isSet(getDistributedSystemProperties(), SystemConfigurationProperties.NAME)
- && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), SystemConfigurationProperties.NAME))
+ && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + NAME)
+ && !isSet(getDistributedSystemProperties(), NAME)
+ && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), NAME))
{
throw new IllegalStateException(LocalizedStrings.Launcher_Builder_MEMBER_NAME_VALIDATION_ERROR_MESSAGE
.toLocalizedString("Locator"));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
index fe441fd..f19ce09 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
@@ -2264,9 +2264,9 @@ public class ServerLauncher extends AbstractLauncher<String> {
protected void validateOnStart() {
if (Command.START.equals(getCommand())) {
if (StringUtils.isBlank(getMemberName())
- && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME)
- && !isSet(getDistributedSystemProperties(), SystemConfigurationProperties.NAME)
- && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), SystemConfigurationProperties.NAME))
+ && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + NAME)
+ && !isSet(getDistributedSystemProperties(), NAME)
+ && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), NAME))
{
throw new IllegalStateException(LocalizedStrings.Launcher_Builder_MEMBER_NAME_VALIDATION_ERROR_MESSAGE
.toLocalizedString("Server"));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
index c451708..df320b2 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
@@ -16,7 +16,6 @@
*/
package com.gemstone.gemfire.distributed;
-import com.gemstone.gemfire.distributed.internal.ConfigAttribute;
/**
* Created by ukohlmeyer on 26/05/2016.
@@ -130,9 +129,8 @@ public interface SystemConfigurationProperties {
String MEMCACHED_PROTOCOL = "memcached-protocol";
/**
- * The name of the "name" property
+ * The "name" property, representing the system's name
*/
- @ConfigAttribute(type = String.class)
String NAME = "name";
String REDUNDANCY_ZONE = "redundancy-zone";
String REMOTE_LOCATORS = "remote-locators";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index 98c3faf..4212bb3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -809,7 +809,7 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_SERVER_BIND_ADDRESS_NAME_0
.toLocalizedString(DEFAULT_BIND_ADDRESS));
- m.put(SystemConfigurationProperties.NAME, "A name that uniquely identifies a member in its distributed system." +
+ m.put(NAME, "A name that uniquely identifies a member in its distributed system." +
" Multiple members in the same distributed system can not have the same name." +
" Defaults to \"\".");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index dbd9c79..1cce999 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -79,7 +79,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
void setName(String value);
/**
- * The name of the "name" property
+ * The "name" property, representing the system's name
*/
@ConfigAttribute(type = String.class)
String NAME_NAME = NAME;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 196d8f3..e8e4f3b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -35,8 +35,6 @@ import java.net.URL;
import java.net.UnknownHostException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
-
/**
* Provides an implementation of <code>DistributionConfig</code> that
* knows how to read the configuration file.
@@ -1574,7 +1572,7 @@ public class DistributionConfigImpl
if (value == null) {
value = DEFAULT_NAME;
}
- this.name = (String) checkAttribute(SystemConfigurationProperties.NAME, value);
+ this.name = (String) checkAttribute(NAME, value);
}
public void setTcpPort(int value) {
this.tcpPort = (Integer) checkAttribute(TCP_PORT, value);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
index ccccee3..3493a87 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/SharedConfiguration.java
@@ -83,6 +83,8 @@ import com.gemstone.gemfire.management.internal.configuration.messages.SharedCon
import com.gemstone.gemfire.management.internal.configuration.utils.XmlUtils;
import com.gemstone.gemfire.management.internal.configuration.utils.ZipUtils;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
@SuppressWarnings({ "deprecation", "unchecked" })
public class SharedConfiguration {
@@ -142,7 +144,7 @@ public class SharedConfiguration {
public SharedConfiguration(Cache cache) throws IOException {
this.cache = (GemFireCacheImpl)cache;
this.configDiskDirName = CLUSTER_CONFIG_DISK_DIR_PREFIX + cache.getDistributedSystem().getName();
- String clusterConfigDir = cache.getDistributedSystem().getProperties().getProperty(DistributionConfig.CLUSTER_CONFIGURATION_DIR);
+ String clusterConfigDir = cache.getDistributedSystem().getProperties().getProperty(CLUSTER_CONFIGURATION_DIR);
if (StringUtils.isBlank(clusterConfigDir)) {
clusterConfigDir = System.getProperty("user.dir");
} else {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
index bf71373..b15feda 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
@@ -74,7 +74,7 @@ public class HelpUtils {
public static Help getHelp(CommandTarget commandTarget) {
List<Block> blocks = new ArrayList<Block>();
// First we will have the block for NAME of the command
- blocks.add(block(SystemConfigurationProperties.NAME, row(commandTarget.getCommandName())));
+ blocks.add(block(NAME, row(commandTarget.getCommandName())));
// Now add synonyms if any
if (commandTarget.getSynonyms() != null) {
blocks.add(block(SYNONYMS_NAME, row(commandTarget.getSynonyms())));
@@ -186,7 +186,7 @@ public class HelpUtils {
public static NewHelp getNewHelp(CommandTarget commandTarget, boolean withinShell) {
DataNode root = new DataNode(null, new ArrayList<DataNode>());
// First we will have the block for NAME of the command
- DataNode name = new DataNode(SystemConfigurationProperties.NAME, new ArrayList<DataNode>());
+ DataNode name = new DataNode(NAME, new ArrayList<DataNode>());
name.addChild(new DataNode(commandTarget.getCommandName(), null));
root.addChild(name);
if (withinShell) {// include availabilty info
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
index 30b5c27..cd4e615 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
@@ -48,7 +48,7 @@ public abstract class GemFireTestCase {
// make it a loner
p.setProperty(MCAST_PORT, "0");
p.setProperty(LOCATORS, "");
- p.setProperty(SystemConfigurationProperties.NAME, getName());
+ p.setProperty(NAME, getName());
DistributedSystem.connect(p);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
index dccdf79..5270738 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/LocalStatisticsJUnitTest.java
@@ -42,7 +42,7 @@ public class LocalStatisticsJUnitTest extends StatisticsTestCase {
props.setProperty(STATISTIC_ARCHIVE_FILE, "StatisticsTestCase-localTest.gfs");
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(SystemConfigurationProperties.NAME, getName());
+ props.setProperty(NAME, getName());
this.system = DistributedSystem.connect(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
index 09605c7..dedfa67 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/LonerDMJUnitTest.java
@@ -168,7 +168,7 @@ public class LonerDMJUnitTest {
cfg.setProperty(MCAST_PORT, "0");
cfg.setProperty(LOCATORS, "");
cfg.setProperty(ROLES, "lonelyOne");
- cfg.setProperty(SystemConfigurationProperties.NAME, name);
+ cfg.setProperty(NAME, name);
DistributedSystem ds = DistributedSystem.connect(cfg);
System.out.println("MemberId = " + ds.getMemberId());
assertEquals(host.toString(), ds.getDistributedMember().getHost());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
index 3128dc7..17763d2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
@@ -849,7 +849,7 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(NAME, "test");
props.setProperty(MCAST_PORT, "0");
props.setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-creation-with-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
@@ -873,7 +873,7 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(NAME, "test");
props.setProperty(MCAST_PORT, "0");
//Using a different cache.xml that changes some region properties
//That will force the disk code to copy the region entries.
@@ -899,7 +899,7 @@ public class IndexCreationJUnitTest{
file.mkdir();
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(NAME, "test");
props.setProperty(MCAST_PORT, "0");
props
.setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
@@ -927,7 +927,7 @@ public class IndexCreationJUnitTest{
file.mkdir();
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(NAME, "test");
props.setProperty(MCAST_PORT, "0");
props
.setProperty(CACHE_XML_FILE, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
@@ -956,7 +956,7 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(NAME, "test");
props.setProperty(MCAST_PORT, "0");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
@@ -990,7 +990,7 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(NAME, "test");
props.setProperty(MCAST_PORT, "0");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
index 3104892..e7aaf0c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedMulticastRegionDUnitTest.java
@@ -271,7 +271,7 @@ public class DistributedMulticastRegionDUnitTest extends CacheTestCase {
public Object call() {
final File locatorLogFile = new File(getTestMethodName() + "-locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "LocatorWithMcast");
+ locatorProps.setProperty(NAME, "LocatorWithMcast");
locatorProps.setProperty(MCAST_PORT, mcastport);
locatorProps.setProperty(MCAST_TTL, mcastttl);
locatorProps.setProperty(LOG_LEVEL, "info");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
index 96e88c3..1d05217 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
@@ -70,22 +70,22 @@ public class AbstractLauncherTest {
public void testIsSet() {
final Properties properties = new Properties();
- assertFalse(properties.containsKey(SystemConfigurationProperties.NAME));
- assertFalse(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
+ assertFalse(properties.containsKey(NAME));
+ assertFalse(AbstractLauncher.isSet(properties, NAME));
- properties.setProperty(SystemConfigurationProperties.NAME, "");
+ properties.setProperty(NAME, "");
- assertTrue(properties.containsKey(SystemConfigurationProperties.NAME));
- assertFalse(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
+ assertTrue(properties.containsKey(NAME));
+ assertFalse(AbstractLauncher.isSet(properties, NAME));
- properties.setProperty(SystemConfigurationProperties.NAME, " ");
+ properties.setProperty(NAME, " ");
- assertTrue(properties.containsKey(SystemConfigurationProperties.NAME));
- assertFalse(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
+ assertTrue(properties.containsKey(NAME));
+ assertFalse(AbstractLauncher.isSet(properties, NAME));
- properties.setProperty(SystemConfigurationProperties.NAME, "memberOne");
+ properties.setProperty(NAME, "memberOne");
- assertTrue(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
+ assertTrue(AbstractLauncher.isSet(properties, NAME));
assertFalse(AbstractLauncher.isSet(properties, "NaMe"));
}
@@ -114,8 +114,8 @@ public class AbstractLauncherTest {
Properties distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertTrue(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
- assertEquals("memberOne", distributedSystemProperties.getProperty(SystemConfigurationProperties.NAME));
+ assertTrue(distributedSystemProperties.containsKey(NAME));
+ assertEquals("memberOne", distributedSystemProperties.getProperty(NAME));
launcher = createAbstractLauncher(null, "22");
@@ -126,7 +126,7 @@ public class AbstractLauncherTest {
distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertFalse(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
+ assertFalse(distributedSystemProperties.containsKey(NAME));
launcher = createAbstractLauncher(StringUtils.EMPTY_STRING, "333");
@@ -137,7 +137,7 @@ public class AbstractLauncherTest {
distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertFalse(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
+ assertFalse(distributedSystemProperties.containsKey(NAME));
launcher = createAbstractLauncher(" ", "4444");
@@ -148,7 +148,7 @@ public class AbstractLauncherTest {
distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertFalse(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
+ assertFalse(distributedSystemProperties.containsKey(NAME));
}
@Test
@@ -166,7 +166,7 @@ public class AbstractLauncherTest {
Properties distributedSystemProperties = launcher.getDistributedSystemProperties(defaults);
assertNotNull(distributedSystemProperties);
- assertEquals(launcher.getMemberName(), distributedSystemProperties.getProperty(SystemConfigurationProperties.NAME));
+ assertEquals(launcher.getMemberName(), distributedSystemProperties.getProperty(NAME));
assertEquals("testValue", distributedSystemProperties.getProperty("testKey"));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
index 8dc0d03..3f13597 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
@@ -64,7 +64,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
config.setProperty(LOCATORS, "");
config.setProperty(ROLES, "");
config.setProperty(GROUPS, "");
- config.setProperty(SystemConfigurationProperties.NAME, "");
+ config.setProperty(NAME, "");
InternalDistributedSystem system = getSystem(config);
try {
@@ -93,7 +93,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(SystemConfigurationProperties.NAME, "nondefault");
+ config.setProperty(NAME, "nondefault");
InternalDistributedSystem system = getSystem(config);
try {
@@ -154,21 +154,21 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(SystemConfigurationProperties.NAME, "name0");
+ config.setProperty(NAME, "name0");
getSystem(config);
}
});
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(SystemConfigurationProperties.NAME, "name1");
+ config.setProperty(NAME, "name1");
getSystem(config);
}
});
Host.getHost(0).getVM(2).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(SystemConfigurationProperties.NAME, "name0");
+ config.setProperty(NAME, "name0");
try {
getSystem(config);
fail("expected IncompatibleSystemException");
@@ -363,7 +363,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
- config.setProperty(SystemConfigurationProperties.NAME, "foobar");
+ config.setProperty(NAME, "foobar");
InternalDistributedSystem system = getSystem(config);
try {
@@ -421,7 +421,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
@Override
public Object call() throws Exception {
Properties config = new Properties();
- config.setProperty(SystemConfigurationProperties.NAME, name);
+ config.setProperty(NAME, name);
DistributedSystem ds = getSystem(config);
return ds.getDistributedMember();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
index ba7e8c6..63e7b99 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
@@ -116,7 +116,7 @@ public class LocatorLauncherIntegrationTest {
public void testBuildWithMemberNameSetInGemFirePropertiesOnStart() throws Exception {
// given: gemfire.properties with a name
Properties gemfireProperties = new Properties();
- gemfireProperties.setProperty(SystemConfigurationProperties.NAME, "locator123");
+ gemfireProperties.setProperty(NAME, "locator123");
useGemFirePropertiesFileInTemporaryFolder(DistributionConfig.GEMFIRE_PREFIX + "properties", gemfireProperties);
// when: starting with null MemberName
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 4285ed9..8500399 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -71,7 +71,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setMemberName(getUniqueName())
.setPort(this.locatorPort)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(DISABLE_AUTO_RECONNECT, "true")
.set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0")
@@ -90,7 +90,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
assertEquals("true", distributedSystem.getProperties().getProperty(DISABLE_AUTO_RECONNECT));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
- assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
+ assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(NAME));
} catch (Throwable e) {
this.errorCollector.addError(e);
}
@@ -116,7 +116,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config")
.build();
@@ -168,7 +168,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
@@ -221,7 +221,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
@@ -339,7 +339,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config")
.build();
@@ -498,7 +498,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(freeTCPPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config")
.build();
@@ -550,7 +550,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config")
.build();
@@ -612,7 +612,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
@@ -675,7 +675,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
@@ -738,7 +738,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
@@ -790,7 +790,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setRedirectOutput(true)
.setWorkingDirectory(this.workingDirectory)
- .set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
+ .set(CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(LOG_LEVEL, "config");
assertFalse(builder.getForce());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
index 29d9b4c..e635af6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
@@ -314,18 +314,18 @@ public class LocatorLauncherTest {
LocatorLauncher launcher = new Builder()
.setCommand(LocatorLauncher.Command.START)
.setMemberName(null)
- .set(SystemConfigurationProperties.NAME, "locatorABC")
+ .set(NAME, "locatorABC")
.build();
assertNotNull(launcher);
assertEquals(LocatorLauncher.Command.START, launcher.getCommand());
assertNull(launcher.getMemberName());
- assertEquals("locatorABC", launcher.getProperties().getProperty(SystemConfigurationProperties.NAME));
+ assertEquals("locatorABC", launcher.getProperties().getProperty(NAME));
}
@Test
public void testBuildWithMemberNameSetInSystemPropertiesOnStart() {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME, "locatorXYZ");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + NAME, "locatorXYZ");
LocatorLauncher launcher = new Builder()
.setCommand(LocatorLauncher.Command.START)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
index 49c6446..f781374 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
@@ -183,7 +183,7 @@ public class ServerLauncherIntegrationTest {
public void testBuildWithMemberNameSetInGemFirePropertiesOnStart() throws Exception {
// given: gemfire.properties with a name
Properties gemfireProperties = new Properties();
- gemfireProperties.setProperty(SystemConfigurationProperties.NAME, "server123");
+ gemfireProperties.setProperty(NAME, "server123");
useGemFirePropertiesFileInTemporaryFolder(DistributionConfig.GEMFIRE_PREFIX + "properties", gemfireProperties);
// when: starting with null MemberName
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index d039aef..e15da94 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -113,7 +113,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
assertEquals("true", distributedSystem.getProperties().getProperty(DISABLE_AUTO_RECONNECT));
assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
- assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
+ assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(NAME));
} catch (Throwable e) {
this.errorCollector.addError(e);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
index 864d8f9..7d694cd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
@@ -500,18 +500,18 @@ public class ServerLauncherTest {
ServerLauncher launcher = new Builder()
.setCommand(ServerLauncher.Command.START)
.setMemberName(null)
- .set(SystemConfigurationProperties.NAME, "serverABC")
+ .set(NAME, "serverABC")
.build();
assertNotNull(launcher);
assertEquals(ServerLauncher.Command.START, launcher.getCommand());
assertNull(launcher.getMemberName());
- assertEquals("serverABC", launcher.getProperties().getProperty(SystemConfigurationProperties.NAME));
+ assertEquals("serverABC", launcher.getProperties().getProperty(NAME));
}
@Test
public void testBuildWithMemberNameSetInSystemPropertiesOnStart() {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME, "serverXYZ");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + NAME, "serverXYZ");
ServerLauncher launcher = new Builder()
.setCommand(ServerLauncher.Command.START)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
index c78c077..b6eb757 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
@@ -254,7 +254,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(ACK_WAIT_THRESHOLD, "3");
props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "3");
- props.setProperty(SystemConfigurationProperties.NAME, "putter");
+ props.setProperty(NAME, "putter");
getSystem(props);
Region rgn = (new RegionFactory())
@@ -265,7 +265,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
vm1.invoke(new SerializableRunnable("Connect to distributed system") {
public void run() {
- props.setProperty(SystemConfigurationProperties.NAME, "sleeper");
+ props.setProperty(NAME, "sleeper");
getSystem(props);
IgnoredException.addIgnoredException("elapsed while waiting for replies");
RegionFactory rf = new RegionFactory();
@@ -396,7 +396,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
props.setProperty(MCAST_PORT, "0"); // loner
props.setProperty(ACK_WAIT_THRESHOLD, "5");
props.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "5");
- props.setProperty(SystemConfigurationProperties.NAME, "putter");
+ props.setProperty(NAME, "putter");
getSystem(props);
Region rgn = (new RegionFactory())
@@ -407,7 +407,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
vm1.invoke(new SerializableRunnable("Connect to distributed system") {
public void run() {
- props.setProperty(SystemConfigurationProperties.NAME, "sleeper");
+ props.setProperty(NAME, "sleeper");
getSystem(props);
LogWriter log = basicGetSystem().getLogWriter();
log.info("<ExpectedException action=add>service failure</ExpectedException>");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index e9f2fb6..442c3d7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -155,7 +155,7 @@ public class InternalDistributedSystemJUnitTest
String name = "testGetName";
Properties props = new Properties();
- props.put(SystemConfigurationProperties.NAME, name);
+ props.put(NAME, name);
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
@@ -617,7 +617,7 @@ public class InternalDistributedSystemJUnitTest
// a loner is all this test needs
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(SystemConfigurationProperties.NAME, name);
+ props.setProperty(NAME, name);
createSystem(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
index 57bde39..6defbba 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCacheXmlJUnitTest.java
@@ -69,7 +69,7 @@ public class DiskRegCacheXmlJUnitTest
dirs[2] = file3;
// Connect to the GemFire distributed system
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(NAME, "test");
String path = TestUtil.getResourcePath(getClass(), "DiskRegCacheXmlJUnitTest.xml");
props.setProperty(MCAST_PORT, "0");
props.setProperty(CACHE_XML_FILE, path);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
index c7f1d18..fc15247 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DiskRegCachexmlGeneratorJUnitTest.java
@@ -197,7 +197,7 @@ public class DiskRegCachexmlGeneratorJUnitTest extends DiskRegionTestingBase
ds.disconnect();
// Connect to the GemFire distributed system
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "DiskRegCachexmlGeneratorJUnitTest");
+ props.setProperty(NAME, "DiskRegCachexmlGeneratorJUnitTest");
props.setProperty(MCAST_PORT, "0");
String path = "DiskRegCachexmlGeneratorJUnitTest.xml";
props.setProperty(CACHE_XML_FILE, path);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
index 43775c8..47828e8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
@@ -888,7 +888,7 @@ public class DistributedRegionFunctionExecutionDUnitTest extends DistributedTest
public static void createCacheInVm_41367() {
Properties props = new Properties();
- props.put(SystemConfigurationProperties.NAME, "SecurityServer");
+ props.put(NAME, "SecurityServer");
props.put(SECURITY_CLIENT_AUTHENTICATOR, DummyAuthenticator.class.getName() + ".create");
new DistributedRegionFunctionExecutionDUnitTest("temp").createCache(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
index f33bd3b..0111d6d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
@@ -54,7 +54,7 @@ public class HeadlessGfshIntegrationTest {
int port = getRandomAvailablePort(SOCKET);
Properties properties = new Properties();
- properties.put(SystemConfigurationProperties.NAME, this.testName.getMethodName());
+ properties.put(NAME, this.testName.getMethodName());
properties.put(JMX_MANAGER, "true");
properties.put(JMX_MANAGER_START, "true");
properties.put(JMX_MANAGER_PORT, String.valueOf(port));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
index e82768f..f9cfd0c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
@@ -134,8 +134,8 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
jmxHost = "localhost";
}
- if (!localProps.containsKey(SystemConfigurationProperties.NAME)) {
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ if (!localProps.containsKey(NAME)) {
+ localProps.setProperty(NAME, "Manager");
}
final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index 8a2aab7..47183af 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -160,7 +160,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExportConfig() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
@@ -168,7 +168,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "VM1");
+ localProps.setProperty(NAME, "VM1");
localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
@@ -179,7 +179,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
Host.getHost(0).getVM(2).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "VM2");
+ localProps.setProperty(NAME, "VM2");
localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
@@ -188,7 +188,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
// Create a cache in the local VM
localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Shell");
+ localProps.setProperty(NAME, "Shell");
getSystem(localProps);
Cache cache = getCache();
@@ -260,7 +260,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
setUpJmxManagerOnVm0ThenConnect(null);
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, controller);
+ localProps.setProperty(NAME, controller);
localProps.setProperty(LOG_LEVEL, "error");
getSystem(localProps);
@@ -305,7 +305,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
setUpJmxManagerOnVm0ThenConnect(null);
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, controller);
+ localProps.setProperty(NAME, controller);
localProps.setProperty(LOG_LEVEL, "error");
getSystem(localProps);
@@ -315,7 +315,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, member1);
+ localProps.setProperty(NAME, member1);
getSystem(localProps);
Cache cache = getCache();
}
@@ -353,7 +353,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
setUpJmxManagerOnVm0ThenConnect(null);
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, controller);
+ localProps.setProperty(NAME, controller);
localProps.setProperty(LOG_LEVEL, "error");
getSystem(localProps);
@@ -363,7 +363,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, member1);
+ localProps.setProperty(NAME, member1);
getSystem(localProps);
Cache cache = getCache();
}
@@ -430,7 +430,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorDirectory, "locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
locatorProps.setProperty(CLUSTER_CONFIGURATION_DIR, locatorDirectory);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index d3f8b11..f6013ec 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -401,7 +401,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
this.alterVm1Name = "VM" + this.alterVm1.getPid();
this.alterVm1.invoke(() -> {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, alterVm1Name);
+ localProps.setProperty(NAME, alterVm1Name);
localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
Cache cache = getCache();
@@ -434,7 +434,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
this.alterVm2Name = "VM" + this.alterVm2.getPid();
this.alterVm2.invoke(() -> {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, alterVm2Name);
+ localProps.setProperty(NAME, alterVm2Name);
localProps.setProperty(GROUPS, "Group1,Group2");
getSystem(localProps);
Cache cache = getCache();
@@ -770,7 +770,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Host.getHost(0).getVM(3).invoke(() -> {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "fine");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
@@ -904,7 +904,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Host.getHost(0).getVM(3).invoke(() -> {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "fine");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
index 3d77dad..f40675c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -98,7 +98,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final String vmName = "VM" + vm.getPid();
// Create the cache in this VM
- props.setProperty(SystemConfigurationProperties.NAME, "Controller");
+ props.setProperty(NAME, "Controller");
props.setProperty(GROUPS, "Group1");
getSystem(props);
getCache();
@@ -106,7 +106,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in the other VM
vm.invoke(new SerializableRunnable() {
public void run() {
- props.setProperty(SystemConfigurationProperties.NAME, vmName);
+ props.setProperty(NAME, vmName);
props.setProperty(GROUPS, "Group2");
getSystem(props);
getCache();
@@ -184,7 +184,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final String vmName = "VM" + vm.getPid();
// Create the cache in this VM
- props.setProperty(SystemConfigurationProperties.NAME, "Controller");
+ props.setProperty(NAME, "Controller");
props.setProperty(GROUPS, "Group1");
getSystem(props);
getCache();
@@ -192,7 +192,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in the other VM
vm.invoke(new SerializableRunnable() {
public void run() {
- props.setProperty(SystemConfigurationProperties.NAME, vmName);
+ props.setProperty(NAME, vmName);
props.setProperty(GROUPS, "Group2");
getSystem(props);
getCache();
@@ -261,7 +261,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final String vmName = "VM" + vm.getPid();
// Create the cache in this VM
- props.setProperty(SystemConfigurationProperties.NAME, "Controller");
+ props.setProperty(NAME, "Controller");
props.setProperty(GROUPS, "Group1");
getSystem(props);
getCache();
@@ -269,7 +269,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in the other VM
vm.invoke(new SerializableRunnable() {
public void run() {
- props.setProperty(SystemConfigurationProperties.NAME, vmName);
+ props.setProperty(NAME, vmName);
props.setProperty(GROUPS, "Group2");
getSystem(props);
getCache();
@@ -337,7 +337,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorLogPath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "fine");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index 02c4ba3..09f51d0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -83,7 +83,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
}
@@ -747,7 +747,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
filesToBeDeleted.add(fullBackupDirPath);
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, controllerName);
+ props.setProperty(NAME, controllerName);
getSystem(props);
@@ -762,7 +762,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
@@ -840,7 +840,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore1Dir2.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
getCache();
@@ -856,7 +856,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore2Dir.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
+ localProps.setProperty(NAME, vm2Name);
localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
@@ -959,7 +959,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore2Dir1.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
localProps.setProperty(GROUPS, "Group1,Group2");
getSystem(localProps);
Cache cache = getCache();
@@ -985,7 +985,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore2Dir2.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
+ localProps.setProperty(NAME, vm2Name);
localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
Cache cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
index 4fa3ddb..09cd629 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
@@ -302,7 +302,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMembers() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -336,7 +336,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMembersWithArgs() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_RETURN_ARGS);
@@ -372,7 +372,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMembersWithArgsAndCustomResultCollector() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_RETURN_ARGS);
@@ -409,7 +409,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnGroups() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -488,7 +488,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testDestroyOnGroups() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -578,7 +578,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
@@ -597,7 +597,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
vm2.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
+ localProps.setProperty(NAME, vm2Name);
localProps.setProperty(GROUPS, "Group3");
getSystem(localProps);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index 28424a5..59eab66 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -104,7 +104,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
final VM vm1 = Host.getHost(0).getVM(1);
final VM vm2 = Host.getHost(0).getVM(2);
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, testName + "Manager");
+ props.setProperty(NAME, testName + "Manager");
HeadlessGfsh gfsh = setUpJmxManagerOnVm0ThenConnect(props);
assertNotNull(gfsh);
assertEquals(true, gfsh.isConnectedAndReady());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
index f284f02..79e8b23 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
@@ -42,7 +42,7 @@ import java.util.Map;
import java.util.Properties;
import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOG_LEVEL;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.NAME;
+import static com.gemstone.gemfire.distributed.NAME;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.Host.getHost;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
@@ -265,7 +265,7 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
}
public String getName() {
- return getConfiguration().getProperty(SystemConfigurationProperties.NAME);
+ return getConfiguration().getProperty(NAME);
}
public VM getVm() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
index b4a1f5f..fc7aaab 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -765,7 +765,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, VM1Name);
+ props.setProperty(NAME, VM1Name);
props.setProperty(GROUPS, group1);
getSystem(props);
Region parReg = createParReg(parRegName, getCache(), String.class, Stock.class);
@@ -799,7 +799,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, VM1Name);
+ props.setProperty(NAME, VM1Name);
props.setProperty(GROUPS, group1);
getSystem(props);
Region parReg = createParReg(parRegName, getCache(), String.class, Stock.class);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
index 469ff7b..d6ae20f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
@@ -123,7 +123,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
final Properties distributedSystemProperties = new Properties();
distributedSystemProperties.setProperty(SystemConfigurationProperties.LOG_LEVEL, getDUnitLogLevel());
- distributedSystemProperties.setProperty(SystemConfigurationProperties.NAME, gemfireName);
+ distributedSystemProperties.setProperty(NAME, gemfireName);
return distributedSystemProperties;
}
@@ -170,7 +170,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
}
public String getName() {
- return getDistributedSystemConfiguration().getProperty(SystemConfigurationProperties.NAME);
+ return getDistributedSystemConfiguration().getProperty(NAME);
}
public VM getVm() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index 3123399..2352113 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -67,7 +67,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
props.setProperty(LOG_LEVEL, "info");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
- props.setProperty(SystemConfigurationProperties.NAME, name);
+ props.setProperty(NAME, name);
props.setProperty(GROUPS, groups);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index 931cdbe..26b858e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -128,7 +128,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
final Properties distributedSystemProperties = new Properties();
distributedSystemProperties.setProperty(LOG_LEVEL, getDUnitLogLevel());
- distributedSystemProperties.setProperty(SystemConfigurationProperties.NAME, gemfireName);
+ distributedSystemProperties.setProperty(NAME, gemfireName);
return distributedSystemProperties;
}
@@ -318,7 +318,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
}
public String getName() {
- return getConfiguration().getProperty(SystemConfigurationProperties.NAME);
+ return getConfiguration().getProperty(NAME);
}
public VM getVm() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
index 1377551..7703a7b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -80,7 +80,7 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
props.setProperty(LOG_LEVEL, "info");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
- props.setProperty(SystemConfigurationProperties.NAME, name);
+ props.setProperty(NAME, name);
props.setProperty(GROUPS, groups);
return props;
}
[33/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RootRegionResponse.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RootRegionResponse.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RootRegionResponse.java
index d3a66a7..bc1dbb7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RootRegionResponse.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RootRegionResponse.java
@@ -18,15 +18,26 @@
package com.gemstone.gemfire.internal.admin.remote;
-import com.gemstone.gemfire.*;
-import com.gemstone.gemfire.cache.*;
-//import com.gemstone.gemfire.internal.*;
-import com.gemstone.gemfire.internal.admin.*;
+import com.gemstone.gemfire.CancelException;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.internal.admin.GemFireVM;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.distributed.internal.*;
-import java.io.*;
-import java.util.*;
-import com.gemstone.gemfire.distributed.internal.membership.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+
+//import com.gemstone.gemfire.internal.*;
/**
* Responds to {@link RootRegionResponse}.
@@ -47,7 +58,7 @@ public final class RootRegionResponse extends AdminResponse {
try {
Cache cache = CacheFactory.getInstance(dm.getSystem());
final Collection roots;
- if (! Boolean.getBoolean("gemfire.PRDebug")) {
+ if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
roots = cache.rootRegions();
} else {
roots = ((GemFireCacheImpl)cache).rootRegions(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
index 4d5e3ac..1b80844 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/ShutdownAllRequest.java
@@ -16,32 +16,20 @@
*/
package com.gemstone.gemfire.internal.admin.remote;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Set;
-import java.util.TreeSet;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.ReplyMessage;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
/**
* An instruction to all members with cache that their PR should gracefully
@@ -51,8 +39,8 @@ import com.gemstone.gemfire.internal.tcp.ConnectionTable;
public class ShutdownAllRequest extends AdminRequest {
private static final Logger logger = LogService.getLogger();
-
- static final long SLEEP_TIME_BEFORE_DISCONNECT_DS = Long.getLong("gemfire.sleep-before-disconnect-ds", 1000).longValue();
+
+ static final long SLEEP_TIME_BEFORE_DISCONNECT_DS = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "sleep-before-disconnect-ds", 1000).longValue();
public ShutdownAllRequest() {
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/TailLogResponse.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/TailLogResponse.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/TailLogResponse.java
index 65f8756..6a210ca 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/TailLogResponse.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/TailLogResponse.java
@@ -18,28 +18,22 @@
package com.gemstone.gemfire.internal.admin.remote;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-//import com.gemstone.gemfire.distributed.DistributedSystem;
-import java.io.IOException;
-import java.io.RandomAccessFile;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-//import java.util.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.ManagerLogWriter;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender;
import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppenders;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+
+//import com.gemstone.gemfire.distributed.DistributedSystem;
+//import java.util.*;
public final class TailLogResponse extends AdminResponse {
private static final Logger logger = LogService.getLogger();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBucketRegionQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBucketRegionQueue.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBucketRegionQueue.java
index 92eaa01..70fb12d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBucketRegionQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractBucketRegionQueue.java
@@ -16,24 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
@@ -47,6 +31,12 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
public abstract class AbstractBucketRegionQueue extends BucketRegion {
protected static final Logger logger = LogService.getLogger();
@@ -55,8 +45,8 @@ public abstract class AbstractBucketRegionQueue extends BucketRegion {
* The maximum size of this single queue before we start blocking puts
* The system property is in megabytes.
*/
- private final long maximumSize = 1024 * 1024 * Long.getLong("gemfire.GATEWAY_QUEUE_THROTTLE_SIZE_MB", -1);
- private final long throttleTime = Long.getLong("gemfire.GATEWAY_QUEUE_THROTTLE_TIME_MS", 100);
+ private final long maximumSize = 1024 * 1024 * Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "GATEWAY_QUEUE_THROTTLE_SIZE_MB", -1);
+ private final long throttleTime = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "GATEWAY_QUEUE_THROTTLE_TIME_MS", 100);
private final LRUStatistics stats;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractCacheServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractCacheServer.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractCacheServer.java
index d473f9b..c9648a3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractCacheServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractCacheServer.java
@@ -16,13 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache;
-import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
import com.gemstone.gemfire.cache.server.ServerLoadProbe;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.admin.ClientMembershipMessage;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
@@ -42,7 +42,7 @@ import java.util.Set;
*/
public abstract class AbstractCacheServer implements CacheServer {
- public static final String TEST_OVERRIDE_DEFAULT_PORT_PROPERTY = "gemfire.test.CacheServer.OVERRIDE_DEFAULT_PORT";
+ public static final String TEST_OVERRIDE_DEFAULT_PORT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "test.CacheServer.OVERRIDE_DEFAULT_PORT";
/** The cache that is served by this bridge server */
protected final InternalCache cache;
@@ -149,7 +149,7 @@ public abstract class AbstractCacheServer implements CacheServer {
this.maximumMessageCount = CacheServer.DEFAULT_MAXIMUM_MESSAGE_COUNT;
this.messageTimeToLive = CacheServer.DEFAULT_MESSAGE_TIME_TO_LIVE;
// TODO this should be configurable in CacheServer
- this.transactionTimeToLive = Integer.getInteger("gemfire.cacheServer.transactionTimeToLive", 180);
+ this.transactionTimeToLive = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "cacheServer.transactionTimeToLive", 180);
this.groups = CacheServer.DEFAULT_GROUPS;
this.bindAddress = CacheServer.DEFAULT_BIND_ADDRESS;
this.hostnameForClients = CacheServer.DEFAULT_HOSTNAME_FOR_CLIENTS;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegion.java
index 2e510b3..95854ec 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegion.java
@@ -17,67 +17,13 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.CacheCallback;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheStatistics;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskWriteAttributes;
-import com.gemstone.gemfire.cache.EntryExistsException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.EvictionAttributesMutator;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.MembershipAttributes;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAccessException;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionMembershipListener;
-import com.gemstone.gemfire.cache.RegionService;
-import com.gemstone.gemfire.cache.RoleException;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.StatisticsDisabledException;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.query.FunctionDomainException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
import com.gemstone.gemfire.cache.snapshot.RegionSnapshotService;
import com.gemstone.gemfire.cache.wan.GatewaySender;
@@ -85,6 +31,7 @@ import com.gemstone.gemfire.compression.Compressor;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.DataSerializableFixedID;
import com.gemstone.gemfire.internal.cache.extension.Extensible;
@@ -97,6 +44,15 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.util.ArrayUtils;
import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.atomic.AtomicLong;
/**
* Takes care of RegionAttributes, AttributesMutator, and some no-brainer method
@@ -245,8 +201,8 @@ public abstract class AbstractRegion implements Region, RegionAttributes,
private final AtomicLong lastModifiedTime;
- private static final boolean trackHits = !Boolean.getBoolean("gemfire.ignoreHits");
- private static final boolean trackMisses = !Boolean.getBoolean("gemfire.ignoreMisses");
+ private static final boolean trackHits = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ignoreHits");
+ private static final boolean trackMisses = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ignoreMisses");
private final AtomicLong hitCount = new AtomicLong();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index 8075367..35f16bc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -17,22 +17,10 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-import java.util.Arrays;
-
-import org.apache.logging.log4j.Logger;
-
-import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ABSTRACT_REGION_ENTRY_FILL_IN_VALUE;
-import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ABSTRACT_REGION_ENTRY_PREPARE_VALUE_FOR_CACHE;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.InvalidDeltaException;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.IndexMaintenanceException;
import com.gemstone.gemfire.cache.query.QueryException;
import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
@@ -40,32 +28,20 @@ import com.gemstone.gemfire.cache.query.internal.index.IndexProtocol;
import com.gemstone.gemfire.cache.util.GatewayConflictHelper;
import com.gemstone.gemfire.cache.util.GatewayConflictResolver;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ByteArrayDataInput;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.InternalStatisticsDisabledException;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.lru.LRUClockNode;
import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
-import com.gemstone.gemfire.internal.cache.versions.ConcurrentCacheModificationException;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
-import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import com.gemstone.gemfire.internal.cache.versions.*;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderEventImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
-import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
-import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
-import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.StoredObject;
+import com.gemstone.gemfire.internal.offheap.*;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
import com.gemstone.gemfire.internal.offheap.annotations.Retained;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
@@ -79,6 +55,13 @@ import com.gemstone.gemfire.pdx.PdxSerializationException;
import com.gemstone.gemfire.pdx.PdxSerializer;
import com.gemstone.gemfire.pdx.internal.ConvertableToBytes;
import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.util.Arrays;
+
+import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ABSTRACT_REGION_ENTRY_FILL_IN_VALUE;
+import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ABSTRACT_REGION_ENTRY_PREPARE_VALUE_FOR_CACHE;
/**
* Abstract implementation class of RegionEntry interface.
@@ -100,7 +83,7 @@ public abstract class AbstractRegionEntry implements RegionEntry,
* 'gemfire.disableAccessTimeUpdateOnPut' system property.
*/
protected static final boolean DISABLE_ACCESS_TIME_UPDATE_ON_PUT = Boolean
- .getBoolean("gemfire.disableAccessTimeUpdateOnPut");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableAccessTimeUpdateOnPut");
/*
* Flags for a Region Entry.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 68f28d6..a512750 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -17,55 +17,29 @@
package com.gemstone.gemfire.internal.cache;
-
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import com.gemstone.gemfire.internal.cache.region.entry.RegionEntryFactoryBuilder;
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.cache.CacheRuntimeException;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.EntryExistsException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.TransactionId;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.IndexMaintenanceException;
import com.gemstone.gemfire.cache.query.QueryException;
import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
import com.gemstone.gemfire.cache.query.internal.index.IndexProtocol;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.internal.cache.DiskInitFile.DiskRegionFlag;
import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
import com.gemstone.gemfire.internal.cache.delta.Delta;
import com.gemstone.gemfire.internal.cache.ha.HAContainerWrapper;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.internal.cache.lru.LRUEntry;
+import com.gemstone.gemfire.internal.cache.region.entry.RegionEntryFactoryBuilder;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.tier.sockets.HAEventWrapper;
-import com.gemstone.gemfire.internal.cache.versions.ConcurrentCacheModificationException;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.internal.cache.versions.VersionHolder;
-import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
-import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import com.gemstone.gemfire.internal.cache.versions.*;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderEventImpl;
import com.gemstone.gemfire.internal.concurrent.MapCallbackAdapter;
import com.gemstone.gemfire.internal.concurrent.MapResult;
@@ -81,6 +55,10 @@ import com.gemstone.gemfire.internal.offheap.annotations.Retained;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
import com.gemstone.gemfire.internal.util.concurrent.CustomEntryConcurrentHashMap;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Abstract implementation of {@link RegionMap}that has all the common
@@ -1841,7 +1819,7 @@ public abstract class AbstractRegionMap implements RegionMap {
* on that client to be notified of the invalidate.
* A non-empty "caching-proxy" will receive invalidates from the server.
*/
- public static boolean FORCE_INVALIDATE_EVENT = Boolean.getBoolean("gemfire.FORCE_INVALIDATE_EVENT");
+ public static boolean FORCE_INVALIDATE_EVENT = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "FORCE_INVALIDATE_EVENT");
/**
* If the FORCE_INVALIDATE_EVENT flag is true
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketAdvisor.java
index 0c53d4b..f8e04a6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketAdvisor.java
@@ -16,30 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.Serializable;
-import java.util.AbstractSet;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Queue;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.CacheClosedException;
@@ -68,6 +44,17 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.util.StopWatch;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* Specialized {@link CacheDistributionAdvisor} for {@link BucketRegion
@@ -921,7 +908,7 @@ public class BucketAdvisor extends CacheDistributionAdvisor {
// failure detection period
long timeout = config.getMemberTimeout() * 3;
// plus time for a new member to become primary
- timeout += Long.getLong("gemfire.BucketAdvisor.getPrimaryTimeout",
+ timeout += Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "BucketAdvisor.getPrimaryTimeout",
15 * 1000);
InternalDistributedMember newPrimary = waitForPrimaryMember(timeout);
return newPrimary;
@@ -1612,7 +1599,7 @@ public class BucketAdvisor extends CacheDistributionAdvisor {
}
}
- private final static long BUCKET_STORAGE_WAIT = Long.getLong("gemfire.BUCKET_STORAGE_WAIT", 15000).longValue(); // 15 seconds
+ private final static long BUCKET_STORAGE_WAIT = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "BUCKET_STORAGE_WAIT", 15000).longValue(); // 15 seconds
public boolean waitForStorage() {
synchronized (this) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
index 4d51eb8..c87cc3d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/BucketRegion.java
@@ -16,41 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.Lock;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.CopyHelper;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.DeltaSerializationException;
-import com.gemstone.gemfire.InternalGemFireError;
-import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAlgorithm;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.partition.PartitionListener;
import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
import com.gemstone.gemfire.distributed.DistributedMember;
@@ -58,6 +25,7 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.AtomicLongWithTerminalState;
import com.gemstone.gemfire.distributed.internal.DirectReplyProcessor;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
@@ -67,15 +35,7 @@ import com.gemstone.gemfire.internal.cache.BucketAdvisor.BucketProfile;
import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
import com.gemstone.gemfire.internal.cache.delta.Delta;
-import com.gemstone.gemfire.internal.cache.partitioned.Bucket;
-import com.gemstone.gemfire.internal.cache.partitioned.DestroyMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.InvalidateMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.LockObject;
-import com.gemstone.gemfire.internal.cache.partitioned.PRTombstoneMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.PutAllPRMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.PutMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.RemoveAllPRMessage;
+import com.gemstone.gemfire.internal.cache.partitioned.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientTombstoneMessage;
@@ -84,6 +44,7 @@ import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderEventImpl;
+import com.gemstone.gemfire.internal.concurrent.AtomicLong5;
import com.gemstone.gemfire.internal.concurrent.Atomics;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
@@ -92,7 +53,14 @@ import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
import com.gemstone.gemfire.internal.offheap.annotations.Retained;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
-import com.gemstone.gemfire.internal.concurrent.AtomicLong5;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
/**
@@ -215,8 +183,8 @@ implements Bucket
/* one map per bucket region */
public HashMap allKeysMap = new HashMap();
- static final boolean FORCE_LOCAL_LISTENERS_INVOCATION =
- Boolean.getBoolean("gemfire.BucketRegion.alwaysFireLocalListeners");
+ static final boolean FORCE_LOCAL_LISTENERS_INVOCATION =
+ Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "BucketRegion.alwaysFireLocalListeners");
// gemfire.BucktRegion.alwaysFireLocalListeners=true
private volatile AtomicLong5 eventSeqNum = null;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
index 63138b5..2c72410 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerImpl.java
@@ -16,49 +16,19 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.InvalidValueException;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.ClientSession;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.DynamicRegionFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.InterestRegistrationListener;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
import com.gemstone.gemfire.cache.server.ServerLoadProbe;
import com.gemstone.gemfire.cache.server.internal.LoadMonitor;
import com.gemstone.gemfire.cache.wan.GatewayTransportFilter;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisee;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.ResourceEvent;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.OSProcess;
@@ -74,6 +44,12 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.management.membership.ClientMembership;
import com.gemstone.gemfire.management.membership.ClientMembershipListener;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* An implementation of the <code>CacheServer</code> interface that delegates
@@ -87,8 +63,9 @@ public class CacheServerImpl
implements DistributionAdvisee {
private static final Logger logger = LogService.getLogger();
-
- private static final int FORCE_LOAD_UPDATE_FREQUENCY= Integer.getInteger("gemfire.BridgeServer.FORCE_LOAD_UPDATE_FREQUENCY", 10).intValue();
+
+ private static final int FORCE_LOAD_UPDATE_FREQUENCY = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "BridgeServer.FORCE_LOAD_UPDATE_FREQUENCY", 10)
+ .intValue();
/** The acceptor that does the actual serving */
private volatile AcceptorImpl acceptor;
@@ -122,8 +99,8 @@ public class CacheServerImpl
*/
private int serialNumber; // changed on each start
- public static final boolean ENABLE_NOTIFY_BY_SUBSCRIPTION_FALSE =
- Boolean.getBoolean("gemfire.cache-server.enable-notify-by-subscription-false");
+ public static final boolean ENABLE_NOTIFY_BY_SUBSCRIPTION_FALSE =
+ Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "cache-server.enable-notify-by-subscription-false");
// ////////////////////// Constructors //////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
index d13c79f..d3365e8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
@@ -17,30 +17,13 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.PrintStream;
-import java.io.Serializable;
-import java.net.URL;
-import java.util.AbstractList;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -55,6 +38,13 @@ import com.gemstone.gemfire.internal.process.StartupStatusListener;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.internal.util.JavaCommandBuilder;
+import java.io.*;
+import java.net.URL;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.SERVER_BIND_ADDRESS;
+
/**
* Launcher program to start a cache server.
*
@@ -64,23 +54,23 @@ import com.gemstone.gemfire.internal.util.JavaCommandBuilder;
public class CacheServerLauncher {
/** Is this VM a dedicated Cache Server? This value is used mainly by the admin API. */
- public static boolean isDedicatedCacheServer = Boolean.getBoolean("gemfire.isDedicatedServer");
+ public static boolean isDedicatedCacheServer = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "isDedicatedServer");
- public static boolean ASSIGN_BUCKETS = Boolean.getBoolean("gemfire.CacheServerLauncher.assignBucketsToPartitions");
+ public static boolean ASSIGN_BUCKETS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "CacheServerLauncher.assignBucketsToPartitions");
//default is to exit if property not defined
- public static boolean DONT_EXIT_AFTER_LAUNCH = Boolean.getBoolean("gemfire.CacheServerLauncher.dontExitAfterLaunch");
+ public static boolean DONT_EXIT_AFTER_LAUNCH = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "CacheServerLauncher.dontExitAfterLaunch");
/** Should the launch command be printed? */
public static final boolean PRINT_LAUNCH_COMMAND = Boolean.getBoolean(
CacheServerLauncher.class.getSimpleName() + ".PRINT_LAUNCH_COMMAND");
-
- private static final long STATUS_WAIT_TIME
- = Long.getLong("gemfire.CacheServerLauncher.STATUS_WAIT_TIME_MS", 15000);
+
+ private static final long STATUS_WAIT_TIME
+ = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "CacheServerLauncher.STATUS_WAIT_TIME_MS", 15000);
/** How long to wait for a cache server to stop */
- private static final long SHUTDOWN_WAIT_TIME
- = Long.getLong("gemfire.CacheServerLauncher.SHUTDOWN_WAIT_TIME_MS", 20000);
+ private static final long SHUTDOWN_WAIT_TIME
+ = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "CacheServerLauncher.SHUTDOWN_WAIT_TIME_MS", 20000);
protected final String baseName;
protected final String defaultLogFileName;
@@ -262,7 +252,7 @@ public class CacheServerLauncher {
protected static final String CLASSPATH = "classpath";
protected static final String REBALANCE = "rebalance";
protected static final String SERVER_PORT = "server-port";
- protected static final String SERVER_BIND_ADDRESS = "server-bind-address";
+ protected static final String SERVER_BIND_ADDRESS_NAME = SERVER_BIND_ADDRESS;
protected static final String DISABLE_DEFAULT_SERVER = "disable-default-server";
public static final String CRITICAL_HEAP_PERCENTAGE =
"critical-heap-percentage";
@@ -272,7 +262,7 @@ public class CacheServerLauncher {
"critical-off-heap-percentage";
public static final String EVICTION_OFF_HEAP_PERCENTAGE =
"eviction-off-heap-percentage";
- protected static final String LOCK_MEMORY = "lock-memory";
+ protected static final String LOCK_MEMORY = SystemConfigurationProperties.LOCK_MEMORY;
protected final File processDirOption(final Map<String, Object> options, final String dirValue) throws FileNotFoundException {
final File inputWorkingDirectory = new File(dirValue);
@@ -318,7 +308,7 @@ public class CacheServerLauncher {
if (System.getProperty("os.name").indexOf("Windows") >= 0) {
throw new IllegalArgumentException("Unable to lock memory on this operating system");
}
- props.put(DistributionConfig.LOCK_MEMORY_NAME, "true");
+ props.put(LOCK_MEMORY, "true");
}
else if (arg.startsWith("-rebalance")) {
options.put(REBALANCE, Boolean.TRUE);
@@ -339,7 +329,7 @@ public class CacheServerLauncher {
options.put(EVICTION_OFF_HEAP_PERCENTAGE, arg);
}
else if (arg.startsWith("-server-bind-address")) {
- options.put(SERVER_BIND_ADDRESS, arg);
+ options.put(SERVER_BIND_ADDRESS_NAME, arg);
}
else if (arg.startsWith("-J")) {
String vmArg = arg.substring(2);
@@ -450,7 +440,7 @@ public class CacheServerLauncher {
options.put(SERVER_PORT, arg.substring(arg.indexOf("=") + 1));
}
else if (arg.startsWith("-server-bind-address")) {
- options.put(SERVER_BIND_ADDRESS, arg.substring(arg.indexOf("=") + 1));
+ options.put(SERVER_BIND_ADDRESS_NAME, arg.substring(arg.indexOf("=") + 1));
}
else if (arg.startsWith("-" + CRITICAL_HEAP_PERCENTAGE)) {
options.put(CRITICAL_HEAP_PERCENTAGE, arg.substring(arg.indexOf("=") + 1));
@@ -655,7 +645,7 @@ public class CacheServerLauncher {
serverPort.set(Integer.parseInt(serverPortString));
}
- serverBindAddress.set((String) options.get(SERVER_BIND_ADDRESS));
+ serverBindAddress.set((String) options.get(SERVER_BIND_ADDRESS_NAME));
disableDefaultServer.set((Boolean) options.get(DISABLE_DEFAULT_SERVER));
workingDir = new File(System.getProperty("user.dir"));
@@ -1244,7 +1234,7 @@ public class CacheServerLauncher {
commandLineWrapper.add((String) options.get(DISABLE_DEFAULT_SERVER));
commandLineWrapper.add((String) options.get(SERVER_PORT));
- commandLineWrapper.add((String) options.get(SERVER_BIND_ADDRESS));
+ commandLineWrapper.add((String) options.get(SERVER_BIND_ADDRESS_NAME));
String criticalHeapThreshold = (String)options.get(CRITICAL_HEAP_PERCENTAGE);
if (criticalHeapThreshold != null) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
index b19d310..83b0a58 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CachedDeserializableFactory.java
@@ -17,10 +17,9 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.util.ObjectSizer;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.DSCODE;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.NullDataOutputStream;
@@ -28,14 +27,16 @@ import com.gemstone.gemfire.internal.cache.lru.Sizeable;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.pdx.PdxInstance;
+import java.io.IOException;
+
/**
* Produces instances that implement CachedDeserializable.
* @since GemFire 5.0.2
*
*/
public class CachedDeserializableFactory {
- public static boolean PREFER_DESERIALIZED = ! Boolean.getBoolean("gemfire.PREFER_SERIALIZED");
- public static boolean STORE_ALL_VALUE_FORMS = Boolean.getBoolean("gemfire.STORE_ALL_VALUE_FORMS");
+ public static boolean PREFER_DESERIALIZED = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PREFER_SERIALIZED");
+ public static boolean STORE_ALL_VALUE_FORMS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "STORE_ALL_VALUE_FORMS");
/**
* Currently GFE always wants a CachedDeserializable wrapper.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ClusterConfigurationLoader.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ClusterConfigurationLoader.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ClusterConfigurationLoader.java
index b21f901..e362389 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ClusterConfigurationLoader.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ClusterConfigurationLoader.java
@@ -16,21 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.UnmodifiableException;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -47,6 +32,14 @@ import com.gemstone.gemfire.internal.process.ClusterConfigurationNotAvailableExc
import com.gemstone.gemfire.management.internal.configuration.domain.Configuration;
import com.gemstone.gemfire.management.internal.configuration.messages.ConfigurationRequest;
import com.gemstone.gemfire.management.internal.configuration.messages.ConfigurationResponse;
+import org.apache.logging.log4j.Logger;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
public class ClusterConfigurationLoader {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
index 7e97f4d..b53ed31 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/ColocationHelper.java
@@ -17,34 +17,24 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.EntryDestroyedException;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.execute.InternalRegionFunctionContext;
import com.gemstone.gemfire.internal.cache.partitioned.PRLocallyDestroyedException;
import com.gemstone.gemfire.internal.cache.persistence.PRPersistentConfig;
import com.gemstone.gemfire.internal.cache.wan.parallel.ParallelGatewaySenderQueue;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.io.Serializable;
+import java.util.*;
+import java.util.Map.Entry;
/**
* An utility class to retrieve colocated regions in a colocation hierarchy in
@@ -116,7 +106,7 @@ public class ColocationHelper {
* if they are not attached to the region. See bug 50120. Mutable
* for tests.
*/
- public static boolean IGNORE_UNRECOVERED_QUEUE = Boolean.getBoolean("gemfire.IGNORE_UNRECOVERED_QUEUE");
+ public static boolean IGNORE_UNRECOVERED_QUEUE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "IGNORE_UNRECOVERED_QUEUE");
/**
* An utility method to retrieve colocated region of a given partitioned
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
index 3219bb4..f010ca9 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
@@ -16,68 +16,17 @@
*/
package com.gemstone.gemfire.internal.cache;
-import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
-import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.InetAddress;
-import java.nio.channels.ClosedByInterruptException;
-import java.nio.channels.FileChannel;
-import java.nio.channels.FileLock;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.Future;
-import java.util.concurrent.LinkedBlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
-import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.StatisticsFactory;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.ByteArrayDataInput;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.ValueWrapper;
@@ -85,18 +34,7 @@ import com.gemstone.gemfire.internal.cache.DiskEntry.RecoveredEntry;
import com.gemstone.gemfire.internal.cache.ExportDiskRegion.ExportWriter;
import com.gemstone.gemfire.internal.cache.lru.LRUAlgorithm;
import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
-import com.gemstone.gemfire.internal.cache.persistence.BackupInspector;
-import com.gemstone.gemfire.internal.cache.persistence.BackupManager;
-import com.gemstone.gemfire.internal.cache.persistence.BytesAndBits;
-import com.gemstone.gemfire.internal.cache.persistence.DiskRecoveryStore;
-import com.gemstone.gemfire.internal.cache.persistence.DiskRegionView;
-import com.gemstone.gemfire.internal.cache.persistence.DiskStoreFilter;
-import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
-import com.gemstone.gemfire.internal.cache.persistence.OplogType;
-import com.gemstone.gemfire.internal.cache.persistence.PRPersistentConfig;
-import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
-import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberPattern;
-import com.gemstone.gemfire.internal.cache.persistence.RestoreScript;
+import com.gemstone.gemfire.internal.cache.persistence.*;
import com.gemstone.gemfire.internal.cache.snapshot.GFSnapshot;
import com.gemstone.gemfire.internal.cache.snapshot.GFSnapshot.SnapshotWriter;
import com.gemstone.gemfire.internal.cache.snapshot.SnapshotPacket.SnapshotRecord;
@@ -109,13 +47,33 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.util.BlobHelper;
import com.gemstone.gemfire.pdx.internal.EnumInfo;
import com.gemstone.gemfire.pdx.internal.PdxField;
import com.gemstone.gemfire.pdx.internal.PdxType;
import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
-import com.gemstone.gemfire.i18n.StringId;
+import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
+import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.net.InetAddress;
+import java.nio.channels.ClosedByInterruptException;
+import java.nio.channels.FileChannel;
+import java.nio.channels.FileLock;
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
+import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Represents a (disk-based) persistent store for region data. Used for both
@@ -132,7 +90,7 @@ public class DiskStoreImpl implements DiskStore {
public static final boolean KRF_DEBUG = Boolean.getBoolean("disk.KRF_DEBUG");
public static final int MAX_OPEN_INACTIVE_OPLOGS = Integer.getInteger(
- "gemfire.MAX_OPEN_INACTIVE_OPLOGS", 7).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "MAX_OPEN_INACTIVE_OPLOGS", 7).intValue();
/*
* If less than 20MB (default - configurable through this property) of the
@@ -140,12 +98,13 @@ public class DiskStoreImpl implements DiskStore {
* is better to bail out.
*/
public static final int MIN_DISK_SPACE_FOR_LOGS = Integer.getInteger(
- "gemfire.MIN_DISK_SPACE_FOR_LOGS", 20).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "MIN_DISK_SPACE_FOR_LOGS", 20).intValue();
/** Represents an invalid id of a key/value on disk */
public static final long INVALID_ID = 0L; // must be zero
-
- public static final String COMPLETE_COMPACTION_BEFORE_TERMINATION_PROPERTY_NAME = "gemfire.disk.completeCompactionBeforeTermination";
+
+ public static final String COMPLETE_COMPACTION_BEFORE_TERMINATION_PROPERTY_NAME =
+ DistributionConfig.GEMFIRE_PREFIX + "disk.completeCompactionBeforeTermination";
static final int MINIMUM_DIR_SIZE = 1024;
@@ -165,16 +124,16 @@ public class DiskStoreImpl implements DiskStore {
* Kept for backwards compat. Should use allowForceCompaction api/dtd instead.
*/
private final static boolean ENABLE_NOTIFY_TO_ROLL = Boolean
- .getBoolean("gemfire.ENABLE_NOTIFY_TO_ROLL");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ENABLE_NOTIFY_TO_ROLL");
- public static final String RECOVER_VALUE_PROPERTY_NAME = "gemfire.disk.recoverValues";
- public static final String RECOVER_VALUES_SYNC_PROPERTY_NAME = "gemfire.disk.recoverValuesSync";
+ public static final String RECOVER_VALUE_PROPERTY_NAME = DistributionConfig.GEMFIRE_PREFIX + "disk.recoverValues";
+ public static final String RECOVER_VALUES_SYNC_PROPERTY_NAME = DistributionConfig.GEMFIRE_PREFIX + "disk.recoverValuesSync";
boolean RECOVER_VALUES = getBoolean(
DiskStoreImpl.RECOVER_VALUE_PROPERTY_NAME, true);
boolean RECOVER_VALUES_SYNC = getBoolean(
DiskStoreImpl.RECOVER_VALUES_SYNC_PROPERTY_NAME, false);
boolean FORCE_KRF_RECOVERY = getBoolean(
- "gemfire.disk.FORCE_KRF_RECOVERY", false);
+ DistributionConfig.GEMFIRE_PREFIX + "disk.FORCE_KRF_RECOVERY", false);
public static boolean getBoolean(String sysProp, boolean def) {
return Boolean.valueOf(System.getProperty(sysProp, Boolean.valueOf(def)
@@ -198,15 +157,15 @@ public class DiskStoreImpl implements DiskStore {
* set it.
*/
private final int MAX_OPLOGS_PER_COMPACTION = Integer.getInteger(
- "gemfire.MAX_OPLOGS_PER_COMPACTION",
- Integer.getInteger("gemfire.MAX_OPLOGS_PER_ROLL", 1).intValue())
+ DistributionConfig.GEMFIRE_PREFIX + "MAX_OPLOGS_PER_COMPACTION",
+ Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "MAX_OPLOGS_PER_ROLL", 1).intValue())
.intValue();
/**
*
*/
public static final int MAX_CONCURRENT_COMPACTIONS = Integer.getInteger(
- "gemfire.MAX_CONCURRENT_COMPACTIONS",
- Integer.getInteger("gemfire.MAX_CONCURRENT_ROLLS", 1).intValue())
+ DistributionConfig.GEMFIRE_PREFIX + "MAX_CONCURRENT_COMPACTIONS",
+ Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "MAX_CONCURRENT_ROLLS", 1).intValue())
.intValue();
/**
@@ -214,20 +173,20 @@ public class DiskStoreImpl implements DiskStore {
* tasks that can be pending before submitting the tasks start blocking.
* These tasks are things like unpreblow oplogs, delete oplogs, etc.
*/
- public static final int MAX_PENDING_TASKS = Integer.getInteger("gemfire.disk.MAX_PENDING_TASKS", 6);
+ public static final int MAX_PENDING_TASKS = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "disk.MAX_PENDING_TASKS", 6);
/**
* This system property indicates that IF should also be preallocated. This property
* will be used in conjunction with the PREALLOCATE_OPLOGS property. If PREALLOCATE_OPLOGS
* is ON the below will by default be ON but in order to switch it off you need to explicitly
*/
static final boolean PREALLOCATE_IF = !System.getProperty(
- "gemfire.preAllocateIF", "true").equalsIgnoreCase("false");
+ DistributionConfig.GEMFIRE_PREFIX + "preAllocateIF", "true").equalsIgnoreCase("false");
/**
* This system property indicates that Oplogs should be preallocated till the
* maxOplogSize as specified for the disk store.
*/
static final boolean PREALLOCATE_OPLOGS = !System.getProperty(
- "gemfire.preAllocateDisk", "true").equalsIgnoreCase("false");
+ DistributionConfig.GEMFIRE_PREFIX + "preAllocateDisk", "true").equalsIgnoreCase("false");
/**
* For some testing purposes we would not consider top property if this flag
@@ -239,7 +198,7 @@ public class DiskStoreImpl implements DiskStore {
* This system property turns on synchronous writes just the the init file.
*/
static final boolean SYNC_IF_WRITES = Boolean
- .getBoolean("gemfire.syncMetaDataWrites");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "syncMetaDataWrites");
/**
* For testing - to keep track of files for which fallocate happened
@@ -372,9 +331,9 @@ public class DiskStoreImpl implements DiskStore {
private static int calcCompactionThreshold(int ct) {
if (ct == DiskStoreFactory.DEFAULT_COMPACTION_THRESHOLD) {
// allow the old sys prop for backwards compat.
- if (System.getProperty("gemfire.OVERFLOW_ROLL_PERCENTAGE") != null) {
+ if (System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "OVERFLOW_ROLL_PERCENTAGE") != null) {
ct = (int) (Double.parseDouble(System.getProperty(
- "gemfire.OVERFLOW_ROLL_PERCENTAGE", "0.50")) * 100.0);
+ DistributionConfig.GEMFIRE_PREFIX + "OVERFLOW_ROLL_PERCENTAGE", "0.50")) * 100.0);
}
}
return ct;
@@ -4397,9 +4356,9 @@ public class DiskStoreImpl implements DiskStore {
}
// need a cache so create a loner ds
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
- props.setProperty("cache-xml-file", "");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "");
DistributedSystem ds = DistributedSystem.connect(props);
offlineDS = ds;
Cache c = com.gemstone.gemfire.cache.CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreMonitor.java
index 1d6e26c..b81142b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreMonitor.java
@@ -16,19 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.DiskAccessException;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -37,15 +24,23 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+import java.util.concurrent.*;
public class DiskStoreMonitor {
private static final Logger logger = LogService.getLogger();
-
- private static final boolean DISABLE_MONITOR = Boolean.getBoolean("gemfire.DISK_USAGE_DISABLE_MONITORING");
+
+ private static final boolean DISABLE_MONITOR = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DISK_USAGE_DISABLE_MONITORING");
// private static final boolean AUTO_RECONNECT = Boolean.getBoolean("gemfire.DISK_USAGE_ENABLE_AUTO_RECONNECT");
-
- private static final int USAGE_CHECK_INTERVAL = Integer.getInteger("gemfire.DISK_USAGE_POLLING_INTERVAL_MILLIS", 10000);
- private static final float LOG_WARNING_THRESHOLD_PCT = Integer.getInteger("gemfire.DISK_USAGE_LOG_WARNING_PERCENT", 99);
+
+ private static final int USAGE_CHECK_INTERVAL = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "DISK_USAGE_POLLING_INTERVAL_MILLIS", 10000);
+ private static final float LOG_WARNING_THRESHOLD_PCT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "DISK_USAGE_LOG_WARNING_PERCENT", 99);
enum DiskState {
NORMAL,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
index 3ff0333..9bb148b 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskWriteAttributesImpl.java
@@ -16,12 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.DiskWriteAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -66,7 +62,8 @@ public final class DiskWriteAttributesImpl implements DiskWriteAttributes
private final long maxOplogSize;
/** default max in bytes **/
- private static final long DEFAULT_MAX_OPLOG_SIZE = Long.getLong("gemfire.DEFAULT_MAX_OPLOG_SIZE", 1024L).longValue() * (1024 * 1024); // 1 GB
+ private static final long DEFAULT_MAX_OPLOG_SIZE =
+ Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "DEFAULT_MAX_OPLOG_SIZE", 1024L).longValue() * (1024 * 1024); // 1 GB
/** default max limit in bytes **/
private static final long DEFAULT_MAX_OPLOG_SIZE_LIMIT = (long)Integer.MAX_VALUE * (1024*1024);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
index 937216f..eed5268 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
@@ -17,51 +17,11 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.InvalidDeltaException;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.LossAction;
-import com.gemstone.gemfire.cache.MembershipAttributes;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionAccessException;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionDistributionException;
-import com.gemstone.gemfire.cache.RegionMembershipListener;
-import com.gemstone.gemfire.cache.ResumptionAction;
-import com.gemstone.gemfire.cache.RoleException;
-import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.TransactionId;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionException;
@@ -74,37 +34,22 @@ import com.gemstone.gemfire.distributed.DistributedLockService;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.LockServiceDestroyedException;
import com.gemstone.gemfire.distributed.Role;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisee;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.ProfileVisitor;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.MembershipListener;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
import com.gemstone.gemfire.distributed.internal.locks.DLockRemoteToken;
import com.gemstone.gemfire.distributed.internal.locks.DLockService;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor.CacheProfile;
import com.gemstone.gemfire.internal.cache.InitialImageOperation.GIIStatus;
import com.gemstone.gemfire.internal.cache.RemoteFetchVersionMessage.FetchVersionResponse;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
-import com.gemstone.gemfire.internal.cache.execute.DistributedRegionFunctionExecutor;
-import com.gemstone.gemfire.internal.cache.execute.DistributedRegionFunctionResultSender;
-import com.gemstone.gemfire.internal.cache.execute.DistributedRegionFunctionResultWaiter;
-import com.gemstone.gemfire.internal.cache.execute.FunctionStats;
-import com.gemstone.gemfire.internal.cache.execute.LocalResultCollector;
-import com.gemstone.gemfire.internal.cache.execute.RegionFunctionContextImpl;
-import com.gemstone.gemfire.internal.cache.execute.ServerToClientFunctionResultSender;
+import com.gemstone.gemfire.internal.cache.execute.*;
import com.gemstone.gemfire.internal.cache.lru.LRUEntry;
-import com.gemstone.gemfire.internal.cache.persistence.CreatePersistentRegionProcessor;
-import com.gemstone.gemfire.internal.cache.persistence.PersistenceAdvisor;
-import com.gemstone.gemfire.internal.cache.persistence.PersistenceAdvisorImpl;
-import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
-import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberManager;
-import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberView;
+import com.gemstone.gemfire.internal.cache.persistence.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.tier.sockets.VersionedObjectList;
import com.gemstone.gemfire.internal.cache.versions.ConcurrentCacheModificationException;
@@ -113,7 +58,6 @@ import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.cache.wan.AsyncEventQueueConfigurationException;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderConfigurationException;
-import com.gemstone.gemfire.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderQueue;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
@@ -121,7 +65,17 @@ import com.gemstone.gemfire.internal.offheap.annotations.Released;
import com.gemstone.gemfire.internal.offheap.annotations.Retained;
import com.gemstone.gemfire.internal.sequencelog.RegionLogger;
import com.gemstone.gemfire.internal.util.concurrent.StoppableCountDownLatch;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+import java.util.concurrent.CopyOnWriteArraySet;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
/**
*
*/
@@ -2683,7 +2637,7 @@ public class DistributedRegion extends LocalRegion implements
//Fix for #48066 - make sure that region operations are completely
//distributed to peers before destroying the region.
long timeout = 1000L * getCache().getDistributedSystem().getConfig().getAckWaitThreshold();
- Boolean flushOnClose = !Boolean.getBoolean("gemfire.no-flush-on-close"); // test hook
+ Boolean flushOnClose = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "no-flush-on-close"); // test hook
if (!this.cache.forcedDisconnect() &&
flushOnClose && this.getDistributionManager().getMembershipManager() != null
&& this.getDistributionManager().getMembershipManager().isConnected()) {
@@ -3247,7 +3201,7 @@ public class DistributedRegion extends LocalRegion implements
}
static class DiskPage extends DiskPosition {
- static final long DISK_PAGE_SIZE = Long.getLong("gemfire.DISK_PAGE_SIZE", 8 * 1024L).longValue();
+ static final long DISK_PAGE_SIZE = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "DISK_PAGE_SIZE", 8 * 1024L).longValue();
DiskPage(DiskPosition dp) {
this.setPosition(dp.oplogId, dp.offset / DISK_PAGE_SIZE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
index 16b4016..65b2c04 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
@@ -17,28 +17,8 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.ByteArrayInputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.IOException;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CopyHelper;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.DeltaSerializationException;
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.SerializationException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EntryOperation;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.SerializedCacheValue;
-import com.gemstone.gemfire.cache.TransactionId;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.IndexMaintenanceException;
import com.gemstone.gemfire.cache.query.QueryException;
import com.gemstone.gemfire.cache.query.internal.IndexUpdater;
@@ -48,16 +28,10 @@ import com.gemstone.gemfire.cache.query.internal.index.IndexUtils;
import com.gemstone.gemfire.cache.util.TimestampedEntryEvent;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionMessage;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ByteArrayDataInput;
-import com.gemstone.gemfire.internal.DSFIDFactory;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.Sendable;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.FilterRoutingInfo.FilterInfo;
import com.gemstone.gemfire.internal.cache.delta.Delta;
import com.gemstone.gemfire.internal.cache.lru.Sizeable;
@@ -73,21 +47,19 @@ import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
-import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
-import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
-import com.gemstone.gemfire.internal.offheap.Releasable;
-import com.gemstone.gemfire.internal.offheap.StoredObject;
+import com.gemstone.gemfire.internal.offheap.*;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
import com.gemstone.gemfire.internal.offheap.annotations.Retained;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
-
-import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_NEW_VALUE;
-import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_OLD_VALUE;
-
import com.gemstone.gemfire.internal.util.ArrayUtils;
import com.gemstone.gemfire.internal.util.BlobHelper;
import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+
+import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_NEW_VALUE;
+import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ENTRY_EVENT_OLD_VALUE;
/**
* Implementation of an entry event
@@ -1632,7 +1604,7 @@ public class EntryEventImpl
* If true (the default) then preserve old values in events.
* If false then mark non-null values as being NOT_AVAILABLE.
*/
- private static final boolean EVENT_OLD_VALUE = !Boolean.getBoolean("gemfire.disable-event-old-value");
+ private static final boolean EVENT_OLD_VALUE = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disable-event-old-value");
void putExistingEntry(final LocalRegion owner, RegionEntry entry) throws RegionClearedException {
[59/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 702dda9..dbd9c79 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -1256,7 +1256,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @since GemFire 7.0 */
String DS_CONFIG_NAME = "ds-config";
-
+
/**
* The name of an internal property that specifies whether
* the distributed system is reconnecting after a forced-
@@ -2013,22 +2013,33 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int MAX_ASYNC_MAX_QUEUE_SIZE = 1024;
- /** The name of the "asyncMaxQueueSize" property */
- @ConfigAttribute(type=Integer.class, min=MIN_ASYNC_MAX_QUEUE_SIZE, max=MAX_ASYNC_MAX_QUEUE_SIZE)
- String ASYNC_MAX_QUEUE_SIZE_NAME = "async-max-queue-size";
- /** @since GemFire 5.7 */
- @ConfigAttribute(type=String.class)
- String CLIENT_CONFLATION_PROP_NAME = "conflate-events";
- /** @since GemFire 5.7 */
+ /**
+ * The name of the "asyncMaxQueueSize" property
+ */
+ @ConfigAttribute(type = Integer.class, min = MIN_ASYNC_MAX_QUEUE_SIZE, max = MAX_ASYNC_MAX_QUEUE_SIZE)
+ String ASYNC_MAX_QUEUE_SIZE_NAME = ASYNC_MAX_QUEUE_SIZE;
+ /**
+ * @since GemFire 5.7
+ */
+ @ConfigAttribute(type = String.class)
+ String CLIENT_CONFLATION_PROP_NAME = CONFLATE_EVENTS;
+ /**
+ * @since GemFire 5.7
+ */
String CLIENT_CONFLATION_PROP_VALUE_DEFAULT = "server";
- /** @since GemFire 5.7 */
+ /**
+ * @since GemFire 5.7
+ */
String CLIENT_CONFLATION_PROP_VALUE_ON = "true";
- /** @since GemFire 5.7 */
+ /**
+ * @since GemFire 5.7
+ */
String CLIENT_CONFLATION_PROP_VALUE_OFF = "false";
-
- /** @since Geode 1.0 */
- @ConfigAttribute(type=Boolean.class)
+ /**
+ * @since Geode 1.0
+ */
+ @ConfigAttribute(type = Boolean.class)
String DISTRIBUTED_TRANSACTIONS_NAME = DISTRIBUTED_TRANSACTIONS;
boolean DEFAULT_DISTRIBUTED_TRANSACTIONS = false;
@@ -2144,7 +2155,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user module name authenticating client credentials in <a
* href="../DistributedSystem.html#security-client-authenticator">"security-client-authenticator"</a>
*/
- @ConfigAttributeGetter(name = SECURITY_CLIENT_AUTHENTICATOR_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_AUTHENTICATOR)
String getSecurityClientAuthenticator();
/**
@@ -2152,7 +2163,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-authenticator">"security-client-authenticator"</a>
* property.
*/
- @ConfigAttributeSetter(name = SECURITY_CLIENT_AUTHENTICATOR_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_AUTHENTICATOR)
void setSecurityClientAuthenticator(String attValue);
/**
@@ -2171,7 +2182,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns name of algorithm to use for Diffie-Hellman key exchange <a
* href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
*/
- @ConfigAttributeGetter(name = SECURITY_CLIENT_DHALGO_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_DHALGO)
String getSecurityClientDHAlgo();
/**
@@ -2179,7 +2190,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
* property.
*/
- @ConfigAttributeSetter(name = SECURITY_CLIENT_DHALGO_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_DHALGO)
void setSecurityClientDHAlgo(String attValue);
/**
@@ -2201,7 +2212,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user defined method name for peer authentication initializer in <a
* href="../DistributedSystem.html#security-peer-auth-init">"security-peer-auth-init"</a>
*/
- @ConfigAttributeGetter(name = SECURITY_PEER_AUTH_INIT_NAME)
+ @ConfigAttributeGetter(name = SECURITY_PEER_AUTH_INIT)
String getSecurityPeerAuthInit();
/**
@@ -2209,7 +2220,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-peer-auth-init">"security-peer-auth-init"</a>
* property.
*/
- @ConfigAttributeSetter(name = SECURITY_PEER_AUTH_INIT_NAME)
+ @ConfigAttributeSetter(name = SECURITY_PEER_AUTH_INIT)
void setSecurityPeerAuthInit(String attValue);
/**
@@ -2228,7 +2239,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user defined method name authenticating peer's credentials in <a
* href="../DistributedSystem.html#security-peer-authenticator">"security-peer-authenticator"</a>
*/
- @ConfigAttributeGetter(name = SECURITY_PEER_AUTHENTICATOR_NAME)
+ @ConfigAttributeGetter(name = SECURITY_PEER_AUTHENTICATOR)
String getSecurityPeerAuthenticator();
/**
@@ -2236,7 +2247,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-peer-authenticator">"security-peer-authenticator"</a>
* property.
*/
- @ConfigAttributeSetter(name = SECURITY_PEER_AUTHENTICATOR_NAME)
+ @ConfigAttributeSetter(name = SECURITY_PEER_AUTHENTICATOR)
void setSecurityPeerAuthenticator(String attValue);
/**
@@ -2255,7 +2266,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user module name authorizing client credentials in <a
* href="../DistributedSystem.html#security-client-accessor">"security-client-accessor"</a>
*/
- @ConfigAttributeGetter(name = SECURITY_CLIENT_ACCESSOR_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_ACCESSOR)
String getSecurityClientAccessor();
/**
@@ -2263,7 +2274,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-accessor">"security-client-accessor"</a>
* property.
*/
- @ConfigAttributeSetter(name = SECURITY_CLIENT_ACCESSOR_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_ACCESSOR)
void setSecurityClientAccessor(String attValue);
/**
@@ -2282,7 +2293,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Returns user module name authorizing client credentials in <a
* href="../DistributedSystem.html#security-client-accessor-pp">"security-client-accessor-pp"</a>
*/
- @ConfigAttributeGetter(name = SECURITY_CLIENT_ACCESSOR_PP_NAME)
+ @ConfigAttributeGetter(name = SECURITY_CLIENT_ACCESSOR_PP)
String getSecurityClientAccessorPP();
/**
@@ -2290,7 +2301,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#security-client-accessor-pp">"security-client-accessor-pp"</a>
* property.
*/
- @ConfigAttributeSetter(name = SECURITY_CLIENT_ACCESSOR_PP_NAME)
+ @ConfigAttributeSetter(name = SECURITY_CLIENT_ACCESSOR_PP)
void setSecurityClientAccessorPP(String attValue);
/**
@@ -2310,7 +2321,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @return the current security log-level
*/
- @ConfigAttributeGetter(name = SECURITY_LOG_LEVEL_NAME)
+ @ConfigAttributeGetter(name = SECURITY_LOG_LEVEL)
int getSecurityLogLevel();
/**
@@ -2318,7 +2329,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @param level the new security log-level
*/
- @ConfigAttributeSetter(name = SECURITY_LOG_LEVEL_NAME)
+ @ConfigAttributeSetter(name = SECURITY_LOG_LEVEL)
void setSecurityLogLevel(int level);
/**
@@ -2335,7 +2346,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @return <code>null</code> if logging information goes to standard out
*/
- @ConfigAttributeGetter(name = SECURITY_LOG_FILE_NAME)
+ @ConfigAttributeGetter(name = SECURITY_LOG_FILE)
File getSecurityLogFile();
/**
@@ -2350,7 +2361,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error when writing to
* the system's configuration file.
*/
- @ConfigAttributeSetter(name = SECURITY_LOG_FILE_NAME)
+ @ConfigAttributeSetter(name = SECURITY_LOG_FILE)
void setSecurityLogFile(File value);
/**
@@ -2374,7 +2385,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @return Timeout in milliseconds.
*/
- @ConfigAttributeGetter(name = SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME)
+ @ConfigAttributeGetter(name = SECURITY_PEER_VERIFY_MEMBER_TIMEOUT)
int getSecurityPeerMembershipTimeout();
/**
@@ -2383,7 +2394,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @param attValue
*/
- @ConfigAttributeSetter(name = SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME)
+ @ConfigAttributeSetter(name = SECURITY_PEER_VERIFY_MEMBER_TIMEOUT)
void setSecurityPeerMembershipTimeout(int attValue);
/**
@@ -2476,7 +2487,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @since GemFire 6.0
*/
- @ConfigAttributeGetter(name = REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME)
+ @ConfigAttributeGetter(name = REMOVE_UNRESPONSIVE_CLIENT)
boolean getRemoveUnresponsiveClient();
/**
@@ -2486,7 +2497,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @since GemFire 6.0
*/
- @ConfigAttributeSetter(name = REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME)
+ @ConfigAttributeSetter(name = REMOVE_UNRESPONSIVE_CLIENT)
void setRemoveUnresponsiveClient(boolean value);
/**
@@ -2496,14 +2507,15 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
String DELTA_PROPAGATION_PROP_NAME = DELTA_PROPAGATION;
boolean DEFAULT_DELTA_PROPAGATION = true;
- /**
- * Returns the value of the <a
- * href="../DistributedSystem.html#delta-propagation">"delta-propagation"</a>
- * property.
- * @since GemFire 6.3
- */
- @ConfigAttributeGetter(name=DELTA_PROPAGATION_PROP_NAME)
- boolean getDeltaPropagation();
+
+ /**
+ * Returns the value of the <a
+ * href="../DistributedSystem.html#delta-propagation">"delta-propagation"</a>
+ * property.
+ * @since GemFire 6.3
+ */
+ @ConfigAttributeGetter(name = DELTA_PROPAGATION)
+ boolean getDeltaPropagation();
/**
* Sets the value of the <a
@@ -2512,7 +2524,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @since GemFire 6.3
*/
- @ConfigAttributeSetter(name = DELTA_PROPAGATION_PROP_NAME)
+ @ConfigAttributeSetter(name = DELTA_PROPAGATION)
void setDeltaPropagation(boolean value);
int MIN_DISTRIBUTED_SYSTEM_ID = -1;
@@ -2524,6 +2536,20 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
String DISTRIBUTED_SYSTEM_ID_NAME = DISTRIBUTED_SYSTEM_ID;
int DEFAULT_DISTRIBUTED_SYSTEM_ID = -1;
+ /**
+ * @since GemFire 6.6
+ */
+ @ConfigAttributeSetter(name = DISTRIBUTED_SYSTEM_ID)
+ void setDistributedSystemId(int distributedSystemId);
+ /**
+ * @since GemFire 6.6
+ */
+ @ConfigAttributeGetter(name = DISTRIBUTED_SYSTEM_ID)
+ int getDistributedSystemId();
+
+ /**
+ * @since GemFire 6.6
+ */
@ConfigAttribute(type = String.class)
String REDUNDANCY_ZONE_NAME = REDUNDANCY_ZONE;
String DEFAULT_REDUNDANCY_ZONE = "";
@@ -2531,19 +2557,12 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* @since GemFire 6.6
*/
- @ConfigAttributeSetter(name = DISTRIBUTED_SYSTEM_ID_NAME)
- void setDistributedSystemId(int distributedSystemId);
-
- @ConfigAttributeSetter(name = REDUNDANCY_ZONE_NAME)
+ @ConfigAttributeSetter(name = REDUNDANCY_ZONE)
void setRedundancyZone(String redundancyZone);
-
/**
* @since GemFire 6.6
*/
- @ConfigAttributeGetter(name = DISTRIBUTED_SYSTEM_ID_NAME)
- int getDistributedSystemId();
-
- @ConfigAttributeGetter(name = REDUNDANCY_ZONE_NAME)
+ @ConfigAttributeGetter(name = REDUNDANCY_ZONE)
String getRedundancyZone();
/**
@@ -2567,17 +2586,17 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @since GemFire 6.6
*/
@ConfigAttribute(type = Boolean.class)
- String ENFORCE_UNIQUE_HOST_NAME = ENFORE_UNIQUE_HOST;
+ String ENFORCE_UNIQUE_HOST_NAME = ENFORCE_UNIQUE_HOST;
/**
* Using the system property to set the default here to retain backwards compatibility
* with customers that are already using this system property.
*/
boolean DEFAULT_ENFORCE_UNIQUE_HOST = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "EnforceUniqueHostStorageAllocation");
- @ConfigAttributeSetter(name = ENFORCE_UNIQUE_HOST_NAME)
+ @ConfigAttributeSetter(name = ENFORCE_UNIQUE_HOST)
void setEnforceUniqueHost(boolean enforceUniqueHost);
- @ConfigAttributeGetter(name = ENFORCE_UNIQUE_HOST_NAME)
+ @ConfigAttributeGetter(name = ENFORCE_UNIQUE_HOST)
boolean getEnforceUniqueHost();
Properties getUserDefinedProps();
@@ -2590,7 +2609,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the value of the property
* @since GemFire 7.0
*/
- @ConfigAttributeGetter(name = GROUPS_NAME)
+ @ConfigAttributeGetter(name = GROUPS)
String getGroups();
/**
@@ -2603,7 +2622,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* when writing to the system's configuration file.
* @since GemFire 7.0
*/
- @ConfigAttributeSetter(name = GROUPS_NAME)
+ @ConfigAttributeSetter(name = GROUPS)
void setGroups(String value);
/**
@@ -2626,10 +2645,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
void close();
- @ConfigAttributeSetter(name = REMOTE_LOCATORS_NAME)
+ @ConfigAttributeSetter(name = REMOTE_LOCATORS)
void setRemoteLocators(String locators);
- @ConfigAttributeGetter(name = REMOTE_LOCATORS_NAME)
+ @ConfigAttributeGetter(name = REMOTE_LOCATORS)
String getRemoteLocators();
/**
@@ -2642,30 +2661,30 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
String DEFAULT_REMOTE_LOCATORS = "";
- @ConfigAttributeGetter(name = JMX_MANAGER_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER)
boolean getJmxManager();
- @ConfigAttributeSetter(name = JMX_MANAGER_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER)
void setJmxManager(boolean value);
@ConfigAttribute(type = Boolean.class)
String JMX_MANAGER_NAME = JMX_MANAGER;
boolean DEFAULT_JMX_MANAGER = false;
- @ConfigAttributeGetter(name = JMX_MANAGER_START_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_START)
boolean getJmxManagerStart();
- @ConfigAttributeSetter(name = JMX_MANAGER_START_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_START)
void setJmxManagerStart(boolean value);
@ConfigAttribute(type = Boolean.class)
String JMX_MANAGER_START_NAME = JMX_MANAGER_START;
boolean DEFAULT_JMX_MANAGER_START = false;
- @ConfigAttributeGetter(name = JMX_MANAGER_PORT_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_PORT)
int getJmxManagerPort();
- @ConfigAttributeSetter(name = JMX_MANAGER_PORT_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_PORT)
void setJmxManagerPort(int value);
@ConfigAttribute(type = Integer.class, min = 0, max = 65535)
@@ -2676,13 +2695,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* @deprecated as of 8.0 use {@link #getJmxManagerSSLEnabled} instead.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL)
boolean getJmxManagerSSL();
/**
* @deprecated as of 8.0 use {@link #setJmxManagerSSLEnabled} instead.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL)
void setJmxManagerSSL(boolean value);
/**
@@ -2701,7 +2720,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-enabled">"jmx-manager-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_ENABLED_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_ENABLED)
boolean getJmxManagerSSLEnabled();
/**
@@ -2721,7 +2740,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-enabled">"jmx-manager-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_ENABLED_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_ENABLED)
void setJmxManagerSSLEnabled(boolean enabled);
/**
@@ -2730,7 +2749,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* property.
* @since Geode 1.0
*/
- @ConfigAttributeGetter(name = OFF_HEAP_MEMORY_SIZE_NAME)
+ @ConfigAttributeGetter(name = OFF_HEAP_MEMORY_SIZE)
String getOffHeapMemorySize();
/**
@@ -2739,10 +2758,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* property.
* @since Geode 1.0
*/
- @ConfigAttributeSetter(name = OFF_HEAP_MEMORY_SIZE_NAME)
+ @ConfigAttributeSetter(name = OFF_HEAP_MEMORY_SIZE)
void setOffHeapMemorySize(String value);
- /**
- * The name of the "off-heap-memory-size" property
+ /**
+ * The name of the "off-heap-memory-size" property
* @since Geode 1.0
*/
@ConfigAttribute(type = String.class)
@@ -2750,7 +2769,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* The default <a
* href="../DistributedSystem.html#off-heap-memory-size">"off-heap-memory-size"</a>
- * value of <code>""</code>.
+ * value of <code>""</code>.
* @since Geode 1.0
*/
String DEFAULT_OFF_HEAP_MEMORY_SIZE = "";
@@ -2760,7 +2779,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-protocols">"jmx-manager-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_PROTOCOLS)
String getJmxManagerSSLProtocols();
/**
@@ -2768,7 +2787,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-protocols">"jmx-manager-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_PROTOCOLS)
void setJmxManagerSSLProtocols(String protocols);
/**
@@ -2787,7 +2806,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-ciphers">"jmx-manager-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_CIPHERS_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_CIPHERS)
String getJmxManagerSSLCiphers();
/**
@@ -2795,7 +2814,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-ciphers">"jmx-manager-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_CIPHERS_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_CIPHERS)
void setJmxManagerSSLCiphers(String ciphers);
/**
@@ -2814,7 +2833,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-require-authentication">"jmx-manager-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION)
boolean getJmxManagerSSLRequireAuthentication();
/**
@@ -2822,7 +2841,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-require-authentication">"jmx-manager-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION)
void setJmxManagerSSLRequireAuthentication(boolean enabled);
/**
@@ -2841,7 +2860,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-keystore">"jmx-manager-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_KEYSTORE_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_KEYSTORE)
String getJmxManagerSSLKeyStore();
/**
@@ -2849,7 +2868,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-keystore">"jmx-manager-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_KEYSTORE_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_KEYSTORE)
void setJmxManagerSSLKeyStore(String keyStore);
/**
@@ -2869,7 +2888,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-keystore-type">"jmx-manager-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_KEYSTORE_TYPE)
String getJmxManagerSSLKeyStoreType();
/**
@@ -2877,7 +2896,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-keystore-type">"jmx-manager-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_KEYSTORE_TYPE)
void setJmxManagerSSLKeyStoreType(String keyStoreType);
/**
@@ -2897,7 +2916,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-keystore-password">"jmx-manager-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_KEYSTORE_PASSWORD)
String getJmxManagerSSLKeyStorePassword();
/**
@@ -2905,7 +2924,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-keystore-password">"jmx-manager-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_KEYSTORE_PASSWORD)
void setJmxManagerSSLKeyStorePassword(String keyStorePassword);
/**
@@ -2925,7 +2944,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-truststore">"jmx-manager-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_TRUSTSTORE)
String getJmxManagerSSLTrustStore();
/**
@@ -2933,7 +2952,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-truststore">"jmx-manager-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_TRUSTSTORE)
void setJmxManagerSSLTrustStore(String trustStore);
/**
@@ -2953,7 +2972,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-truststore-password">"jmx-manager-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD)
String getJmxManagerSSLTrustStorePassword();
/**
@@ -2961,7 +2980,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#jmx-manager-ssl-truststore-password">"jmx-manager-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD)
void setJmxManagerSSLTrustStorePassword(String trusStorePassword);
/**
@@ -2976,40 +2995,40 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
@ConfigAttribute(type = String.class)
String JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME = JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD;
- @ConfigAttributeGetter(name = JMX_MANAGER_BIND_ADDRESS_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_BIND_ADDRESS)
String getJmxManagerBindAddress();
- @ConfigAttributeSetter(name = JMX_MANAGER_BIND_ADDRESS_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_BIND_ADDRESS)
void setJmxManagerBindAddress(String value);
@ConfigAttribute(type = String.class)
String JMX_MANAGER_BIND_ADDRESS_NAME = JMX_MANAGER_BIND_ADDRESS;
String DEFAULT_JMX_MANAGER_BIND_ADDRESS = "";
- @ConfigAttributeGetter(name = JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_HOSTNAME_FOR_CLIENTS)
String getJmxManagerHostnameForClients();
- @ConfigAttributeSetter(name = JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_HOSTNAME_FOR_CLIENTS)
void setJmxManagerHostnameForClients(String value);
@ConfigAttribute(type = String.class)
String JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME = JMX_MANAGER_HOSTNAME_FOR_CLIENTS;
String DEFAULT_JMX_MANAGER_HOSTNAME_FOR_CLIENTS = "";
- @ConfigAttributeGetter(name = JMX_MANAGER_PASSWORD_FILE_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_PASSWORD_FILE)
String getJmxManagerPasswordFile();
- @ConfigAttributeSetter(name = JMX_MANAGER_PASSWORD_FILE_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_PASSWORD_FILE)
void setJmxManagerPasswordFile(String value);
@ConfigAttribute(type = String.class)
String JMX_MANAGER_PASSWORD_FILE_NAME = JMX_MANAGER_PASSWORD_FILE;
String DEFAULT_JMX_MANAGER_PASSWORD_FILE = "";
- @ConfigAttributeGetter(name = JMX_MANAGER_ACCESS_FILE_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_ACCESS_FILE)
String getJmxManagerAccessFile();
- @ConfigAttributeSetter(name = JMX_MANAGER_ACCESS_FILE_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_ACCESS_FILE)
void setJmxManagerAccessFile(String value);
@ConfigAttribute(type = String.class)
@@ -3022,7 +3041,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @deprecated as of 8.0 use {@link #getHttpServicePort()} instead.
*/
- @ConfigAttributeGetter(name = JMX_MANAGER_HTTP_PORT_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_HTTP_PORT)
int getJmxManagerHttpPort();
/**
@@ -3031,13 +3050,13 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @param value the port number for jmx-manager HTTP service
* @deprecated as of 8.0 use {@link #setHttpServicePort(int)} instead.
*/
- @ConfigAttributeSetter(name = JMX_MANAGER_HTTP_PORT_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_HTTP_PORT)
void setJmxManagerHttpPort(int value);
/**
* The name of the "jmx-manager-http-port" property.
*
- * @deprecated as of 8.0 use {@link #HTTP_SERVICE_PORT_NAME} instead.
+ * @deprecated as of 8.0 use {@link #HTTP_SERVICE_PORT} instead.
*/
@ConfigAttribute(type = Integer.class, min = 0, max = 65535)
String JMX_MANAGER_HTTP_PORT_NAME = JMX_MANAGER_HTTP_PORT;
@@ -3050,10 +3069,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*/
int DEFAULT_JMX_MANAGER_HTTP_PORT = 7070;
- @ConfigAttributeGetter(name = JMX_MANAGER_UPDATE_RATE_NAME)
+ @ConfigAttributeGetter(name = JMX_MANAGER_UPDATE_RATE)
int getJmxManagerUpdateRate();
- @ConfigAttributeSetter(name = JMX_MANAGER_UPDATE_RATE_NAME)
+ @ConfigAttributeSetter(name = JMX_MANAGER_UPDATE_RATE)
void setJmxManagerUpdateRate(int value);
int DEFAULT_JMX_MANAGER_UPDATE_RATE = 2000;
@@ -3069,10 +3088,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the port on which GemFireMemcachedServer should be started
* @since GemFire 7.0
*/
- @ConfigAttributeGetter(name = MEMCACHED_PORT_NAME)
+ @ConfigAttributeGetter(name = MEMCACHED_PORT)
int getMemcachedPort();
- @ConfigAttributeSetter(name = MEMCACHED_PORT_NAME)
+ @ConfigAttributeSetter(name = MEMCACHED_PORT)
void setMemcachedPort(int value);
@ConfigAttribute(type = Integer.class, min = 0, max = 65535)
@@ -3086,10 +3105,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the protocol for GemFireMemcachedServer
* @since GemFire 7.0
*/
- @ConfigAttributeGetter(name = MEMCACHED_PROTOCOL_NAME)
+ @ConfigAttributeGetter(name = MEMCACHED_PROTOCOL)
String getMemcachedProtocol();
- @ConfigAttributeSetter(name = MEMCACHED_PROTOCOL_NAME)
+ @ConfigAttributeSetter(name = MEMCACHED_PROTOCOL)
void setMemcachedProtocol(String protocol);
@ConfigAttribute(type = String.class)
@@ -3103,10 +3122,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the bind address for GemFireMemcachedServer
* @since GemFire 7.0
*/
- @ConfigAttributeGetter(name = MEMCACHED_BIND_ADDRESS_NAME)
+ @ConfigAttributeGetter(name = MEMCACHED_BIND_ADDRESS)
String getMemcachedBindAddress();
- @ConfigAttributeSetter(name = MEMCACHED_BIND_ADDRESS_NAME)
+ @ConfigAttributeSetter(name = MEMCACHED_BIND_ADDRESS)
void setMemcachedBindAddress(String bindAddress);
@ConfigAttribute(type = String.class)
@@ -3120,10 +3139,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the port on which GemFireRedisServer should be started
* @since GemFire 8.0
*/
- @ConfigAttributeGetter(name = REDIS_PORT_NAME)
+ @ConfigAttributeGetter(name = REDIS_PORT)
int getRedisPort();
- @ConfigAttributeSetter(name = REDIS_PORT_NAME)
+ @ConfigAttributeSetter(name = REDIS_PORT)
void setRedisPort(int value);
@ConfigAttribute(type = Integer.class, min = 0, max = 65535)
@@ -3137,10 +3156,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the bind address for GemFireRedisServer
* @since GemFire 8.0
*/
- @ConfigAttributeGetter(name = REDIS_BIND_ADDRESS_NAME)
+ @ConfigAttributeGetter(name = REDIS_BIND_ADDRESS)
String getRedisBindAddress();
- @ConfigAttributeSetter(name = REDIS_BIND_ADDRESS_NAME)
+ @ConfigAttributeSetter(name = REDIS_BIND_ADDRESS)
void setRedisBindAddress(String bindAddress);
@ConfigAttribute(type = String.class)
@@ -3154,10 +3173,10 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the authentication password for GemFireRedisServer
* @since GemFire 8.0
*/
- @ConfigAttributeGetter(name = REDIS_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = REDIS_PASSWORD)
String getRedisPassword();
- @ConfigAttributeSetter(name = REDIS_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = REDIS_PASSWORD)
void setRedisPassword(String password);
@ConfigAttribute(type = String.class)
@@ -3173,7 +3192,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the HTTP service port
* @since GemFire 8.0
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_PORT_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_PORT)
int getHttpServicePort();
/**
@@ -3182,7 +3201,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @param value the port number for HTTP service
* @since GemFire 8.0
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_PORT_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_PORT)
void setHttpServicePort(int value);
/**
@@ -3206,7 +3225,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the bind-address for HTTP service
* @since GemFire 8.0
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_BIND_ADDRESS_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_BIND_ADDRESS)
String getHttpServiceBindAddress();
/**
@@ -3215,7 +3234,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @param value the bind-address for HTTP service
* @since GemFire 8.0
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_BIND_ADDRESS_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_BIND_ADDRESS)
void setHttpServiceBindAddress(String value);
/**
@@ -3239,7 +3258,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-enabled">"http-service-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_ENABLED_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_ENABLED)
boolean getHttpServiceSSLEnabled();
/**
@@ -3247,7 +3266,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-enabled">"http-service-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_ENABLED_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_ENABLED)
void setHttpServiceSSLEnabled(boolean httpServiceSSLEnabled);
/**
@@ -3267,7 +3286,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-require-authentication">"http-service-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION)
boolean getHttpServiceSSLRequireAuthentication();
/**
@@ -3275,7 +3294,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-require-authentication">"http-service-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION)
void setHttpServiceSSLRequireAuthentication(boolean httpServiceSSLRequireAuthentication);
/**
@@ -3295,7 +3314,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-protocols">"http-service-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_PROTOCOLS)
String getHttpServiceSSLProtocols();
/**
@@ -3303,7 +3322,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-protocols">"http-service-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_PROTOCOLS)
void setHttpServiceSSLProtocols(String protocols);
/**
@@ -3323,7 +3342,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-ciphers">"http-service-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_CIPHERS_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_CIPHERS)
String getHttpServiceSSLCiphers();
/**
@@ -3331,7 +3350,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-ciphers">"http-service-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_CIPHERS_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_CIPHERS)
void setHttpServiceSSLCiphers(String ciphers);
/**
@@ -3351,7 +3370,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-keystore">"http-service-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_KEYSTORE_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_KEYSTORE)
String getHttpServiceSSLKeyStore();
/**
@@ -3359,7 +3378,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-keystore">"http-service-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_KEYSTORE_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_KEYSTORE)
void setHttpServiceSSLKeyStore(String keyStore);
/**
@@ -3379,7 +3398,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-keystore-password">"http-service-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_KEYSTORE_PASSWORD)
String getHttpServiceSSLKeyStorePassword();
/**
@@ -3387,7 +3406,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-keystore-password">"http-service-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_KEYSTORE_PASSWORD)
void setHttpServiceSSLKeyStorePassword(String keyStorePassword);
/**
@@ -3407,7 +3426,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-keystore-type">"http-service-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_KEYSTORE_TYPE)
String getHttpServiceSSLKeyStoreType();
/**
@@ -3415,7 +3434,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-keystore-type">"http-service-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_KEYSTORE_TYPE)
void setHttpServiceSSLKeyStoreType(String keyStoreType);
/**
@@ -3435,7 +3454,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-truststore">"http-service-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_TRUSTSTORE)
String getHttpServiceSSLTrustStore();
/**
@@ -3443,7 +3462,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-truststore">"http-service-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_TRUSTSTORE)
void setHttpServiceSSLTrustStore(String trustStore);
/**
@@ -3463,7 +3482,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-truststore-password">"http-service-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD)
String getHttpServiceSSLTrustStorePassword();
/**
@@ -3471,7 +3490,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#http-service-ssl-truststore-password">"http-service-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD)
void setHttpServiceSSLTrustStorePassword(String trustStorePassword);
/**
@@ -3487,7 +3506,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
String HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME = HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD;
Properties getHttpServiceSSLProperties();
-
+
//Added for API REST
/**
@@ -3497,7 +3516,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @return the value of the property
* @since GemFire 8.0
*/
- @ConfigAttributeGetter(name = START_DEV_REST_API_NAME)
+ @ConfigAttributeGetter(name = START_DEV_REST_API)
boolean getStartDevRestApi();
/**
@@ -3506,7 +3525,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @param value for the property
* @since GemFire 8.0
*/
- @ConfigAttributeSetter(name = START_DEV_REST_API_NAME)
+ @ConfigAttributeSetter(name = START_DEV_REST_API)
void setStartDevRestApi(boolean value);
/**
@@ -3538,7 +3557,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
/**
* Gets the value of <a href="../DistributedSystem.html#disable-auto-reconnect">"disable-auto-reconnect"</a>
*/
- @ConfigAttributeGetter(name = DISABLE_AUTO_RECONNECT_NAME)
+ @ConfigAttributeGetter(name = DISABLE_AUTO_RECONNECT)
boolean getDisableAutoReconnect();
/**
@@ -3546,17 +3565,17 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
*
* @param value the new setting
*/
- @ConfigAttributeSetter(name = DISABLE_AUTO_RECONNECT_NAME)
+ @ConfigAttributeSetter(name = DISABLE_AUTO_RECONNECT)
void setDisableAutoReconnect(boolean value);
Properties getServerSSLProperties();
-
+
/**
* Returns the value of the <a
* href="../DistributedSystem.html#server-ssl-enabled">"server-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_ENABLED_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_ENABLED)
boolean getServerSSLEnabled();
/**
@@ -3575,7 +3594,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-enabled">"server-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_ENABLED_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_ENABLED)
void setServerSSLEnabled(boolean enabled);
/**
@@ -3583,7 +3602,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-protocols">"server-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_PROTOCOLS)
String getServerSSLProtocols();
/**
@@ -3591,7 +3610,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-protocols">"server-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_PROTOCOLS)
void setServerSSLProtocols(String protocols);
/**
@@ -3610,7 +3629,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-ciphers">"server-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_CIPHERS_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_CIPHERS)
String getServerSSLCiphers();
/**
@@ -3618,7 +3637,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-ciphers">"server-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_CIPHERS_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_CIPHERS)
void setServerSSLCiphers(String ciphers);
/**
@@ -3637,7 +3656,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-require-authentication">"server-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_REQUIRE_AUTHENTICATION)
boolean getServerSSLRequireAuthentication();
/**
@@ -3645,7 +3664,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-require-authentication">"server-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_REQUIRE_AUTHENTICATION)
void setServerSSLRequireAuthentication(boolean enabled);
/**
@@ -3664,7 +3683,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-keystore">"server-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_KEYSTORE_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_KEYSTORE)
String getServerSSLKeyStore();
/**
@@ -3672,7 +3691,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-keystore">"server-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_KEYSTORE_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_KEYSTORE)
void setServerSSLKeyStore(String keyStore);
/**
@@ -3692,7 +3711,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-keystore-type">"server-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_KEYSTORE_TYPE)
String getServerSSLKeyStoreType();
/**
@@ -3700,7 +3719,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-keystore-type">"server-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_KEYSTORE_TYPE)
void setServerSSLKeyStoreType(String keyStoreType);
/**
@@ -3720,7 +3739,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-keystore-password">"server-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_KEYSTORE_PASSWORD)
String getServerSSLKeyStorePassword();
/**
@@ -3728,7 +3747,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-keystore-password">"server-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_KEYSTORE_PASSWORD)
void setServerSSLKeyStorePassword(String keyStorePassword);
/**
@@ -3748,7 +3767,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-truststore">"server-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_TRUSTSTORE)
String getServerSSLTrustStore();
/**
@@ -3756,7 +3775,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-truststore">"server-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_TRUSTSTORE)
void setServerSSLTrustStore(String trustStore);
/**
@@ -3776,7 +3795,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-truststore-password">"server-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = SERVER_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = SERVER_SSL_TRUSTSTORE_PASSWORD)
String getServerSSLTrustStorePassword();
/**
@@ -3784,7 +3803,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#server-ssl-truststore-password">"server-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = SERVER_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = SERVER_SSL_TRUSTSTORE_PASSWORD)
void setServerSSLTrustStorePassword(String trusStorePassword);
/**
@@ -3804,7 +3823,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#cluster-ssl-enabled">"cluster-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_ENABLED_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_ENABLED)
boolean getGatewaySSLEnabled();
/**
@@ -3823,7 +3842,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-enabled">"gateway-ssl-enabled"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_ENABLED_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_ENABLED)
void setGatewaySSLEnabled(boolean enabled);
/**
@@ -3831,7 +3850,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-protocols">"gateway-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_PROTOCOLS)
String getGatewaySSLProtocols();
/**
@@ -3839,7 +3858,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-protocols">"gateway-ssl-protocols"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_PROTOCOLS_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_PROTOCOLS)
void setGatewaySSLProtocols(String protocols);
/**
@@ -3858,7 +3877,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-ciphers">"gateway-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_CIPHERS_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_CIPHERS)
String getGatewaySSLCiphers();
/**
@@ -3866,7 +3885,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-ciphers">"gateway-ssl-ciphers"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_CIPHERS_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_CIPHERS)
void setGatewaySSLCiphers(String ciphers);
/**
@@ -3885,7 +3904,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-require-authentication">"gateway-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_REQUIRE_AUTHENTICATION)
boolean getGatewaySSLRequireAuthentication();
/**
@@ -3893,7 +3912,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-require-authentication">"gateway-ssl-require-authentication"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_REQUIRE_AUTHENTICATION)
void setGatewaySSLRequireAuthentication(boolean enabled);
/**
@@ -3912,7 +3931,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-keystore">"gateway-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_KEYSTORE_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_KEYSTORE)
String getGatewaySSLKeyStore();
/**
@@ -3920,7 +3939,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-keystore">"gateway-ssl-keystore"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_KEYSTORE_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_KEYSTORE)
void setGatewaySSLKeyStore(String keyStore);
/**
@@ -3940,7 +3959,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-keystore-type">"gateway-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_KEYSTORE_TYPE)
String getGatewaySSLKeyStoreType();
/**
@@ -3948,7 +3967,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-keystore-type">"gateway-ssl-keystore-type"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_KEYSTORE_TYPE_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_KEYSTORE_TYPE)
void setGatewaySSLKeyStoreType(String keyStoreType);
/**
@@ -3968,7 +3987,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-keystore-password">"gateway-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_KEYSTORE_PASSWORD)
String getGatewaySSLKeyStorePassword();
/**
@@ -3976,7 +3995,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-keystore-password">"gateway-ssl-keystore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_KEYSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_KEYSTORE_PASSWORD)
void setGatewaySSLKeyStorePassword(String keyStorePassword);
/**
@@ -3996,7 +4015,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-truststore">"gateway-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_TRUSTSTORE)
String getGatewaySSLTrustStore();
/**
@@ -4004,7 +4023,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-truststore">"gateway-ssl-truststore"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_TRUSTSTORE_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_TRUSTSTORE)
void setGatewaySSLTrustStore(String trustStore);
/**
@@ -4024,7 +4043,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-truststore-password">"gateway-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeGetter(name = GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeGetter(name = GATEWAY_SSL_TRUSTSTORE_PASSWORD)
String getGatewaySSLTrustStorePassword();
/**
@@ -4032,7 +4051,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* href="../DistributedSystem.html#gateway-ssl-truststore-password">"gateway-ssl-truststore-password"</a>
* property.
*/
- @ConfigAttributeSetter(name = GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME)
+ @ConfigAttributeSetter(name = GATEWAY_SSL_TRUSTSTORE_PASSWORD)
void setGatewaySSLTrustStorePassword(String trusStorePassword);
/**
@@ -4064,7 +4083,7 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* Gets the value of <a href="../DistributedSystem.html#lock-memory">"lock-memory"</a>
* @since Geode 1.0
*/
- @ConfigAttributeGetter(name = LOCK_MEMORY_NAME)
+ @ConfigAttributeGetter(name = LOCK_MEMORY)
boolean getLockMemory();
/**
@@ -4073,16 +4092,16 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
* @param value the new setting
* @since Geode 1.0
*/
- @ConfigAttributeSetter(name = LOCK_MEMORY_NAME)
+ @ConfigAttributeSetter(name = LOCK_MEMORY)
void setLockMemory(boolean value);
@ConfigAttribute(type = String.class)
String SECURITY_SHIRO_INIT_NAME = SECURITY_SHIRO_INIT;
- @ConfigAttributeSetter(name = SECURITY_SHIRO_INIT_NAME)
+ @ConfigAttributeSetter(name = SECURITY_SHIRO_INIT)
void setShiroInit(String value);
- @ConfigAttributeGetter(name = SECURITY_SHIRO_INIT_NAME)
+ @ConfigAttributeGetter(name = SECURITY_SHIRO_INIT)
String getShiroInit();
//*************** Initializers to gather all the annotations in this class ************************
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index e1e5123..196d8f3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -35,6 +35,8 @@ import java.net.URL;
import java.net.UnknownHostException;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Provides an implementation of <code>DistributionConfig</code> that
* knows how to read the configuration file.
@@ -716,13 +718,13 @@ public class DistributionConfigImpl
initialize(props);
if (securityPeerAuthInit != null && securityPeerAuthInit.length() > 0) {
- System.setProperty(SECURITY_SYSTEM_PREFIX + SECURITY_PEER_AUTH_INIT_NAME,
+ System.setProperty(SECURITY_SYSTEM_PREFIX + SECURITY_PEER_AUTH_INIT,
securityPeerAuthInit);
}
if (securityPeerAuthenticator != null
&& securityPeerAuthenticator.length() > 0) {
System.setProperty(SECURITY_SYSTEM_PREFIX
- + SECURITY_PEER_AUTHENTICATOR_NAME, securityPeerAuthenticator);
+ + SECURITY_PEER_AUTHENTICATOR, securityPeerAuthenticator);
}
Iterator iter = security.entrySet().iterator();
@@ -843,7 +845,7 @@ public class DistributionConfigImpl
this.sourceMap.put(JMX_MANAGER_SSL_ENABLED,this.sourceMap.get(CLUSTER_SSL_ENABLED));
if(this.sourceMap.get(CLUSTER_SSL_CIPHERS)!=null) {
this.jmxManagerSslCiphers = this.clusterSSLCiphers;
- this.sourceMap.put(JMX_MANAGER_SSL_CIPHERS_NAME,this.sourceMap.get(CLUSTER_SSL_CIPHERS));
+ this.sourceMap.put(JMX_MANAGER_SSL_CIPHERS,this.sourceMap.get(CLUSTER_SSL_CIPHERS));
}
if(this.sourceMap.get(CLUSTER_SSL_PROTOCOLS)!=null) {
@@ -909,7 +911,7 @@ public class DistributionConfigImpl
* if http-service-ssl-*properties are given then use them, and copy the unspecified http-service properties from cluster-properties
*/
private void copySSLPropsToHTTPSSLProps() {
- boolean httpServiceSSLEnabledOverriden = this.sourceMap.get(HTTP_SERVICE_SSL_ENABLED_NAME) != null;
+ boolean httpServiceSSLEnabledOverriden = this.sourceMap.get(HTTP_SERVICE_SSL_ENABLED) != null;
boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED) != null;
@@ -1312,16 +1314,16 @@ public class DistributionConfigImpl
this.setAttribute(CLUSTER_SSL_ENABLED, (String) props.get( CLUSTER_SSL_ENABLED ), this.sourceMap.get(CLUSTER_SSL_ENABLED) );
}
// now set the security authInit if needed
- if (props.containsKey(SECURITY_PEER_AUTH_INIT_NAME)) {
- this.setAttribute(SECURITY_PEER_AUTH_INIT_NAME, (String)props
- .get(SECURITY_PEER_AUTH_INIT_NAME),
- this.sourceMap.get(SECURITY_PEER_AUTH_INIT_NAME));
+ if (props.containsKey(SECURITY_PEER_AUTH_INIT)) {
+ this.setAttribute(SECURITY_PEER_AUTH_INIT, (String)props
+ .get(SECURITY_PEER_AUTH_INIT),
+ this.sourceMap.get(SECURITY_PEER_AUTH_INIT));
}
// and security authenticator if needed
- if (props.containsKey(SECURITY_PEER_AUTHENTICATOR_NAME)) {
- this.setAttribute(SECURITY_PEER_AUTHENTICATOR_NAME, (String)props
- .get(SECURITY_PEER_AUTHENTICATOR_NAME),
- this.sourceMap.get(SECURITY_PEER_AUTHENTICATOR_NAME));
+ if (props.containsKey(SECURITY_PEER_AUTHENTICATOR)) {
+ this.setAttribute(SECURITY_PEER_AUTHENTICATOR, (String)props
+ .get(SECURITY_PEER_AUTHENTICATOR),
+ this.sourceMap.get(SECURITY_PEER_AUTHENTICATOR));
}
// Make attributes read only
@@ -1331,8 +1333,8 @@ public class DistributionConfigImpl
public void close() {
// Clear the extra stuff from System properties
Properties props = System.getProperties();
- props.remove(SECURITY_SYSTEM_PREFIX + SECURITY_PEER_AUTH_INIT_NAME);
- props.remove(SECURITY_SYSTEM_PREFIX + SECURITY_PEER_AUTHENTICATOR_NAME);
+ props.remove(SECURITY_SYSTEM_PREFIX + SECURITY_PEER_AUTH_INIT);
+ props.remove(SECURITY_SYSTEM_PREFIX + SECURITY_PEER_AUTHENTICATOR);
Iterator iter = security.keySet().iterator();
while (iter.hasNext()) {
@@ -1537,7 +1539,7 @@ public class DistributionConfigImpl
}
public void setHttpServicePort(int value) {
- this.httpServicePort = (Integer)checkAttribute(HTTP_SERVICE_PORT_NAME, value);
+ this.httpServicePort = (Integer)checkAttribute(HTTP_SERVICE_PORT, value);
}
public String getHttpServiceBindAddress() {
@@ -1545,7 +1547,7 @@ public class DistributionConfigImpl
}
public void setHttpServiceBindAddress(String value) {
- this.httpServiceBindAddress = (String)checkAttribute(HTTP_SERVICE_BIND_ADDRESS_NAME, value);
+ this.httpServiceBindAddress = (String)checkAttribute(HTTP_SERVICE_BIND_ADDRESS, value);
}
public boolean getStartDevRestApi(){
@@ -1565,7 +1567,7 @@ public class DistributionConfigImpl
}
public void setDeltaPropagation(boolean value) {
- this.deltaPropagation = (Boolean)checkAttribute(DELTA_PROPAGATION_PROP_NAME, value);
+ this.deltaPropagation = (Boolean)checkAttribute(DELTA_PROPAGATION, value);
}
public void setName(String value) {
@@ -1921,7 +1923,7 @@ public class DistributionConfigImpl
}
public void setSecurityClientAuthenticator(String value) {
- securityClientAuthenticator = (String)checkAttribute(SECURITY_CLIENT_AUTHENTICATOR_NAME, value);
+ securityClientAuthenticator = (String)checkAttribute(SECURITY_CLIENT_AUTHENTICATOR, value);
}
public String getSecurityClientDHAlgo() {
@@ -1929,7 +1931,7 @@ public class DistributionConfigImpl
}
public void setSecurityClientDHAlgo(String value) {
- securityClientDHAlgo = (String)checkAttribute(SECURITY_CLIENT_DHALGO_NAME, value);
+ securityClientDHAlgo = (String)checkAttribute(SECURITY_CLIENT_DHALGO, value);
}
public String getSecurityPeerAuthInit() {
@@ -1937,7 +1939,7 @@ public class DistributionConfigImpl
}
public void setSecurityPeerAuthInit(String value) {
- securityPeerAuthInit = (String)checkAttribute(SECURITY_PEER_AUTH_INIT_NAME, value);
+ securityPeerAuthInit = (String)checkAttribute(SECURITY_PEER_AUTH_INIT, value);
}
public String getSecurityPeerAuthenticator() {
@@ -1945,7 +1947,7 @@ public class DistributionConfigImpl
}
public void setSecurityPeerAuthenticator(String value) {
- securityPeerAuthenticator = (String)checkAttribute(SECURITY_PEER_AUTHENTICATOR_NAME, value);
+ securityPeerAuthenticator = (String)checkAttribute(SECURITY_PEER_AUTHENTICATOR, value);
}
public String getSecurityClientAccessor() {
@@ -1953,7 +1955,7 @@ public class DistributionConfigImpl
}
public void setSecurityClientAccessor(String value) {
- securityClientAccessor = (String)checkAttribute(SECURITY_CLIENT_ACCESSOR_NAME, value);
+ securityClientAccessor = (String)checkAttribute(SECURITY_CLIENT_ACCESSOR, value);
}
public String getSecurityClientAccessorPP() {
@@ -1961,7 +1963,7 @@ public class DistributionConfigImpl
}
public void setSecurityClientAccessorPP(String value) {
- securityClientAccessorPP = (String)checkAttribute(SECURITY_CLIENT_ACCESSOR_PP_NAME, value);
+ securityClientAccessorPP = (String)checkAttribute(SECURITY_CLIENT_ACCESSOR_PP, value);
}
public int getSecurityLogLevel() {
@@ -1969,7 +1971,7 @@ public class DistributionConfigImpl
}
public void setSecurityLogLevel(int value) {
- securityLogLevel = (Integer)checkAttribute(SECURITY_LOG_LEVEL_NAME, value);
+ securityLogLevel = (Integer)checkAttribute(SECURITY_LOG_LEVEL, value);
}
public File getSecurityLogFile() {
@@ -1977,7 +1979,7 @@ public class DistributionConfigImpl
}
public void setSecurityLogFile(File value) {
- securityLogFile = (File)checkAttribute(SECURITY_LOG_FILE_NAME, value);
+ securityLogFile = (File)checkAttribute(SECURITY_LOG_FILE, value);
}
public int getSecurityPeerMembershipTimeout() {
@@ -1985,7 +1987,7 @@ public class DistributionConfigImpl
}
public void setSecurityPeerMembershipTimeout(int value) {
- securityPeerMembershipTimeout = (Integer)checkAttribute(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME, value);
+ securityPeerMembershipTimeout = (Integer)checkAttribute(SECURITY_PEER_VERIFY_MEMBER_TIMEOUT, value);
}
public Properties getSecurityProps() {
@@ -2015,7 +2017,7 @@ public class DistributionConfigImpl
}
public void setDistributedSystemId(int distributedSystemId) {
- this.distributedSystemId = (Integer)checkAttribute(DISTRIBUTED_SYSTEM_ID_NAME, distributedSystemId);
+ this.distributedSystemId = (Integer)checkAttribute(DISTRIBUTED_SYSTEM_ID, distributedSystemId);
}
@@ -2029,12 +2031,12 @@ public class DistributionConfigImpl
}
public void setEnforceUniqueHost(boolean enforceUniqueHost) {
- this.enforceUniqueHost = (Boolean)checkAttribute(ENFORCE_UNIQUE_HOST_NAME, enforceUniqueHost);
+ this.enforceUniqueHost = (Boolean)checkAttribute(ENFORCE_UNIQUE_HOST, enforceUniqueHost);
}
public void setRedundancyZone(String redundancyZone) {
- this.redundancyZone = (String)checkAttribute(REDUNDANCY_ZONE_NAME, redundancyZone);
+ this.redundancyZone = (String)checkAttribute(REDUNDANCY_ZONE, redundancyZone);
}
@@ -2082,7 +2084,7 @@ public class DistributionConfigImpl
if (value == null) {
value = DEFAULT_GROUPS;
}
- this.groups = (String)checkAttribute(GROUPS_NAME, value);
+ this.groups = (String)checkAttribute(GROUPS, value);
}
@Override
@@ -2143,27 +2145,27 @@ public class DistributionConfigImpl
}
public void setJmxManagerSSLKeyStore( String value ) {
- value = (String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_NAME, value);
+ value = (String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE, value);
this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
this.jmxManagerSSLKeyStore = value;
}
public void setJmxManagerSSLKeyStoreType( String value ) {
- value =(String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME, value);
+ value =(String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_TYPE, value);
this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
this.jmxManagerSSLKeyStoreType = value;
}
public void setJmxManagerSSLKeyStorePassword( String value ) {
- value = (String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME, value);
+ value = (String)checkAttribute(JMX_MANAGER_SSL_KEYSTORE_PASSWORD, value);
this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
this.jmxManagerSSLKeyStorePassword = value;
}
public void setJmxManagerSSLTrustStore( String value ) {
- value = (String)checkAttribute(JMX_MANAGER_SSL_TRUSTSTORE_NAME, value);
+ value = (String)checkAttribute(JMX_MANAGER_SSL_TRUSTSTORE, value);
this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
this.jmxManagerSSLTrustStore = value;
}
public void setJmxManagerSSLTrustStorePassword( String value ) {
- value = (String)checkAttribute(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME, value);
+ value = (String)checkAttribute(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD, value);
this.getJmxSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
this.jmxManagerSSLTrustStorePassword =value;
}
@@ -2193,7 +2195,7 @@ public class DistributionConfigImpl
}
@Override
public void setJmxManagerPort(int value) {
- this.jmxManagerPort = (Integer)checkAttribute(JMX_MANAGER_PORT_NAME, value);
+ this.jmxManagerPort = (Integer)checkAttribute(JMX_MANAGER_PORT, value);
}
@Override
public String getJmxManagerBindAddress() {
@@ -2204,7 +2206,7 @@ public class DistributionConfigImpl
if (value == null) {
value = "";
}
- this.jmxManagerBindAddress = (String)checkAttribute(JMX_MANAGER_BIND_ADDRESS_NAME, value);
+ this.jmxManagerBindAddress = (String)checkAttribute(JMX_MANAGER_BIND_ADDRESS, value);
}
@Override
public String getJmxManagerHostnameForClients() {
@@ -2215,7 +2217,7 @@ public class DistributionConfigImpl
if (value == null) {
value = "";
}
- this.jmxManagerHostnameForClients = (String)checkAttribute(JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME, value);
+ this.jmxManagerHostnameForClients = (String)checkAttribute(JMX_MANAGER_HOSTNAME_FOR_CLIENTS, value);
}
@Override
public String getJmxManagerPasswordFile() {
@@ -2226,7 +2228,7 @@ public class DistributionConfigImpl
if (value == null) {
value = "";
}
- this.jmxManagerPasswordFile = (String)checkAttribute(JMX_MANAGER_PASSWORD_FILE_NAME, value);
+ this.jmxManagerPasswordFile = (String)checkAttribute(JMX_MANAGER_PASSWORD_FILE, value);
}
@Override
public String getJmxManagerAccessFile() {
@@ -2237,7 +2239,7 @@ public class DistributionConfigImpl
if (value == null) {
value = "";
}
- this.jmxManagerAccessFile = (String)checkAttribute(JMX_MANAGER_ACCESS_FILE_NAME, value);
+ this.jmxManagerAccessFile = (String)checkAttribute(JMX_MANAGER_ACCESS_FILE, value);
}
@Override
@@ -2257,7 +2259,7 @@ public class DistributionConfigImpl
@Override
public void setJmxManagerUpdateRate(int value) {
- this.jmxManagerUpdateRate = (Integer)checkAttribute(JMX_MANAGER_UPDATE_RATE_NAME, value);
+ this.jmxManagerUpdateRate = (Integer)checkAttribute(JMX_MANAGER_UPDATE_RATE, value);
}
@Override
@@ -3112,7 +3114,7 @@ public class DistributionConfigImpl
* Set the host-port information of remote site locator
*/
public void setRemoteLocators(String value) {
- this.remoteLocators = (String)checkAttribute(REMOTE_LOCATORS_NAME, value);
+ this.remoteLocators = (String)checkAttribute(REMOTE_LOCATORS, value);
}
/**
@@ -3133,7 +3135,7 @@ public class DistributionConfigImpl
@Override
public void setMemcachedPort(int value) {
- this.memcachedPort = (Integer)checkAttribute(MEMCACHED_PORT_NAME, value);
+ this.memcachedPort = (Integer)checkAttribute(MEMCACHED_PORT, value);
}
@Override
@@ -3143,7 +3145,7 @@ public class DistributionConfigImpl
@Override
public void setMemcachedProtocol(String protocol) {
- this.memcachedProtocol = (String)checkAttribute(MEMCACHED_PROTOCOL_NAME, protocol);
+ this.memcachedProtocol = (String)checkAttribute(MEMCACHED_PROTOCOL, protocol);
}
@Override
@@ -3153,7 +3155,7 @@ public class DistributionConfigImpl
@Override
public void setRedisPort(int value) {
- this.redisPort = (Integer)checkAttribute(REDIS_PORT_NAME, value);
+ this.redisPort = (Integer)checkAttribute(REDIS_PORT, value);
}
@Override
@@ -3163,7 +3165,7 @@ public class DistributionConfigImpl
@Override
public void setRedisBindAddress(String bindAddress) {
- this.redisBindAddress = (String)checkAttribute(REDIS_BIND_ADDRESS_NAME, bindAddress);
+ this.redisBindAddress = (String)checkAttribute(REDIS_BIND_ADDRESS, bindAddress);
}
@Override
@@ -3183,7 +3185,7 @@ public class DistributionConfigImpl
@Override
public void setOffHeapMemorySize(String value) {
- this.offHeapMemorySize = (String)checkAttribute(OFF_HEAP_MEMORY_SIZE_NAME, value);
+ this.offHeapMemorySize = (String)checkAttribute(OFF_HEAP_MEMORY_SIZE, value);
}
@Override
@@ -3193,7 +3195,7 @@ public class DistributionConfigImpl
@Override
public void setMemcachedBindAddress(String bindAddress) {
- this.memcachedBindAddress = (String)checkAttribute(MEMCACHED_BIND_ADDRESS_NAME, bindAddress);
+ this.memcachedBindAddress = (String)checkAttribute(MEMCACHED_BIND_ADDRESS, bindAddress);
}
@Override
@@ -3242,7 +3244,7 @@ public class DistributionConfigImpl
@Override
public void setServerSSLEnabled(boolean value) {
- this.serverSSLEnabled = (Boolean)checkAttribute(SERVER_SSL_ENABLED_NAME, value);
+ this.serverSSLEnabled = (Boolean)checkAttribute(SERVER_SSL_ENABLED, value);
}
@@ -3253,7 +3255,7 @@ public class DistributionConfigImpl
@Override
public void setServerSSLRequireAuthentication(boolean value) {
- this.serverSslRequireAuthentication = (Boolean)checkAttribute(SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, value);
+ this.serverSslRequireAuthentication = (Boolean)checkAttribute(SERVER_SSL_REQUIRE_AUTHENTICATION, value);
}
@Override
@@ -3263,7 +3265,7 @@ public class DistributionConfigImpl
@Override
public void setServerSSLProtocols(String protocols) {
- this.serverSslProtocols = (String)checkAttribute(SERVER_SSL_PROTOCOLS_NAME, protocols);
+ this.serverSslProtocols = (String)checkAttribute(SERVER_SSL_PROTOCOLS, protocols);
}
@Override
@@ -3273,31 +3275,31 @@ public class DistributionConfigImpl
@Override
public void setServerSSLCiphers(String ciphers) {
- this.serverSslCiphers = (String)checkAttribute(SERVER_SSL_CIPHERS_NAME, ciphers);
+ this.serverSslCiphers = (String)checkAttribute(SERVER_SSL_CIPHERS, ciphers);
}
public void setServerSSLKeyStore( String value ) {
- value = (String)checkAttribute(SERVER_SSL_KEYSTORE_NAME, value);
+ value = (String)checkAttribute(SERVER_SSL_KEYSTORE, value);
this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
this.serverSSLKeyStore = value;
}
public void setServerSSLKeyStoreType( String value ) {
- value = (String)checkAttribute(SERVER_SSL_KEYSTORE_TYPE_NAME, value);
+ value = (String)checkAttribute(SERVER_SSL_KEYSTORE_TYPE, value);
this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
this.serverSSLKeyStoreType = value;
}
public void setServerSSLKeyStorePassword( String value ) {
- value = (String) checkAttribute(SERVER_SSL_KEYSTORE_PASSWORD_NAME, value );
+ value = (String) checkAttribute(SERVER_SSL_KEYSTORE_PASSWORD, value );
this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
this.serverSSLKeyStorePassword = value;
}
public void setServerSSLTrustStore( String value ) {
- value = (String)checkAttribute(SERVER_SSL_TRUSTSTORE_NAME, value);
+ value = (String)checkAttribute(SERVER_SSL_TRUSTSTORE, value);
this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
this.serverSSLTrustStore = value;
}
public void setServerSSLTrustStorePassword( String value ) {
- value = (String)checkAttribute(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, value);
+ value = (String)checkAttribute(SERVER_SSL_TRUSTSTORE_PASSWORD, value);
this.getServerSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
this.serverSSLTrustStorePassword = value;
}
@@ -3333,7 +3335,7 @@ public class DistributionConfigImpl
@Override
public void setGatewaySSLEnabled(boolean value) {
- this.gatewaySSLEnabled = (Boolean)checkAttribute(SERVER_SSL_ENABLED_NAME, value);
+ this.gatewaySSLEnabled = (Boolean)checkAttribute(SERVER_SSL_ENABLED, value);
}
@@ -3344,7 +3346,7 @@ public class DistributionConfigImpl
@Override
public void setGatewaySSLRequireAuthentication(boolean value) {
- this.gatewaySslRequireAuthentication = (Boolean)checkAttribute(GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, value);
+ this.gatewaySslRequireAuthentication = (Boolean)checkAttribute(GATEWAY_SSL_REQUIRE_AUTHENTICATION, value);
}
@Override
@@ -3354,7 +3356,7 @@ public class DistributionConfigImpl
@Override
public void setGatewaySSLProtocols(String protocols) {
- this.gatewaySslProtocols = (String)checkAttribute(SERVER_SSL_PROTOCOLS_NAME, protocols);
+ this.gatewaySslProtocols = (String)checkAttribute(SERVER_SSL_PROTOCOLS, protocols);
}
@Override
@@ -3364,31 +3366,31 @@ public class DistributionConfigImpl
@Override
public void setGatewaySSLCiphers(String ciphers) {
- this.gatewaySslCiphers = (String)checkAttribute(GATEWAY_SSL_CIPHERS_NAME, ciphers);
+ this.gatewaySslCiphers = (String)checkAttribute(GATEWAY_SSL_CIPHERS, ciphers);
}
public void setGatewaySSLKeyStore( String value ) {
- checkAttribute(GATEWAY_SSL_KEYSTORE_NAME, value);
+ checkAttribute(GATEWAY_SSL_KEYSTORE, value);
this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
this.gatewaySSLKeyStore = value;
}
public void setGatewaySSLKeyStoreType( String value ) {
- checkAttribute(GATEWAY_SSL_KEYSTORE_TYPE_NAME, value);
+ checkAttribute(GATEWAY_SSL_KEYSTORE_TYPE, value);
this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
this.gatewaySSLKeyStoreType = value;
}
public void setGatewaySSLKeyStorePassword( String value ) {
- checkAttribute(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME, value);
+ checkAttribute(GATEWAY_SSL_KEYSTORE_PASSWORD, value);
this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
this.gatewaySSLKeyStorePassword = value;
}
public void setGatewaySSLTrustStore( String value ) {
- checkAttribute(GATEWAY_SSL_TRUSTSTORE_NAME, value);
+ checkAttribute(GATEWAY_SSL_TRUSTSTORE, value);
this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
this.gatewaySSLTrustStore = value;
}
public void setGatewaySSLTrustStorePassword( String value ) {
- checkAttribute(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, value);
+ checkAttribute(GATEWAY_SSL_TRUSTSTORE_PASSWORD, value);
this.getGatewaySSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
this.gatewaySSLTrustStorePassword = value;
}
@@ -3465,7 +3467,7 @@ public class DistributionConfigImpl
@Override
public void setHttpServiceSSLKeyStore(String httpServiceSSLKeyStore) {
- checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_NAME, httpServiceSSLKeyStore);
+ checkAttribute(HTTP_SERVICE_SSL_KEYSTORE, httpServiceSSLKeyStore);
this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, httpServiceSSLKeyStore);
this.httpServiceSSLKeyStore = httpServiceSSLKeyStore;
}
@@ -3477,7 +3479,7 @@ public class DistributionConfigImpl
@Override
public void setHttpServiceSSLKeyStoreType(String httpServiceSSLKeyStoreType) {
- checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, httpServiceSSLKeyStoreType);
+ checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_TYPE, httpServiceSSLKeyStoreType);
this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, httpServiceSSLKeyStoreType);
this.httpServiceSSLKeyStoreType = httpServiceSSLKeyStoreType;
}
@@ -3489,7 +3491,7 @@ public class DistributionConfigImpl
@Override
public void setHttpServiceSSLKeyStorePassword(String httpServiceSSLKeyStorePassword) {
- checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, httpServiceSSLKeyStorePassword);
+ checkAttribute(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, httpServiceSSLKeyStorePassword);
this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME,
httpServiceSSLKeyStorePassword);
this.httpServiceSSLKeyStorePassword = httpServiceSSLKeyStorePassword;
@@ -3502,7 +3504,7 @@ public class DistributionConfigImpl
@Override
public void setHttpServiceSSLTrustStore(String httpServiceSSLTrustStore) {
- checkAttribute(HTTP_SERVICE_SSL_TRUSTSTORE_NAME, httpServiceSSLTrustStore);
+ checkAttribute(HTTP_SERVICE_SSL_TRUSTSTORE, httpServiceSSLTrustStore);
this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, httpServiceSSLTrustStore);
this.httpServiceSSLTrustStore = httpServiceSSLTrustStore;
}
@@ -3514,7 +3516,7 @@ public class DistributionConfigImpl
@Override
public void setHttpServiceSSLTrustStorePassword(String httpServiceSSLTrustStorePassword) {
- checkAttribute(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME, httpServiceSSLTrustStorePassword);
+ checkAttribute(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD, httpServiceSSLTrustStorePassword);
this.getHttpServiceSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME,
httpServiceSSLTrustStorePassword);
this.httpServiceSSLTrustStorePassword = httpServiceSSLTrustStorePassword;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
index ff95cef..2c674f8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
@@ -129,7 +129,7 @@ public final class RuntimeDistributionConfigImpl
}
public List<String> getModifiableAttributes(){
- String[] modifiables = {HTTP_SERVICE_PORT_NAME,JMX_MANAGER_HTTP_PORT_NAME, ARCHIVE_DISK_SPACE_LIMIT,
+ String[] modifiables = {HTTP_SERVICE_PORT,JMX_MANAGER_HTTP_PORT, ARCHIVE_DISK_SPACE_LIMIT,
ARCHIVE_FILE_SIZE_LIMIT, LOG_DISK_SPACE_LIMIT, LOG_FILE_SIZE_LIMIT,
LOG_LEVEL, STATISTIC_ARCHIVE_FILE, STATISTIC_SAMPLE_RATE, STATISTIC_SAMPLING_ENABLED};
return Arrays.asList(modifiables);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index c6558fd..dae240f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -161,7 +161,7 @@ public abstract class AbstractConfig implements Config {
}
}
// hide the shiro-init configuration for now. Remove after we can allow customer to specify shiro.ini file
- if(attName.equals(DistributionConfig.SECURITY_SHIRO_INIT_NAME)){
+ if(attName.equals(DistributionConfig.SECURITY_SHIRO_INIT)){
continue;
}
pw.print(attName);
@@ -216,7 +216,7 @@ public abstract class AbstractConfig implements Config {
return true;
} else if (attName.equals(SSL_REQUIRE_AUTHENTICATION)) {
return true;
- } else if (attName.equals(DistributionConfig.JMX_MANAGER_SSL_NAME)) {
+ } else if (attName.equals(JMX_MANAGER_SSL)) {
return true;
}
return false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
index 696f322..06b5721 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
@@ -312,7 +312,7 @@ public class RemoteTransportConfig implements TransportConfig {
props.setProperty(DISABLE_TCP,
this.tcpDisabled? "true" : "false");
- props.setProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, this.disableAutoReconnect? "true" : "false");
+ props.setProperty(DISABLE_AUTO_RECONNECT, this.disableAutoReconnect? "true" : "false");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
index c04ae48..4bf8fea 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
@@ -435,7 +435,7 @@ public class CacheServerLauncher {
options.put(DISABLE_DEFAULT_SERVER, Boolean.TRUE);
}
else if (arg.startsWith("-lock-memory")) {
- props.put(DistributionConfig.LOCK_MEMORY_NAME, "true");
+ props.put(LOCK_MEMORY, "true");
}
else if (arg.startsWith("-server-port")) {
options.put(SERVER_PORT, arg.substring(arg.indexOf("=") + 1));
[63/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/f84b1c08
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/f84b1c08
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/f84b1c08
Branch: refs/heads/develop
Commit: f84b1c084d0497eb196abdeba0282183ff6c3145
Parents: 0a05985
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Jun 1 05:15:38 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../cache/tier/sockets/InterestRegrListenerDUnitTest.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f84b1c08/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
index 7f70ed9..8ab5f53 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
@@ -50,7 +50,7 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
private static final String UNREGISTER_INTEREST = "UnregisterInterest";
private static final String REGISTER_INTEREST = "RegisterInterest";
- private static final int DURABLE_CLIENT_TIMEOUT=20;
+ private static final int DURABLE_CLIENT_TIMEOUT_TEST=20;
private static InterestRegrListenerDUnitTest instance = new InterestRegrListenerDUnitTest("InterestRegrListenerDUnitTest");
@@ -170,7 +170,7 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
Properties gemFireProps = new Properties();
if (isDurable) {
gemFireProps.put(DURABLE_CLIENT_ID, vmID);
- gemFireProps.put(DURABLE_CLIENT_TIMEOUT, "" + DURABLE_CLIENT_TIMEOUT);
+ gemFireProps.put(DURABLE_CLIENT_TIMEOUT, "" + DURABLE_CLIENT_TIMEOUT_TEST);
}
ClientCacheFactory clientCacheFactory = new ClientCacheFactory(gemFireProps);
clientCacheFactory.addPoolServer(host, port);
@@ -293,7 +293,7 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
assertEquals(3, registerCount);
assertEquals(0, unregisterCount);
LogWriterUtils.getLogWriter().info("Sleeping till durable client queue are expired and unregister event is called on to listener");
- Thread.sleep((DURABLE_CLIENT_TIMEOUT+5)*1000);
+ Thread.sleep((DURABLE_CLIENT_TIMEOUT_TEST+5)*1000);
listnerMap = (Map<String, Integer>) serverVM.invoke(() -> InterestRegrListenerDUnitTest.getListenerMapTask());
LogWriterUtils.getLogWriter().info("Listener Map after sleeping " + listnerMap);
registerCount = getMapValueForKey(listnerMap,REGISTER_INTEREST);
@@ -355,7 +355,7 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
assertEquals(3, registerCount);
assertEquals(0, unregisterCount);
LogWriterUtils.getLogWriter().info("Sleeping till durable client queue are expired and unregister event is called on to listener");
- Thread.sleep((DURABLE_CLIENT_TIMEOUT+5)*1000);
+ Thread.sleep((DURABLE_CLIENT_TIMEOUT_TEST+5)*1000);
listnerMap = (Map<String, Integer>) serverVM.invoke(() -> InterestRegrListenerDUnitTest.getListenerMapTask());
LogWriterUtils.getLogWriter().info("Listener Map after sleeping " + listnerMap);
registerCount = getMapValueForKey(listnerMap,REGISTER_INTEREST);
@@ -441,7 +441,7 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
Wait.waitForCriterion(wc, 20000, 500, true);
LogWriterUtils.getLogWriter().info("Sleeping till durable client queue are expired and unregister event is called on to listener");
- Thread.sleep((DURABLE_CLIENT_TIMEOUT+5)*1000);
+ Thread.sleep((DURABLE_CLIENT_TIMEOUT_TEST+5)*1000);
serverVM.invoke(() -> InterestRegrListenerDUnitTest.closeCacheTask());
}
[06/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
index 8f80877..3e21a7a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
@@ -16,12 +16,18 @@
*/
package com.gemstone.gemfire.management.internal.configuration;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.jayway.awaitility.Awaitility.*;
-import static java.util.stream.Collectors.*;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
+import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
+import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.io.File;
import java.io.FileInputStream;
@@ -33,18 +39,13 @@ import java.util.Arrays;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
-import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-import com.gemstone.gemfire.util.test.TestUtil;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.jayway.awaitility.Awaitility.waitAtMost;
+import static java.util.stream.Collectors.joining;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
@Category(DistributedTest.class)
public class SharedConfigurationUsingDirDUnitTest extends JUnit4CacheTestCase {
@@ -268,14 +269,14 @@ public class SharedConfigurationUsingDirDUnitTest extends JUnit4CacheTestCase {
final String locatorName = "locator" + i;
final File logFile = new File("locator-" + i + ".log");
final Properties props = new Properties();
- props.setProperty(NAME_NAME, locatorName);
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
- props.setProperty(LOAD_CLUSTER_CONFIG_FROM_DIR_NAME, "true");
+ props.setProperty(NAME, locatorName);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
+ props.setProperty(LOAD_CLUSTER_CONFIGURATION_FROM_DIR, "true");
if (locatorPorts.length > 1) {
int otherLocatorPort = locatorPorts[(i + 1) % locatorPorts.length];
- props.setProperty(LOCATORS_NAME, "localhost[" + otherLocatorPort + "]");
+ props.setProperty(LOCATORS, "localhost[" + otherLocatorPort + "]");
}
Locator.startLocatorAndDS(locatorPorts[i], logFile, props);
@@ -305,12 +306,12 @@ public class SharedConfigurationUsingDirDUnitTest extends JUnit4CacheTestCase {
disconnectFromDS();
final Properties props = new Properties();
- props.setProperty(NAME_NAME, "member" + i);
- props.setProperty(MCAST_PORT_NAME, "0");
- props.setProperty(LOCATORS_NAME, getLocatorStr(locatorPorts));
- props.setProperty(LOG_FILE_NAME, "server-" + i + ".log");
- props.setProperty(USE_CLUSTER_CONFIGURATION_NAME, "true");
- props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ props.setProperty(SystemConfigurationProperties.NAME, "member" + i);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getLocatorStr(locatorPorts));
+ props.setProperty(LOG_FILE, "server-" + i + ".log");
+ props.setProperty(USE_CLUSTER_CONFIGURATION, "true");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
getSystem(props);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java
index 340c637..d2a05fc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/utils/XmlUtilsAddNewNodeJUnitTest.java
@@ -16,16 +16,14 @@
*/
package com.gemstone.gemfire.management.internal.configuration.utils;
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPathExpressionException;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
+import com.gemstone.gemfire.internal.cache.extension.Extension;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
+import com.gemstone.gemfire.management.internal.configuration.domain.XmlEntity;
+import com.gemstone.gemfire.management.internal.configuration.utils.XmlUtils.XPathContext;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
@@ -37,14 +35,15 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
-import com.gemstone.gemfire.internal.cache.extension.Extension;
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
-import com.gemstone.gemfire.management.internal.configuration.domain.XmlEntity;
-import com.gemstone.gemfire.management.internal.configuration.utils.XmlUtils.XPathContext;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPathExpressionException;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.List;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
* Unit tests for {@link XmlUtils#addNewNode(Document, XmlEntity)} and
@@ -68,7 +67,7 @@ public class XmlUtilsAddNewNodeJUnitTest {
@BeforeClass
public static void beforeClass() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
xPathContext.addNamespace(CacheXml.PREFIX, CacheXml.GEODE_NAMESPACE);
xPathContext.addNamespace(TEST_PREFIX, TEST_NAMESPACE);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
index b4a43b4..cbe7c69 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestClientIdsDUnitTest.java
@@ -16,37 +16,24 @@
*/
package com.gemstone.gemfire.management.internal.pulse;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.management.CacheServerMXBean;
import com.gemstone.gemfire.management.MBeanUtil;
import com.gemstone.gemfire.management.ManagementTestBase;
import com.gemstone.gemfire.management.internal.cli.CliUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is for testing client IDs
@@ -175,8 +162,8 @@ public class TestClientIdsDUnitTest extends DistributedTestCase {
public Cache createClientCache(String host, Integer port1) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
Cache cache = createCache(props);
PoolImpl p = (PoolImpl) PoolManager.createFactory()
.addServer(host, port1.intValue()).setSubscriptionEnabled(false)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
index 8567822..3f8d758 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/pulse/TestSubscriptionsDUnitTest.java
@@ -16,37 +16,23 @@
*/
package com.gemstone.gemfire.management.internal.pulse;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.management.DistributedRegionMXBean;
import com.gemstone.gemfire.management.DistributedSystemMXBean;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.ManagementTestBase;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is for testing subscriptions
@@ -176,8 +162,8 @@ public class TestSubscriptionsDUnitTest extends DistributedTestCase {
public Cache createClientCache(String host, Integer port1) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
Cache cache = createCache(props);
PoolImpl p = (PoolImpl) PoolManager.createFactory()
.addServer(host, port1.intValue()).setSubscriptionEnabled(true)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
index f34be0b..7227371 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ExampleJSONAuthorization.java
@@ -16,34 +16,28 @@
*/
package com.gemstone.gemfire.management.internal.security;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.StringWriter;
-import java.security.Principal;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import javax.management.remote.JMXPrincipal;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.operations.OperationContext;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.security.AccessControl;
import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.security.Authenticator;
import com.gemstone.gemfire.security.NotAuthorizedException;
-
import org.apache.commons.io.IOUtils;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
+import javax.management.remote.JMXPrincipal;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.StringWriter;
+import java.security.Principal;
+import java.util.*;
+
public class ExampleJSONAuthorization implements AccessControl, Authenticator {
public static class Role {
@@ -100,7 +94,7 @@ public class ExampleJSONAuthorization implements AccessControl, Authenticator {
user.pwd = user.name;
}
- JSONArray ops = obj.getJSONArray("roles");
+ JSONArray ops = obj.getJSONArray(DistributionConfig.ROLES_NAME);
for (int j = 0; j < ops.length(); j++) {
String roleName = ops.getString(j);
user.roles.add(roleMap.get(roleName));
@@ -111,7 +105,7 @@ public class ExampleJSONAuthorization implements AccessControl, Authenticator {
private static Map<String, Role> readRoles(JSONObject jsonBean) throws JSONException {
Map<String, Role> roleMap = new HashMap<>();
- JSONArray array = jsonBean.getJSONArray("roles");
+ JSONArray array = jsonBean.getJSONArray(DistributionConfig.ROLES_NAME);
for (int i = 0; i < array.length(); i++) {
JSONObject obj = array.getJSONObject(i);
Role role = new Role();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
index 52f37e6..e56ab85 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
@@ -20,7 +20,6 @@ package com.gemstone.gemfire.management.internal.security;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
index d8c20eb..8568b1a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
@@ -17,23 +17,22 @@
package com.gemstone.gemfire.management.internal.security;
-import static org.assertj.core.api.Assertions.*;
-
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.operations.OperationContext;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
import com.gemstone.gemfire.security.GemFireSecurityException;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
import org.apache.shiro.util.ThreadContext;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.Properties;
+
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
+
/**
* this test and ShiroUtilCustomRealmJUunitTest uses the same test body, but initialize the SecurityUtils differently.
* If you change shiro.ini, remmber to change the shiro-ini.json to match the changes as well.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
index ac81c76..ebbf7d9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JSONAuthorization.java
@@ -43,6 +43,27 @@ import java.util.Properties;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.StreamSupport;
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.operations.OperationContext;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.security.AccessControl;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
+import com.gemstone.gemfire.security.Authenticator;
+import com.gemstone.gemfire.security.NotAuthorizedException;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import javax.management.remote.JMXPrincipal;
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.security.Principal;
+import java.util.*;
public class JSONAuthorization implements AccessControl, Authenticator {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
index e6654d5..f4a4e59 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
@@ -16,13 +16,17 @@
*/
package com.gemstone.gemfire.management.internal.security;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import org.junit.rules.ExternalResource;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class JsonAuthorizationCacheStartRule extends ExternalResource {
private Cache cache;
private int jmxManagerPort = 0;
@@ -51,9 +55,9 @@ public class JsonAuthorizationCacheStartRule extends ExternalResource {
protected void before() throws Throwable {
Properties properties = new Properties();
- properties.put(DistributionConfig.NAME_NAME, JsonAuthorizationCacheStartRule.class.getSimpleName());
- properties.put(DistributionConfig.LOCATORS_NAME, "");
- properties.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ properties.put(SystemConfigurationProperties.NAME, JsonAuthorizationCacheStartRule.class.getSimpleName());
+ properties.put(LOCATORS, "");
+ properties.put(MCAST_PORT, "0");
properties.put(DistributionConfig.JMX_MANAGER_NAME, "true");
properties.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
properties.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxManagerPort));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
index d92f89e..6ec3c10 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
@@ -17,13 +17,7 @@
package com.gemstone.gemfire.management.internal.security;
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.management.cli.Result.Status;
@@ -39,18 +33,25 @@ import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
import com.jayway.awaitility.Awaitility;
-
import org.json.JSONException;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import static org.junit.Assert.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
@Category({ DistributedTest.class, SecurityTest.class })
public class MultiUserDUnitTest extends CliCommandTestBase {
@Test
public void testMultiUser() throws IOException, JSONException, InterruptedException {
Properties properties = new Properties();
- properties.put(DistributionConfig.NAME_NAME, MultiUserDUnitTest.class.getSimpleName());
+ properties.put(NAME, MultiUserDUnitTest.class.getSimpleName());
properties.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
properties.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
index f4c2e06..f7dd2eb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
@@ -16,13 +16,17 @@
*/
package com.gemstone.gemfire.management.internal.security;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import org.junit.rules.ExternalResource;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class ShiroCacheStartRule extends ExternalResource {
private Cache cache;
private int jmxManagerPort;
@@ -36,9 +40,9 @@ public class ShiroCacheStartRule extends ExternalResource {
protected void before() throws Throwable {
Properties properties = new Properties();
- properties.put(DistributionConfig.NAME_NAME, ShiroCacheStartRule.class.getSimpleName());
- properties.put(DistributionConfig.LOCATORS_NAME, "");
- properties.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ properties.put(SystemConfigurationProperties.NAME, ShiroCacheStartRule.class.getSimpleName());
+ properties.put(LOCATORS, "");
+ properties.put(MCAST_PORT, "0");
properties.put(DistributionConfig.JMX_MANAGER_NAME, "true");
properties.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
properties.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxManagerPort));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/unsafe/ReadOpFileAccessControllerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/unsafe/ReadOpFileAccessControllerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/unsafe/ReadOpFileAccessControllerJUnitTest.java
index f6aac5e..7a463d6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/unsafe/ReadOpFileAccessControllerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/unsafe/ReadOpFileAccessControllerJUnitTest.java
@@ -16,10 +16,21 @@
*/
package com.gemstone.gemfire.management.internal.unsafe;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.management.ManagementService;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import javax.management.*;
+import javax.management.remote.*;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
@@ -34,30 +45,10 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import javax.management.InstanceNotFoundException;
-import javax.management.MBeanException;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerConnection;
-import javax.management.ReflectionException;
-import javax.management.remote.JMXConnector;
-import javax.management.remote.JMXConnectorFactory;
-import javax.management.remote.JMXConnectorServer;
-import javax.management.remote.JMXConnectorServerFactory;
-import javax.management.remote.JMXServiceURL;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.management.ManagementService;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import org.junit.rules.TemporaryFolder;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
/**
* Test ReadOnly operations are accesible from RMI Connector with readOnly user
@@ -99,8 +90,8 @@ public class ReadOpFileAccessControllerJUnitTest {
private Properties getProperties() {
Properties pr = new Properties();
- pr.put("mcast-port", "0");
- pr.put("locators", "");
+ pr.put(MCAST_PORT, "0");
+ pr.put(LOCATORS, "");
//pr.put("jmx-manager", "true");
//pr.put("jmx-manager-start", "true");
return pr;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
index 58daf7e..a9419cc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/DomainObjectsAsValuesJUnitTest.java
@@ -16,31 +16,22 @@
*/
package com.gemstone.gemfire.memcached;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.util.concurrent.Future;
-import java.util.logging.Logger;
-import java.util.logging.StreamHandler;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import net.spy.memcached.MemcachedClient;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.concurrent.Future;
+import java.util.logging.Logger;
-import net.spy.memcached.MemcachedClient;
-import junit.framework.TestCase;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class DomainObjectsAsValuesJUnitTest {
@@ -53,7 +44,7 @@ public class DomainObjectsAsValuesJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.mcast-port", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
PORT = AvailablePortHelper.getRandomAvailableTCPPort();
this.server = new GemFireMemcachedServer(PORT);
server.start();
@@ -62,7 +53,7 @@ public class DomainObjectsAsValuesJUnitTest {
@After
public void tearDown() throws Exception {
this.server.shutdown();
- System.getProperties().remove("gemfire.mcast-port");
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT);
}
public static class Customer implements java.io.Serializable {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
index 71bc653..d9f3077 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/GemcachedDevelopmentJUnitTest.java
@@ -16,11 +16,18 @@
*/
package com.gemstone.gemfire.memcached;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.memcached.GemFireMemcachedServer.Protocol;
+import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import net.spy.memcached.CASResponse;
+import net.spy.memcached.CASValue;
+import net.spy.memcached.MemcachedClient;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.io.IOException;
import java.net.InetAddress;
@@ -32,19 +39,8 @@ import java.util.concurrent.Future;
import java.util.logging.Logger;
import java.util.logging.StreamHandler;
-import net.spy.memcached.CASResponse;
-import net.spy.memcached.CASValue;
-import net.spy.memcached.MemcachedClient;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.memcached.GemFireMemcachedServer.Protocol;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class GemcachedDevelopmentJUnitTest {
@@ -57,7 +53,7 @@ public class GemcachedDevelopmentJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.mcast-port", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
PORT = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
this.server = new GemFireMemcachedServer("", PORT, getProtocol());
server.start();
@@ -66,7 +62,7 @@ public class GemcachedDevelopmentJUnitTest {
@After
public void tearDown() throws Exception {
- System.getProperties().remove("gemfire.mcast-port");
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT);
this.server.shutdown();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
index afd386b..5e135f9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
@@ -16,29 +16,22 @@
*/
package com.gemstone.gemfire.memcached;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.util.Properties;
-import java.util.concurrent.Future;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import net.spy.memcached.MemcachedClient;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import net.spy.memcached.MemcachedClient;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.util.Properties;
+import java.util.concurrent.Future;
-import junit.framework.TestCase;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -50,8 +43,8 @@ public class IntegrationJUnitTest {
public void testGemFireProperty() throws Exception {
Properties props = new Properties();
final int port = AvailablePortHelper.getRandomAvailableTCPPort();
- props.setProperty("memcached-port", port+"");
- props.setProperty("mcast-port", "0");
+ props.setProperty(DistributionConfig.MEMCACHED_PORT_NAME, port + "");
+ props.setProperty(MCAST_PORT, "0");
CacheFactory cf = new CacheFactory(props);
Cache cache = cf.create();
@@ -72,9 +65,9 @@ public class IntegrationJUnitTest {
public void testMemcachedBindAddress() throws Exception {
Properties props = new Properties();
final int port = AvailablePortHelper.getRandomAvailableTCPPort();
- props.setProperty("memcached-port", port+"");
- props.setProperty("memcached-bind-address", "127.0.0.1");
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(DistributionConfig.MEMCACHED_PORT_NAME, port + "");
+ props.setProperty(DistributionConfig.MEMCACHED_BIND_ADDRESS_NAME, "127.0.0.1");
+ props.put(MCAST_PORT, "0");
CacheFactory cf = new CacheFactory(props);
Cache cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
index 93d07de..37ab246 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/AutoSerializableJUnitTest.java
@@ -16,44 +16,10 @@
*/
package com.gemstone.gemfire.pdx;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.Externalizable;
-import java.io.File;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.io.ObjectInput;
-import java.io.ObjectOutput;
-import java.io.ObjectStreamException;
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.math.BigDecimal;
-import java.math.BigInteger;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.net.URLClassLoader;
-import java.util.ArrayList;
-import java.util.Comparator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeSet;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.SerializationException;
import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.PdxSerializerObject;
import com.gemstone.gemfire.internal.Version;
@@ -62,6 +28,23 @@ import com.gemstone.gemfire.pdx.internal.AutoSerializableManager;
import com.gemstone.gemfire.pdx.internal.PdxField;
import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.lang.reflect.Field;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLClassLoader;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* TODO: fails (on Windows 7?)
@@ -92,7 +75,7 @@ public class AutoSerializableJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.auto.serialization.no.hardcoded.excludes", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "auto.serialization.no.hardcoded.excludes", "true");
}
@After
@@ -114,7 +97,7 @@ public class AutoSerializableJUnitTest {
this.serializer = s;
this.manager = (AutoSerializableManager) s.getManager();
this.c = (GemFireCacheImpl) new CacheFactory().
- set("mcast-port", "0").
+ set(MCAST_PORT, "0").
setPdxReadSerialized(readSerialized).
setPdxSerializer(s).
create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
index e64c821..36012d4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/ClientsWithVersioningRetryDUnitTest.java
@@ -16,55 +16,27 @@
*/
package com.gemstone.gemfire.pdx;
-import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.DistributionMessage;
import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.cache.DistributedCacheOperation;
-import com.gemstone.gemfire.internal.cache.DistributedPutAllOperation;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.VMCachedDeserializable;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.BaseCommand;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.tier.sockets.command.Put70;
import com.gemstone.gemfire.internal.cache.versions.VMVersionTag;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.*;
/**
*
@@ -84,7 +56,7 @@ public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
public void run() {
//Disable endpoint shuffling, so that the client will always connect
//to the first server we give it.
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
}
});
@@ -95,7 +67,7 @@ public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
Invoke.invokeInEveryVM(new SerializableRunnable() {
@Override
public void run() {
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "false");
}
});
for (IgnoredException ex: expectedExceptions) {
@@ -430,7 +402,7 @@ public class ClientsWithVersioningRetryDUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put("conserve-sockets", "false");
+ p.put(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
index 8c00ab3..f4a30d6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
@@ -16,20 +16,15 @@
*/
package com.gemstone.gemfire.pdx;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class DistributedSystemIdDUnitTest extends DistributedTestCase {
@@ -113,7 +108,7 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
public Object call() throws Exception {
Properties props = new Properties();
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locatorPort + "]");
+ props.setProperty(LOCATORS, "localhost[" + locatorPort + "]");
getSystem(props);
return null;
}
@@ -127,9 +122,9 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
int port = AvailablePortHelper.getRandomAvailableTCPPort();
Properties props = new Properties();
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
- props.setProperty("mcast-port", "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port + "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost[" + port + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + port + "]");
+ props.setProperty(START_LOCATOR, "localhost[" + port + "]");
getSystem(props);
// Locator locator = Locator.startLocatorAndDS(port, File.createTempFile("locator", ""), props);
// system = (InternalDistributedSystem) locator.getDistributedSystem();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
index 458c020..35739ff 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONFormatterJUnitTest.java
@@ -16,30 +16,25 @@
*/
package com.gemstone.gemfire.pdx;
-import static org.junit.Assert.fail;
-
-import java.text.SimpleDateFormat;
-
-import org.json.JSONException;
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.json.JSONException;
+import org.json.JSONObject;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.text.SimpleDateFormat;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class JSONFormatterJUnitTest {
@@ -53,7 +48,7 @@ public class JSONFormatterJUnitTest {
@Before
public void setUp() throws Exception {
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0").setPdxReadSerialized(true).create();
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
//start cache-server
CacheServer server = c.addCacheServer();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
index d76b5bd..2f93cc3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
@@ -16,21 +16,10 @@
*/
package com.gemstone.gemfire.pdx;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Properties;
-
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -46,9 +35,16 @@ import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.util.test.TestUtil;
-
import org.json.JSONException;
import org.json.JSONObject;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
*
*/
@@ -566,7 +562,7 @@ public class JSONPdxClientServerDUnitTest extends CacheTestCase {
SerializableCallable createRegion = new SerializableCallable() {
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty("locators", "");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
getSystem(props);
AttributesFactory af = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxAttributesJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxAttributesJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxAttributesJUnitTest.java
index ff6688c..4c0a2aa 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxAttributesJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxAttributesJUnitTest.java
@@ -16,24 +16,9 @@
*/
package com.gemstone.gemfire.pdx;
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.ToDataException;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.FileUtil;
@@ -42,6 +27,17 @@ import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
*
@@ -81,7 +77,7 @@ public class PdxAttributesJUnitTest {
public void testPdxPersistent() throws Exception {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
Cache cache = cf.create();
//define a type
@@ -95,7 +91,7 @@ public class PdxAttributesJUnitTest {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
cf.setPdxPersistent(true);
Cache cache = cf.create();
@@ -111,7 +107,7 @@ public class PdxAttributesJUnitTest {
public void testPdxDiskStore() throws Exception {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
cf.setPdxPersistent(true);
cf.setPdxDiskStore("diskstore1");
Cache cache = cf.create();
@@ -129,7 +125,7 @@ public class PdxAttributesJUnitTest {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
cf.setPdxPersistent(true);
Cache cache = cf.create();
@@ -145,7 +141,7 @@ public class PdxAttributesJUnitTest {
public void testNonPersistentRegistryWithOverflowRegion() throws Exception {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
Cache cache = cf.create();
cache.createDiskStoreFactory().setDiskDirs(new File[] {diskDir}).setMaxOplogSize(1).create("diskstore1");
cache.createRegionFactory(RegionShortcut.LOCAL_OVERFLOW).setDiskStoreName("diskstore1").create("region");
@@ -156,7 +152,7 @@ public class PdxAttributesJUnitTest {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
Cache cache = cf.create();
defineAType();
cache.createDiskStoreFactory().setDiskDirs(new File[] {diskDir}).setMaxOplogSize(1).create("diskstore1");
@@ -168,7 +164,7 @@ public class PdxAttributesJUnitTest {
public void testNonPersistentRegistryWithPersistentRegion() throws Exception {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
Cache cache = cf.create();
cache.createDiskStoreFactory().setDiskDirs(new File[] {diskDir}).setMaxOplogSize(1).create("diskstore1");
cache.createRegionFactory(RegionShortcut.LOCAL_PERSISTENT).setDiskStoreName("diskstore1").create("region");
@@ -185,7 +181,7 @@ public class PdxAttributesJUnitTest {
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
Cache cache = cf.create();
defineATypeNoEnum();
cache.createDiskStoreFactory().setDiskDirs(new File[] {diskDir}).setMaxOplogSize(1).create("diskstore1");
@@ -209,7 +205,7 @@ public class PdxAttributesJUnitTest {
//Test that we can become a peer registry
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
Cache cache = cf.create();
//This should work, because this is a peer.
defineAType();
@@ -220,7 +216,7 @@ public class PdxAttributesJUnitTest {
//Test that we can become a client registry.
{
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "0");
+ cf.set(MCAST_PORT, "0");
Cache cache = cf.create();
int port = AvailablePortHelper.getRandomAvailableTCPPort();
PoolManager.createFactory().addServer("localhost", port).create("pool");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
index 6c41e86..129727b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
@@ -16,22 +16,9 @@
*/
package com.gemstone.gemfire.pdx;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.util.Properties;
-
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -41,13 +28,14 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.PdxSerializerObject;
import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.pdx.internal.AutoSerializableManager;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -187,10 +175,10 @@ public class PdxClientServerDUnitTest extends CacheTestCase {
VM vm1 = host.getVM(1);
VM vm2 = host.getVM(2);
- System.setProperty("gemfire.auto.serialization.no.hardcoded.excludes", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "auto.serialization.no.hardcoded.excludes", "true");
Invoke.invokeInEveryVM(new SerializableRunnable() {
public void run() {
- System.setProperty("gemfire.auto.serialization.no.hardcoded.excludes", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "auto.serialization.no.hardcoded.excludes", "true");
}
});
try {
@@ -254,11 +242,11 @@ public class PdxClientServerDUnitTest extends CacheTestCase {
return null;
}
});
- } finally {
- System.setProperty("gemfire.auto.serialization.no.hardcoded.excludes", "false");
+ } finally {
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "auto.serialization.no.hardcoded.excludes", "false");
Invoke.invokeInEveryVM(new SerializableRunnable() {
public void run() {
- System.setProperty("gemfire.auto.serialization.no.hardcoded.excludes", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "auto.serialization.no.hardcoded.excludes", "false");
}
});
}
@@ -404,8 +392,8 @@ public class PdxClientServerDUnitTest extends CacheTestCase {
SerializableCallable createRegion = new SerializableCallable() {
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
getSystem(props);
Cache cache = getCache();
PoolFactory pf = PoolManager.createFactory();
@@ -509,8 +497,8 @@ public class PdxClientServerDUnitTest extends CacheTestCase {
SerializableCallable createRegion = new SerializableCallable() {
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
getSystem(props);
Cache cache = getCache();
PoolFactory pf = PoolManager.createFactory();
@@ -560,8 +548,8 @@ public class PdxClientServerDUnitTest extends CacheTestCase {
SerializableCallable createRegion = new SerializableCallable() {
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
getSystem(props);
Cache cache = getCache();
HeapDataOutputStream out = new HeapDataOutputStream(Version.CURRENT);
@@ -683,7 +671,7 @@ public class PdxClientServerDUnitTest extends CacheTestCase {
SerializableCallable createRegion = new SerializableCallable() {
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty("locators", "");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
getSystem(props);
AttributesFactory af = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceFactoryJUnitTest.java
index b984c93..de3a3bf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceFactoryJUnitTest.java
@@ -16,34 +16,6 @@
*/
package com.gemstone.gemfire.pdx;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.LinkedHashSet;
-import java.util.Vector;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -53,12 +25,18 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSourceFactory;
-import com.gemstone.gemfire.pdx.internal.PdxField;
-import com.gemstone.gemfire.pdx.internal.PdxInstanceEnum;
-import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
-import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
-import com.gemstone.gemfire.pdx.internal.PdxType;
+import com.gemstone.gemfire.pdx.internal.*;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class PdxInstanceFactoryJUnitTest {
@@ -68,7 +46,7 @@ public class PdxInstanceFactoryJUnitTest {
public void setUp() {
// make it a loner
this.cache = (GemFireCacheImpl) new CacheFactory()
- .set("mcast-port", "0")
+ .set(MCAST_PORT, "0")
.setPdxReadSerialized(true)
.create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
index 8e2983d..561341d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
@@ -16,38 +16,30 @@
*/
package com.gemstone.gemfire.pdx;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.math.BigInteger;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.pdx.PdxInstanceFactory;
import com.gemstone.gemfire.pdx.internal.EnumInfo.PdxInstanceEnumInfo;
-import com.gemstone.gemfire.pdx.internal.PdxInstanceEnum;
import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.math.BigInteger;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -62,8 +54,8 @@ public class PdxInstanceJUnitTest {
public void setUp() {
// make it a loner
this.c = (GemFireCacheImpl) new CacheFactory()
- .set("mcast-port", "0")
- .set("distributed-system-id", "255")
+ .set(MCAST_PORT, "0")
+ .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "255")
.setPdxReadSerialized(true)
.create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
index adde942..b56bb01 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxSerializableJUnitTest.java
@@ -16,64 +16,29 @@
*/
package com.gemstone.gemfire.pdx;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInput;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.NotSerializableException;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.CopyHelper;
-import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.DeltaTestImpl;
-import com.gemstone.gemfire.ToDataException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStore;
import com.gemstone.gemfire.cache.DiskStoreFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
-import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.PdxSerializerObject;
-import com.gemstone.gemfire.internal.SystemAdmin;
-import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSourceFactory;
import com.gemstone.gemfire.internal.util.ArrayUtils;
-import com.gemstone.gemfire.pdx.internal.DataSize;
-import com.gemstone.gemfire.pdx.internal.PdxReaderImpl;
-import com.gemstone.gemfire.pdx.internal.PdxType;
-import com.gemstone.gemfire.pdx.internal.PdxWriterImpl;
-import com.gemstone.gemfire.pdx.internal.TypeRegistry;
+import com.gemstone.gemfire.pdx.internal.*;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.nio.ByteBuffer;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class PdxSerializableJUnitTest {
@@ -87,7 +52,7 @@ public class PdxSerializableJUnitTest {
@Before
public void setUp() {
// make it a loner
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.create();
}
@@ -103,7 +68,7 @@ public class PdxSerializableJUnitTest {
@Test
public void testNoDiskStore() throws Exception {
this.c.close();
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.setPdxPersistent(true)
.setPdxDiskStore("doesNotExist")
.create();
@@ -120,7 +85,7 @@ public class PdxSerializableJUnitTest {
@Test
public void testPdxPersistentKeys() throws Exception {
this.c.close();
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.setPdxPersistent(true)
.setPdxDiskStore("pdxDS")
.create();
@@ -136,7 +101,7 @@ public class PdxSerializableJUnitTest {
r2.put(new SimpleClass(1, (byte) 1), new SimpleClass(1, (byte) 1));
r2.put(new SimpleClass(2, (byte) 2), new SimpleClass(2, (byte) 2));
this.c.close();
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.setPdxPersistent(true)
.setPdxDiskStore("pdxDS")
.create();
@@ -153,7 +118,7 @@ public class PdxSerializableJUnitTest {
assertEquals(new SimpleClass(2, (byte) 2), r2.get(new SimpleClass(2, (byte) 2)));
this.c.close();
// use a cache.xml to recover
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.create();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter pw = new PrintWriter(new OutputStreamWriter(baos), true);
@@ -203,7 +168,7 @@ public class PdxSerializableJUnitTest {
@Test
public void testPdxPersistentKeysDefDS() throws Exception {
this.c.close();
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.setPdxPersistent(true)
.create();
try {
@@ -216,7 +181,7 @@ public class PdxSerializableJUnitTest {
r2.put(new SimpleClass(1, (byte) 1), new SimpleClass(1, (byte) 1));
r2.put(new SimpleClass(2, (byte) 2), new SimpleClass(2, (byte) 2));
this.c.close();
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.setPdxPersistent(true)
.create();
this.c.createDiskStoreFactory().create("r2DS");
@@ -230,7 +195,7 @@ public class PdxSerializableJUnitTest {
assertEquals(new SimpleClass(2, (byte) 2), r2.get(new SimpleClass(2, (byte) 2)));
this.c.close();
// use a cache.xml to recover
- this.c = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0")
+ this.c = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0")
.create();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter pw = new PrintWriter(new OutputStreamWriter(baos), true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
index 5ff0db0..f847c19 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxStringJUnitTest.java
@@ -16,29 +16,25 @@
*/
package com.gemstone.gemfire.pdx;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
-
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
import com.gemstone.gemfire.pdx.internal.PdxString;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-import junit.framework.TestCase;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class PdxStringJUnitTest {
@@ -48,7 +44,7 @@ public class PdxStringJUnitTest {
public void setUp() {
// make it a loner
this.c = (GemFireCacheImpl) new CacheFactory()
- .set("mcast-port", "0")
+ .set(MCAST_PORT, "0")
.setPdxReadSerialized(true)
.create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
index 5e0e71a..b8349d3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/redis/AuthJUnitTest.java
@@ -16,25 +16,27 @@
*/
package com.gemstone.gemfire.redis;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.io.IOException;
-import java.util.Random;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.GemFireCache;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-
import redis.clients.jedis.Jedis;
import redis.clients.jedis.exceptions.JedisDataException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.util.Random;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
@Category(IntegrationTest.class)
public class AuthJUnitTest {
@@ -62,10 +64,10 @@ public class AuthJUnitTest {
}
private void setupCacheWithPassword() {
CacheFactory cf = new CacheFactory();
- cf.set("log-level", "error");
- cf.set("mcast-port", "0");
- cf.set("locators", "");
- cf.set("redis-password", PASSWORD);
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
+ cf.set(SystemConfigurationProperties.REDIS_PASSWORD, PASSWORD);
cache = cf.create();
server = new GemFireRedisServer("localhost", port);
server.start();
@@ -96,9 +98,9 @@ public class AuthJUnitTest {
@Test
public void testAuthNoPwd() {
CacheFactory cf = new CacheFactory();
- cf.set("log-level", "error");
- cf.set("mcast-port", "0");
- cf.set("locators", "");
+ cf.set(DistributionConfig.LOG_LEVEL_NAME, "error");
+ cf.set(MCAST_PORT, "0");
+ cf.set(LOCATORS, "");
cache = cf.create();
server = new GemFireRedisServer("localhost", port);
server.start();
[04/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java b/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
index 4759ed4..0866ea2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/process/ProcessWrapper.java
@@ -16,17 +16,13 @@
*/
package com.gemstone.gemfire.test.process;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
import java.io.File;
import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
+import java.util.*;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
@@ -34,9 +30,7 @@ import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Pattern;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.logging.LogService;
+import static org.junit.Assert.fail;
/**
* Wraps spawned {@link java.lang.Process} to capture output and provide interaction with the process.
@@ -281,7 +275,7 @@ public class ProcessWrapper {
if (properties != null) {
for (Map.Entry<Object, Object> entry : properties.entrySet()) {
- if (!entry.getKey().equals("log-file")) {
+ if (!entry.getKey().equals(DistributionConfig.LOG_FILE_NAME)) {
jvmArgumentsList.add("-D" + entry.getKey() + "=" + entry.getValue());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
index f2ef3eb..6403783 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
@@ -16,15 +16,16 @@
*/
package com.main;
-import java.util.List;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This is a member representing site 1 who wants to send data to site 2
*
@@ -55,15 +56,15 @@ public class WANBootStrapping_Site1_Add {
public static void main(String[] args) {
- System.setProperty("gemfire.DistributedSystemListener",
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DistributedSystemListener",
"com.main.MyDistributedSystemListener");
// Create a locator and a cache
System.out.println("Creating cache ...It will take some time..");
- Cache cache = new CacheFactory().set(DistributionConfig.MCAST_PORT_NAME,
+ Cache cache = new CacheFactory().set(MCAST_PORT,
"0").set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + 1).set(
- DistributionConfig.LOCATORS_NAME, "localhost[" + 10101 + "]").set(
- DistributionConfig.START_LOCATOR_NAME,
+ LOCATORS, "localhost[" + 10101 + "]").set(
+ START_LOCATOR,
"localhost[" + 10101
+ "],server=true,peer=true,hostname-for-clients=localhost").set(
DistributionConfig.LOG_LEVEL_NAME, "warning").create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
index 8ad1760..506990e 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
@@ -16,11 +16,13 @@
*/
package com.main;
+import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.io.IOException;
import java.util.Properties;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is a stand alone locator with a distributed-system-id = -1
@@ -37,14 +39,14 @@ public class WANBootStrapping_Site1_Remove {
public static void main(String[] args) {
//On this locator, I am not expecting a listener to take any action, so a empty listener is a passed
- System.setProperty("gemfire.DistributedSystemListener",
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DistributedSystemListener",
"");
System.out.println("Starting a locator with negative ds id -1");
//start a stand alone locator with distributed-system-is = -1
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ properties.setProperty(MCAST_PORT, "0");
properties.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+ (-1));
properties.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 20202 + "]");
properties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "warning");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
index 89ab366..21b071b 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
@@ -22,6 +22,8 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.wan.GatewayReceiver;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This is a member representing site 2 who wants to receive data from site 1
*
@@ -52,16 +54,16 @@ public class WANBootStrapping_Site2_Add {
public static void main(String[] args) {
- System.setProperty("gemfire.DistributedSystemListener",
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DistributedSystemListener",
"com.main.MyDistributedSystemListener");
//create a locator and a cache
System.out.println("Creating cache ...It will take some time..");
Cache cache = new CacheFactory()
- .set(DistributionConfig.MCAST_PORT_NAME,"0")
+ .set(MCAST_PORT, "0")
.set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+2)
- .set(DistributionConfig.LOCATORS_NAME, "localhost[" + 20202 + "]")
- .set(DistributionConfig.START_LOCATOR_NAME, "localhost[" + 20202 + "],server=true,peer=true,hostname-for-clients=localhost")
+ .set(LOCATORS, "localhost[" + 20202 + "]")
+ .set(START_LOCATOR, "localhost[" + 20202 + "],server=true,peer=true,hostname-for-clients=localhost")
.set(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 10101 + "]")
.set(DistributionConfig.LOG_LEVEL_NAME, "warning")
.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
index 6f125b4..02df335 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
@@ -16,11 +16,13 @@
*/
package com.main;
+import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.io.IOException;
import java.util.Properties;
-import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is a stand alone locator with a distributed-system-id = -2
@@ -38,12 +40,12 @@ public class WANBootStrapping_Site2_Remove {
// On this locator, I am not expecting a listener to take any action, so a
// empty listener is a passed
- System.setProperty("gemfire.DistributedSystemListener",
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DistributedSystemListener",
"");
System.out.println("Starting a locator with negative ds id -2");
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
+ properties.setProperty(MCAST_PORT, "0");
properties.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+ (-2));
properties.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 10101 + "]");
properties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "warning");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java b/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
index d1905a0..fa90e88 100644
--- a/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
+++ b/geode-cq/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceImpl.java
@@ -16,58 +16,19 @@
*/
package com.gemstone.gemfire.cache.query.internal.cq;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ConcurrentLinkedQueue;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.InvalidDeltaException;
import com.gemstone.gemfire.StatisticsFactory;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheEvent;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.internal.GetEventValueOp;
-import com.gemstone.gemfire.cache.client.internal.InternalPool;
-import com.gemstone.gemfire.cache.client.internal.QueueManager;
-import com.gemstone.gemfire.cache.client.internal.ServerCQProxyImpl;
-import com.gemstone.gemfire.cache.client.internal.UserAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqClosedException;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.CqServiceStatistics;
-import com.gemstone.gemfire.cache.query.CqStatusListener;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryInvalidException;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.internal.CompiledSelect;
-import com.gemstone.gemfire.cache.query.internal.CqQueryVsdStats;
-import com.gemstone.gemfire.cache.query.internal.CqStateImpl;
-import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
-import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
+import com.gemstone.gemfire.cache.client.internal.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.cache.CacheDistributionAdvisor.CacheProfile;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.FilterProfile;
-import com.gemstone.gemfire.internal.cache.FilterRoutingInfo;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.MessageType;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
@@ -76,7 +37,10 @@ import com.gemstone.gemfire.internal.cache.tier.sockets.Part;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
/**
* @since GemFire 5.5
@@ -93,9 +57,9 @@ public final class CqServiceImpl implements CqService {
/**
* System property to evaluate the query even though the initial results are not required
* when cq is executed using the execute() method.
- */
- public static boolean EXECUTE_QUERY_DURING_INIT =
- Boolean.valueOf(System.getProperty("gemfire.cq.EXECUTE_QUERY_DURING_INIT", "true")).booleanValue();
+ */
+ public static boolean EXECUTE_QUERY_DURING_INIT =
+ Boolean.valueOf(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "cq.EXECUTE_QUERY_DURING_INIT", "true")).booleanValue();
private static final String CQ_NAME_PREFIX = "GfCq";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
index 606d8aa..8ea8178 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/CQJUnitTest.java
@@ -16,23 +16,23 @@
*/
package com.gemstone.gemfire.cache.query.cq;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import junit.framework.TestCase;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.cache.query.CqAttributes;
import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.QueryInvalidException;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class CQJUnitTest extends TestCase {
@@ -50,8 +50,8 @@ public class CQJUnitTest extends TestCase {
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("log-level", "config");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
this.ds = DistributedSystem.connect(props);
this.cache = CacheFactory.create(ds);
this.qs = cache.getQueryService();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
index 9165358..e2b0f2a 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqDataUsingPoolDUnitTest.java
@@ -16,36 +16,11 @@
*/
package com.gemstone.gemfire.cache.query.cq.dunit;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import util.TestException;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqEvent;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.cq.CqQueryImpl;
import com.gemstone.gemfire.cache.query.internal.cq.CqQueryImpl.TestHook;
@@ -57,17 +32,18 @@ import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import util.TestException;
+
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This class tests the ContiunousQuery mechanism in GemFire.
@@ -1374,8 +1350,8 @@ public class CqDataUsingPoolDUnitTest extends CacheTestCase {
private Properties getDurableClientProperties(String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
return properties;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
index a06c51b..e2f5d99 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryDUnitTest.java
@@ -16,63 +16,29 @@
*/
package com.gemstone.gemfire.cache.query.cq.dunit;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqAttributesMutator;
-import com.gemstone.gemfire.cache.query.CqClosedException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.CqStateImpl;
import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.DistributedTombstoneOperation;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This class tests the ContiunousQuery mechanism in GemFire.
@@ -3976,8 +3942,8 @@ public void testCQEventsWithNotEqualsUndefined() throws Exception {
private InternalDistributedSystem createLonerDS() {
disconnectFromDS();
Properties lonerProps = new Properties();
- lonerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- lonerProps.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ lonerProps.setProperty(MCAST_PORT, "0");
+ lonerProps.setProperty(LOCATORS, "");
InternalDistributedSystem ds = getSystem(lonerProps);
assertEquals(0, ds.getDistributionManager().getOtherDistributionManagerIds().size());
return ds;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
index eda4d1d..57d6adf 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryOptimizedExecuteDUnitTest.java
@@ -22,15 +22,10 @@ import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.cq.CqServiceImpl;
import com.gemstone.gemfire.cache.query.internal.cq.CqServiceProvider;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
/**
* Test class for testing {@link CqServiceImpl#EXECUTE_QUERY_DURING_INIT} flag
@@ -186,7 +181,7 @@ public class CqQueryOptimizedExecuteDUnitTest extends CqQueryDUnitTest {
server.invoke(new CacheSerializableRunnable("execute cq") {
public void run2() throws CacheException {
assertFalse("CqServiceImpl.EXECUTE_QUERY_DURING_INIT flag should be false ", CqServiceImpl.EXECUTE_QUERY_DURING_INIT);
- assertFalse("gemfire.cq.MAINTAIN_KEYS flag should be false ", CqServiceProvider.MAINTAIN_KEYS);
+ assertFalse(DistributionConfig.GEMFIRE_PREFIX + "cq.MAINTAIN_KEYS flag should be false ", CqServiceProvider.MAINTAIN_KEYS);
int numOfQueryExecutions = (Integer) ((GemFireCacheImpl)getCache()).getCachePerfStats().getStats().get("queryExecutions");
assertEquals("Number of query executions for cq.execute should be 0 ", 0, numOfQueryExecutions);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
index a684e04..faa7433 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqQueryUsingPoolDUnitTest.java
@@ -16,49 +16,18 @@
*/
package com.gemstone.gemfire.cache.query.cq.dunit;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqAttributesMutator;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.CqStateImpl;
import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.InitialImageOperation;
@@ -66,16 +35,13 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This class tests the ContiunousQuery mechanism in GemFire.
@@ -3303,8 +3269,8 @@ public class CqQueryUsingPoolDUnitTest extends CacheTestCase {
private InternalDistributedSystem createLonerDS() {
disconnectFromDS();
Properties lonerProps = new Properties();
- lonerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- lonerProps.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ lonerProps.setProperty(MCAST_PORT, "0");
+ lonerProps.setProperty(LOCATORS, "");
InternalDistributedSystem ds = getSystem(lonerProps);
assertEquals(0, ds.getDistributionManager().getOtherDistributionManagerIds().size());
return ds;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
index 0165fbf..a5eed2d 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
@@ -16,23 +16,18 @@
*/
package com.gemstone.gemfire.cache.query.cq.dunit;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.query.CqQuery;
import com.gemstone.gemfire.cache.query.dunit.CloseCacheAuthorization;
import com.gemstone.gemfire.cache.query.dunit.HelperTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.security.templates.DummyAuthenticator;
import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class CqStateDUnitTest extends HelperTestCase {
@@ -111,22 +106,22 @@ public class CqStateDUnitTest extends HelperTestCase {
public Properties getAuthenticatedServerProperties() {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("security-client-accessor", CloseCacheAuthorization.class.getName() + ".create");
- props.put("security-client-accessor-pp", CloseCacheAuthorization.class.getName() + ".create");
- props.put("security-client-authenticator", DummyAuthenticator.class.getName() + ".create");
+ props.put(MCAST_PORT, "0");
+ props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, CloseCacheAuthorization.class.getName() + ".create");
+ props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME, CloseCacheAuthorization.class.getName() + ".create");
+ props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, DummyAuthenticator.class.getName() + ".create");
return props;
}
public Properties getServerProperties() {
Properties props = new Properties();
- props.put("mcast-port", "0");
+ props.put(MCAST_PORT, "0");
return props;
}
public Properties getClientProperties() {
Properties props = new Properties();
- props.put("security-client-auth-init", UserPasswordAuthInit.class.getName() + ".create");
+ props.put(DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create");
props.put("security-username", "root");
props.put("security-password", "root");
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
index 0cc10c0..389f412 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryDUnitTest.java
@@ -16,43 +16,23 @@
*/
package com.gemstone.gemfire.cache.query.cq.dunit;
-import hydra.Log;
-
-import java.io.IOException;
-import java.util.HashSet;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
+import hydra.Log;
+
+import java.io.IOException;
+import java.util.HashSet;
/**
* Test class for Partitioned Region and CQs
*
@@ -1754,7 +1734,7 @@ public class PartitionedRegionCqQueryDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer(serverHosts[0]/*getServerHostName(Host.getHost(0))*/, serverPorts[0]);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
// Create Client Cache.
getClientCache(ccf);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
index 1913b4d..7b25430 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/PartitionedRegionCqQueryOptimizedExecuteDUnitTest.java
@@ -22,13 +22,9 @@ import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.cq.CqServiceImpl;
import com.gemstone.gemfire.cache.query.internal.cq.CqServiceProvider;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
public class PartitionedRegionCqQueryOptimizedExecuteDUnitTest extends PartitionedRegionCqQueryDUnitTest{
@@ -179,7 +175,7 @@ public class PartitionedRegionCqQueryOptimizedExecuteDUnitTest extends Partition
server.invoke(new CacheSerializableRunnable("execute cq") {
public void run2() throws CacheException {
assertFalse("CqServiceImpl.EXECUTE_QUERY_DURING_INIT flag should be false ", CqServiceImpl.EXECUTE_QUERY_DURING_INIT);
- assertFalse("gemfire.cq.MAINTAIN_KEYS flag should be false ", CqServiceProvider.MAINTAIN_KEYS);
+ assertFalse(DistributionConfig.GEMFIRE_PREFIX + "cq.MAINTAIN_KEYS flag should be false ", CqServiceProvider.MAINTAIN_KEYS);
int numOfQueryExecutions = (Integer) ((GemFireCacheImpl)getCache()).getCachePerfStats().getStats().get("queryExecutions");
assertEquals("Number of query executions for cq.execute should be 0 ", 0, numOfQueryExecutions);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
index 9bcb341..86a8324 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/PdxQueryCQTestBase.java
@@ -16,29 +16,11 @@
*/
package com.gemstone.gemfire.cache.query.dunit;
-import java.io.IOException;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.PortfolioPdx;
import com.gemstone.gemfire.cache.query.data.PositionPdx;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -56,6 +38,12 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public abstract class PdxQueryCQTestBase extends CacheTestCase {
/** The port on which the bridge server was started in this VM */
@@ -123,8 +111,8 @@ public abstract class PdxQueryCQTestBase extends CacheTestCase {
public void run2() throws CacheException {
// Create Cache.
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
getSystem(props );
getCache();
PoolFactory cpf = PoolManager.createFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
index 8796d08..8153ab2 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryMonitorDUnitTest.java
@@ -16,23 +16,7 @@
*/
package com.gemstone.gemfire.cache.query.dunit;
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
@@ -45,22 +29,18 @@ import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
import com.gemstone.gemfire.cache.query.internal.QueryMonitor;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
/**
* Tests for QueryMonitoring service.
@@ -163,7 +143,7 @@ public class QueryMonitorDUnitTest extends CacheTestCase {
r = new SerializableRunnable("getClientSystem") {
public void run() {
Properties props = DistributedTestUtils.getAllDistributedSystemProperties(new Properties());
- props.put(DistributionConfigImpl.LOCATORS_NAME, "");
+ props.put(DistributionConfigImpl.LOCATORS, "");
getSystem(props);
}
};
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
index 08ad752..e91accc 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/snapshot/ClientSnapshotDUnitTest.java
@@ -16,17 +16,9 @@
*/
package com.gemstone.gemfire.cache.snapshot;
-import java.io.File;
-import java.util.concurrent.atomic.AtomicBoolean;
-
import com.examples.snapshot.MyObject;
import com.examples.snapshot.MyPdxSerializer;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -39,12 +31,16 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache.util.CqListenerAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
+import java.io.File;
+import java.util.concurrent.atomic.AtomicBoolean;
+
public class ClientSnapshotDUnitTest extends CacheTestCase {
private transient Region<Integer, MyObject> region;
@@ -255,7 +251,7 @@ public class ClientSnapshotDUnitTest extends CacheTestCase {
@Override
public Object call() throws Exception {
ClientCacheFactory cf = new ClientCacheFactory()
- .set("log-level", LogWriterUtils.getDUnitLogLevel())
+ .set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel())
.setPdxSerializer(new MyPdxSerializer())
.addPoolServer(NetworkUtils.getServerHostName(host), port)
.setPoolSubscriptionEnabled(true)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
index 3b35954..cc7c7a1 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PRDeltaPropagationDUnitTest.java
@@ -16,28 +16,9 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Properties;
-
import com.gemstone.gemfire.Delta;
import com.gemstone.gemfire.DeltaTestImpl;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.query.CqAttributes;
@@ -45,25 +26,24 @@ import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.CqEvent;
import com.gemstone.gemfire.cache.query.CqQuery;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CqListenerAdapter;
import com.gemstone.gemfire.compression.Compressor;
import com.gemstone.gemfire.compression.SnappyCompressor;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -999,8 +979,8 @@ public class PRDeltaPropagationDUnitTest extends DistributedTestCase {
Boolean subscriptionEnable, Boolean isEmpty, Boolean isCq) throws Exception {
PRDeltaPropagationDUnitTest test = new PRDeltaPropagationDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
test.createCache(props);
lastKeyReceived = false;
@@ -1087,8 +1067,8 @@ public class PRDeltaPropagationDUnitTest extends DistributedTestCase {
public static void createClientCache(Integer port1, Integer port2) throws Exception {
PRDeltaPropagationDUnitTest test = new PRDeltaPropagationDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
test.createCache(props);
lastKeyReceived = false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
index eb3f1f0..a9ad6e5 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/PutAllCSDUnitTest.java
@@ -16,76 +16,33 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerConnectivityException;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache.persistence.PartitionOfflineException;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqClosedException;
-import com.gemstone.gemfire.cache.query.CqEvent;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryInvalidException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests putAll for c/s. Also tests removeAll
@@ -2626,8 +2583,8 @@ public void testOneServer() throws CacheException, InterruptedException {
{
// Create local region
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
// Create Region
@@ -3728,7 +3685,7 @@ public void testOneServer() throws CacheException, InterruptedException {
public Object call() throws Exception {
// Create DS
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
// Create Region
@@ -3800,8 +3757,8 @@ public void testOneServer() throws CacheException, InterruptedException {
public void run2() throws CacheException {
// Create DS
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
// Create Region
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
index 5c3a1b3..65a1a14 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/RemoteCQTransactionDUnitTest.java
@@ -16,29 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheEvent;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
-import com.gemstone.gemfire.cache.TransactionEvent;
-import com.gemstone.gemfire.cache.TransactionListener;
-import com.gemstone.gemfire.cache.TransactionWriter;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
@@ -54,19 +32,18 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
import com.gemstone.gemfire.internal.cache.execute.data.CustId;
import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
/**
*
@@ -730,7 +707,7 @@ public class RemoteCQTransactionDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
index 2e7339a..43090f4 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/CQListGIIDUnitTest.java
@@ -16,55 +16,31 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.cq.dunit.CqQueryTestListener;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
+import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientUpdateMessageImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.ConflationDUnitTest;
-import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
-import junit.framework.Test;
-import junit.framework.TestSuite;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -333,8 +309,8 @@ public class CQListGIIDUnitTest extends DistributedTestCase {
String host = NetworkUtils.getIPLiteral();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new CQListGIIDUnitTest("temp").createCache(props);
PoolFactory pf = PoolManager.createFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
index fd7c559..a39543b 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/ha/HADispatcherDUnitTest.java
@@ -16,47 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
-import static com.gemstone.gemfire.internal.AvailablePort.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.cq.dunit.CqQueryTestListener;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.Conflatable;
import com.gemstone.gemfire.internal.cache.HARegion;
@@ -69,6 +36,22 @@ import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
+import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.getServerHostName;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
/**
* This Dunit test is to verify that when the dispatcher of CS dispatches the
@@ -321,8 +304,8 @@ public class HADispatcherDUnitTest extends JUnit4DistributedTestCase {
int PORT1 = port1.intValue();
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
index 4780623..1a0fa28 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
@@ -16,25 +16,9 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Properties;
-
import com.gemstone.gemfire.DeltaTestImpl;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.internal.ConnectionStats;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.query.CqAttributes;
import com.gemstone.gemfire.cache.query.CqAttributesFactory;
@@ -50,12 +34,15 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionLocalMaxMemoryDUnitTest.TestObject1;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test client to server flow for delta propogation
@@ -563,8 +550,8 @@ public class ClientToServerDeltaDUnitTest extends DistributedTestCase {
error = false;
lastKeyReceived = false;
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new ClientToServerDeltaDUnitTest("temp").createCache(props);
pool = (PoolImpl)PoolManager.createFactory().addServer(host, port.intValue())
.setThreadLocalConnections(true).setMinConnections(2)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
index 389ea55..76aa0d9 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaPropagationWithCQDUnitTest.java
@@ -16,32 +16,9 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.DeltaTestImpl;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.query.CqAttributes;
import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.CqEvent;
import com.gemstone.gemfire.cache.query.CqQuery;
@@ -51,17 +28,16 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CqListenerAdapter;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -256,7 +232,7 @@ public class DeltaPropagationWithCQDUnitTest extends DistributedTestCase {
cache = CacheFactory.create(ds);
assertNotNull(cache);
// Properties props = new Properties();
-// props.setProperty(DistributionConfig.MCAST_PORT_NAME, "10333");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10333");
// cache = new CacheFactory(props).create();
RegionFactory<Object, Object> rf = ((Cache)cache)
.createRegionFactory(RegionShortcut.REPLICATE);
@@ -270,8 +246,8 @@ public class DeltaPropagationWithCQDUnitTest extends DistributedTestCase {
public static void createClientCache(String host, Integer port, Boolean doRI)
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DeltaPropagationWithCQDUnitTest instance = new DeltaPropagationWithCQDUnitTest("temp");
DistributedSystem ds = instance.getSystem(props);
ds.disconnect();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
index bf14d2e..160a460 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DeltaToRegionRelationCQRegistrationDUnitTest.java
@@ -16,39 +16,25 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Properties;
-
-import javax.naming.InitialContext;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.query.CqAttributes;
import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqClosedException;
-import com.gemstone.gemfire.cache.query.CqException;
import com.gemstone.gemfire.cache.query.CqQuery;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This tests the flag setting for region ( DataPolicy as Empty ) for
* Delta propogation for a client while registering CQ
@@ -468,8 +454,8 @@ public class DeltaToRegionRelationCQRegistrationDUnitTest extends DistributedTes
public static void createClientCache(String host, Integer port)
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
Pool p = PoolManager.createFactory().addServer(host, port.intValue())
.setThreadLocalConnections(true).setMinConnections(3)
@@ -504,8 +490,8 @@ public class DeltaToRegionRelationCQRegistrationDUnitTest extends DistributedTes
public static void createClientCacheWithNoRegion(String host, Integer port)
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
p = (PoolImpl)PoolManager.createFactory().addServer(host, port.intValue())
.setThreadLocalConnections(true).setMinConnections(3)
@@ -521,8 +507,8 @@ public class DeltaToRegionRelationCQRegistrationDUnitTest extends DistributedTes
public static Integer createClientCache2(String host1, String host2,
Integer port1, Integer port2) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory().addServer(host1,
port1.intValue()).addServer(host2, port2.intValue())
@@ -557,8 +543,8 @@ public class DeltaToRegionRelationCQRegistrationDUnitTest extends DistributedTes
public static Integer createClientCache3(String host1, String host2,
Integer port1, Integer port2) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new DeltaToRegionRelationCQRegistrationDUnitTest("temp").createCache(props);
p = (PoolImpl)PoolManager.createFactory().addServer(host1,
port1.intValue()).addServer(host2, port2.intValue())
[25/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
index 6863f92..b4743b3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/TXExpiryJUnitTest.java
@@ -16,46 +16,25 @@
*/
package com.gemstone.gemfire;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.internal.cache.ExpiryTask;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.ExpiryTask.ExpiryTaskListener;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Tests transaction expiration functionality
@@ -70,7 +49,7 @@ public class TXExpiryJUnitTest {
protected void createCache() throws CacheException {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
+ p.setProperty(MCAST_PORT, "0"); // loner
this.cache = (GemFireCacheImpl) (new CacheFactory(p)).create();
this.txMgr = this.cache.getCacheTransactionManager();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
index ec7a020..cd32c3a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/TXJUnitTest.java
@@ -16,90 +16,28 @@
*/
package com.gemstone.gemfire;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.transaction.Synchronization;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheEvent;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryExistsException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.FailedSynchronizationException;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.TimeoutException;
-import com.gemstone.gemfire.cache.TransactionEvent;
-import com.gemstone.gemfire.cache.TransactionException;
-import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.TransactionListener;
-import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.TransactionListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.NanoTimer; // With java 1.5, please replace with System.nanoTime()
-import com.gemstone.gemfire.internal.cache.AbstractRegion;
-import com.gemstone.gemfire.internal.cache.CachePerfStats;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
+import com.gemstone.gemfire.internal.NanoTimer;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.util.StopWatch;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.*;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import javax.transaction.Synchronization;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Tests basic transaction functionality
@@ -130,7 +68,7 @@ public class TXJUnitTest {
protected void createCache() throws Exception {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
+ p.setProperty(MCAST_PORT, "0"); // loner
this.cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(p));
createRegion();
this.txMgr = this.cache.getCacheTransactionManager();
@@ -4433,7 +4371,7 @@ public class TXJUnitTest {
void assertValid() {
assertEquals(this.txRollbacks, this.stats.getTxRollbacks());
assertEquals(this.txRollbackChanges, this.stats.getTxRollbackChanges());
- if (Boolean.getBoolean("gemfire.cache.enable-time-statistics")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "cache.enable-time-statistics")) {
assertTrue(this.txRollbackTime <= this.stats.getTxRollbackTime());
// assertTrue(this.txRollbackLifeTime+((SLEEP_MS-10)*1000000) <= this.stats.getTxRollbackLifeTime());
assertTrue("RollbackLifeTime " + this.txRollbackLifeTime
@@ -4480,7 +4418,7 @@ public class TXJUnitTest {
testRollbackLifeTime += beforeRollback - afterBegin;
// bruce - time based stats are disabled by default
String p = (String)cache.getDistributedSystem()
- .getProperties().get("gemfire.enable-time-statistics");
+ .getProperties().get(DistributionConfig.GEMFIRE_PREFIX + "enable-time-statistics");
if (p != null && Boolean.getBoolean(p)) {
assertTrue("Local RollbackLifeTime assertion: "
+ testRollbackLifeTime
@@ -4489,7 +4427,7 @@ public class TXJUnitTest {
}
testTotalTx += afterRollback - beforeBegin;
final long totalTXMinusRollback = testTotalTx - stats.getTxRollbackTime();
- if (Boolean.getBoolean("gemfire.cache.enable-time-statistics")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "cache.enable-time-statistics")) {
assertTrue("Total Tx Minus Rollback assertion: "
+ totalTXMinusRollback
+ " is not >= " + statsRollbackLifeTime,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/TXWriterTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/TXWriterTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/TXWriterTestCase.java
index 1dff222..40633df 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/TXWriterTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/TXWriterTestCase.java
@@ -16,30 +16,18 @@
*/
package com.gemstone.gemfire;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.TransactionEvent;
-import com.gemstone.gemfire.cache.TransactionListener;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Extracted from TXWriterJUnitTest to share with TXWriterOOMEJUnitTest.
@@ -59,7 +47,7 @@ public class TXWriterTestCase {
protected void createCache() throws CacheException {
Properties p = new Properties();
- p.setProperty("mcast-port", "0"); // loner
+ p.setProperty(MCAST_PORT, "0"); // loner
this.cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(p));
AttributesFactory<?, ?> af = new AttributesFactory<String, String>();
af.setScope(Scope.DISTRIBUTED_NO_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/BindDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/BindDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/BindDistributedSystemJUnitTest.java
index 407b075..dcefc2b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/BindDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/BindDistributedSystemJUnitTest.java
@@ -16,27 +16,18 @@
*/
package com.gemstone.gemfire.admin.internal;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.net.InetAddress;
-import java.net.Socket;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminDistributedSystemFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.util.StopWatch;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.BIND_ADDRESS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
+import static org.junit.Assert.assertEquals;
/**
* Tests {@link com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl}.
@@ -78,8 +69,8 @@ public class BindDistributedSystemJUnitTest {
assertEquals(true, InetAddressUtil.isLoopback(bindTo));
Properties props = new Properties();
- props.setProperty(DistributionConfig.BIND_ADDRESS_NAME, bindTo);
- props.setProperty(DistributionConfig.START_LOCATOR_NAME,
+ props.setProperty(BIND_ADDRESS, bindTo);
+ props.setProperty(START_LOCATOR,
"localhost["+AvailablePortHelper.getRandomAvailableTCPPort()+"]");
this.system = com.gemstone.gemfire.distributed.DistributedSystem.connect(
props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
index 8322959..de34b2b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/DistributedSystemTestCase.java
@@ -16,12 +16,15 @@
*/
package com.gemstone.gemfire.admin.internal;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import org.junit.After;
import org.junit.Before;
-import com.gemstone.gemfire.distributed.DistributedSystem;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Provides common setUp and tearDown for testing the Admin API.
@@ -58,9 +61,9 @@ public abstract class DistributedSystemTestCase {
*/
protected Properties defineProperties() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("conserve-sockets", "true");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "true");
return props;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
index 3e5a452..55f10a4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/admin/internal/HealthEvaluatorTestCase.java
@@ -17,12 +17,15 @@
package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import org.junit.After;
+import org.junit.Before;
import java.util.Properties;
-import org.junit.After;
-import org.junit.Before;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Superclass of tests for the {@linkplain
@@ -65,9 +68,9 @@ public abstract class HealthEvaluatorTestCase {
*/
protected Properties getProperties() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheListenerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheListenerJUnitTest.java
index 7d2d8ad..9b19053 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheListenerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheListenerJUnitTest.java
@@ -16,19 +16,25 @@
*/
package com.gemstone.gemfire.cache;
-import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.cache.util.*;
-import com.gemstone.gemfire.distributed.*;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.cache.util.RegionMembershipListenerAdapter;
+import com.gemstone.gemfire.cache.util.RegionRoleListenerAdapter;
+import com.gemstone.gemfire.cache.util.TransactionListenerAdapter;
+import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import java.util.*;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+
/**
* Unit test for basic CacheListener feature.
* NOTE: these tests using a loner DistributedSystem and local scope regions
@@ -47,8 +53,8 @@ public class CacheListenerJUnitTest {
@Before
public void setUp() throws Exception {
Properties p = new Properties();
- p.setProperty("mcast-port", "0");
- p.setProperty("locators", "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
this.ds = DistributedSystem.connect(p);
this.c = CacheFactory.create(this.ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
index 192b60e..53a6189 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/CacheRegionClearStatsDUnitTest.java
@@ -16,20 +16,18 @@
*/
package com.gemstone.gemfire.cache;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* verifies the count of clear operation
*
@@ -80,8 +78,8 @@ public class CacheRegionClearStatsDUnitTest extends DistributedTestCase {
throws Exception {
new CacheRegionClearStatsDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new CacheRegionClearStatsDUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory().addServer(host,
port1.intValue()).setSubscriptionEnabled(false)
@@ -125,8 +123,8 @@ public class CacheRegionClearStatsDUnitTest extends DistributedTestCase {
throws Exception {
new CacheRegionClearStatsDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new CacheRegionClearStatsDUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory().addServer(host,
port1.intValue()).setSubscriptionEnabled(false)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
index 12f5340..2e97707 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ClientServerTimeSyncDUnitTest.java
@@ -16,11 +16,6 @@
*/
package com.gemstone.gemfire.cache;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.junit.Ignore;
-
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -29,14 +24,13 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DSClock;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import org.junit.Ignore;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
public class ClientServerTimeSyncDUnitTest extends CacheTestCase {
@@ -87,7 +81,7 @@ public class ClientServerTimeSyncDUnitTest extends CacheTestCase {
disconnectFromDS();
Properties props = new Properties();
- props.setProperty("locators", "");
+ props.setProperty(LOCATORS, "");
props = getSystem(props).getProperties();
cache = new ClientCacheFactory(props).setPoolSubscriptionEnabled(true)
.addPoolServer(hostName, serverPort)
@@ -166,7 +160,7 @@ public class ClientServerTimeSyncDUnitTest extends CacheTestCase {
disconnectFromDS();
Properties props = new Properties();
- props.setProperty("locators", "");
+ props.setProperty(LOCATORS, "");
props = getSystem(props).getProperties();
cache = new ClientCacheFactory(props).setPoolSubscriptionEnabled(true)
.addPoolServer(hostName, serverPort)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java
index 7495328..ef09970 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolAndLoaderDUnitTest.java
@@ -16,22 +16,20 @@
*/
package com.gemstone.gemfire.cache;
-import java.io.IOException;
-import java.util.Properties;
-
-import junit.framework.Assert;
-
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+import junit.framework.Assert;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This tests cases where we have both
@@ -409,8 +407,8 @@ public class ConnectionPoolAndLoaderDUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties p = new Properties();
if(!useLocator) {
- p.setProperty("locators", "");
- p.setProperty("mcast-port", "0");
+ p.setProperty(LOCATORS, "");
+ p.setProperty(MCAST_PORT, "0");
}
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
index 05e71f5..b5ea652 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ConnectionPoolFactoryJUnitTest.java
@@ -16,22 +16,24 @@
*/
package com.gemstone.gemfire.cache;
-import static org.junit.Assert.*;
-
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class ConnectionPoolFactoryJUnitTest {
@@ -42,9 +44,9 @@ public class ConnectionPoolFactoryJUnitTest {
@Before
public void setUp() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "info"); // to keep diskPerf logs smaller
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
this.ds = DistributedSystem.connect(props);
this.cache = CacheFactory.create(this.ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/PoolManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/PoolManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/PoolManagerJUnitTest.java
index 7394f0e..dfbc54b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/PoolManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/PoolManagerJUnitTest.java
@@ -16,21 +16,23 @@
*/
package com.gemstone.gemfire.cache;
-import static org.junit.Assert.*;
-
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
/**
* Tests PoolManager
@@ -44,8 +46,8 @@ public class PoolManagerJUnitTest {
@Before
public void setUp() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
ds = DistributedSystem.connect(props);
assertEquals(0, PoolManager.getAll().size());
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/ProxyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/ProxyJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/ProxyJUnitTest.java
index ad5695d..9a3ab17 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/ProxyJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/ProxyJUnitTest.java
@@ -16,25 +16,28 @@
*/
package com.gemstone.gemfire.cache;
-import static org.junit.Assert.*;
-
-import com.gemstone.gemfire.cache.query.*;
-import com.gemstone.gemfire.cache.util.*;
-import com.gemstone.gemfire.distributed.*;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.cache.util.TransactionListenerAdapter;
+import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.CachePerfStats;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.util.StopWatch;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import java.util.*;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+
/**
* Unit test for basic DataPolicy.EMPTY feature.
* NOTE: these tests using a loner DistributedSystem and local scope regions
@@ -49,8 +52,8 @@ public class ProxyJUnitTest {
@Before
public void setUp() throws Exception {
Properties p = new Properties();
- p.setProperty("mcast-port", "0");
- p.setProperty("locators", "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
this.ds = DistributedSystem.connect(p);
this.c = CacheFactory.create(this.ds);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
index 4a31158..c870091 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/RegionFactoryJUnitTest.java
@@ -16,34 +16,31 @@
*/
package com.gemstone.gemfire.cache;
-import static com.gemstone.gemfire.cache.RegionShortcut.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Ignore;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.cache.RegionShortcut.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
/**
* Unit test for the RegionFactory class
@@ -237,7 +234,7 @@ public class RegionFactoryJUnitTest {
// Assert failure when a Distributed system exists but with different properties
this.distSys = DistributedSystem.connect(createGemFireProperties()); // for teardown
final Properties failed = new Properties();
- failed.put("mcast-ttl", "64");
+ failed.put(MCAST_TTL, "64");
try {
new RegionFactory(failed);
@@ -346,11 +343,11 @@ public class RegionFactoryJUnitTest {
@Test
public void testRegionFactoryProperties() throws Exception {
final Properties gemfireProperties = createGemFireProperties();
- gemfireProperties.put("mcast-ttl", "64");
+ gemfireProperties.put(MCAST_TTL, "64");
RegionFactory factory = new RegionFactory(gemfireProperties);
r1 = factory.create(this.r1Name);
assertBasicRegionFunctionality(r1, r1Name);
- assertEquals(gemfireProperties.get("mcast-ttl"), r1.getCache().getDistributedSystem().getProperties().get("mcast-ttl"));
+ assertEquals(gemfireProperties.get(MCAST_TTL), r1.getCache().getDistributedSystem().getProperties().get(MCAST_TTL));
}
/**
@@ -374,9 +371,9 @@ public class RegionFactoryJUnitTest {
File xmlFile = null;
try {
final Properties gemfireProperties = createGemFireProperties();
- gemfireProperties.put("mcast-ttl", "64");
+ gemfireProperties.put(MCAST_TTL, "64");
final String xmlFileName = getName() + "-cache.xml";
- gemfireProperties.put("cache-xml-file", xmlFileName);
+ gemfireProperties.put(DistributionConfig.CACHE_XML_FILE_NAME, xmlFileName);
xmlFile = new File(xmlFileName);
xmlFile.delete();
xmlFile.createNewFile();
@@ -402,8 +399,9 @@ public class RegionFactoryJUnitTest {
RegionFactory factory = new RegionFactory(gemfireProperties, attrsId);
r1 = factory.create(this.r1Name);
assertBasicRegionFunctionality(r1, r1Name);
- assertEquals(gemfireProperties.get("mcast-ttl"), r1.getCache().getDistributedSystem().getProperties().get("mcast-ttl"));
- assertEquals(gemfireProperties.get("cache-xml-file"), r1.getCache().getDistributedSystem().getProperties().get("cache-xml-file"));
+ assertEquals(gemfireProperties.get(MCAST_TTL), r1.getCache().getDistributedSystem().getProperties().get(MCAST_TTL));
+ assertEquals(gemfireProperties.get(DistributionConfig.CACHE_XML_FILE_NAME),
+ r1.getCache().getDistributedSystem().getProperties().get(DistributionConfig.CACHE_XML_FILE_NAME));
RegionAttributes ra = r1.getAttributes();
assertEquals(ra.getStatisticsEnabled(), true);
assertEquals(ra.getScope().isDistributedAck(), true);
@@ -1131,8 +1129,8 @@ public class RegionFactoryJUnitTest {
private Properties createGemFireProperties() {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("locators", "");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
index 5efac05..e99af37 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/AsyncEventQueueEvictionAndExpirationJUnitTest.java
@@ -16,12 +16,10 @@
*/
package com.gemstone.gemfire.cache.asyncqueue;
-import static org.junit.Assert.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.TimeUnit;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.jayway.awaitility.Awaitility;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -29,20 +27,14 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.jayway.awaitility.Awaitility;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
-import static org.mockito.Mockito.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
@Category(IntegrationTest.class)
public class AsyncEventQueueEvictionAndExpirationJUnitTest {
@@ -61,7 +53,7 @@ public class AsyncEventQueueEvictionAndExpirationJUnitTest {
//ignore
}
if (null == cache) {
- cache = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0").create();
+ cache = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0").create();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
index 5014676..aa8095a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/asyncqueue/internal/SerialAsyncEventQueueImplJUnitTest.java
@@ -16,17 +16,17 @@
*/
package com.gemstone.gemfire.cache.asyncqueue.internal;
-import static org.junit.Assert.*;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.internal.cache.wan.GatewaySenderAttributes;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.internal.cache.wan.GatewaySenderAttributes;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
public class SerialAsyncEventQueueImplJUnitTest {
@@ -34,7 +34,7 @@ public class SerialAsyncEventQueueImplJUnitTest {
private Cache cache;
@Before
public void setUp() {
- CacheFactory cf = new CacheFactory().set("mcast-port", "0");
+ CacheFactory cf = new CacheFactory().set(MCAST_PORT, "0");
cache = cf.create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
index b17e69c..5abddf4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientCacheFactoryJUnitTest.java
@@ -17,32 +17,13 @@
package com.gemstone.gemfire.cache.client;
-import static org.junit.Assert.*;
-import static org.junit.runners.MethodSorters.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.File;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Properties;
-
-import org.jgroups.util.UUID;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.FixMethodOrder;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.RegionService;
import com.gemstone.gemfire.cache.client.internal.ProxyCache;
import com.gemstone.gemfire.cache.client.internal.UserAttributes;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
@@ -54,6 +35,28 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.pdx.ReflectionBasedAutoSerializer;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.jgroups.util.UUID;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.FixMethodOrder;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.File;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+import static org.junit.runners.MethodSorters.NAME_ASCENDING;
/**
* Unit test for the ClientCacheFactory class
@@ -90,8 +93,8 @@ public class ClientCacheFactoryJUnitTest {
GemFireCacheImpl gfc = (GemFireCacheImpl)this.cc;
assertEquals(true, gfc.isClient());
Properties dsProps = this.cc.getDistributedSystem().getProperties();
- assertEquals("0", dsProps.getProperty("mcast-port"));
- assertEquals("", dsProps.getProperty("locators"));
+ assertEquals("0", dsProps.getProperty(MCAST_PORT));
+ assertEquals("", dsProps.getProperty(LOCATORS));
Pool defPool = gfc.getDefaultPool();
assertEquals("DEFAULT", defPool.getName());
assertEquals(new ArrayList(), defPool.getLocators());
@@ -103,7 +106,7 @@ public class ClientCacheFactoryJUnitTest {
}
try {
- new ClientCacheFactory().set("log-level", "severe").create();
+ new ClientCacheFactory().set(DistributionConfig.LOG_LEVEL_NAME, "severe").create();
fail("expected create to fail");
} catch (IllegalStateException expected) {
}
@@ -122,13 +125,13 @@ public class ClientCacheFactoryJUnitTest {
URL url = ClientCacheFactoryJUnitTest.class.getResource("ClientCacheFactoryJUnitTest_single_pool.xml");;
FileUtil.copy(url, this.tmpFile);
this.cc = new ClientCacheFactory()
- .set("cache-xml-file", this.tmpFile.getAbsolutePath())
+ .set(DistributionConfig.CACHE_XML_FILE_NAME, this.tmpFile.getAbsolutePath())
.create();
GemFireCacheImpl gfc = (GemFireCacheImpl)this.cc;
assertEquals(true, gfc.isClient());
Properties dsProps = this.cc.getDistributedSystem().getProperties();
- assertEquals("0", dsProps.getProperty("mcast-port"));
- assertEquals("", dsProps.getProperty("locators"));
+ assertEquals("0", dsProps.getProperty(MCAST_PORT));
+ assertEquals("", dsProps.getProperty(LOCATORS));
Pool defPool = gfc.getDefaultPool();
assertEquals("my_pool_name", defPool.getName());
assertEquals(new ArrayList(), defPool.getLocators());
@@ -141,7 +144,7 @@ public class ClientCacheFactoryJUnitTest {
@Test
public void test002DPsinglePool() throws Exception {
Properties dsProps = new Properties();
- dsProps.setProperty("mcast-port", "0");
+ dsProps.setProperty(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(dsProps);
Pool p = PoolManager.createFactory().addServer(InetAddress.getLocalHost().getHostName(), 7777).create("singlePool");
this.cc = new ClientCacheFactory().create();
@@ -179,7 +182,7 @@ public class ClientCacheFactoryJUnitTest {
@Test
public void test003DPmultiplePool() throws Exception {
Properties dsProps = new Properties();
- dsProps.setProperty("mcast-port", "0");
+ dsProps.setProperty(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(dsProps);
PoolManager.createFactory().addServer(InetAddress.getLocalHost().getHostName(), 7777).create("p7");
PoolManager.createFactory().addServer(InetAddress.getLocalHost().getHostName(), 6666).create("p6");
@@ -214,13 +217,13 @@ public class ClientCacheFactoryJUnitTest {
@Test
public void test004SetMethod() throws Exception {
- this.cc = new ClientCacheFactory().set("log-level", "severe").create();
+ this.cc = new ClientCacheFactory().set(DistributionConfig.LOG_LEVEL_NAME, "severe").create();
GemFireCacheImpl gfc = (GemFireCacheImpl)this.cc;
assertEquals(true, gfc.isClient());
Properties dsProps = this.cc.getDistributedSystem().getProperties();
- assertEquals("0", dsProps.getProperty("mcast-port"));
- assertEquals("", dsProps.getProperty("locators"));
- assertEquals("severe", dsProps.getProperty("log-level"));
+ assertEquals("0", dsProps.getProperty(MCAST_PORT));
+ assertEquals("", dsProps.getProperty(LOCATORS));
+ assertEquals("severe", dsProps.getProperty(DistributionConfig.LOG_LEVEL_NAME));
}
@Test
@@ -233,8 +236,8 @@ public class ClientCacheFactoryJUnitTest {
assertEquals(true, gfc.isClient());
Properties dsProps = this.cc.getDistributedSystem().getProperties();
- assertEquals("0", dsProps.getProperty("mcast-port"));
- assertEquals("", dsProps.getProperty("locators"));
+ assertEquals("0", dsProps.getProperty(MCAST_PORT));
+ assertEquals("", dsProps.getProperty(LOCATORS));
Pool defPool = gfc.getDefaultPool();
assertEquals("DEFAULT", defPool.getName());
assertEquals(new ArrayList(), defPool.getLocators());
@@ -244,8 +247,8 @@ public class ClientCacheFactoryJUnitTest {
// make sure we can create another secure user cache
RegionService cc2 = this.cc.createAuthenticatedView(suProps);
assertEquals(true, gfc.isClient());
- assertEquals("0", dsProps.getProperty("mcast-port"));
- assertEquals("", dsProps.getProperty("locators"));
+ assertEquals("0", dsProps.getProperty(MCAST_PORT));
+ assertEquals("", dsProps.getProperty(LOCATORS));
defPool = gfc.getDefaultPool();
assertEquals("DEFAULT", defPool.getName());
assertEquals(new ArrayList(), defPool.getLocators());
@@ -264,8 +267,8 @@ public class ClientCacheFactoryJUnitTest {
GemFireCacheImpl gfc = (GemFireCacheImpl)this.cc;
assertEquals(true, gfc.isClient());
Properties dsProps = this.cc.getDistributedSystem().getProperties();
- assertEquals("0", dsProps.getProperty("mcast-port"));
- assertEquals("", dsProps.getProperty("locators"));
+ assertEquals("0", dsProps.getProperty(MCAST_PORT));
+ assertEquals("", dsProps.getProperty(LOCATORS));
Pool defPool = gfc.getDefaultPool();
assertEquals("DEFAULT", defPool.getName());
assertEquals(new ArrayList(), defPool.getLocators());
@@ -275,8 +278,8 @@ public class ClientCacheFactoryJUnitTest {
gfc = (GemFireCacheImpl)this.cc;
assertEquals(true, gfc.isClient());
dsProps = this.cc.getDistributedSystem().getProperties();
- assertEquals("0", dsProps.getProperty("mcast-port"));
- assertEquals("", dsProps.getProperty("locators"));
+ assertEquals("0", dsProps.getProperty(MCAST_PORT));
+ assertEquals("", dsProps.getProperty(LOCATORS));
defPool = gfc.getDefaultPool();
assertEquals("DEFAULT", defPool.getName());
assertEquals(new ArrayList(), defPool.getLocators());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientRegionFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientRegionFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientRegionFactoryJUnitTest.java
index 91f6741..1435172 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientRegionFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientRegionFactoryJUnitTest.java
@@ -16,33 +16,7 @@
*/
package com.gemstone.gemfire.cache.client;
-import static com.gemstone.gemfire.cache.client.ClientRegionShortcut.*;
-import static org.junit.Assert.*;
-
-import java.net.InetAddress;
-import java.util.Arrays;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.RegionService;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.internal.ProxyRegion;
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.QueryService;
@@ -51,6 +25,20 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import java.net.InetAddress;
+import java.util.Arrays;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.cache.client.ClientRegionShortcut.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Unit test for the ClientRegionFactory class
@@ -482,8 +470,8 @@ public class ClientRegionFactoryJUnitTest {
private Properties createGemFireProperties() {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("locators", "");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
index f5513df..44d03ce 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/ClientServerRegisterInterestsDUnitTest.java
@@ -16,29 +16,21 @@
*/
package com.gemstone.gemfire.cache.client;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.test.dunit.*;
+
import java.io.IOException;
import java.net.UnknownHostException;
import java.util.Stack;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache.server.ClientSubscriptionConfig;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* The ClientServerRegisterInterestsDUnitTest class is a test suite of test cases testing the interaction between a
@@ -93,9 +85,9 @@ public class ClientServerRegisterInterestsDUnitTest extends DistributedTestCase
try {
Cache cache = new CacheFactory()
.set("name", "ClientServerRegisterInterestsTestGemFireServer")
- .set("mcast-port", "0")
- .set("log-file", "clientServerRegisterInterestsTest.log")
- .set("log-level", "config")
+ .set(MCAST_PORT, "0")
+ .set(DistributionConfig.LOG_FILE_NAME, "clientServerRegisterInterestsTest.log")
+ .set(DistributionConfig.LOG_LEVEL_NAME, "config")
//.set("jmx-manager", "true")
//.set("jmx-manager-http-port", "0")
//.set("jmx-manager-port", "1199")
@@ -148,7 +140,7 @@ public class ClientServerRegisterInterestsDUnitTest extends DistributedTestCase
private ClientCache setupGemFireClientCache() {
ClientCache clientCache = new ClientCacheFactory()
- .set("durable-client-id", "TestDurableClientId")
+ .set(DistributionConfig.DURABLE_CLIENT_ID_NAME, "TestDurableClientId")
.create();
PoolFactory poolFactory = PoolManager.createFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
index 667af89..72bed06 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/AutoConnectionSourceImplJUnitTest.java
@@ -16,31 +16,8 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.net.ConnectException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.cache.RegionService;
-import com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.NoAvailableLocatorsException;
import com.gemstone.gemfire.cache.client.SubscriptionNotEnabledException;
import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionRequest;
@@ -48,7 +25,6 @@ import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionRespon
import com.gemstone.gemfire.cache.client.internal.locator.LocatorListResponse;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.PoolStatHelper;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
@@ -59,6 +35,27 @@ import com.gemstone.gemfire.distributed.internal.tcpserver.TcpServer;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.PoolStats;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
*
@@ -79,8 +76,8 @@ public class AutoConnectionSourceImplJUnitTest {
@Before
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
@@ -94,8 +91,8 @@ public class AutoConnectionSourceImplJUnitTest {
//very irritating, the SystemTimer requires having a distributed system
Properties properties = new Properties();
- properties.put(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.put(DistributionConfig.LOCATORS_NAME, "");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
background = Executors.newSingleThreadScheduledExecutor();
List/*<InetSocketAddress>*/ locators = new ArrayList();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 15f5d52..4b61979 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -16,15 +16,7 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Properties;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
@@ -34,11 +26,19 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.security.AuthenticationRequiredException;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.Host;
+import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.util.test.TestUtil;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Tests cacheserver ssl support added. See https://svn.gemstone.com/trac/gemfire/ticket/48995 for details
*/
@@ -71,8 +71,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
public Cache createCache(Properties props) throws Exception
{
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = new CacheFactory(props).create();
if (cache == null) {
throw new Exception("CacheFactory.create() returned null ");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java
index 532f514..8f055d9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/ConnectionPoolImplJUnitTest.java
@@ -16,17 +16,6 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import static org.junit.Assert.*;
-
-import java.net.InetSocketAddress;
-import java.net.SocketTimeoutException;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.client.Pool;
@@ -39,6 +28,18 @@ import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.net.InetSocketAddress;
+import java.net.SocketTimeoutException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -55,8 +56,8 @@ public class ConnectionPoolImplJUnitTest {
@Before
public void setUp() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = CacheFactory.create(DistributedSystem.connect(props));
port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
index 54c819e..ee17818 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/LocatorTestBase.java
@@ -34,6 +34,8 @@ import java.net.InetSocketAddress;
import java.net.UnknownHostException;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*
*/
@@ -94,8 +96,8 @@ public abstract class LocatorTestBase extends DistributedTestCase {
final String testName = getUniqueName();
disconnectFromDS();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- props.setProperty(DistributionConfig.LOCATORS_NAME, otherLocators);
+ props.setProperty(MCAST_PORT, String.valueOf(0));
+ props.setProperty(LOCATORS, otherLocators);
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
try {
@@ -185,8 +187,8 @@ public abstract class LocatorTestBase extends DistributedTestCase {
protected int startBridgeServer(final String[] groups, final String locators, final String[] regions, final ServerLoadProbe probe)
throws IOException {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
DistributedSystem ds = getSystem(props);
Cache cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
@@ -211,9 +213,9 @@ public abstract class LocatorTestBase extends DistributedTestCase {
protected int startBridgeServerWithEmbeddedLocator(final String[] groups, final String locators, final String[] regions, final ServerLoadProbe probe)
throws IOException {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, locators);
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
+ props.setProperty(MCAST_PORT, String.valueOf(0));
+ props.setProperty(START_LOCATOR, locators);
+ props.setProperty(LOCATORS, locators);
DistributedSystem ds = getSystem(props);
Cache cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
@@ -290,8 +292,8 @@ public abstract class LocatorTestBase extends DistributedTestCase {
protected void startBridgeClient(final Pool pool, final String[] regions) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, String.valueOf(0));
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = getSystem(props);
Cache cache = CacheFactory.create(ds);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/QueueManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/QueueManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/QueueManagerJUnitTest.java
index c2872e7..6ea0bdf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/QueueManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/QueueManagerJUnitTest.java
@@ -16,35 +16,12 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import static org.junit.Assert.*;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.cache.RegionService;
import com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException;
+import com.gemstone.gemfire.cache.RegionService;
import com.gemstone.gemfire.cache.client.SubscriptionNotEnabledException;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.cache.PoolStats;
@@ -54,6 +31,23 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LocalLogWriter;
import com.gemstone.gemfire.internal.util.StopWatch;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.util.*;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -78,8 +72,8 @@ public class QueueManagerJUnitTest {
public void setUp() {
this.logger = new LocalLogWriter(InternalLogWriter.FINEST_LEVEL, System.out);
Properties properties = new Properties();
- properties.put(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.put(DistributionConfig.LOCATORS_NAME, "");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
ds = DistributedSystem.connect(properties);
stats = new PoolStats(ds, "QueueManagerJUnitTest");
pool = new DummyPool();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
index dd146a6..c9d5e84 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
@@ -16,15 +16,7 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.util.Properties;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
@@ -32,12 +24,19 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.security.AuthenticationRequiredException;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.util.test.TestUtil;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Test for GEODE-396
*/
@@ -65,8 +64,8 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase {
public Cache createCache(Properties props) throws Exception
{
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = new CacheFactory(props).create();
if (cache == null) {
throw new Exception("CacheFactory.create() returned null ");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
index fc06afd..6321c14 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerJUnitTest.java
@@ -16,43 +16,12 @@
*/
package com.gemstone.gemfire.cache.client.internal.pooling;
-import static org.junit.Assert.fail;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
-import java.util.Collections;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Executors;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.cache.client.AllConnectionsInUseException;
import com.gemstone.gemfire.cache.client.NoAvailableServersException;
-import com.gemstone.gemfire.cache.client.internal.ClientUpdater;
-import com.gemstone.gemfire.cache.client.internal.Connection;
-import com.gemstone.gemfire.cache.client.internal.ConnectionFactory;
-import com.gemstone.gemfire.cache.client.internal.ConnectionStats;
-import com.gemstone.gemfire.cache.client.internal.Endpoint;
-import com.gemstone.gemfire.cache.client.internal.EndpointManager;
-import com.gemstone.gemfire.cache.client.internal.EndpointManagerImpl;
-import com.gemstone.gemfire.cache.client.internal.Op;
-import com.gemstone.gemfire.cache.client.internal.QueueManager;
-import com.gemstone.gemfire.cache.client.internal.ServerBlackList;
+import com.gemstone.gemfire.cache.client.internal.*;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.cache.PoolStats;
@@ -64,6 +33,28 @@ import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.nio.ByteBuffer;
+import java.util.Collections;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class ConnectionManagerJUnitTest {
@@ -87,8 +78,8 @@ public class ConnectionManagerJUnitTest {
factory = new DummyFactory();
Properties properties = new Properties();
- properties.put(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.put(DistributionConfig.LOCATORS_NAME, "");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
ds = DistributedSystem.connect(properties);
background = Executors.newSingleThreadScheduledExecutor();
poolStats = new PoolStats(ds, "connectionManagerJUnitTest");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MXMemoryPoolListenerExample.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MXMemoryPoolListenerExample.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MXMemoryPoolListenerExample.java
index 0c0a4c0..af13c04 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MXMemoryPoolListenerExample.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MXMemoryPoolListenerExample.java
@@ -16,6 +16,14 @@
*/
package com.gemstone.gemfire.cache.management;
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+
+import javax.management.Notification;
+import javax.management.NotificationEmitter;
+import javax.management.NotificationListener;
import java.lang.management.ManagementFactory;
import java.lang.management.MemoryMXBean;
import java.lang.management.MemoryPoolMXBean;
@@ -25,19 +33,7 @@ import java.util.Properties;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
-import javax.management.Notification;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationListener;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* An test class for exploring the various notification listener behaviors
@@ -105,11 +101,11 @@ public class MXMemoryPoolListenerExample implements NotificationListener {
}
Properties dsProps = new Properties();
- dsProps.setProperty(DistributedSystemConfig.MCAST_PORT_NAME, "0"); // Loner
- dsProps.setProperty(DistributedSystemConfig.LOG_LEVEL_NAME, "info");
- dsProps.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "200");
- dsProps.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- dsProps.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ dsProps.setProperty(MCAST_PORT, "0"); // Loner
+ dsProps.setProperty(SystemConfigurationProperties.LOG_LEVEL, "info");
+ dsProps.setProperty(SystemConfigurationProperties.STATISTIC_SAMPLE_RATE, "200");
+ dsProps.setProperty(SystemConfigurationProperties.ENABLE_TIME_STATISTICS, "true");
+ dsProps.setProperty(SystemConfigurationProperties.STATISTIC_SAMPLING_ENABLED, "true");
DistributedSystem ds = DistributedSystem.connect(dsProps);
final LogWriter logger = ds.getLogWriter();
[55/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
index 249e189..93c6360 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/WANLocatorServerDUnitTest.java
@@ -97,7 +97,7 @@ public class WANLocatorServerDUnitTest extends WANTestBase {
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + 1);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "" + 1);
props.setProperty(LOCATORS, "localhost[" + port1
+ "],localhost[" + port2 + "],localhost[" + port3 + "]");
props.setProperty(START_LOCATOR, "localhost["
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
index bd69adc..8a327a7 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WANCommandTestBase.java
@@ -79,7 +79,7 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
InternalDistributedSystem ds = getSystem(props);
@@ -91,10 +91,10 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
getSystem(props);
return port;
}
@@ -111,7 +111,7 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locPort + "]");
- props.setProperty(DistributionConfig.GROUPS_NAME, groups);
+ props.setProperty(GROUPS, groups);
InternalDistributedSystem ds = getSystem(props);
cache = CacheFactory.create(ds);
}
@@ -244,7 +244,7 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
- props.setProperty(DistributionConfig.GROUPS_NAME, groups);
+ props.setProperty(GROUPS, groups);
InternalDistributedSystem ds = getSystem(props);
cache = CacheFactory.create(ds);
@@ -281,7 +281,7 @@ public abstract class WANCommandTestBase extends CliCommandTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
- props.setProperty(DistributionConfig.GROUPS_NAME, groups);
+ props.setProperty(GROUPS, groups);
InternalDistributedSystem ds = getSystem(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
index ab07226..9ce3de6 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandCreateGatewaySenderDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.cache.wan.wancommand;
import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.wan.GatewaySenderException;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
@@ -34,8 +33,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
@@ -65,7 +63,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -114,7 +112,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -186,7 +184,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -242,7 +240,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -317,7 +315,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -390,7 +388,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -455,7 +453,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -520,7 +518,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -582,7 +580,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -651,7 +649,7 @@ public class WanCommandCreateGatewaySenderDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort
+ "]");
setUpJmxManagerOnVm0ThenConnect(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
index 5cccdbb..10e55e1 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStartDUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.internal.cache.wan.wancommand;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
@@ -30,8 +29,7 @@ import org.junit.experimental.categories.Category;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.pause;
@@ -52,7 +50,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -97,7 +95,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -158,7 +156,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -202,7 +200,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -268,7 +266,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -349,7 +347,7 @@ public class WanCommandGatewaySenderStartDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
index 7abb3a9..c51853d 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandGatewaySenderStopDUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.internal.cache.wan.wancommand;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
@@ -30,8 +29,7 @@ import org.junit.experimental.categories.Category;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.pause;
@@ -55,7 +53,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -90,7 +88,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -156,7 +154,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -202,7 +200,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -274,7 +272,7 @@ public class WanCommandGatewaySenderStopDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
index 20977c7..91c9e45 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandListDUnitTest.java
@@ -16,7 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.wan.wancommand;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
@@ -30,8 +29,7 @@ import org.junit.experimental.categories.Category;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.pause;
@@ -48,7 +46,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -77,7 +75,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -130,7 +128,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -180,7 +178,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -242,7 +240,7 @@ public class WanCommandListDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + lnPort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
index a95ae17..abefb3b 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/wancommand/WanCommandPauseResumeDUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.internal.cache.wan.wancommand;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
@@ -29,8 +28,7 @@ import org.junit.experimental.categories.Category;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.pause;
@@ -47,7 +45,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -86,7 +84,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -128,7 +126,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -194,7 +192,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -265,7 +263,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -349,7 +347,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -385,7 +383,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -462,7 +460,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -513,7 +511,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
@@ -594,7 +592,7 @@ public class WanCommandPauseResumeDUnitTest extends WANCommandTestBase {
Properties props = getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "1");
props.setProperty(LOCATORS, "localhost[" + punePort + "]");
setUpJmxManagerOnVm0ThenConnect(props);
[53/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index 3b08779..864c93b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -109,11 +109,11 @@ public abstract class AbstractDistributionConfig
protected int checkTcpPort(int value) {
if ( getSSLEnabled() && value != 0 ) {
throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
- .toLocalizedString(new Object[] { TCP_PORT, Integer.valueOf(value), SSL_ENABLED_NAME }));
+ .toLocalizedString(new Object[] { TCP_PORT, Integer.valueOf(value), SSL_ENABLED }));
}
if ( getClusterSSLEnabled() && value != 0 ) {
throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
- .toLocalizedString(new Object[] { TCP_PORT, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME }));
+ .toLocalizedString(new Object[] { TCP_PORT, Integer.valueOf(value), CLUSTER_SSL_ENABLED }));
}
return value;
}
@@ -122,11 +122,11 @@ public abstract class AbstractDistributionConfig
protected int checkMcastPort(int value) {
if ( getSSLEnabled() && value != 0 ) {
throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
- .toLocalizedString(new Object[] { MCAST_PORT, Integer.valueOf(value), SSL_ENABLED_NAME }));
+ .toLocalizedString(new Object[] { MCAST_PORT, Integer.valueOf(value), SSL_ENABLED }));
}
if ( getClusterSSLEnabled() && value != 0 ) {
throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
- .toLocalizedString(new Object[] { MCAST_PORT, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME }));
+ .toLocalizedString(new Object[] { MCAST_PORT, Integer.valueOf(value), CLUSTER_SSL_ENABLED }));
}
return value;
}
@@ -164,25 +164,25 @@ public abstract class AbstractDistributionConfig
return value;
}
- @ConfigAttributeChecker(name=SSL_ENABLED_NAME)
+ @ConfigAttributeChecker(name=SSL_ENABLED)
protected Boolean checkSSLEnabled(Boolean value) {
if ( value.booleanValue() && (getMcastPort() != 0) ) {
throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0
- .toLocalizedString(new Object[] { SSL_ENABLED_NAME, value, MCAST_PORT }));
+ .toLocalizedString(new Object[] { SSL_ENABLED, value, MCAST_PORT }));
}
return value;
}
- @ConfigAttributeChecker(name=CLUSTER_SSL_ENABLED_NAME)
+ @ConfigAttributeChecker(name=CLUSTER_SSL_ENABLED)
protected Boolean checkClusterSSLEnabled(Boolean value) {
if ( value.booleanValue() && (getMcastPort() != 0) ) {
throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0
- .toLocalizedString(new Object[] { CLUSTER_SSL_ENABLED_NAME, value, MCAST_PORT }));
+ .toLocalizedString(new Object[] { CLUSTER_SSL_ENABLED, value, MCAST_PORT }));
}
return value;
}
- @ConfigAttributeChecker(name=HTTP_SERVICE_BIND_ADDRESS_NAME)
+ @ConfigAttributeChecker(name=HTTP_SERVICE_BIND_ADDRESS)
protected String checkHttpServiceBindAddress(String value) {
if (value != null && value.length() > 0 &&
!SocketCreator.isLocalHost(value)) {
@@ -195,7 +195,7 @@ public abstract class AbstractDistributionConfig
}
- @ConfigAttributeChecker(name=DISTRIBUTED_SYSTEM_ID_NAME)
+ @ConfigAttributeChecker(name=DISTRIBUTED_SYSTEM_ID)
protected int checkDistributedSystemId(int value) {
String distributedSystemListener = System
.getProperty(DistributionConfig.GEMFIRE_PREFIX + "DistributedSystemListener");
@@ -204,13 +204,13 @@ public abstract class AbstractDistributionConfig
if (value < MIN_DISTRIBUTED_SYSTEM_ID) {
throw new IllegalArgumentException(
LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2
- .toLocalizedString(new Object[] { DISTRIBUTED_SYSTEM_ID_NAME,
+ .toLocalizedString(new Object[] { DISTRIBUTED_SYSTEM_ID,
Integer.valueOf(value),
Integer.valueOf(MIN_DISTRIBUTED_SYSTEM_ID) }));
}
}
if (value > MAX_DISTRIBUTED_SYSTEM_ID) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {DISTRIBUTED_SYSTEM_ID_NAME, Integer.valueOf(value), Integer.valueOf(MAX_DISTRIBUTED_SYSTEM_ID)}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {DISTRIBUTED_SYSTEM_ID, Integer.valueOf(value), Integer.valueOf(MAX_DISTRIBUTED_SYSTEM_ID)}));
}
return value;
}
@@ -344,36 +344,36 @@ public abstract class AbstractDistributionConfig
}
/** check a new mcast flow-control setting */
- @ConfigAttributeChecker(name=MCAST_FLOW_CONTROL_NAME)
+ @ConfigAttributeChecker(name=MCAST_FLOW_CONTROL)
protected FlowControlParams checkMcastFlowControl(FlowControlParams params) {
int value = params.getByteAllowance();
if (value < MIN_FC_BYTE_ALLOWANCE) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_BYTEALLOWANCE_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL_NAME, Integer.valueOf(value), Integer.valueOf(MIN_FC_BYTE_ALLOWANCE)}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_BYTEALLOWANCE_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL, Integer.valueOf(value), Integer.valueOf(MIN_FC_BYTE_ALLOWANCE)}));
}
float fvalue = params.getRechargeThreshold();
if (fvalue < MIN_FC_RECHARGE_THRESHOLD) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGETHRESHOLD_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL_NAME, new Float(fvalue), new Float(MIN_FC_RECHARGE_THRESHOLD)}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGETHRESHOLD_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL, new Float(fvalue), new Float(MIN_FC_RECHARGE_THRESHOLD)}));
}
else if (fvalue > MAX_FC_RECHARGE_THRESHOLD) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGETHRESHOLD_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL_NAME, new Float(fvalue), new Float(MAX_FC_RECHARGE_THRESHOLD)}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGETHRESHOLD_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL, new Float(fvalue), new Float(MAX_FC_RECHARGE_THRESHOLD)}));
}
value = params.getRechargeBlockMs();
if (value < MIN_FC_RECHARGE_BLOCK_MS) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGEBLOCKMS_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL_NAME, Integer.valueOf(value), Integer.valueOf(MIN_FC_RECHARGE_BLOCK_MS)}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGEBLOCKMS_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL, Integer.valueOf(value), Integer.valueOf(MIN_FC_RECHARGE_BLOCK_MS)}));
}
else if (value > MAX_FC_RECHARGE_BLOCK_MS) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGEBLOCKMS_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL_NAME, Integer.valueOf(value), Integer.valueOf(MAX_FC_RECHARGE_BLOCK_MS)}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_RECHARGEBLOCKMS_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(new Object[] {MCAST_FLOW_CONTROL, Integer.valueOf(value), Integer.valueOf(MAX_FC_RECHARGE_BLOCK_MS)}));
}
return params;
}
- @ConfigAttributeChecker(name=MEMBERSHIP_PORT_RANGE_NAME)
+ @ConfigAttributeChecker(name=MEMBERSHIP_PORT_RANGE)
protected int[] checkMembershipPortRange(int[] value) {
- minMaxCheck(MEMBERSHIP_PORT_RANGE_NAME, value[0],
+ minMaxCheck(MEMBERSHIP_PORT_RANGE, value[0],
DEFAULT_MEMBERSHIP_PORT_RANGE[0],
value[1]);
- minMaxCheck(MEMBERSHIP_PORT_RANGE_NAME, value[1],
+ minMaxCheck(MEMBERSHIP_PORT_RANGE, value[1],
value[0],
DEFAULT_MEMBERSHIP_PORT_RANGE[1]);
@@ -381,7 +381,7 @@ public abstract class AbstractDistributionConfig
// One for each, UDP, FD_SOCk protocols and Cache Server.
if (value[1] - value[0] < 2) {
throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.
- toLocalizedString(new Object[] {MEMBERSHIP_PORT_RANGE_NAME, value[0]+"-"+value[1], Integer.valueOf(3)}));
+ toLocalizedString(new Object[] {MEMBERSHIP_PORT_RANGE, value[0]+"-"+value[1], Integer.valueOf(3)}));
}
return value;
}
@@ -393,25 +393,25 @@ public abstract class AbstractDistributionConfig
if (! (value.equals(CLIENT_CONFLATION_PROP_VALUE_DEFAULT) ||
value.equals(CLIENT_CONFLATION_PROP_VALUE_ON) ||
value.equals(CLIENT_CONFLATION_PROP_VALUE_OFF)) ) {
- throw new IllegalArgumentException("Could not set \"" + CLIENT_CONFLATION_PROP_NAME + "\" to \"" + value + "\" because its value is not recognized");
+ throw new IllegalArgumentException("Could not set \"" + CONFLATE_EVENTS + "\" to \"" + value + "\" because its value is not recognized");
}
return value;
}
- @ConfigAttributeChecker(name=SECURITY_PEER_AUTH_INIT_NAME)
+ @ConfigAttributeChecker(name=SECURITY_PEER_AUTH_INIT)
protected String checkSecurityPeerAuthInit(String value) {
if (value != null && value.length() > 0 && getMcastPort() != 0) {
String mcastInfo = MCAST_PORT + "[" + getMcastPort() + "]";
throw new IllegalArgumentException(
LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_2_MUST_BE_0_WHEN_SECURITY_IS_ENABLED
.toLocalizedString(new Object[] {
- SECURITY_PEER_AUTH_INIT_NAME, value, mcastInfo }));
+ SECURITY_PEER_AUTH_INIT, value, mcastInfo }));
}
return value;
}
- @ConfigAttributeChecker(name=SECURITY_PEER_AUTHENTICATOR_NAME)
+ @ConfigAttributeChecker(name=SECURITY_PEER_AUTHENTICATOR)
protected String checkSecurityPeerAuthenticator(String value) {
if (value != null && value.length() > 0 && getMcastPort() != 0) {
String mcastInfo = MCAST_PORT + "[" + getMcastPort() + "]";
@@ -419,7 +419,7 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_2_MUST_BE_0_WHEN_SECURITY_IS_ENABLED
.toLocalizedString(
new Object[] {
- SECURITY_PEER_AUTHENTICATOR_NAME,
+ SECURITY_PEER_AUTHENTICATOR,
value,
mcastInfo}));
}
@@ -427,13 +427,13 @@ public abstract class AbstractDistributionConfig
}
- @ConfigAttributeChecker(name=SECURITY_LOG_LEVEL_NAME)
+ @ConfigAttributeChecker(name=SECURITY_LOG_LEVEL)
protected int checkSecurityLogLevel(int value) {
if (value < MIN_LOG_LEVEL) {
throw new IllegalArgumentException(
LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_LESS_THAN_2.toLocalizedString(
new Object[] {
- SECURITY_LOG_LEVEL_NAME,
+ SECURITY_LOG_LEVEL,
LogWriterImpl.levelToString(value),
LogWriterImpl.levelToString(MIN_LOG_LEVEL)}));
}
@@ -441,7 +441,7 @@ public abstract class AbstractDistributionConfig
throw new IllegalArgumentException(
LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_CAN_NOT_BE_GREATER_THAN_2.toLocalizedString(
new Object[] {
- SECURITY_LOG_LEVEL_NAME,
+ SECURITY_LOG_LEVEL,
LogWriterImpl.levelToString(value),
LogWriterImpl.levelToString(MAX_LOG_LEVEL)}));
}
@@ -449,7 +449,7 @@ public abstract class AbstractDistributionConfig
}
- @ConfigAttributeChecker(name=MEMCACHED_PROTOCOL_NAME)
+ @ConfigAttributeChecker(name=MEMCACHED_PROTOCOL)
protected String checkMemcachedProtocol(String protocol) {
if (protocol == null
|| (!protocol.equalsIgnoreCase(GemFireMemcachedServer.Protocol.ASCII.name()) &&
@@ -464,7 +464,7 @@ public abstract class AbstractDistributionConfig
return false;
}
- @ConfigAttributeChecker(name=MEMCACHED_BIND_ADDRESS_NAME)
+ @ConfigAttributeChecker(name=MEMCACHED_BIND_ADDRESS)
protected String checkMemcachedBindAddress(String value) {
if (value != null && value.length() > 0 &&
!SocketCreator.isLocalHost(value)) {
@@ -476,7 +476,7 @@ public abstract class AbstractDistributionConfig
return value;
}
- @ConfigAttributeChecker(name=REDIS_BIND_ADDRESS_NAME)
+ @ConfigAttributeChecker(name=REDIS_BIND_ADDRESS)
protected String checkRedisBindAddress(String value) {
if (value != null && value.length() > 0 &&
!SocketCreator.isLocalHost(value)) {
@@ -492,7 +492,7 @@ public abstract class AbstractDistributionConfig
@Override
protected void checkAttributeName(String attName) {
- if(!attName.startsWith(SECURITY_PREFIX_NAME) && !attName.startsWith(USERDEFINED_PREFIX_NAME)
+ if(!attName.startsWith(SECURITY_PREFIX) && !attName.startsWith(USERDEFINED_PREFIX_NAME)
&& !attName.startsWith(SSL_SYSTEM_PROPS_NAME) && !attName.startsWith(SYS_PROP_NAME)) {
super.checkAttributeName(attName);
}
@@ -518,13 +518,13 @@ public abstract class AbstractDistributionConfig
}
// special case: log-level and security-log-level attributes are String type, but the setter accepts int
- if(attName.equalsIgnoreCase(LOG_LEVEL_NAME) || attName.equalsIgnoreCase(SECURITY_LOG_LEVEL_NAME)){
+ if(attName.equalsIgnoreCase(LOG_LEVEL) || attName.equalsIgnoreCase(SECURITY_LOG_LEVEL)){
if(attValue instanceof String) {
attValue = LogWriterImpl.levelNameToCode((String) attValue);
}
}
- if (attName.startsWith(SECURITY_PREFIX_NAME)) {
+ if (attName.startsWith(SECURITY_PREFIX)) {
this.setSecurity(attName,attValue.toString());
}
@@ -536,7 +536,7 @@ public abstract class AbstractDistributionConfig
if (setter == null) {
// if we cann't find the defined setter, but the attributeName starts with these special characters
// since we already set it in the respecitive properties above, we need to set the source then return
- if (attName.startsWith(SECURITY_PREFIX_NAME) ||
+ if (attName.startsWith(SECURITY_PREFIX) ||
attName.startsWith(SSL_SYSTEM_PROPS_NAME) ||
attName.startsWith(SYS_PROP_NAME)) {
getAttSourceMap().put(attName, source);
@@ -570,17 +570,17 @@ public abstract class AbstractDistributionConfig
checkAttributeName(attName);
// special case:
- if (attName.equalsIgnoreCase(LOG_LEVEL_NAME)) {
+ if (attName.equalsIgnoreCase(LOG_LEVEL)) {
return LogWriterImpl.levelToString(this.getLogLevel());
}
- if (attName.equalsIgnoreCase(SECURITY_LOG_LEVEL_NAME)) {
+ if (attName.equalsIgnoreCase(SECURITY_LOG_LEVEL)) {
return LogWriterImpl.levelToString(this.getSecurityLogLevel());
}
Method getter = getters.get(attName);
if(getter==null) {
- if (attName.startsWith(SECURITY_PREFIX_NAME)) {
+ if (attName.startsWith(SECURITY_PREFIX)) {
return this.getSecurity(attName);
}
throw new InternalGemFireException(LocalizedStrings.AbstractDistributionConfig_UNHANDLED_ATTRIBUTE_NAME_0.toLocalizedString(attName));
@@ -619,7 +619,7 @@ public abstract class AbstractDistributionConfig
* @return an empty list
*/
public List<String> getModifiableAttributes(){
- String[] modifiables = {HTTP_SERVICE_PORT_NAME,JMX_MANAGER_HTTP_PORT_NAME};
+ String[] modifiables = {HTTP_SERVICE_PORT,JMX_MANAGER_HTTP_PORT_NAME};
return Arrays.asList(modifiables);
};
@@ -641,7 +641,7 @@ public abstract class AbstractDistributionConfig
public static Class _getAttributeType(String attName) {
ConfigAttribute ca = attributes.get(attName);
if(ca==null){
- if(attName.startsWith(SECURITY_PREFIX_NAME) || attName.startsWith(SSL_SYSTEM_PROPS_NAME) || attName.startsWith(SYS_PROP_NAME) ){
+ if(attName.startsWith(SECURITY_PREFIX) || attName.startsWith(SSL_SYSTEM_PROPS_NAME) || attName.startsWith(SYS_PROP_NAME) ){
return String.class;
}
throw new InternalGemFireException(LocalizedStrings.AbstractDistributionConfig_UNHANDLED_ATTRIBUTE_NAME_0.toLocalizedString(attName));
@@ -653,58 +653,58 @@ public abstract class AbstractDistributionConfig
static {
Map<String, String> m = new HashMap<String, String>();
- m.put(ACK_WAIT_THRESHOLD_NAME,
+ m.put(ACK_WAIT_THRESHOLD,
LocalizedStrings.AbstractDistributionConfig_DEFAULT_ACK_WAIT_THRESHOLD_0_1_2
.toLocalizedString( new Object[] {
Integer.valueOf(DEFAULT_ACK_WAIT_THRESHOLD),
Integer.valueOf(MIN_ACK_WAIT_THRESHOLD),
Integer.valueOf(MIN_ACK_WAIT_THRESHOLD)}));
- m.put(ARCHIVE_FILE_SIZE_LIMIT_NAME,
+ m.put(ARCHIVE_FILE_SIZE_LIMIT,
LocalizedStrings.AbstractDistributionConfig_ARCHIVE_FILE_SIZE_LIMIT_NAME
.toLocalizedString());
- m.put(ACK_SEVERE_ALERT_THRESHOLD_NAME,
+ m.put(ACK_SEVERE_ALERT_THRESHOLD,
LocalizedStrings.AbstractDistributionConfig_ACK_SEVERE_ALERT_THRESHOLD_NAME
.toLocalizedString(
- new Object[] { ACK_WAIT_THRESHOLD_NAME,
+ new Object[] { ACK_WAIT_THRESHOLD,
Integer.valueOf(DEFAULT_ACK_SEVERE_ALERT_THRESHOLD),
Integer.valueOf(MIN_ACK_SEVERE_ALERT_THRESHOLD),
Integer.valueOf(MAX_ACK_SEVERE_ALERT_THRESHOLD)}));
- m.put(ARCHIVE_DISK_SPACE_LIMIT_NAME,
+ m.put(ARCHIVE_DISK_SPACE_LIMIT,
LocalizedStrings.AbstractDistributionConfig_ARCHIVE_DISK_SPACE_LIMIT_NAME
.toLocalizedString());
- m.put(CACHE_XML_FILE_NAME,
+ m.put(CACHE_XML_FILE,
LocalizedStrings.AbstractDistributionConfig_CACHE_XML_FILE_NAME_0
.toLocalizedString( DEFAULT_CACHE_XML_FILE ));
- m.put(DISABLE_TCP_NAME,
+ m.put(DISABLE_TCP,
LocalizedStrings.AbstractDistributionConfig_DISABLE_TCP_NAME_0
.toLocalizedString(Boolean.valueOf(DEFAULT_DISABLE_TCP)));
- m.put(ENABLE_TIME_STATISTICS_NAME,
+ m.put(ENABLE_TIME_STATISTICS,
LocalizedStrings.AbstractDistributionConfig_ENABLE_TIME_STATISTICS_NAME
.toLocalizedString());
- m.put(DEPLOY_WORKING_DIR,
+ m.put(SystemConfigurationProperties.DEPLOY_WORKING_DIR,
LocalizedStrings.AbstractDistributionConfig_DEPLOY_WORKING_DIR_0
.toLocalizedString(DEFAULT_DEPLOY_WORKING_DIR));
- m.put(LOG_FILE_NAME,
+ m.put(LOG_FILE,
LocalizedStrings.AbstractDistributionConfig_LOG_FILE_NAME_0
.toLocalizedString(DEFAULT_LOG_FILE));
- m.put(LOG_LEVEL_NAME,
+ m.put(LOG_LEVEL,
LocalizedStrings.AbstractDistributionConfig_LOG_LEVEL_NAME_0_1
.toLocalizedString(new Object[] { LogWriterImpl.levelToString(DEFAULT_LOG_LEVEL), LogWriterImpl.allowedLogLevels()}));
- m.put(LOG_FILE_SIZE_LIMIT_NAME,
+ m.put(LOG_FILE_SIZE_LIMIT,
LocalizedStrings.AbstractDistributionConfig_LOG_FILE_SIZE_LIMIT_NAME
.toLocalizedString());
- m.put(LOG_DISK_SPACE_LIMIT_NAME,
+ m.put(LOG_DISK_SPACE_LIMIT,
LocalizedStrings.AbstractDistributionConfig_LOG_DISK_SPACE_LIMIT_NAME
.toLocalizedString());
@@ -743,20 +743,20 @@ public abstract class AbstractDistributionConfig
Integer.valueOf(MIN_MCAST_TTL),
Integer.valueOf(MAX_MCAST_TTL)}));
- m.put(MCAST_SEND_BUFFER_SIZE_NAME,
+ m.put(MCAST_SEND_BUFFER_SIZE,
LocalizedStrings.AbstractDistributionConfig_MCAST_SEND_BUFFER_SIZE_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_MCAST_SEND_BUFFER_SIZE)));
- m.put(MCAST_RECV_BUFFER_SIZE_NAME,
+ m.put(MCAST_RECV_BUFFER_SIZE,
LocalizedStrings.AbstractDistributionConfig_MCAST_RECV_BUFFER_SIZE_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_MCAST_RECV_BUFFER_SIZE)));
- m.put(MCAST_FLOW_CONTROL_NAME,
+ m.put(MCAST_FLOW_CONTROL,
LocalizedStrings.AbstractDistributionConfig_MCAST_FLOW_CONTROL_NAME_0
.toLocalizedString(DEFAULT_MCAST_FLOW_CONTROL));
- m.put(MEMBER_TIMEOUT_NAME,
- LocalizedStrings.AbstractDistributionConfig_MEMBER_TIMEOUT_NAME_0
+ m.put(MEMBER_TIMEOUT,
+ LocalizedStrings.AbstractDistributionConfig_MEMBER_TIMEOUT_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_MEMBER_TIMEOUT)));
// for some reason the default port range is null under some circumstances
@@ -764,40 +764,40 @@ public abstract class AbstractDistributionConfig
String srange = range==null? "not available" : "" + range[0] + "-" + range[1];
String msg = LocalizedStrings.AbstractDistributionConfig_MEMBERSHIP_PORT_RANGE_NAME_0
.toLocalizedString(srange);
- m.put(MEMBERSHIP_PORT_RANGE_NAME,
+ m.put(MEMBERSHIP_PORT_RANGE,
msg);
- m.put(UDP_SEND_BUFFER_SIZE_NAME,
+ m.put(UDP_SEND_BUFFER_SIZE,
LocalizedStrings.AbstractDistributionConfig_UDP_SEND_BUFFER_SIZE_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_UDP_SEND_BUFFER_SIZE)));
- m.put(UDP_RECV_BUFFER_SIZE_NAME,
+ m.put(UDP_RECV_BUFFER_SIZE,
LocalizedStrings.AbstractDistributionConfig_UDP_RECV_BUFFER_SIZE_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_UDP_RECV_BUFFER_SIZE)));
- m.put(UDP_FRAGMENT_SIZE_NAME,
+ m.put(UDP_FRAGMENT_SIZE,
LocalizedStrings.AbstractDistributionConfig_UDP_FRAGMENT_SIZE_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_UDP_FRAGMENT_SIZE)));
- m.put(SOCKET_LEASE_TIME_NAME,
+ m.put(SOCKET_LEASE_TIME,
LocalizedStrings.AbstractDistributionConfig_SOCKET_LEASE_TIME_NAME_0_1_2
.toLocalizedString(new Object[] {
Integer.valueOf(DEFAULT_SOCKET_LEASE_TIME),
Integer.valueOf(MIN_SOCKET_LEASE_TIME),
Integer.valueOf(MAX_SOCKET_LEASE_TIME)}));
- m.put(SOCKET_BUFFER_SIZE_NAME,
+ m.put(SOCKET_BUFFER_SIZE,
LocalizedStrings.AbstractDistributionConfig_SOCKET_BUFFER_SIZE_NAME_0_1_2
.toLocalizedString(new Object[] {
Integer.valueOf(DEFAULT_SOCKET_BUFFER_SIZE),
Integer.valueOf(MIN_SOCKET_BUFFER_SIZE),
Integer.valueOf(MAX_SOCKET_BUFFER_SIZE)}));
- m.put(CONSERVE_SOCKETS_NAME,
+ m.put(CONSERVE_SOCKETS,
LocalizedStrings.AbstractDistributionConfig_CONSERVE_SOCKETS_NAME_0
.toLocalizedString(Boolean.valueOf(DEFAULT_CONSERVE_SOCKETS)));
- m.put(ROLES_NAME,
+ m.put(ROLES,
LocalizedStrings.AbstractDistributionConfig_ROLES_NAME_0
.toLocalizedString(DEFAULT_ROLES));
@@ -813,76 +813,76 @@ public abstract class AbstractDistributionConfig
" Multiple members in the same distributed system can not have the same name." +
" Defaults to \"\".");
- m.put(STATISTIC_ARCHIVE_FILE_NAME,
+ m.put(STATISTIC_ARCHIVE_FILE,
LocalizedStrings.AbstractDistributionConfig_STATISTIC_ARCHIVE_FILE_NAME_0
.toLocalizedString(DEFAULT_STATISTIC_ARCHIVE_FILE));
- m.put(STATISTIC_SAMPLE_RATE_NAME,
+ m.put(STATISTIC_SAMPLE_RATE,
LocalizedStrings.AbstractDistributionConfig_STATISTIC_SAMPLE_RATE_NAME_0_1_2
.toLocalizedString(new Object[] {
Integer.valueOf(DEFAULT_STATISTIC_SAMPLE_RATE),
Integer.valueOf(MIN_STATISTIC_SAMPLE_RATE),
Integer.valueOf(MAX_STATISTIC_SAMPLE_RATE)}));
- m.put(STATISTIC_SAMPLING_ENABLED_NAME,
+ m.put(STATISTIC_SAMPLING_ENABLED,
LocalizedStrings.AbstractDistributionConfig_STATISTIC_SAMPLING_ENABLED_NAME_0
.toLocalizedString(
Boolean.valueOf(DEFAULT_STATISTIC_SAMPLING_ENABLED)));
- m.put(SSL_ENABLED_NAME,
+ m.put(SSL_ENABLED,
LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_NAME_0
.toLocalizedString(
Boolean.valueOf(DEFAULT_SSL_ENABLED)));
- m.put(SSL_PROTOCOLS_NAME,
+ m.put(SSL_PROTOCOLS,
LocalizedStrings.AbstractDistributionConfig_SSL_PROTOCOLS_NAME_0
.toLocalizedString(DEFAULT_SSL_PROTOCOLS));
- m.put(SSL_CIPHERS_NAME,
+ m.put(SSL_CIPHERS,
LocalizedStrings.AbstractDistributionConfig_SSL_CIPHERS_NAME_0
.toLocalizedString(DEFAULT_SSL_CIPHERS));
- m.put(SSL_REQUIRE_AUTHENTICATION_NAME,
+ m.put(SSL_REQUIRE_AUTHENTICATION,
LocalizedStrings.AbstractDistributionConfig_SSL_REQUIRE_AUTHENTICATION_NAME
.toLocalizedString(Boolean.valueOf(DEFAULT_SSL_REQUIRE_AUTHENTICATION)));
- m.put(CLUSTER_SSL_ENABLED_NAME,
+ m.put(CLUSTER_SSL_ENABLED,
LocalizedStrings.AbstractDistributionConfig_SSL_ENABLED_NAME_0
.toLocalizedString(
Boolean.valueOf(DEFAULT_CLUSTER_SSL_ENABLED)));
- m.put(CLUSTER_SSL_PROTOCOLS_NAME,
+ m.put(CLUSTER_SSL_PROTOCOLS,
LocalizedStrings.AbstractDistributionConfig_SSL_PROTOCOLS_NAME_0
.toLocalizedString(DEFAULT_CLUSTER_SSL_PROTOCOLS));
- m.put(CLUSTER_SSL_CIPHERS_NAME,
+ m.put(CLUSTER_SSL_CIPHERS,
LocalizedStrings.AbstractDistributionConfig_SSL_CIPHERS_NAME_0
.toLocalizedString(DEFAULT_CLUSTER_SSL_CIPHERS));
- m.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME,
+ m.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION,
LocalizedStrings.AbstractDistributionConfig_SSL_REQUIRE_AUTHENTICATION_NAME
.toLocalizedString(Boolean.valueOf(DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION)));
- m.put(CLUSTER_SSL_KEYSTORE_NAME,"Location of the Java keystore file containing an distributed member's own certificate and private key.");
+ m.put(CLUSTER_SSL_KEYSTORE,"Location of the Java keystore file containing an distributed member's own certificate and private key.");
- m.put(CLUSTER_SSL_KEYSTORE_TYPE_NAME,
+ m.put(CLUSTER_SSL_KEYSTORE_TYPE,
"For Java keystore file format, this property has the value jks (or JKS).");
- m.put(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
+ m.put(CLUSTER_SSL_KEYSTORE_PASSWORD,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
- m.put(CLUSTER_SSL_TRUSTSTORE_NAME,"Location of the Java keystore file containing the collection of CA certificates trusted by distributed member (trust store).");
+ m.put(CLUSTER_SSL_TRUSTSTORE,"Location of the Java keystore file containing the collection of CA certificates trusted by distributed member (trust store).");
- m.put(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
+ m.put(CLUSTER_SSL_TRUSTSTORE_PASSWORD,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
- m.put(MAX_WAIT_TIME_FOR_RECONNECT_NAME,
+ m.put(MAX_WAIT_TIME_RECONNECT,
LocalizedStrings.AbstractDistributionConfig_MAX_WAIT_TIME_FOR_RECONNECT
.toLocalizedString());
- m.put(MAX_NUM_RECONNECT_TRIES,
+ m.put(MAX_NUM_RECONNECT_TRIES,
LocalizedStrings.AbstractDistributionConfig_MAX_NUM_RECONNECT_TRIES
.toLocalizedString());
- m.put(ASYNC_DISTRIBUTION_TIMEOUT_NAME,
+ m.put(ASYNC_DISTRIBUTION_TIMEOUT,
LocalizedStrings.AbstractDistributionConfig_ASYNC_DISTRIBUTION_TIMEOUT_NAME_0_1_2
.toLocalizedString( new Object[] {
Integer.valueOf(DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT),
@@ -890,14 +890,14 @@ public abstract class AbstractDistributionConfig
Integer.valueOf(MAX_ASYNC_DISTRIBUTION_TIMEOUT)}));
- m.put(ASYNC_QUEUE_TIMEOUT_NAME,
+ m.put(ASYNC_QUEUE_TIMEOUT,
LocalizedStrings.AbstractDistributionConfig_ASYNC_QUEUE_TIMEOUT_NAME_0_1_2
.toLocalizedString( new Object[] {
Integer.valueOf(DEFAULT_ASYNC_QUEUE_TIMEOUT),
Integer.valueOf(MIN_ASYNC_QUEUE_TIMEOUT),
Integer.valueOf(MAX_ASYNC_QUEUE_TIMEOUT)}));
- m.put(ASYNC_MAX_QUEUE_SIZE_NAME,
+ m.put(ASYNC_MAX_QUEUE_SIZE,
LocalizedStrings.AbstractDistributionConfig_ASYNC_MAX_QUEUE_SIZE_NAME_0_1_2
.toLocalizedString( new Object[] {
Integer.valueOf(DEFAULT_ASYNC_MAX_QUEUE_SIZE),
@@ -908,65 +908,65 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_START_LOCATOR_NAME
.toLocalizedString());
- m.put(DURABLE_CLIENT_ID_NAME,
+ m.put(DURABLE_CLIENT_ID,
LocalizedStrings.AbstractDistributionConfig_DURABLE_CLIENT_ID_NAME_0
.toLocalizedString(DEFAULT_DURABLE_CLIENT_ID));
- m.put(CLIENT_CONFLATION_PROP_NAME,
+ m.put(CONFLATE_EVENTS,
LocalizedStrings.AbstractDistributionConfig_CLIENT_CONFLATION_PROP_NAME
.toLocalizedString());
- m.put(DURABLE_CLIENT_TIMEOUT_NAME,
+ m.put(DURABLE_CLIENT_TIMEOUT,
LocalizedStrings.AbstractDistributionConfig_DURABLE_CLIENT_TIMEOUT_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_DURABLE_CLIENT_TIMEOUT)));
- m.put(SECURITY_CLIENT_AUTH_INIT_NAME,
+ m.put(SECURITY_CLIENT_AUTH_INIT,
LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_AUTH_INIT_NAME_0
.toLocalizedString(DEFAULT_SECURITY_CLIENT_AUTH_INIT));
- m.put(ENABLE_NETWORK_PARTITION_DETECTION_NAME, "Whether network partitioning detection is enabled");
+ m.put(ENABLE_NETWORK_PARTITION_DETECTION, "Whether network partitioning detection is enabled");
- m.put(DISABLE_AUTO_RECONNECT_NAME, "Whether auto reconnect is attempted after a network partition");
+ m.put(DISABLE_AUTO_RECONNECT, "Whether auto reconnect is attempted after a network partition");
- m.put(SECURITY_CLIENT_AUTHENTICATOR_NAME,
+ m.put(SECURITY_CLIENT_AUTHENTICATOR,
LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_AUTHENTICATOR_NAME_0
.toLocalizedString(DEFAULT_SECURITY_CLIENT_AUTHENTICATOR));
- m.put(SECURITY_CLIENT_DHALGO_NAME,
+ m.put(SECURITY_CLIENT_DHALGO,
LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_DHALGO_NAME_0
.toLocalizedString(DEFAULT_SECURITY_CLIENT_DHALGO));
- m.put(SECURITY_PEER_AUTH_INIT_NAME,
+ m.put(SECURITY_PEER_AUTH_INIT,
LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_AUTH_INIT_NAME_0
.toLocalizedString(DEFAULT_SECURITY_PEER_AUTH_INIT));
- m.put(SECURITY_PEER_AUTHENTICATOR_NAME,
+ m.put(SECURITY_PEER_AUTHENTICATOR,
LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_AUTHENTICATOR_NAME_0
.toLocalizedString(DEFAULT_SECURITY_PEER_AUTHENTICATOR));
- m.put(SECURITY_CLIENT_ACCESSOR_NAME,
+ m.put(SECURITY_CLIENT_ACCESSOR,
LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_ACCESSOR_NAME_0
.toLocalizedString(DEFAULT_SECURITY_CLIENT_ACCESSOR));
- m.put(SECURITY_CLIENT_ACCESSOR_PP_NAME,
+ m.put(SECURITY_CLIENT_ACCESSOR_PP,
LocalizedStrings.AbstractDistributionConfig_SECURITY_CLIENT_ACCESSOR_PP_NAME_0
.toLocalizedString(DEFAULT_SECURITY_CLIENT_ACCESSOR_PP));
- m.put(SECURITY_LOG_LEVEL_NAME,
+ m.put(SECURITY_LOG_LEVEL,
LocalizedStrings.AbstractDistributionConfig_SECURITY_LOG_LEVEL_NAME_0_1
.toLocalizedString( new Object[] {
LogWriterImpl.levelToString(DEFAULT_LOG_LEVEL),
LogWriterImpl.allowedLogLevels()}));
- m.put(SECURITY_LOG_FILE_NAME,
+ m.put(SECURITY_LOG_FILE,
LocalizedStrings.AbstractDistributionConfig_SECURITY_LOG_FILE_NAME_0
.toLocalizedString(DEFAULT_SECURITY_LOG_FILE));
- m.put(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME,
+ m.put(SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME,
LocalizedStrings.AbstractDistributionConfig_SECURITY_PEER_VERIFYMEMBER_TIMEOUT_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_SECURITY_PEER_VERIFYMEMBER_TIMEOUT)));
- m.put(SECURITY_PREFIX_NAME,
+ m.put(SECURITY_PREFIX,
LocalizedStrings.AbstractDistributionConfig_SECURITY_PREFIX_NAME
.toLocalizedString());
@@ -974,156 +974,156 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_USERDEFINED_PREFIX_NAME
.toLocalizedString());
- m.put(REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME,
+ m.put(REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME,
LocalizedStrings.AbstractDistributionConfig_REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME_0
.toLocalizedString(DEFAULT_REMOVE_UNRESPONSIVE_CLIENT));
m.put(DELTA_PROPAGATION_PROP_NAME, "Whether delta propagation is enabled");
- m.put(REMOTE_LOCATORS_NAME,
+ m.put(REMOTE_LOCATORS,
LocalizedStrings.AbstractDistributionConfig_REMOTE_DISTRIBUTED_SYSTEMS_NAME_0
.toLocalizedString(DEFAULT_REMOTE_LOCATORS));
- m.put(DISTRIBUTED_SYSTEM_ID_NAME, "An id that uniquely idenitifies this distributed system. " +
+ m.put(DISTRIBUTED_SYSTEM_ID, "An id that uniquely idenitifies this distributed system. " +
"Required when using portable data exchange objects and the WAN." +
"Must be the same on each member in this distributed system if set.");
m.put(ENFORCE_UNIQUE_HOST_NAME, "Whether to require partitioned regions to put " +
"redundant copies of data on different physical machines");
- m.put(REDUNDANCY_ZONE_NAME, "The zone that this member is in. When this is set, " +
+ m.put(REDUNDANCY_ZONE, "The zone that this member is in. When this is set, " +
"partitioned regions will not put two copies of the same data in the same zone.");
- m.put(GROUPS_NAME, "A comma separated list of all the groups this member belongs to." +
+ m.put(GROUPS, "A comma separated list of all the groups this member belongs to." +
" Defaults to \"\".");
- m.put(USER_COMMAND_PACKAGES, "A comma separated list of the names of the packages containing classes that implement user commands.");
+ m.put(SystemConfigurationProperties.USER_COMMAND_PACKAGES, "A comma separated list of the names of the packages containing classes that implement user commands.");
- m.put(JMX_MANAGER_NAME, "If true then this member is willing to be a jmx manager. Defaults to false except on a locator.");
- m.put(JMX_MANAGER_START_NAME, "If true then the jmx manager will be started when the cache is created. Defaults to false.");
- m.put(JMX_MANAGER_SSL_NAME, "If true then the jmx manager will only allow SSL clients to connect. Defaults to false. This property is ignored if jmx-manager-port is \"0\".");
- m.put(JMX_MANAGER_SSL_ENABLED_NAME, "If true then the jmx manager will only allow SSL clients to connect. Defaults to false. This property is ignored if jmx-manager-port is \"0\".");
- m.put(JMX_MANAGER_SSL_CIPHERS_NAME, "List of available SSL cipher suites that are to be enabled for JMX Manager. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_CIPHERS+"\" meaning your provider''s defaults.");
- m.put(JMX_MANAGER_SSL_PROTOCOLS_NAME, "List of available SSL protocols that are to be enabled for JMX Manager. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_PROTOCOLS+"\" meaning defaults of your provider.");
- m.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME, "If set to false, ciphers and protocols that permit anonymous JMX Clients are allowed. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION+"\".");
- m.put(JMX_MANAGER_SSL_KEYSTORE_NAME,"Location of the Java keystore file containing jmx manager's own certificate and private key.");
- m.put(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME, "For Java keystore file format, this property has the value jks (or JKS).");
- m.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore. ");
- m.put(JMX_MANAGER_SSL_TRUSTSTORE_NAME,"Location of the Java keystore file containing the collection of CA certificates trusted by jmx manager.");
- m.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
+ m.put(JMX_MANAGER, "If true then this member is willing to be a jmx manager. Defaults to false except on a locator.");
+ m.put(JMX_MANAGER_START, "If true then the jmx manager will be started when the cache is created. Defaults to false.");
+ m.put(JMX_MANAGER_SSL, "If true then the jmx manager will only allow SSL clients to connect. Defaults to false. This property is ignored if jmx-manager-port is \"0\".");
+ m.put(JMX_MANAGER_SSL_ENABLED, "If true then the jmx manager will only allow SSL clients to connect. Defaults to false. This property is ignored if jmx-manager-port is \"0\".");
+ m.put(JMX_MANAGER_SSL_CIPHERS, "List of available SSL cipher suites that are to be enabled for JMX Manager. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_CIPHERS+"\" meaning your provider''s defaults.");
+ m.put(JMX_MANAGER_SSL_PROTOCOLS, "List of available SSL protocols that are to be enabled for JMX Manager. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_PROTOCOLS+"\" meaning defaults of your provider.");
+ m.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, "If set to false, ciphers and protocols that permit anonymous JMX Clients are allowed. Defaults to \""+DEFAULT_JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION+"\".");
+ m.put(JMX_MANAGER_SSL_KEYSTORE,"Location of the Java keystore file containing jmx manager's own certificate and private key.");
+ m.put(JMX_MANAGER_SSL_KEYSTORE_TYPE, "For Java keystore file format, this property has the value jks (or JKS).");
+ m.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore. ");
+ m.put(JMX_MANAGER_SSL_TRUSTSTORE,"Location of the Java keystore file containing the collection of CA certificates trusted by jmx manager.");
+ m.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
- m.put(JMX_MANAGER_PORT_NAME, "The port the jmx manager will listen on. Default is \"" + DEFAULT_JMX_MANAGER_PORT + "\". Set to zero to disable GemFire's creation of a jmx listening port.");
- m.put(JMX_MANAGER_BIND_ADDRESS_NAME, "The address the jmx manager will listen on for remote connections. Default is \"\" which causes the jmx manager to listen on the host's default address. This property is ignored if jmx-manager-port is \"0\".");
- m.put(JMX_MANAGER_HOSTNAME_FOR_CLIENTS_NAME, "The hostname that will be given to clients when they ask a locator for the location of this jmx manager. Default is \"\" which causes the locator to report the jmx manager's actual ip address as its location. This property is ignored if jmx-manager-port is \"0\".");
- m.put(JMX_MANAGER_PASSWORD_FILE_NAME, "The name of the file the jmx manager will use to only allow authenticated clients to connect. Default is \"\" which causes the jmx manager to allow all clients to connect. This property is ignored if jmx-manager-port is \"0\".");
- m.put(JMX_MANAGER_ACCESS_FILE_NAME, "The name of the file the jmx manager will use to define the access level of authenticated clients. Default is \"\" which causes the jmx manager to allow all clients all access. This property is ignored if jmx-manager-port is \"0\".");
- m.put(JMX_MANAGER_HTTP_PORT_NAME, "By default when a jmx-manager is started it will also start an http server on this port. This server is used by the GemFire Pulse application. Setting this property to zero disables the http server. It defaults to 8080. Ignored if jmx-manager is false.");
- m.put(JMX_MANAGER_UPDATE_RATE_NAME, "The rate in milliseconds at which this member will send updates to each jmx manager. Default is " + DEFAULT_JMX_MANAGER_UPDATE_RATE + ". Values must be in the range " + MIN_JMX_MANAGER_UPDATE_RATE + ".." + MAX_JMX_MANAGER_UPDATE_RATE + ".");
- m.put(MEMCACHED_PORT_NAME, "The port GemFireMemcachedServer will listen on. Default is 0. Set to zero to disable GemFireMemcachedServer.");
- m.put(MEMCACHED_PROTOCOL_NAME, "The protocol that GemFireMemcachedServer understands. Default is ASCII. Values may be ASCII or BINARY");
- m.put(MEMCACHED_BIND_ADDRESS_NAME, "The address the GemFireMemcachedServer will listen on for remote connections. Default is \"\" which causes the GemFireMemcachedServer to listen on the host's default address. This property is ignored if memcached-port is \"0\".");
- m.put(REDIS_PORT_NAME, "The port GemFireRedisServer will listen on. Default is 0. Set to zero to disable GemFireRedisServer.");
- m.put(REDIS_BIND_ADDRESS_NAME, "The address the GemFireRedisServer will listen on for remote connections. Default is \"\" which causes the GemFireRedisServer to listen on the host's default address. This property is ignored if redis-port is \"0\".");
- m.put(REDIS_PASSWORD_NAME, "The password which client of GemFireRedisServer must use to authenticate themselves. The default is none and no authentication will be required.");
- m.put(ENABLE_CLUSTER_CONFIGURATION_NAME, LocalizedStrings.AbstractDistributionConfig_ENABLE_SHARED_CONFIGURATION.toLocalizedString());
- m.put(USE_CLUSTER_CONFIGURATION_NAME, LocalizedStrings.AbstractDistributionConfig_USE_SHARED_CONFIGURATION.toLocalizedString());
- m.put(LOAD_CLUSTER_CONFIG_FROM_DIR_NAME, LocalizedStrings.AbstractDistributionConfig_LOAD_SHARED_CONFIGURATION_FROM_DIR.toLocalizedString(SharedConfiguration.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME));
+ m.put(JMX_MANAGER_PORT, "The port the jmx manager will listen on. Default is \"" + DEFAULT_JMX_MANAGER_PORT + "\". Set to zero to disable GemFire's creation of a jmx listening port.");
+ m.put(JMX_MANAGER_BIND_ADDRESS, "The address the jmx manager will listen on for remote connections. Default is \"\" which causes the jmx manager to listen on the host's default address. This property is ignored if jmx-manager-port is \"0\".");
+ m.put(JMX_MANAGER_HOSTNAME_FOR_CLIENTS, "The hostname that will be given to clients when they ask a locator for the location of this jmx manager. Default is \"\" which causes the locator to report the jmx manager's actual ip address as its location. This property is ignored if jmx-manager-port is \"0\".");
+ m.put(JMX_MANAGER_PASSWORD_FILE, "The name of the file the jmx manager will use to only allow authenticated clients to connect. Default is \"\" which causes the jmx manager to allow all clients to connect. This property is ignored if jmx-manager-port is \"0\".");
+ m.put(JMX_MANAGER_ACCESS_FILE, "The name of the file the jmx manager will use to define the access level of authenticated clients. Default is \"\" which causes the jmx manager to allow all clients all access. This property is ignored if jmx-manager-port is \"0\".");
+ m.put(JMX_MANAGER_HTTP_PORT, "By default when a jmx-manager is started it will also start an http server on this port. This server is used by the GemFire Pulse application. Setting this property to zero disables the http server. It defaults to 8080. Ignored if jmx-manager is false.");
+ m.put(JMX_MANAGER_UPDATE_RATE, "The rate in milliseconds at which this member will send updates to each jmx manager. Default is " + DEFAULT_JMX_MANAGER_UPDATE_RATE + ". Values must be in the range " + MIN_JMX_MANAGER_UPDATE_RATE + ".." + MAX_JMX_MANAGER_UPDATE_RATE + ".");
+ m.put(MEMCACHED_PORT, "The port GemFireMemcachedServer will listen on. Default is 0. Set to zero to disable GemFireMemcachedServer.");
+ m.put(MEMCACHED_PROTOCOL, "The protocol that GemFireMemcachedServer understands. Default is ASCII. Values may be ASCII or BINARY");
+ m.put(MEMCACHED_BIND_ADDRESS, "The address the GemFireMemcachedServer will listen on for remote connections. Default is \"\" which causes the GemFireMemcachedServer to listen on the host's default address. This property is ignored if memcached-port is \"0\".");
+ m.put(REDIS_PORT, "The port GemFireRedisServer will listen on. Default is 0. Set to zero to disable GemFireRedisServer.");
+ m.put(REDIS_BIND_ADDRESS, "The address the GemFireRedisServer will listen on for remote connections. Default is \"\" which causes the GemFireRedisServer to listen on the host's default address. This property is ignored if redis-port is \"0\".");
+ m.put(REDIS_PASSWORD, "The password which client of GemFireRedisServer must use to authenticate themselves. The default is none and no authentication will be required.");
+ m.put(ENABLE_CLUSTER_CONFIGURATION, LocalizedStrings.AbstractDistributionConfig_ENABLE_SHARED_CONFIGURATION.toLocalizedString());
+ m.put(USE_CLUSTER_CONFIGURATION, LocalizedStrings.AbstractDistributionConfig_USE_SHARED_CONFIGURATION.toLocalizedString());
+ m.put(LOAD_CLUSTER_CONFIGURATION_FROM_DIR, LocalizedStrings.AbstractDistributionConfig_LOAD_SHARED_CONFIGURATION_FROM_DIR.toLocalizedString(SharedConfiguration.CLUSTER_CONFIG_ARTIFACTS_DIR_NAME));
m.put(CLUSTER_CONFIGURATION_DIR, LocalizedStrings.AbstractDistributionConfig_CLUSTER_CONFIGURATION_DIR.toLocalizedString());
m.put(
- SERVER_SSL_ENABLED_NAME,
+ SERVER_SSL_ENABLED,
"If true then the cache server will only allow SSL clients to connect. Defaults to false.");
m.put(
- SERVER_SSL_CIPHERS_NAME,
+ SERVER_SSL_CIPHERS,
"List of available SSL cipher suites that are to be enabled for CacheServer. Defaults to \""
+ DEFAULT_SERVER_SSL_CIPHERS
+ "\" meaning your provider''s defaults.");
m.put(
- SERVER_SSL_PROTOCOLS_NAME,
+ SERVER_SSL_PROTOCOLS,
"List of available SSL protocols that are to be enabled for CacheServer. Defaults to \""
+ DEFAULT_SERVER_SSL_PROTOCOLS
+ "\" meaning defaults of your provider.");
m.put(
- SERVER_SSL_REQUIRE_AUTHENTICATION_NAME,
+ SERVER_SSL_REQUIRE_AUTHENTICATION,
"If set to false, ciphers and protocols that permit anonymous Clients are allowed. Defaults to \""
+ DEFAULT_SERVER_SSL_REQUIRE_AUTHENTICATION + "\".");
- m.put(SERVER_SSL_KEYSTORE_NAME,"Location of the Java keystore file containing server's or client's own certificate and private key.");
+ m.put(SERVER_SSL_KEYSTORE,"Location of the Java keystore file containing server's or client's own certificate and private key.");
- m.put(SERVER_SSL_KEYSTORE_TYPE_NAME,
+ m.put(SERVER_SSL_KEYSTORE_TYPE,
"For Java keystore file format, this property has the value jks (or JKS).");
- m.put(SERVER_SSL_KEYSTORE_PASSWORD_NAME,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore. ");
+ m.put(SERVER_SSL_KEYSTORE_PASSWORD,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore. ");
- m.put(SERVER_SSL_TRUSTSTORE_NAME,"Location of the Java keystore file containing the collection of CA certificates trusted by server or client(trust store).");
+ m.put(SERVER_SSL_TRUSTSTORE,"Location of the Java keystore file containing the collection of CA certificates trusted by server or client(trust store).");
- m.put(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
+ m.put(SERVER_SSL_TRUSTSTORE_PASSWORD,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
m.put(
- GATEWAY_SSL_ENABLED_NAME,
+ GATEWAY_SSL_ENABLED,
"If true then the gateway receiver will only allow SSL gateway sender to connect. Defaults to false.");
m.put(
- GATEWAY_SSL_CIPHERS_NAME,
+ GATEWAY_SSL_CIPHERS,
"List of available SSL cipher suites that are to be enabled for Gateway Receiver. Defaults to \""
+ DEFAULT_GATEWAY_SSL_CIPHERS
+ "\" meaning your provider''s defaults.");
m.put(
- GATEWAY_SSL_PROTOCOLS_NAME,
+ GATEWAY_SSL_PROTOCOLS,
"List of available SSL protocols that are to be enabled for Gateway Receiver. Defaults to \""
+ DEFAULT_GATEWAY_SSL_PROTOCOLS
+ "\" meaning defaults of your provider.");
m.put(
- GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME,
+ GATEWAY_SSL_REQUIRE_AUTHENTICATION,
"If set to false, ciphers and protocols that permit anonymous gateway senders are allowed. Defaults to \""
+ DEFAULT_GATEWAY_SSL_REQUIRE_AUTHENTICATION + "\".");
- m.put(GATEWAY_SSL_KEYSTORE_NAME,"Location of the Java keystore file containing gateway's own certificate and private key.");
+ m.put(GATEWAY_SSL_KEYSTORE,"Location of the Java keystore file containing gateway's own certificate and private key.");
- m.put(GATEWAY_SSL_KEYSTORE_TYPE_NAME,
+ m.put(GATEWAY_SSL_KEYSTORE_TYPE,
"For Java keystore file format, this property has the value jks (or JKS).");
- m.put(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
+ m.put(GATEWAY_SSL_KEYSTORE_PASSWORD,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
- m.put(GATEWAY_SSL_TRUSTSTORE_NAME,"Location of the Java keystore file containing the collection of CA certificates trusted by gateway.");
+ m.put(GATEWAY_SSL_TRUSTSTORE,"Location of the Java keystore file containing the collection of CA certificates trusted by gateway.");
- m.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
+ m.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
- m.put(HTTP_SERVICE_PORT_NAME, "If non zero, then the gemfire developer REST service will be deployed and started when the cache is created. Default value is 0.");
- m.put(HTTP_SERVICE_BIND_ADDRESS_NAME, "The address where gemfire developer REST service will listen for remote REST connections. Default is \"\" which causes the Rest service to listen on the host's default address.");
+ m.put(HTTP_SERVICE_PORT, "If non zero, then the gemfire developer REST service will be deployed and started when the cache is created. Default value is 0.");
+ m.put(HTTP_SERVICE_BIND_ADDRESS, "The address where gemfire developer REST service will listen for remote REST connections. Default is \"\" which causes the Rest service to listen on the host's default address.");
m.put(
- HTTP_SERVICE_SSL_ENABLED_NAME,
+ HTTP_SERVICE_SSL_ENABLED,
"If true then the http service like REST dev api and Pulse will only allow SSL enabled clients to connect. Defaults to false.");
m.put(
- HTTP_SERVICE_SSL_CIPHERS_NAME,
+ HTTP_SERVICE_SSL_CIPHERS,
"List of available SSL cipher suites that are to be enabled for Http Service. Defaults to \""
+ DEFAULT_HTTP_SERVICE_SSL_CIPHERS
+ "\" meaning your provider''s defaults.");
m.put(
- HTTP_SERVICE_SSL_PROTOCOLS_NAME,
+ HTTP_SERVICE_SSL_PROTOCOLS,
"List of available SSL protocols that are to be enabled for Http Service. Defaults to \""
+ DEFAULT_HTTP_SERVICE_SSL_PROTOCOLS
+ "\" meaning defaults of your provider.");
m.put(
- HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME,
+ HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION,
"If set to false, ciphers and protocols that permit anonymous http clients are allowed. Defaults to \""
+ DEFAULT_HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION + "\".");
- m.put(HTTP_SERVICE_SSL_KEYSTORE_NAME,"Location of the Java keystore file containing Http Service's own certificate and private key.");
+ m.put(HTTP_SERVICE_SSL_KEYSTORE,"Location of the Java keystore file containing Http Service's own certificate and private key.");
- m.put(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME,
+ m.put(HTTP_SERVICE_SSL_KEYSTORE_TYPE,
"For Java keystore file format, this property has the value jks (or JKS).");
- m.put(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
+ m.put(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD,"Password to access the private key from the keystore file specified by javax.net.ssl.keyStore.");
- m.put(HTTP_SERVICE_SSL_TRUSTSTORE_NAME,"Location of the Java keystore file containing the collection of CA certificates trusted by Http Service.");
+ m.put(HTTP_SERVICE_SSL_TRUSTSTORE,"Location of the Java keystore file containing the collection of CA certificates trusted by Http Service.");
- m.put(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
+ m.put(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD,"Password to unlock the keystore file (store password) specified by javax.net.ssl.trustStore.");
- m.put(START_DEV_REST_API_NAME, "If true then the developer(API) REST service will be started when the cache is created. Defaults to false.");
- m.put(OFF_HEAP_MEMORY_SIZE_NAME, LocalizedStrings.AbstractDistributionConfig_OFF_HEAP_MEMORY_SIZE_0.toLocalizedString(DEFAULT_OFF_HEAP_MEMORY_SIZE));
- m.put(LOCK_MEMORY_NAME, LocalizedStrings.AbstractDistributionConfig_LOCK_MEMORY.toLocalizedString(DEFAULT_LOCK_MEMORY));
- m.put(DISTRIBUTED_TRANSACTIONS_NAME, "Flag to indicate whether all transactions including JTA should be distributed transactions. Default is false, meaning colocated transactions.");
+ m.put(START_DEV_REST_API, "If true then the developer(API) REST service will be started when the cache is created. Defaults to false.");
+ m.put(OFF_HEAP_MEMORY_SIZE, LocalizedStrings.AbstractDistributionConfig_OFF_HEAP_MEMORY_SIZE_0.toLocalizedString(DEFAULT_OFF_HEAP_MEMORY_SIZE));
+ m.put(LOCK_MEMORY, LocalizedStrings.AbstractDistributionConfig_LOCK_MEMORY.toLocalizedString(DEFAULT_LOCK_MEMORY));
+ m.put(DISTRIBUTED_TRANSACTIONS, "Flag to indicate whether all transactions including JTA should be distributed transactions. Default is false, meaning colocated transactions.");
- m.put(SECURITY_SHIRO_INIT_NAME, "The name of the shiro configuration file in the classpath, e.g. shiro.ini");
+ m.put(SECURITY_SHIRO_INIT, "The name of the shiro configuration file in the classpath, e.g. shiro.ini");
dcAttDescriptions = Collections.unmodifiableMap(m);
[08/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
index f1a67ba..fcb9862 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
@@ -16,15 +16,7 @@
*/
package com.gemstone.gemfire.management;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -36,15 +28,11 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.RMIException;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
-import junit.framework.AssertionFailedError;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Properties;
/**
* Client health stats check
@@ -258,10 +246,10 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
// props.setProperty("log-file", getTestMethodName()+"_client_" + clientNum + ".log");
- props.setProperty("log-level", "info");
- props.setProperty("statistic-archive-file", getTestMethodName()+"_client_" + clientNum
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, getTestMethodName() + "_client_" + clientNum
+ ".gfs");
- props.setProperty("statistic-sampling-enabled", "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
ClientCacheFactory ccf = new ClientCacheFactory(props);
if(subscriptionEnabled){
@@ -271,8 +259,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
}
if(durable){
- ccf.set("durable-client-id", "DurableClientId_"+clientNum);
- ccf.set("durable-client-timeout", "" + 300);
+ ccf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, "DurableClientId_" + clientNum);
+ ccf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + 300);
}
ccf.addPoolServer(host.getHostName(), port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
index 8b70d5c..5dda3da 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
@@ -16,23 +16,7 @@
*/
package com.gemstone.gemfire.management;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Properties;
-
-import org.json.JSONObject;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.data.Position;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -49,6 +33,18 @@ import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.pdx.PdxInstanceFactory;
import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.json.JSONObject;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
* @since GemFire 8.1
@@ -93,10 +89,10 @@ public class DataBrowserJSONValidationJUnitTest {
// System.setProperty("gemfire.stats.debug.debugSampleCollector", "true");
final Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-sampling-enabled", "false");
- props.setProperty("statistic-sample-rate", "60000");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "60000");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
index fb8ae7d..ca56c07 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
@@ -16,28 +16,23 @@
*/
package com.gemstone.gemfire.management;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.i18n.LogWriterI18n;
-import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.management.internal.ManagementConstants;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
@@ -91,8 +86,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
Host host = Host.getHost(0);
String host0 = getServerHostName(host);
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, host0 + "[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
@@ -113,8 +108,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
Host host = Host.getHost(0);
String host0 = getServerHostName(host);
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, host0 + "[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
@@ -168,8 +163,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
String host0 = getServerHostName(host);
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, host0 + "[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
@@ -186,8 +181,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
String host0 = getServerHostName(host);
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, host0 + "[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
@@ -213,9 +208,9 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
assertFalse(InternalLocator.hasLocator());
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME,"0");
-
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
InetAddress bindAddr = null;
@@ -395,8 +390,8 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
* @return the host name
*/
public static String getServerHostName(Host host) {
- return System.getProperty("gemfire.server-bind-address") != null?
- System.getProperty("gemfire.server-bind-address")
+ return System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "server-bind-address") != null ?
+ System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "server-bind-address")
: host.getHostName();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
index fc918ff..522a142 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
@@ -16,18 +16,6 @@
*/
package com.gemstone.gemfire.management;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-
-import javax.management.Attribute;
-import javax.management.AttributeList;
-import javax.management.MBeanServer;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
import com.gemstone.gemfire.OutOfOffHeapMemoryException;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
@@ -36,17 +24,18 @@ import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
import com.gemstone.gemfire.internal.offheap.OffHeapMemoryStats;
import com.gemstone.gemfire.internal.offheap.OffHeapStorage;
+import com.gemstone.gemfire.internal.offheap.OffHeapStoredObject;
import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
import com.gemstone.gemfire.management.internal.beans.MemberMBean;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import javax.management.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
/**
* Tests the off-heap additions to the RegionMXBean and MemberMXBean JMX interfaces.
@@ -637,9 +626,9 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
* Returns off-heap system properties for enabling off-heap and the JMX system.
*/
protected Properties getSystemProperties() {
- Properties props = getDistributedSystemProperties();
-
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ Properties props = getDistributedSystemProperties();
+
+ props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/TypedJsonJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/TypedJsonJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/TypedJsonJUnitTest.java
index b1662cf..78e00db 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/TypedJsonJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/TypedJsonJUnitTest.java
@@ -16,25 +16,12 @@
*/
package com.gemstone.gemfire.management;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.data.Position;
import com.gemstone.gemfire.cache.util.ObjectSizer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonObject;
import com.gemstone.gemfire.management.internal.cli.json.TypedJson;
@@ -42,6 +29,14 @@ import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.pdx.PdxInstanceFactory;
import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class TypedJsonJUnitTest {
@@ -161,7 +156,7 @@ public class TypedJsonJUnitTest {
@Test
public void testPDXObject() {
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
DistributedSystem.connect(props);
Cache cache = new CacheFactory().create();
PdxInstanceFactory pf = PdxInstanceFactoryImpl.newCreator("Portfolio", false);
@@ -181,7 +176,7 @@ public class TypedJsonJUnitTest {
@Test
public void testNestedPDXObject() {
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
DistributedSystem.connect(props);
Cache cache = new CacheFactory().create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index 6516547..7816cc3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -16,15 +16,6 @@
*/
package com.gemstone.gemfire.management;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.AttributesFactory;
@@ -43,20 +34,16 @@ import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.management.membership.ClientMembership;
-import com.gemstone.gemfire.management.membership.ClientMembershipEvent;
-import com.gemstone.gemfire.management.membership.ClientMembershipListener;
-import com.gemstone.gemfire.management.membership.MembershipEvent;
-import com.gemstone.gemfire.management.membership.MembershipListener;
-import com.gemstone.gemfire.management.membership.UniversalMembershipListenerAdapter;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.management.membership.*;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests the UniversalMembershipListenerAdapter.
@@ -415,8 +402,8 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
public Object call() {
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testLonerClientEventsInServer] create bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -1817,8 +1804,8 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] create loner bridge client");
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInLonerClient] create system bridge client");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
index 87be3e9..c5b0e8f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
@@ -16,16 +16,6 @@
*/
package com.gemstone.gemfire.management.bean.stats;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -38,6 +28,16 @@ import com.gemstone.gemfire.management.DistributedSystemMXBean;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.internal.SystemManagementService;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
/**
*
@@ -58,10 +58,10 @@ public class DistributedSystemStatsJUnitTest {
public void setUp() throws Exception {
final Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-sampling-enabled", "false");
- props.setProperty("statistic-sample-rate", "60000");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "60000");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
// set JMX_MANAGER_UPDATE_RATE to practically an infinite value, so that
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
index 588c22d..8481bcd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
@@ -16,17 +16,18 @@
*/
package com.gemstone.gemfire.management.bean.stats;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-
-import static org.junit.Assert.*;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.NanoTimer;
+import org.junit.After;
+import org.junit.Before;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
/**
* Base test case for the management.bean.stats tests.
@@ -47,11 +48,11 @@ public abstract class MBeanStatsTestCase {
//System.setProperty("gemfire.stats.debug.debugSampleCollector", "true");
final Properties props = new Properties();
- //props.setProperty("log-level", "finest");
- props.setProperty("mcast-port", "0");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("statistic-sampling-enabled", "false");
- props.setProperty("statistic-sample-rate", "60000");
+ //props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "finest");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "60000");
this.system = (InternalDistributedSystem) DistributedSystem.connect(props);
assertNotNull(this.system.getStatSampler());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
index cea95c1..55d937e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
@@ -16,35 +16,21 @@
*/
package com.gemstone.gemfire.management.internal.cli;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.management.DistributedRegionMXBean;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.RegionMXBean;
import com.gemstone.gemfire.management.internal.cli.result.CommandResultException;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+import java.util.Set;
/**
*
@@ -217,7 +203,7 @@ public class CliUtilDUnitTest extends CacheTestCase {
public void createCacheWithMemberIdAndGroup(String memberName, String groupName){
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, memberName);
+ localProps.setProperty(SystemConfigurationProperties.NAME, memberName);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
index 7bfde5b..f33bd3b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/HeadlessGfshIntegrationTest.java
@@ -16,23 +16,25 @@
*/
package com.gemstone.gemfire.management.internal.cli;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePort.*;
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
+import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
/**
* TODO : Add more tests for error-catch, different type of results etc
@@ -52,12 +54,12 @@ public class HeadlessGfshIntegrationTest {
int port = getRandomAvailablePort(SOCKET);
Properties properties = new Properties();
- properties.put(NAME_NAME, this.testName.getMethodName());
- properties.put(JMX_MANAGER_NAME, "true");
- properties.put(JMX_MANAGER_START_NAME, "true");
- properties.put(JMX_MANAGER_PORT_NAME, String.valueOf(port));
- properties.put(HTTP_SERVICE_PORT_NAME, "0");
- properties.put(MCAST_PORT_NAME, "0");
+ properties.put(SystemConfigurationProperties.NAME, this.testName.getMethodName());
+ properties.put(JMX_MANAGER, "true");
+ properties.put(JMX_MANAGER_START, "true");
+ properties.put(JMX_MANAGER_PORT, String.valueOf(port));
+ properties.put(HTTP_SERVICE_PORT, "0");
+ properties.put(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(properties);
GemFireCacheImpl cache = (GemFireCacheImpl) CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
index dc8045a..5b058b8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
@@ -16,19 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.IOException;
-import java.io.PrintStream;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.management.ManagementService;
@@ -42,10 +31,21 @@ import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
-
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+
/**
* Base class for all the CLI/gfsh command dunit tests.
*/
@@ -134,8 +134,8 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
jmxHost = "localhost";
}
- if (!localProps.containsKey(DistributionConfig.NAME_NAME)) {
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ if (!localProps.containsKey(SystemConfigurationProperties.NAME)) {
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
}
final int[] ports = AvailablePortHelper.getRandomAvailableTCPPorts(2);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index 217b716..43c67e4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -16,31 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePort.*;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-import static org.apache.commons.io.FileUtils.*;
-
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.lang.management.ManagementFactory;
-import java.lang.management.RuntimeMXBean;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
@@ -54,12 +33,26 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.lang.management.ManagementFactory;
+import java.lang.management.RuntimeMXBean;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
+import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+import static org.apache.commons.io.FileUtils.deleteDirectory;
/**
* Dunit class for testing GemFire config commands : export config
@@ -104,12 +97,12 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
* Create properties for the controller VM
*/
final Properties localProps = new Properties();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOG_LEVEL_NAME, "info");
- localProps.setProperty(STATISTIC_SAMPLING_ENABLED_NAME, "true");
- localProps.setProperty(ENABLE_TIME_STATISTICS_NAME, "true");
- localProps.setProperty(NAME_NAME, controllerName);
- localProps.setProperty(GROUPS_NAME, "G1");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOG_LEVEL, "info");
+ localProps.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ localProps.setProperty(ENABLE_TIME_STATISTICS, "true");
+ localProps.setProperty(NAME, controllerName);
+ localProps.setProperty(GROUPS, "G1");
getSystem(localProps);
Cache cache = getCache();
@@ -146,7 +139,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
assertEquals(true, cmdResult.getStatus().equals(Status.OK));
assertEquals(true, resultStr.contains("G1"));
assertEquals(true, resultStr.contains(controllerName));
- assertEquals(true, resultStr.contains("archive-file-size-limit"));
+ assertEquals(true, resultStr.contains(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME));
assertEquals(true, !resultStr.contains("copy-on-read"));
cmdResult = executeCommand(command + " --" + CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS + "=false");
@@ -167,16 +160,16 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExportConfig() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, "Manager");
- localProps.setProperty(GROUPS_NAME, "Group1");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
// Create a cache in another VM (VM1)
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, "VM1");
- localProps.setProperty(GROUPS_NAME, "Group2");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "VM1");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
}
@@ -186,8 +179,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
Host.getHost(0).getVM(2).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, "VM2");
- localProps.setProperty(GROUPS_NAME, "Group2");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "VM2");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
}
@@ -195,7 +188,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
// Create a cache in the local VM
localProps = new Properties();
- localProps.setProperty(NAME_NAME, "Shell");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Shell");
getSystem(localProps);
Cache cache = getCache();
@@ -267,8 +260,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
setUpJmxManagerOnVm0ThenConnect(null);
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, controller);
- localProps.setProperty(LOG_LEVEL_NAME, "error");
+ localProps.setProperty(SystemConfigurationProperties.NAME, controller);
+ localProps.setProperty(LOG_LEVEL, "error");
getSystem(localProps);
final GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -312,8 +305,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
setUpJmxManagerOnVm0ThenConnect(null);
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, controller);
- localProps.setProperty(LOG_LEVEL_NAME, "error");
+ localProps.setProperty(SystemConfigurationProperties.NAME, controller);
+ localProps.setProperty(LOG_LEVEL, "error");
getSystem(localProps);
final GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -322,7 +315,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, member1);
+ localProps.setProperty(SystemConfigurationProperties.NAME, member1);
getSystem(localProps);
Cache cache = getCache();
}
@@ -360,8 +353,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
setUpJmxManagerOnVm0ThenConnect(null);
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, controller);
- localProps.setProperty(LOG_LEVEL_NAME, "error");
+ localProps.setProperty(SystemConfigurationProperties.NAME, controller);
+ localProps.setProperty(LOG_LEVEL, "error");
getSystem(localProps);
final GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -370,7 +363,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(NAME_NAME, member1);
+ localProps.setProperty(SystemConfigurationProperties.NAME, member1);
getSystem(localProps);
Cache cache = getCache();
}
@@ -437,9 +430,9 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorDirectory, "locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, "Locator");
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
locatorProps.setProperty(CLUSTER_CONFIGURATION_DIR, locatorDirectory);
try {
@@ -465,8 +458,8 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
// Start the default manager
Properties managerProps = new Properties();
- managerProps.setProperty(MCAST_PORT_NAME, "0");
- managerProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
+ managerProps.setProperty(MCAST_PORT, "0");
+ managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
// Create a cache in VM 1
@@ -475,14 +468,14 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locatorPort);
- localProps.setProperty(LOG_LEVEL_NAME, "error");
- localProps.setProperty(GROUPS_NAME, groupName);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
+ localProps.setProperty(LOG_LEVEL, "error");
+ localProps.setProperty(GROUPS, groupName);
getSystem(localProps);
assertNotNull(getCache());
- assertEquals("error", basicGetSystem().getConfig().getAttribute(LOG_LEVEL_NAME));
+ assertEquals("error", basicGetSystem().getConfig().getAttribute(LOG_LEVEL));
return null;
}
});
@@ -508,7 +501,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
fail("Error occurred in cluster configuration service", e);
}
- assertEquals("fine", gemfireProperties.get(LOG_LEVEL_NAME));
+ assertEquals("fine", gemfireProperties.get(LOG_LEVEL));
}
});
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index 530428d..11d4c49 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -16,37 +16,13 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.jayway.awaitility.Awaitility.*;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.text.MessageFormat;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CopyOnWriteArrayList;
-import java.util.concurrent.TimeUnit;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
import com.gemstone.gemfire.cache.wan.GatewaySenderFactory;
import com.gemstone.gemfire.compression.SnappyCompressor;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
@@ -68,8 +44,27 @@ import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.MessageFormat;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.jayway.awaitility.Awaitility.waitAtMost;
@Category(DistributedTest.class)
public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBase {
@@ -407,7 +402,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
this.alterVm1Name = "VM" + this.alterVm1.getPid();
this.alterVm1.invoke(() -> {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, alterVm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, alterVm1Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
getSystem(localProps);
Cache cache = getCache();
@@ -440,7 +435,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
this.alterVm2Name = "VM" + this.alterVm2.getPid();
this.alterVm2.invoke(() -> {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, alterVm2Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, alterVm2Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1,Group2");
getSystem(localProps);
Cache cache = getCache();
@@ -776,8 +771,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Host.getHost(0).getVM(3).invoke(() -> {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(DistributionConfig.NAME_NAME, "Locator");
- locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
try {
@@ -792,16 +787,16 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
// Start the default manager
Properties managerProps = new Properties();
- managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ managerProps.setProperty(MCAST_PORT, "0");
+ managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
// Create a cache in VM 1
VM vm = Host.getHost(0).getVM(1);
vm.invoke(() -> {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
getSystem(localProps);
assertNotNull(getCache());
@@ -838,8 +833,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
assertTrue(cache.isClosed());
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
@@ -880,8 +875,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
assertTrue(cache.isClosed());
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
@@ -910,8 +905,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Host.getHost(0).getVM(3).invoke(() -> {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(DistributionConfig.NAME_NAME, "Locator");
- locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
try {
@@ -926,16 +921,16 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
// Start the default manager
Properties managerProps = new Properties();
- managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ managerProps.setProperty(MCAST_PORT, "0");
+ managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
// Create a cache in VM 1
VM vm = Host.getHost(0).getVM(1);
vm.invoke(() -> {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
getSystem(localProps);
assertNotNull(getCache());
@@ -990,8 +985,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
assertTrue(cache.isClosed());
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
index c070ce9..4ed7821 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -16,18 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-
-import java.io.File;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.regex.Pattern;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
@@ -40,13 +30,20 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.remote.CommandExecutionContext;
import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.regex.Pattern;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
/**
* Unit tests for the DeployCommands class
@@ -102,7 +99,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final String vmName = "VM" + vm.getPid();
// Create the cache in this VM
- props.setProperty(DistributionConfig.NAME_NAME, "Controller");
+ props.setProperty(SystemConfigurationProperties.NAME, "Controller");
props.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
getSystem(props);
getCache();
@@ -110,7 +107,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in the other VM
vm.invoke(new SerializableRunnable() {
public void run() {
- props.setProperty(DistributionConfig.NAME_NAME, vmName);
+ props.setProperty(SystemConfigurationProperties.NAME, vmName);
props.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
getSystem(props);
getCache();
@@ -188,7 +185,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final String vmName = "VM" + vm.getPid();
// Create the cache in this VM
- props.setProperty(DistributionConfig.NAME_NAME, "Controller");
+ props.setProperty(SystemConfigurationProperties.NAME, "Controller");
props.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
getSystem(props);
getCache();
@@ -196,7 +193,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in the other VM
vm.invoke(new SerializableRunnable() {
public void run() {
- props.setProperty(DistributionConfig.NAME_NAME, vmName);
+ props.setProperty(SystemConfigurationProperties.NAME, vmName);
props.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
getSystem(props);
getCache();
@@ -265,7 +262,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final String vmName = "VM" + vm.getPid();
// Create the cache in this VM
- props.setProperty(DistributionConfig.NAME_NAME, "Controller");
+ props.setProperty(SystemConfigurationProperties.NAME, "Controller");
props.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
getSystem(props);
getCache();
@@ -273,7 +270,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in the other VM
vm.invoke(new SerializableRunnable() {
public void run() {
- props.setProperty(DistributionConfig.NAME_NAME, vmName);
+ props.setProperty(SystemConfigurationProperties.NAME, vmName);
props.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
getSystem(props);
getCache();
@@ -341,8 +338,8 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locatorLogPath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(DistributionConfig.NAME_NAME, "Locator");
- locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
@@ -370,9 +367,9 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Start the default manager
Properties managerProps = new Properties();
- managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ managerProps.setProperty(MCAST_PORT, "0");
managerProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
// Create a JAR file
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index 8681713..fcfd16e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -16,35 +16,12 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.StringTokenizer;
-import java.util.concurrent.CopyOnWriteArrayList;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.data.PortfolioPdx;
import com.gemstone.gemfire.compression.SnappyCompressor;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
@@ -60,17 +37,21 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
/**
* The DiskStoreCommandsDUnitTest class is a distributed test suite of test cases for testing the disk store commands
@@ -102,7 +83,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
}
@@ -298,8 +279,8 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testOfflineDiskStorePdxCommands() {
final Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("start-locator", "localhost[" + AvailablePortHelper.getRandomAvailableTCPPort() + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(START_LOCATOR, "localhost[" + AvailablePortHelper.getRandomAvailableTCPPort() + "]");
final File diskStoreDir = new File(new File(".").getAbsolutePath(), "DiskStoreCommandDUnitDiskStores");
diskStoreDir.mkdir();
@@ -460,8 +441,8 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(DistributionConfig.NAME_NAME, "Locator");
- locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
try {
@@ -488,8 +469,8 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
// Start the default manager
Properties managerProps = new Properties();
- managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ managerProps.setProperty(MCAST_PORT, "0");
+ managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
// Create a cache in VM 1
@@ -502,8 +483,8 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStoreDir.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
getSystem(localProps);
assertNotNull(getCache());
@@ -540,8 +521,8 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
public Object call() {
getCache().close();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
@@ -592,8 +573,8 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
public Object call() {
getCache().close();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
@@ -766,7 +747,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
filesToBeDeleted.add(fullBackupDirPath);
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, controllerName);
+ props.setProperty(SystemConfigurationProperties.NAME, controllerName);
getSystem(props);
@@ -781,7 +762,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
@@ -859,7 +840,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore1Dir2.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
getSystem(localProps);
getCache();
@@ -875,7 +856,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore2Dir.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm2Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
getSystem(localProps);
getCache();
@@ -978,7 +959,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore2Dir1.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1,Group2");
getSystem(localProps);
Cache cache = getCache();
@@ -1004,7 +985,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
diskStore2Dir2.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm2Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
getSystem(localProps);
Cache cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
index 8d1252b..ba5974d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
@@ -16,19 +16,13 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.util.List;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.management.DistributedRegionMXBean;
@@ -38,16 +32,18 @@ import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
/**
* Dunit class for testing gemfire function commands : execute function, destroy function, list function
*/
@@ -275,7 +271,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMember() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -306,7 +302,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMembers() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -340,7 +336,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMembersWithArgs() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_RETURN_ARGS);
@@ -376,7 +372,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMembersWithArgsAndCustomResultCollector() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_RETURN_ARGS);
@@ -413,7 +409,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnGroups() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -492,7 +488,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testDestroyOnGroups() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -582,7 +578,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
getSystem(localProps);
getCache();
@@ -601,7 +597,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
vm2.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm2Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group3");
getSystem(localProps);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index eed7db1..28424a5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -16,37 +16,13 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.IgnoredException.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.QueryInvalidException;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.CompiledValue;
import com.gemstone.gemfire.cache.query.internal.QCompiler;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.management.DistributedRegionMXBean;
@@ -57,11 +33,7 @@ import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.CliUtil;
import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
import com.gemstone.gemfire.management.internal.cli.domain.DataCommandRequest;
-import com.gemstone.gemfire.management.internal.cli.dto.Car;
-import com.gemstone.gemfire.management.internal.cli.dto.Key1;
-import com.gemstone.gemfire.management.internal.cli.dto.ObjectWithCharAttr;
-import com.gemstone.gemfire.management.internal.cli.dto.Value1;
-import com.gemstone.gemfire.management.internal.cli.dto.Value2;
+import com.gemstone.gemfire.management.internal.cli.dto.*;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonArray;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
@@ -71,18 +43,20 @@ import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.S
import com.gemstone.gemfire.management.internal.cli.result.ResultData;
import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
/**
* Dunit class for testing gemfire data commands : get, put, remove, select, rebalance
@@ -130,7 +104,7 @@ public class GemfireDataCommandsDUnitTest extends CliCommandTestBase {
final VM vm1 = Host.getHost(0).getVM(1);
final VM vm2 = Host.getHost(0).getVM(2);
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, testName + "Manager");
+ props.setProperty(SystemConfigurationProperties.NAME, testName + "Manager");
HeadlessGfsh gfsh = setUpJmxManagerOnVm0ThenConnect(props);
assertNotNull(gfsh);
assertEquals(true, gfsh.isConnectedAndReady());
[51/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
index 32a3d73..e1e5123 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
@@ -742,8 +742,8 @@ public class DistributionConfigImpl
}
private void validateOldSSLVsNewSSLProperties(Map props) {
- String sslEnabledString = (String)props.get(SSL_ENABLED_NAME);
- String clusterSSLEnabledString =(String)props.get(CLUSTER_SSL_ENABLED_NAME);
+ String sslEnabledString = (String)props.get(SSL_ENABLED);
+ String clusterSSLEnabledString =(String)props.get(CLUSTER_SSL_ENABLED);
if(sslEnabledString != null && clusterSSLEnabledString != null){
boolean sslEnabled = new Boolean(sslEnabledString).booleanValue();
boolean clusterSSLEnabled =new Boolean(clusterSSLEnabledString).booleanValue();
@@ -753,8 +753,8 @@ public class DistributionConfigImpl
}
}
- String sslCipher = (String)props.get(SSL_CIPHERS_NAME);
- String clusterSSLCipher = (String)props.get(CLUSTER_SSL_CIPHERS_NAME);
+ String sslCipher = (String)props.get(SSL_CIPHERS);
+ String clusterSSLCipher = (String)props.get(CLUSTER_SSL_CIPHERS);
if (sslCipher != null && clusterSSLCipher != null) {
if ( !sslCipher.equals(clusterSSLCipher) ) {
throw new IllegalArgumentException(
@@ -762,8 +762,8 @@ public class DistributionConfigImpl
}
}
- String sslProtocol = (String)props.get(SSL_PROTOCOLS_NAME);
- String clusterSSLProtocol = (String)props.get(CLUSTER_SSL_PROTOCOLS_NAME);
+ String sslProtocol = (String)props.get(SSL_PROTOCOLS);
+ String clusterSSLProtocol = (String)props.get(CLUSTER_SSL_PROTOCOLS);
if (sslProtocol != null && clusterSSLProtocol != null) {
if ( !sslProtocol.equals(clusterSSLProtocol) ) {
throw new IllegalArgumentException(
@@ -771,8 +771,8 @@ public class DistributionConfigImpl
}
}
- String sslReqAuthString = (String)props.get(SSL_REQUIRE_AUTHENTICATION_NAME);
- String clusterReqAuthString =(String)props.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME);
+ String sslReqAuthString = (String)props.get(SSL_REQUIRE_AUTHENTICATION);
+ String clusterReqAuthString =(String)props.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION);
if(sslReqAuthString != null && clusterReqAuthString != null){
boolean sslReqAuth = new Boolean(sslReqAuthString).booleanValue();
boolean clusterSSLReqAuth =new Boolean(clusterReqAuthString).booleanValue();
@@ -782,8 +782,8 @@ public class DistributionConfigImpl
}
}
- String jmxSSLString = (String)props.get(JMX_MANAGER_SSL_NAME);
- String jmxSSLEnabledString =(String)props.get(JMX_MANAGER_SSL_ENABLED_NAME);
+ String jmxSSLString = (String)props.get(JMX_MANAGER_SSL);
+ String jmxSSLEnabledString =(String)props.get(JMX_MANAGER_SSL_ENABLED);
if(jmxSSLString != null && jmxSSLEnabledString != null){
boolean jmxSSL = new Boolean(jmxSSLString).booleanValue();
boolean jmxSSLEnabled =new Boolean(jmxSSLEnabledString).booleanValue();
@@ -798,26 +798,26 @@ public class DistributionConfigImpl
* ssl-* properties will be copied in cluster-ssl-* properties. Socket is using cluster-ssl-* properties
*/
private void copySSLPropsToClusterSSLProps() {
- boolean clusterSSLOverriden = this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME)!=null;
- boolean p2pSSLOverRidden = this.sourceMap.get(SSL_ENABLED_NAME)!=null;
+ boolean clusterSSLOverriden = this.sourceMap.get(CLUSTER_SSL_ENABLED)!=null;
+ boolean p2pSSLOverRidden = this.sourceMap.get(SSL_ENABLED)!=null;
if(p2pSSLOverRidden && !clusterSSLOverriden) {
this.clusterSSLEnabled = this.sslEnabled;
- this.sourceMap.put(CLUSTER_SSL_ENABLED_NAME,this.sourceMap.get(SSL_ENABLED_NAME));
+ this.sourceMap.put(CLUSTER_SSL_ENABLED,this.sourceMap.get(SSL_ENABLED));
- if(this.sourceMap.get(SSL_CIPHERS_NAME)!=null) {
+ if(this.sourceMap.get(SSL_CIPHERS)!=null) {
this.clusterSSLCiphers = this.sslCiphers;
- this.sourceMap.put(CLUSTER_SSL_CIPHERS_NAME,this.sourceMap.get(SSL_CIPHERS_NAME));
+ this.sourceMap.put(CLUSTER_SSL_CIPHERS,this.sourceMap.get(SSL_CIPHERS));
}
- if(this.sourceMap.get(SSL_PROTOCOLS_NAME)!=null) {
+ if(this.sourceMap.get(SSL_PROTOCOLS)!=null) {
this.clusterSSLProtocols = this.sslProtocols;
- this.sourceMap.put(CLUSTER_SSL_PROTOCOLS_NAME,this.sourceMap.get(SSL_PROTOCOLS_NAME));
+ this.sourceMap.put(CLUSTER_SSL_PROTOCOLS,this.sourceMap.get(SSL_PROTOCOLS));
}
- if(this.sourceMap.get(SSL_REQUIRE_AUTHENTICATION_NAME)!=null) {
+ if(this.sourceMap.get(SSL_REQUIRE_AUTHENTICATION)!=null) {
this.clusterSSLRequireAuthentication = this.sslRequireAuthentication;
- this.sourceMap.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME,this.sourceMap.get(SSL_REQUIRE_AUTHENTICATION_NAME));
+ this.sourceMap.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION,this.sourceMap.get(SSL_REQUIRE_AUTHENTICATION));
}
this.clusterSSLProperties.putAll(this.sslProperties);
}
@@ -829,76 +829,76 @@ public class DistributionConfigImpl
* if jmx-manager-ssl-*properties are given then use them, and copy the unspecified jmx-manager properties from cluster-properties
*/
private void copySSLPropsToJMXSSLProps() {
- boolean jmxSSLEnabledOverriden = this.sourceMap.get(JMX_MANAGER_SSL_ENABLED_NAME)!=null;
- boolean jmxSSLOverriden = this.sourceMap.get(JMX_MANAGER_SSL_NAME)!=null;
- boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME)!=null;
+ boolean jmxSSLEnabledOverriden = this.sourceMap.get(JMX_MANAGER_SSL_ENABLED)!=null;
+ boolean jmxSSLOverriden = this.sourceMap.get(JMX_MANAGER_SSL)!=null;
+ boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED)!=null;
if(jmxSSLOverriden && !jmxSSLEnabledOverriden) {
this.jmxManagerSSLEnabled = this.jmxManagerSSL;
- this.sourceMap.put(JMX_MANAGER_SSL_ENABLED_NAME,this.sourceMap.get(JMX_MANAGER_SSL_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_ENABLED,this.sourceMap.get(JMX_MANAGER_SSL));
}
if(clusterSSLOverRidden && !jmxSSLOverriden && !jmxSSLEnabledOverriden) {
this.jmxManagerSSLEnabled = this.clusterSSLEnabled;
- this.sourceMap.put(JMX_MANAGER_SSL_ENABLED_NAME,this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME));
- if(this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME)!=null) {
+ this.sourceMap.put(JMX_MANAGER_SSL_ENABLED,this.sourceMap.get(CLUSTER_SSL_ENABLED));
+ if(this.sourceMap.get(CLUSTER_SSL_CIPHERS)!=null) {
this.jmxManagerSslCiphers = this.clusterSSLCiphers;
- this.sourceMap.put(JMX_MANAGER_SSL_CIPHERS_NAME,this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_CIPHERS_NAME,this.sourceMap.get(CLUSTER_SSL_CIPHERS));
}
- if(this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_PROTOCOLS)!=null) {
this.jmxManagerSslProtocols = this.clusterSSLProtocols;
- this.sourceMap.put(JMX_MANAGER_SSL_PROTOCOLS_NAME,this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_PROTOCOLS,this.sourceMap.get(CLUSTER_SSL_PROTOCOLS));
}
- if(this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION)!=null) {
this.jmxManagerSslRequireAuthentication = this.clusterSSLRequireAuthentication;
- this.sourceMap.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME,this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION,this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE)!=null) {
this.jmxManagerSSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE)!=null) {
this.jmxManagerSSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_TYPE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD)!=null) {
this.jmxManagerSSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE)!=null) {
this.jmxManagerSSLTrustStore= this.clusterSSLTrustStore;
- this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD)!=null) {
this.jmxManagerSSLTrustStorePassword= this.clusterSSLTrustStorePassword;
- this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
this.jmxManagerSslProperties.putAll(this.clusterSSLProperties);
}
if(jmxSSLOverriden || jmxSSLEnabledOverriden){
- if(this.sourceMap.get(JMX_MANAGER_SSL_KEYSTORE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME) != null) {
+ if(this.sourceMap.get(JMX_MANAGER_SSL_KEYSTORE)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE) != null) {
this.jmxManagerSSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if(this.sourceMap.get(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME) != null) {
+ if(this.sourceMap.get(JMX_MANAGER_SSL_KEYSTORE_TYPE)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE) != null) {
this.jmxManagerSSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_TYPE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if(this.sourceMap.get(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME) != null) {
+ if(this.sourceMap.get(JMX_MANAGER_SSL_KEYSTORE_PASSWORD)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD) != null) {
this.jmxManagerSSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if(this.sourceMap.get(JMX_MANAGER_SSL_TRUSTSTORE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME) != null) {
+ if(this.sourceMap.get(JMX_MANAGER_SSL_TRUSTSTORE)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE) != null) {
this.jmxManagerSSLTrustStore= this.clusterSSLTrustStore;
- this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if(this.sourceMap.get(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME) != null) {
+ if(this.sourceMap.get(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD) != null) {
this.jmxManagerSSLTrustStorePassword= this.clusterSSLTrustStorePassword;
- this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
}
@@ -911,80 +911,80 @@ public class DistributionConfigImpl
private void copySSLPropsToHTTPSSLProps() {
boolean httpServiceSSLEnabledOverriden = this.sourceMap.get(HTTP_SERVICE_SSL_ENABLED_NAME) != null;
- boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME) != null;
+ boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED) != null;
if (clusterSSLOverRidden && !httpServiceSSLEnabledOverriden) {
this.httpServiceSSLEnabled = this.clusterSSLEnabled;
- this.sourceMap.put(HTTP_SERVICE_SSL_ENABLED_NAME, this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_ENABLED, this.sourceMap.get(CLUSTER_SSL_ENABLED));
- if (this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_CIPHERS) != null) {
this.httpServiceSSLCiphers = this.clusterSSLCiphers;
- this.sourceMap.put(HTTP_SERVICE_SSL_CIPHERS_NAME, this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_CIPHERS, this.sourceMap.get(CLUSTER_SSL_CIPHERS));
}
- if (this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_PROTOCOLS) != null) {
this.httpServiceSSLProtocols = this.clusterSSLProtocols;
- this.sourceMap.put(HTTP_SERVICE_SSL_PROTOCOLS_NAME, this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_PROTOCOLS, this.sourceMap.get(CLUSTER_SSL_PROTOCOLS));
}
- if (this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION) != null) {
this.httpServiceSSLRequireAuthentication = this.clusterSSLRequireAuthentication;
- this.sourceMap.put(HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME,
- this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION,
+ this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION));
}
- if (this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_KEYSTORE) != null) {
this.httpServiceSSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_NAME, this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE, this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if (this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE) != null) {
this.httpServiceSSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_TYPE, this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if (this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD) != null) {
this.httpServiceSSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME,
- this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD,
+ this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if (this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE) != null) {
this.httpServiceSSLTrustStore = this.clusterSSLTrustStore;
- this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE_NAME, this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE, this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if (this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME) != null) {
+ if (this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD) != null) {
this.httpServiceSSLTrustStorePassword = this.clusterSSLTrustStorePassword;
- this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME,
- this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD,
+ this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
this.httpServiceSSLProperties.putAll(this.clusterSSLProperties);
}
if (httpServiceSSLEnabledOverriden) {
- if (this.sourceMap.get(HTTP_SERVICE_SSL_KEYSTORE_NAME) == null
- && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME) != null) {
+ if (this.sourceMap.get(HTTP_SERVICE_SSL_KEYSTORE) == null
+ && this.sourceMap.get(CLUSTER_SSL_KEYSTORE) != null) {
this.httpServiceSSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_NAME, this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE, this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if (this.sourceMap.get(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME) == null
- && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME) != null) {
+ if (this.sourceMap.get(HTTP_SERVICE_SSL_KEYSTORE_TYPE) == null
+ && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE) != null) {
this.httpServiceSSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_TYPE, this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if (this.sourceMap.get(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME) == null
- && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME) != null) {
+ if (this.sourceMap.get(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD) == null
+ && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD) != null) {
this.httpServiceSSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME,
- this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_KEYSTORE_PASSWORD,
+ this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if (this.sourceMap.get(HTTP_SERVICE_SSL_TRUSTSTORE_NAME) == null
- && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME) != null) {
+ if (this.sourceMap.get(HTTP_SERVICE_SSL_TRUSTSTORE) == null
+ && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE) != null) {
this.httpServiceSSLTrustStore = this.clusterSSLTrustStore;
- this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE_NAME, this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE, this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if (this.sourceMap.get(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME) == null
- && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME) != null) {
+ if (this.sourceMap.get(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD) == null
+ && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD) != null) {
this.httpServiceSSLTrustStorePassword = this.clusterSSLTrustStorePassword;
- this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME,
- this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD,
+ this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
}
@@ -995,70 +995,70 @@ public class DistributionConfigImpl
* if server-ssl-*properties are given then use them, and copy the unspecified server properties from cluster-properties
*/
private void copySSLPropsToServerSSLProps() {
- boolean cacheServerSSLOverriden = this.sourceMap.get(SERVER_SSL_ENABLED_NAME)!=null;
- boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME)!=null;
+ boolean cacheServerSSLOverriden = this.sourceMap.get(SERVER_SSL_ENABLED)!=null;
+ boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED)!=null;
if(clusterSSLOverRidden && !cacheServerSSLOverriden) {
this.serverSSLEnabled = this.clusterSSLEnabled;
- this.sourceMap.put(SERVER_SSL_ENABLED_NAME,this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME));
- if(this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME)!=null) {
+ this.sourceMap.put(SERVER_SSL_ENABLED,this.sourceMap.get(CLUSTER_SSL_ENABLED));
+ if(this.sourceMap.get(CLUSTER_SSL_CIPHERS)!=null) {
this.serverSslCiphers = this.clusterSSLCiphers;
- this.sourceMap.put(SERVER_SSL_CIPHERS_NAME,this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME));
+ this.sourceMap.put(SERVER_SSL_CIPHERS,this.sourceMap.get(CLUSTER_SSL_CIPHERS));
}
- if(this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_PROTOCOLS)!=null) {
this.serverSslProtocols = this.clusterSSLProtocols;
- this.sourceMap.put(SERVER_SSL_PROTOCOLS_NAME,this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME));
+ this.sourceMap.put(SERVER_SSL_PROTOCOLS,this.sourceMap.get(CLUSTER_SSL_PROTOCOLS));
}
- if(this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION)!=null) {
this.serverSslRequireAuthentication = this.clusterSSLRequireAuthentication;
- this.sourceMap.put(SERVER_SSL_REQUIRE_AUTHENTICATION_NAME,this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME));
+ this.sourceMap.put(SERVER_SSL_REQUIRE_AUTHENTICATION,this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE)!=null) {
this.serverSSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(SERVER_SSL_KEYSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(SERVER_SSL_KEYSTORE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE)!=null) {
this.serverSSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(SERVER_SSL_KEYSTORE_TYPE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(SERVER_SSL_KEYSTORE_TYPE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD)!=null) {
this.serverSSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(SERVER_SSL_KEYSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(SERVER_SSL_KEYSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE)!=null) {
this.serverSSLTrustStore= this.clusterSSLTrustStore;
- this.sourceMap.put(SERVER_SSL_TRUSTSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(SERVER_SSL_TRUSTSTORE,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD)!=null) {
this.serverSSLTrustStorePassword= this.clusterSSLTrustStorePassword;
- this.sourceMap.put(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(SERVER_SSL_TRUSTSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
this.serverSslProperties.putAll(this.clusterSSLProperties);
}
if(cacheServerSSLOverriden){
- if(this.sourceMap.get(SERVER_SSL_KEYSTORE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME) != null) {
+ if(this.sourceMap.get(SERVER_SSL_KEYSTORE)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE) != null) {
this.serverSSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(SERVER_SSL_KEYSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(SERVER_SSL_KEYSTORE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if(this.sourceMap.get(SERVER_SSL_KEYSTORE_TYPE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME) != null) {
+ if(this.sourceMap.get(SERVER_SSL_KEYSTORE_TYPE)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE) != null) {
this.serverSSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(SERVER_SSL_KEYSTORE_TYPE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(SERVER_SSL_KEYSTORE_TYPE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if(this.sourceMap.get(SERVER_SSL_KEYSTORE_PASSWORD_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME) != null) {
+ if(this.sourceMap.get(SERVER_SSL_KEYSTORE_PASSWORD)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD) != null) {
this.serverSSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(SERVER_SSL_KEYSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(SERVER_SSL_KEYSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if(this.sourceMap.get(SERVER_SSL_TRUSTSTORE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME) != null) {
+ if(this.sourceMap.get(SERVER_SSL_TRUSTSTORE)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE) != null) {
this.serverSSLTrustStore= this.clusterSSLTrustStore;
- this.sourceMap.put(SERVER_SSL_TRUSTSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(SERVER_SSL_TRUSTSTORE,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if(this.sourceMap.get(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME) != null) {
+ if(this.sourceMap.get(SERVER_SSL_TRUSTSTORE_PASSWORD)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD) != null) {
this.serverSSLTrustStorePassword= this.clusterSSLTrustStorePassword;
- this.sourceMap.put(SERVER_SSL_TRUSTSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(SERVER_SSL_TRUSTSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
}
}
@@ -1068,70 +1068,70 @@ public class DistributionConfigImpl
* if gateway-ssl-*properties are given then use them, and copy the unspecified gateway properties from cluster-properties
*/
private void copyClusterSSLPropsToGatewaySSLProps() {
- boolean gatewaySSLOverriden = this.sourceMap.get(GATEWAY_SSL_ENABLED_NAME)!=null;
- boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME)!=null;
+ boolean gatewaySSLOverriden = this.sourceMap.get(GATEWAY_SSL_ENABLED)!=null;
+ boolean clusterSSLOverRidden = this.sourceMap.get(CLUSTER_SSL_ENABLED)!=null;
if(clusterSSLOverRidden && !gatewaySSLOverriden) {
this.gatewaySSLEnabled = this.clusterSSLEnabled;
- this.sourceMap.put(GATEWAY_SSL_ENABLED_NAME,this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME));
- if(this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME)!=null) {
+ this.sourceMap.put(GATEWAY_SSL_ENABLED,this.sourceMap.get(CLUSTER_SSL_ENABLED));
+ if(this.sourceMap.get(CLUSTER_SSL_CIPHERS)!=null) {
this.gatewaySslCiphers = this.clusterSSLCiphers;
- this.sourceMap.put(GATEWAY_SSL_CIPHERS_NAME,this.sourceMap.get(CLUSTER_SSL_CIPHERS_NAME));
+ this.sourceMap.put(GATEWAY_SSL_CIPHERS,this.sourceMap.get(CLUSTER_SSL_CIPHERS));
}
- if(this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_PROTOCOLS)!=null) {
this.gatewaySslProtocols = this.clusterSSLProtocols;
- this.sourceMap.put(GATEWAY_SSL_PROTOCOLS_NAME,this.sourceMap.get(CLUSTER_SSL_PROTOCOLS_NAME));
+ this.sourceMap.put(GATEWAY_SSL_PROTOCOLS,this.sourceMap.get(CLUSTER_SSL_PROTOCOLS));
}
- if(this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION)!=null) {
this.gatewaySslRequireAuthentication = this.clusterSSLRequireAuthentication;
- this.sourceMap.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME,this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME));
+ this.sourceMap.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION,this.sourceMap.get(CLUSTER_SSL_REQUIRE_AUTHENTICATION));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE)!=null) {
this.gatewaySSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(GATEWAY_SSL_KEYSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(GATEWAY_SSL_KEYSTORE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE)!=null) {
this.gatewaySSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(GATEWAY_SSL_KEYSTORE_TYPE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(GATEWAY_SSL_KEYSTORE_TYPE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD)!=null) {
this.gatewaySSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(GATEWAY_SSL_KEYSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE)!=null) {
this.gatewaySSLTrustStore= this.clusterSSLTrustStore;
- this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)!=null) {
+ if(this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD)!=null) {
this.gatewaySSLTrustStorePassword= this.clusterSSLTrustStorePassword;
- this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
this.gatewaySslProperties.putAll(this.clusterSSLProperties);
}
if(gatewaySSLOverriden){
- if(this.sourceMap.get(GATEWAY_SSL_KEYSTORE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME) != null) {
+ if(this.sourceMap.get(GATEWAY_SSL_KEYSTORE)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE) != null) {
this.gatewaySSLKeyStore = this.clusterSSLKeyStore;
- this.sourceMap.put(GATEWAY_SSL_KEYSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_NAME));
+ this.sourceMap.put(GATEWAY_SSL_KEYSTORE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE));
}
- if(this.sourceMap.get(GATEWAY_SSL_KEYSTORE_TYPE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME) != null) {
+ if(this.sourceMap.get(GATEWAY_SSL_KEYSTORE_TYPE)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE) != null) {
this.gatewaySSLKeyStoreType = this.clusterSSLKeyStoreType;
- this.sourceMap.put(GATEWAY_SSL_KEYSTORE_TYPE_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE_NAME));
+ this.sourceMap.put(GATEWAY_SSL_KEYSTORE_TYPE,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_TYPE));
}
- if(this.sourceMap.get(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME) != null) {
+ if(this.sourceMap.get(GATEWAY_SSL_KEYSTORE_PASSWORD)==null && this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD) != null) {
this.gatewaySSLKeyStorePassword = this.clusterSSLKeyStorePassword;
- this.sourceMap.put(GATEWAY_SSL_KEYSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME));
+ this.sourceMap.put(GATEWAY_SSL_KEYSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_KEYSTORE_PASSWORD));
}
- if(this.sourceMap.get(GATEWAY_SSL_TRUSTSTORE_NAME)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME)!= null) {
+ if(this.sourceMap.get(GATEWAY_SSL_TRUSTSTORE)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE)!= null) {
this.gatewaySSLTrustStore= this.clusterSSLTrustStore;
- this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_NAME));
+ this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE));
}
- if(this.sourceMap.get(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME) != null) {
+ if(this.sourceMap.get(GATEWAY_SSL_TRUSTSTORE_PASSWORD)==null && this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD) != null) {
this.gatewaySSLTrustStorePassword= this.clusterSSLTrustStorePassword;
- this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME));
+ this.sourceMap.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD,this.sourceMap.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD));
}
}
}
@@ -1200,10 +1200,10 @@ public class DistributionConfigImpl
}
public static boolean specialPropName(String propName) {
- return propName.equalsIgnoreCase(SSL_ENABLED_NAME) ||
- propName.equalsIgnoreCase(CLUSTER_SSL_ENABLED_NAME) ||
- propName.equals(SECURITY_PEER_AUTH_INIT_NAME) ||
- propName.equals(SECURITY_PEER_AUTHENTICATOR_NAME) ||
+ return propName.equalsIgnoreCase(SSL_ENABLED) ||
+ propName.equalsIgnoreCase(CLUSTER_SSL_ENABLED) ||
+ propName.equals(SECURITY_PEER_AUTH_INIT) ||
+ propName.equals(SECURITY_PEER_AUTHENTICATOR) ||
propName.equals(LOG_WRITER_NAME) ||
propName.equals(DS_CONFIG_NAME) ||
propName.equals(SECURITY_LOG_WRITER_NAME) ||
@@ -1305,11 +1305,11 @@ public class DistributionConfigImpl
}
}
// now set ssl-enabled if needed...
- if ( props.containsKey(SSL_ENABLED_NAME) ) {
- this.setAttribute(SSL_ENABLED_NAME, (String) props.get( SSL_ENABLED_NAME ), this.sourceMap.get(SSL_ENABLED_NAME) );
+ if ( props.containsKey(SSL_ENABLED) ) {
+ this.setAttribute(SSL_ENABLED, (String) props.get( SSL_ENABLED ), this.sourceMap.get(SSL_ENABLED) );
}
- if ( props.containsKey(CLUSTER_SSL_ENABLED_NAME) ) {
- this.setAttribute(CLUSTER_SSL_ENABLED_NAME, (String) props.get( CLUSTER_SSL_ENABLED_NAME ), this.sourceMap.get(CLUSTER_SSL_ENABLED_NAME) );
+ if ( props.containsKey(CLUSTER_SSL_ENABLED) ) {
+ this.setAttribute(CLUSTER_SSL_ENABLED, (String) props.get( CLUSTER_SSL_ENABLED ), this.sourceMap.get(CLUSTER_SSL_ENABLED) );
}
// now set the security authInit if needed
if (props.containsKey(SECURITY_PEER_AUTH_INIT_NAME)) {
@@ -1557,7 +1557,7 @@ public class DistributionConfigImpl
}
public void setUserCommandPackages(String value) {
- this.userCommandPackages = (String)checkAttribute(USER_COMMAND_PACKAGES, value);
+ this.userCommandPackages = (String)checkAttribute(SystemConfigurationProperties.USER_COMMAND_PACKAGES, value);
}
public boolean getDeltaPropagation() {
@@ -1584,16 +1584,16 @@ public class DistributionConfigImpl
this.mcastTtl = (Integer) checkAttribute(MCAST_TTL, value);
}
public void setSocketLeaseTime(int value) {
- this.socketLeaseTime = (Integer)checkAttribute(SOCKET_LEASE_TIME_NAME, value);
+ this.socketLeaseTime = (Integer)checkAttribute(SOCKET_LEASE_TIME, value);
}
public void setSocketBufferSize(int value) {
- this.socketBufferSize = (Integer)checkAttribute(SOCKET_BUFFER_SIZE_NAME, value);
+ this.socketBufferSize = (Integer)checkAttribute(SOCKET_BUFFER_SIZE, value);
}
public void setConserveSockets(boolean value) {
- this.conserveSockets = (Boolean)checkAttribute(CONSERVE_SOCKETS_NAME, value);
+ this.conserveSockets = (Boolean)checkAttribute(CONSERVE_SOCKETS, value);
}
public void setRoles(String value) {
- this.roles = (String)checkAttribute(ROLES_NAME, value);
+ this.roles = (String)checkAttribute(ROLES, value);
}
public void setMaxWaitTimeForReconnect(int value){
@@ -1629,13 +1629,13 @@ public class DistributionConfigImpl
}
public void setDeployWorkingDir(File value) {
- this.deployWorkingDir = (File)checkAttribute(DEPLOY_WORKING_DIR, value);
+ this.deployWorkingDir = (File)checkAttribute(SystemConfigurationProperties.DEPLOY_WORKING_DIR, value);
}
public void setLogFile(File value) {
- this.logFile = (File)checkAttribute(LOG_FILE_NAME, value);
+ this.logFile = (File)checkAttribute(LOG_FILE, value);
}
public void setLogLevel(int value) {
- this.logLevel = (Integer)checkAttribute(LOG_LEVEL_NAME, value);
+ this.logLevel = (Integer)checkAttribute(LOG_LEVEL, value);
}
/**
* the locator startup code must be able to modify the locator log file in order
@@ -1680,10 +1680,10 @@ public class DistributionConfigImpl
this.startLocator = value;
}
public void setStatisticSamplingEnabled(boolean value) {
- this.statisticSamplingEnabled = (Boolean)checkAttribute(STATISTIC_SAMPLING_ENABLED_NAME, value);
+ this.statisticSamplingEnabled = (Boolean)checkAttribute(STATISTIC_SAMPLING_ENABLED, value);
}
public void setStatisticSampleRate(int value) {
- value = (Integer)checkAttribute(STATISTIC_SAMPLE_RATE_NAME, value);
+ value = (Integer)checkAttribute(STATISTIC_SAMPLE_RATE, value);
if (value < DEFAULT_STATISTIC_SAMPLE_RATE) {
// fix 48228
InternalDistributedSystem ids = InternalDistributedSystem.getConnectedInstance();
@@ -1698,91 +1698,91 @@ public class DistributionConfigImpl
if (value == null) {
value = new File("");
}
- this.statisticArchiveFile = (File)checkAttribute(STATISTIC_ARCHIVE_FILE_NAME, value);
+ this.statisticArchiveFile = (File)checkAttribute(STATISTIC_ARCHIVE_FILE, value);
}
public void setCacheXmlFile(File value) {
- this.cacheXmlFile = (File)checkAttribute(CACHE_XML_FILE_NAME, value);
+ this.cacheXmlFile = (File)checkAttribute(CACHE_XML_FILE, value);
}
public void setAckWaitThreshold(int value) {
- this.ackWaitThreshold = (Integer)checkAttribute(ACK_WAIT_THRESHOLD_NAME, value);
+ this.ackWaitThreshold = (Integer)checkAttribute(ACK_WAIT_THRESHOLD, value);
}
public void setAckSevereAlertThreshold(int value) {
- this.ackForceDisconnectThreshold = (Integer)checkAttribute(ACK_SEVERE_ALERT_THRESHOLD_NAME, value);
+ this.ackForceDisconnectThreshold = (Integer)checkAttribute(ACK_SEVERE_ALERT_THRESHOLD, value);
}
public int getArchiveDiskSpaceLimit() {
return this.archiveDiskSpaceLimit;
}
public void setArchiveDiskSpaceLimit(int value) {
- this.archiveDiskSpaceLimit = (Integer)checkAttribute(ARCHIVE_DISK_SPACE_LIMIT_NAME, value);
+ this.archiveDiskSpaceLimit = (Integer)checkAttribute(ARCHIVE_DISK_SPACE_LIMIT, value);
}
public int getArchiveFileSizeLimit() {
return this.archiveFileSizeLimit;
}
public void setArchiveFileSizeLimit(int value) {
- this.archiveFileSizeLimit = (Integer)checkAttribute(ARCHIVE_FILE_SIZE_LIMIT_NAME, value);
+ this.archiveFileSizeLimit = (Integer)checkAttribute(ARCHIVE_FILE_SIZE_LIMIT, value);
}
public int getLogDiskSpaceLimit() {
return this.logDiskSpaceLimit;
}
public void setLogDiskSpaceLimit(int value) {
- this.logDiskSpaceLimit = (Integer)checkAttribute(LOG_DISK_SPACE_LIMIT_NAME, value);
+ this.logDiskSpaceLimit = (Integer)checkAttribute(LOG_DISK_SPACE_LIMIT, value);
}
public int getLogFileSizeLimit() {
return this.logFileSizeLimit;
}
public void setLogFileSizeLimit(int value) {
- this.logFileSizeLimit = (Integer)checkAttribute(LOG_FILE_SIZE_LIMIT_NAME, value);
+ this.logFileSizeLimit = (Integer)checkAttribute(LOG_FILE_SIZE_LIMIT, value);
}
public void setSSLEnabled( boolean value ) {
- this.sslEnabled = (Boolean)checkAttribute(SSL_ENABLED_NAME, value);
+ this.sslEnabled = (Boolean)checkAttribute(SSL_ENABLED, value);
}
public void setSSLProtocols( String value ) {
- this.sslProtocols = (String)checkAttribute(SSL_PROTOCOLS_NAME, value);
+ this.sslProtocols = (String)checkAttribute(SSL_PROTOCOLS, value);
}
public void setSSLCiphers( String value ) {
- this.sslCiphers = (String)checkAttribute(SSL_CIPHERS_NAME, value);
+ this.sslCiphers = (String)checkAttribute(SSL_CIPHERS, value);
}
public void setSSLRequireAuthentication( boolean value ){
- this.sslRequireAuthentication = (Boolean)checkAttribute(SSL_REQUIRE_AUTHENTICATION_NAME, value);
+ this.sslRequireAuthentication = (Boolean)checkAttribute(SSL_REQUIRE_AUTHENTICATION, value);
}
public void setClusterSSLEnabled( boolean value ) {
- this.clusterSSLEnabled = (Boolean)checkAttribute(CLUSTER_SSL_ENABLED_NAME, value);
+ this.clusterSSLEnabled = (Boolean)checkAttribute(CLUSTER_SSL_ENABLED, value);
}
public void setClusterSSLProtocols( String value ) {
- this.clusterSSLProtocols = (String)checkAttribute(CLUSTER_SSL_PROTOCOLS_NAME, value);
+ this.clusterSSLProtocols = (String)checkAttribute(CLUSTER_SSL_PROTOCOLS, value);
}
public void setClusterSSLCiphers( String value ) {
- this.clusterSSLCiphers = (String)checkAttribute(CLUSTER_SSL_CIPHERS_NAME, value);
+ this.clusterSSLCiphers = (String)checkAttribute(CLUSTER_SSL_CIPHERS, value);
}
public void setClusterSSLRequireAuthentication( boolean value ){
- this.clusterSSLRequireAuthentication = (Boolean)checkAttribute(CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, value);
+ this.clusterSSLRequireAuthentication = (Boolean)checkAttribute(CLUSTER_SSL_REQUIRE_AUTHENTICATION, value);
}
public void setClusterSSLKeyStore( String value ) {
- value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE_NAME, value);
+ value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE, value);
this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_NAME, value);
this.clusterSSLKeyStore = value;
}
public void setClusterSSLKeyStoreType( String value ) {
- value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE_TYPE_NAME, value);
+ value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE_TYPE, value);
this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_TYPE_NAME, value);
this.clusterSSLKeyStoreType = value;
}
public void setClusterSSLKeyStorePassword( String value ) {
- value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE_PASSWORD_NAME, value);
+ value = (String)checkAttribute(CLUSTER_SSL_KEYSTORE_PASSWORD, value);
this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + KEY_STORE_PASSWORD_NAME, value);
this.clusterSSLKeyStorePassword =value;
}
public void setClusterSSLTrustStore( String value ) {
- value = (String)checkAttribute(CLUSTER_SSL_TRUSTSTORE_NAME, value);
+ value = (String)checkAttribute(CLUSTER_SSL_TRUSTSTORE, value);
this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_NAME, value);
this.clusterSSLTrustStore = value;
}
public void setClusterSSLTrustStorePassword( String value ) {
- value = (String)checkAttribute(CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME, value);
+ value = (String)checkAttribute(CLUSTER_SSL_TRUSTSTORE_PASSWORD, value);
this.getClusterSSLProperties().setProperty(SSL_SYSTEM_PROPS_NAME + TRUST_STORE_PASSWORD_NAME, value);
this.clusterSSLTrustStorePassword = value;
}
@@ -1792,7 +1792,7 @@ public class DistributionConfigImpl
}
public void setMcastSendBufferSize(int value) {
- mcastSendBufferSize = (Integer)checkAttribute(MCAST_SEND_BUFFER_SIZE_NAME, value);
+ mcastSendBufferSize = (Integer)checkAttribute(MCAST_SEND_BUFFER_SIZE, value);
}
public int getMcastRecvBufferSize() {
@@ -1800,16 +1800,16 @@ public class DistributionConfigImpl
}
public void setMcastRecvBufferSize(int value) {
- mcastRecvBufferSize = (Integer)checkAttribute(MCAST_RECV_BUFFER_SIZE_NAME, value);
+ mcastRecvBufferSize = (Integer)checkAttribute(MCAST_RECV_BUFFER_SIZE, value);
}
public void setAsyncDistributionTimeout(int value) {
- this.asyncDistributionTimeout = (Integer)checkAttribute(ASYNC_DISTRIBUTION_TIMEOUT_NAME, value);
+ this.asyncDistributionTimeout = (Integer)checkAttribute(ASYNC_DISTRIBUTION_TIMEOUT, value);
}
public void setAsyncQueueTimeout(int value) {
- this.asyncQueueTimeout = (Integer)checkAttribute(ASYNC_QUEUE_TIMEOUT_NAME, value);
+ this.asyncQueueTimeout = (Integer)checkAttribute(ASYNC_QUEUE_TIMEOUT, value);
}
public void setAsyncMaxQueueSize(int value) {
- this.asyncMaxQueueSize = (Integer)checkAttribute(ASYNC_MAX_QUEUE_SIZE_NAME, value);
+ this.asyncMaxQueueSize = (Integer)checkAttribute(ASYNC_MAX_QUEUE_SIZE, value);
}
public FlowControlParams getMcastFlowControl() {
@@ -1817,7 +1817,7 @@ public class DistributionConfigImpl
}
public void setMcastFlowControl(FlowControlParams values) {
- mcastFlowControl = (FlowControlParams)checkAttribute(MCAST_FLOW_CONTROL_NAME, values);
+ mcastFlowControl = (FlowControlParams)checkAttribute(MCAST_FLOW_CONTROL, values);
}
public int getUdpFragmentSize() {
@@ -1825,7 +1825,7 @@ public class DistributionConfigImpl
}
public void setUdpFragmentSize(int value) {
- udpFragmentSize = (Integer)checkAttribute(UDP_FRAGMENT_SIZE_NAME, value);
+ udpFragmentSize = (Integer)checkAttribute(UDP_FRAGMENT_SIZE, value);
}
public int getUdpSendBufferSize() {
@@ -1833,7 +1833,7 @@ public class DistributionConfigImpl
}
public void setUdpSendBufferSize(int value) {
- udpSendBufferSize = (Integer)checkAttribute(UDP_SEND_BUFFER_SIZE_NAME, value);
+ udpSendBufferSize = (Integer)checkAttribute(UDP_SEND_BUFFER_SIZE, value);
}
public int getUdpRecvBufferSize() {
@@ -1841,7 +1841,7 @@ public class DistributionConfigImpl
}
public void setUdpRecvBufferSize(int value) {
- udpRecvBufferSize = (Integer)checkAttribute(UDP_RECV_BUFFER_SIZE_NAME, value);
+ udpRecvBufferSize = (Integer)checkAttribute(UDP_RECV_BUFFER_SIZE, value);
}
public boolean getDisableTcp() {
@@ -1865,7 +1865,7 @@ public class DistributionConfigImpl
}
public void setMemberTimeout(int value) {
- memberTimeout = (Integer)checkAttribute(MEMBER_TIMEOUT_NAME, value);
+ memberTimeout = (Integer)checkAttribute(MEMBER_TIMEOUT, value);
}
/** @since GemFire 5.7 */
@@ -1875,7 +1875,7 @@ public class DistributionConfigImpl
/** @since GemFire 5.7 */
public void setClientConflation(String value) {
- this.clientConflation = (String)checkAttribute(CLIENT_CONFLATION_PROP_NAME, value);
+ this.clientConflation = (String)checkAttribute(CONFLATE_EVENTS, value);
}
public String getDurableClientId() {
@@ -1883,7 +1883,7 @@ public class DistributionConfigImpl
}
public void setDurableClientId(String value) {
- durableClientId = (String)checkAttribute(DURABLE_CLIENT_ID_NAME, value);
+ durableClientId = (String)checkAttribute(DURABLE_CLIENT_ID, value);
}
public int getDurableClientTimeout() {
@@ -1891,7 +1891,7 @@ public class DistributionConfigImpl
}
public void setDurableClientTimeout(int value) {
- durableClientTimeout = (Integer)checkAttribute(DURABLE_CLIENT_TIMEOUT_NAME, value);
+ durableClientTimeout = (Integer)checkAttribute(DURABLE_CLIENT_TIMEOUT, value);
}
public String getSecurityClientAuthInit() {
@@ -1899,7 +1899,7 @@ public class DistributionConfigImpl
}
public void setSecurityClientAuthInit(String value) {
- securityClientAuthInit = (String)checkAttribute(SECURITY_CLIENT_AUTH_INIT_NAME, value);
+ securityClientAuthInit = (String)checkAttribute(SECURITY_CLIENT_AUTH_INIT, value);
}
public String getSecurityClientAuthenticator() {
@@ -3105,7 +3105,7 @@ public class DistributionConfigImpl
* @see com.gemstone.gemfire.distributed.internal.DistributionConfig#setMembershipPortRange(int[])
*/
public void setMembershipPortRange(int[] range) {
- membershipPortRange = (int[])checkAttribute(MEMBERSHIP_PORT_RANGE_NAME, range);
+ membershipPortRange = (int[])checkAttribute(MEMBERSHIP_PORT_RANGE, range);
}
/**
@@ -3198,7 +3198,7 @@ public class DistributionConfigImpl
@Override
public void setEnableClusterConfiguration(boolean value) {
- this.enableSharedConfiguration = (Boolean)checkAttribute(ENABLE_CLUSTER_CONFIGURATION_NAME, value);
+ this.enableSharedConfiguration = (Boolean)checkAttribute(ENABLE_CLUSTER_CONFIGURATION, value);
}
@Override
@@ -3209,7 +3209,7 @@ public class DistributionConfigImpl
@Override
public void setUseSharedConfiguration(boolean newValue) {
- this.useSharedConfiguration = (Boolean)checkAttribute(USE_CLUSTER_CONFIGURATION_NAME, newValue);
+ this.useSharedConfiguration = (Boolean)checkAttribute(USE_CLUSTER_CONFIGURATION, newValue);
}
@Override
@@ -3218,7 +3218,7 @@ public class DistributionConfigImpl
}
@Override
public void setLoadClusterConfigFromDir(boolean newValue) {
- this.loadSharedConfigurationFromDir = (Boolean)checkAttribute(LOAD_CLUSTER_CONFIG_FROM_DIR_NAME, newValue);
+ this.loadSharedConfigurationFromDir = (Boolean)checkAttribute(LOAD_CLUSTER_CONFIGURATION_FROM_DIR, newValue);
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 7bc65c8..8b9b307 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@ -71,8 +71,7 @@ import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.BIND_ADDRESS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Provides the implementation of a distribution <code>Locator</code>
@@ -541,7 +540,7 @@ public class InternalLocator extends Locator implements ConnectListener {
if (distributedSystemProperties != null) {
env.putAll(distributedSystemProperties);
}
- env.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "");
+ env.setProperty(CACHE_XML_FILE, "");
// create a DC so that all of the lookup rules, gemfire.properties, etc,
// are considered and we have a config object we can trust
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
index 010527f..ff95cef 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/RuntimeDistributionConfigImpl.java
@@ -59,21 +59,21 @@ public final class RuntimeDistributionConfigImpl
//////////////////// Configuration Methods ////////////////////
@Override
public void setLogLevel(int value) {
- this.logLevel = (Integer)checkAttribute(LOG_LEVEL_NAME, value);
- getAttSourceMap().put(LOG_LEVEL_NAME, ConfigSource.runtime());
+ this.logLevel = (Integer)checkAttribute(LOG_LEVEL, value);
+ getAttSourceMap().put(LOG_LEVEL, ConfigSource.runtime());
this.ds.getInternalLogWriter().setLogWriterLevel(value);
LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
}
@Override
public void setStatisticSamplingEnabled(boolean value) {
- this.statisticSamplingEnabled = (Boolean)checkAttribute(STATISTIC_SAMPLING_ENABLED_NAME, value);
- getAttSourceMap().put(STATISTIC_SAMPLING_ENABLED_NAME, ConfigSource.runtime());
+ this.statisticSamplingEnabled = (Boolean)checkAttribute(STATISTIC_SAMPLING_ENABLED, value);
+ getAttSourceMap().put(STATISTIC_SAMPLING_ENABLED, ConfigSource.runtime());
}
@Override
public void setStatisticSampleRate(int value) {
- value = (Integer)checkAttribute(STATISTIC_SAMPLE_RATE_NAME, value);
+ value = (Integer)checkAttribute(STATISTIC_SAMPLE_RATE, value);
if (value < DEFAULT_STATISTIC_SAMPLE_RATE) {
// fix 48228
this.ds.getLogWriter().info("Setting statistic-sample-rate to " + DEFAULT_STATISTIC_SAMPLE_RATE + " instead of the requested " + value + " because VSD does not work with sub-second sampling.");
@@ -84,7 +84,7 @@ public final class RuntimeDistributionConfigImpl
@Override
public void setStatisticArchiveFile(File value) {
- value = (File)checkAttribute(STATISTIC_ARCHIVE_FILE_NAME, value);
+ value = (File)checkAttribute(STATISTIC_ARCHIVE_FILE, value);
if (value == null) {
value = new File("");
}
@@ -94,33 +94,33 @@ public final class RuntimeDistributionConfigImpl
throw new IllegalArgumentException(ex.getMessage());
}
this.statisticArchiveFile = value;
- getAttSourceMap().put(STATISTIC_ARCHIVE_FILE_NAME, ConfigSource.runtime());
+ getAttSourceMap().put(STATISTIC_ARCHIVE_FILE, ConfigSource.runtime());
}
@Override
public void setArchiveDiskSpaceLimit(int value) {
- this.archiveDiskSpaceLimit = (Integer)checkAttribute(ARCHIVE_DISK_SPACE_LIMIT_NAME, value);
- getAttSourceMap().put(ARCHIVE_DISK_SPACE_LIMIT_NAME, ConfigSource.runtime());
+ this.archiveDiskSpaceLimit = (Integer)checkAttribute(ARCHIVE_DISK_SPACE_LIMIT, value);
+ getAttSourceMap().put(ARCHIVE_DISK_SPACE_LIMIT, ConfigSource.runtime());
}
@Override
public void setArchiveFileSizeLimit(int value) {
- this.archiveFileSizeLimit = (Integer)checkAttribute(ARCHIVE_FILE_SIZE_LIMIT_NAME, value);
- getAttSourceMap().put(ARCHIVE_FILE_SIZE_LIMIT_NAME, ConfigSource.runtime());
+ this.archiveFileSizeLimit = (Integer)checkAttribute(ARCHIVE_FILE_SIZE_LIMIT, value);
+ getAttSourceMap().put(ARCHIVE_FILE_SIZE_LIMIT, ConfigSource.runtime());
}
@Override
public void setLogDiskSpaceLimit(int value) {
- this.logDiskSpaceLimit = (Integer)checkAttribute(LOG_DISK_SPACE_LIMIT_NAME, value);
- getAttSourceMap().put(LOG_DISK_SPACE_LIMIT_NAME, ConfigSource.runtime());
+ this.logDiskSpaceLimit = (Integer)checkAttribute(LOG_DISK_SPACE_LIMIT, value);
+ getAttSourceMap().put(LOG_DISK_SPACE_LIMIT, ConfigSource.runtime());
LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
}
@Override
public void setLogFileSizeLimit(int value) {
- this.logFileSizeLimit = (Integer)checkAttribute(LOG_FILE_SIZE_LIMIT_NAME, value);
- getAttSourceMap().put(this.LOG_FILE_SIZE_LIMIT_NAME, ConfigSource.runtime());
+ this.logFileSizeLimit = (Integer)checkAttribute(LOG_FILE_SIZE_LIMIT, value);
+ getAttSourceMap().put(LOG_FILE_SIZE_LIMIT, ConfigSource.runtime());
LogWriterAppenders.configChanged(LogWriterAppenders.Identifier.MAIN);
}
@@ -129,9 +129,9 @@ public final class RuntimeDistributionConfigImpl
}
public List<String> getModifiableAttributes(){
- String[] modifiables = {HTTP_SERVICE_PORT_NAME,JMX_MANAGER_HTTP_PORT_NAME, ARCHIVE_DISK_SPACE_LIMIT_NAME,
- ARCHIVE_FILE_SIZE_LIMIT_NAME, LOG_DISK_SPACE_LIMIT_NAME, LOG_FILE_SIZE_LIMIT_NAME,
- LOG_LEVEL_NAME, STATISTIC_ARCHIVE_FILE_NAME, STATISTIC_SAMPLE_RATE_NAME, STATISTIC_SAMPLING_ENABLED_NAME};
+ String[] modifiables = {HTTP_SERVICE_PORT_NAME,JMX_MANAGER_HTTP_PORT_NAME, ARCHIVE_DISK_SPACE_LIMIT,
+ ARCHIVE_FILE_SIZE_LIMIT, LOG_DISK_SPACE_LIMIT, LOG_FILE_SIZE_LIMIT,
+ LOG_LEVEL, STATISTIC_ARCHIVE_FILE, STATISTIC_SAMPLE_RATE, STATISTIC_SAMPLING_ENABLED};
return Arrays.asList(modifiables);
};
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
index 964f741..c6558fd 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/AbstractConfig.java
@@ -29,6 +29,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Provides an implementation of the {@link Config} interface
* that implements functionality that all {@link Config} implementations
@@ -207,13 +208,13 @@ public abstract class AbstractConfig implements Config {
}
public boolean isDeprecated(String attName) {
- if (attName.equals(DistributionConfig.SSL_CIPHERS_NAME)) {
+ if (attName.equals(SSL_CIPHERS)) {
return true;
- } else if (attName.equals(DistributionConfig.SSL_ENABLED_NAME)) {
+ } else if (attName.equals(SSL_ENABLED)) {
return true;
- } else if (attName.equals(DistributionConfig.SSL_PROTOCOLS_NAME)) {
+ } else if (attName.equals(SSL_PROTOCOLS)) {
return true;
- } else if (attName.equals(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME)) {
+ } else if (attName.equals(SSL_REQUIRE_AUTHENTICATION)) {
return true;
} else if (attName.equals(DistributionConfig.JMX_MANAGER_SSL_NAME)) {
return true;
@@ -304,7 +305,7 @@ public abstract class AbstractConfig implements Config {
return (String)result;
}
- if (attName.equalsIgnoreCase(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME)) {
+ if (attName.equalsIgnoreCase(MEMBERSHIP_PORT_RANGE)) {
int[] value = (int[])result;
return ""+value[0]+"-"+value[1];
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
index 0e80a28..cd35e53 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationClient.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
@@ -158,9 +160,9 @@ public class MigrationClient {
&& System.getProperty(DistributionConfig.GEMFIRE_PREFIX + LOCATORS) == null) {
dsProps.put(MCAST_PORT, "0");
}
- dsProps.put(DistributionConfig.LOG_FILE_NAME, "migrationClient.log");
+ dsProps.put(LOG_FILE, "migrationClient.log");
if (this.cacheXmlFile != null) {
- dsProps.put(DistributionConfig.CACHE_XML_FILE_NAME, this.cacheXmlFile.getName());
+ dsProps.put(CACHE_XML_FILE, this.cacheXmlFile.getName());
}
this.distributedSystem = DistributedSystem.connect(dsProps);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
index 6c9fa73..a611d39 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/MigrationServer.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.admin.internal.InetAddressUtil;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -208,9 +210,9 @@ public class MigrationServer {
&& System.getProperty(DistributionConfig.GEMFIRE_PREFIX + LOCATORS) == null) {
dsProps.put(MCAST_PORT, "0");
}
- dsProps.put(DistributionConfig.LOG_FILE_NAME, "migrationServer.log");
+ dsProps.put(LOG_FILE, "migrationServer.log");
if (this.cacheXmlFile != null) {
- dsProps.put(DistributionConfig.CACHE_XML_FILE_NAME, this.cacheXmlFile.getName());
+ dsProps.put(CACHE_XML_FILE, this.cacheXmlFile.getName());
}
this.distributedSystem = DistributedSystem.connect(dsProps);
if (VERBOSE) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
index d3220b8..8f1ad81 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/SystemAdmin.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.*;
import com.gemstone.gemfire.admin.AdminException;
import com.gemstone.gemfire.admin.BackupStatus;
@@ -457,7 +459,7 @@ public class SystemAdmin {
private static InternalDistributedSystem getAdminCnx() {
InternalDistributedSystem.setCommandLineAdmin(true);
Properties props = propertyOption;
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "warning");
+ props.setProperty(LOG_LEVEL, "warning");
DistributionConfigImpl dsc = new DistributionConfigImpl(props);
System.out.print("Connecting to distributed system:");
if (!"".equals(dsc.getLocators())) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
index 97d907a..213653e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/SSLConfig.java
@@ -18,6 +18,8 @@ package com.gemstone.gemfire.internal.admin;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import java.util.Iterator;
import java.util.Properties;
@@ -113,15 +115,15 @@ public class SSLConfig {
* @since GemFire 4.0
*/
public void toDSProperties(Properties props) {
- props.setProperty(DistributionConfig.SSL_ENABLED_NAME,
+ props.setProperty(SSL_ENABLED,
String.valueOf(this.enabled));
if (this.enabled) {
- props.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME,
+ props.setProperty(SSL_PROTOCOLS,
this.protocols);
- props.setProperty(DistributionConfig.SSL_CIPHERS_NAME,
+ props.setProperty(SSL_CIPHERS,
this.ciphers);
- props.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME,
+ props.setProperty(SSL_REQUIRE_AUTHENTICATION,
String.valueOf(this.requireAuth));
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
index 3e4ddf1..696f322 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/RemoteTransportConfig.java
@@ -264,7 +264,7 @@ public class RemoteTransportConfig implements TransportConfig {
bindAddress);
// System.out.println("entering ds port range property of " + this.membershipPortRange);
if (this.membershipPortRange != null) {
- props.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME, this.membershipPortRange);
+ props.setProperty(MEMBERSHIP_PORT_RANGE, this.membershipPortRange);
}
if (this.tcpPort != 0) {
props.setProperty(TCP_PORT, String.valueOf(this.tcpPort));
@@ -309,7 +309,7 @@ public class RemoteTransportConfig implements TransportConfig {
this.sslConfig.toDSProperties(props);
- props.setProperty(DistributionConfig.DISABLE_TCP_NAME,
+ props.setProperty(DISABLE_TCP,
this.tcpDisabled? "true" : "false");
props.setProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, this.disableAutoReconnect? "true" : "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
index d3365e8..c04ae48 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/CacheServerLauncher.java
@@ -43,6 +43,7 @@ import java.net.URL;
import java.util.*;
import java.util.concurrent.TimeUnit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOG_FILE;
import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.SERVER_BIND_ADDRESS;
/**
@@ -658,15 +659,15 @@ public class CacheServerLauncher {
// properly configure logging, the declarative caching file, etc.
final Properties props = (Properties) options.get(PROPERTIES);
- if (props.getProperty(DistributionConfig.LOG_FILE_NAME) == null && CacheServerLauncher.isLoggingToStdOut()) {
+ if (props.getProperty(LOG_FILE) == null && CacheServerLauncher.isLoggingToStdOut()) {
// Check First if the gemfire.properties set the log-file. If they do, we shouldn't override that default
final Properties gemfireProperties = new Properties();
DistributionConfigImpl.loadGemFireProperties(gemfireProperties);
- if (gemfireProperties.get(DistributionConfig.LOG_FILE_NAME) == null) {
+ if (gemfireProperties.get(LOG_FILE) == null) {
// Do not allow the cache server to log to stdout, override the logger with #defaultLogFileName
- props.setProperty(DistributionConfig.LOG_FILE_NAME, defaultLogFileName);
+ props.setProperty(LOG_FILE, defaultLogFileName);
}
}
@@ -1196,7 +1197,7 @@ public class CacheServerLauncher {
/**
* Reads {@link DistributedSystem#PROPERTY_FILE} and determines if the
- * {@link DistributionConfig#LOG_FILE_NAME} property is set to stdout
+ * {@link SystemConfigurationProperties#LOG_FILE} property is set to stdout
* @return true if the logging would go to stdout
*/
private static boolean isLoggingToStdOut() {
@@ -1210,7 +1211,7 @@ public class CacheServerLauncher {
System.out.println("Failed reading " + url);
System.exit( 1 );
}
- final String logFile = gfprops.getProperty(DistributionConfig.LOG_FILE_NAME);
+ final String logFile = gfprops.getProperty(LOG_FILE);
if ( logFile == null || logFile.length() == 0 ) {
return true;
}
@@ -1262,9 +1263,9 @@ public class CacheServerLauncher {
commandLineWrapper.add(key + "=" + props.getProperty(key.toString()));
}
- if (props.getProperty(DistributionConfig.LOG_FILE_NAME) == null && CacheServerLauncher.isLoggingToStdOut()) {
+ if (props.getProperty(LOG_FILE) == null && CacheServerLauncher.isLoggingToStdOut()) {
// Do not allow the cache server to log to stdout; override the logger with #defaultLogFileName
- commandLineWrapper.add(DistributionConfig.LOG_FILE_NAME + "=" + defaultLogFileName);
+ commandLineWrapper.add(LOG_FILE + "=" + defaultLogFileName);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
index f010ca9..4c6ea10 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskStoreImpl.java
@@ -72,8 +72,7 @@ import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Represents a (disk-based) persistent store for region data. Used for both
@@ -4358,7 +4357,7 @@ public class DiskStoreImpl implements DiskStore {
Properties props = new Properties();
props.setProperty(LOCATORS, "");
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "");
+ props.setProperty(CACHE_XML_FILE, "");
DistributedSystem ds = DistributedSystem.connect(props);
offlineDS = ds;
Cache c = com.gemstone.gemfire.cache.CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
index d4c291f..ade09ee 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
@@ -32,6 +32,8 @@ import org.apache.logging.log4j.Logger;
import java.io.*;
import java.util.Arrays;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This class represents a ConnectionProxy of the CacheClient
*
@@ -202,7 +204,7 @@ public final class ClientProxyMembershipID
private ClientProxyMembershipID(int id, byte[] clientSideIdentity) {
Boolean specialCase = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE");
- String durableID = this.system.getProperties().getProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME);
+ String durableID = this.system.getProperties().getProperty(DURABLE_CLIENT_ID);
if (specialCase.booleanValue() && durableID != null && (!durableID.equals(""))) {
this.uniqueId = durable_synch_counter;
} else {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
index 4ea34f5..8c2fda7 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
@@ -56,6 +56,8 @@ import java.security.cert.X509Certificate;
import java.security.spec.X509EncodedKeySpec;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class HandShake implements ClientHandShake
{
private static final Logger logger = LogService.getLogger();
@@ -344,8 +346,7 @@ public class HandShake implements ClientHandShake
private byte setClientConflation() {
byte result = CONFLATION_DEFAULT;
- String clientConflationValue = this.system.getProperties().getProperty(
- DistributionConfig.CLIENT_CONFLATION_PROP_NAME);
+ String clientConflationValue = this.system.getProperties().getProperty(CONFLATE_EVENTS);
if (DistributionConfig.CLIENT_CONFLATION_PROP_VALUE_ON
.equalsIgnoreCase(clientConflationValue)) {
result = CONFLATION_ON;
@@ -480,8 +481,7 @@ public class HandShake implements ClientHandShake
writeCredentials(dos, dis, p_credentials, ports != null, member, hdos);
}
} else {
- String authInitMethod = this.system.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME);
+ String authInitMethod = this.system.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT);
acceptanceCode = writeCredential(dos, dis, authInitMethod,
ports != null, member, hdos);
}
@@ -1252,8 +1252,7 @@ public class HandShake implements ClientHandShake
REPLY_OK, this.clientReadTimeout, null, this.credentials, member,
false);
- String authInit = this.system.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME);
+ String authInit = this.system.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT);
if (communicationMode != Acceptor.GATEWAY_TO_GATEWAY
&& intermediateAcceptanceCode != REPLY_AUTH_NOT_REQUIRED
&& (authInit != null && authInit.length() != 0)) {
@@ -1593,8 +1592,7 @@ public class HandShake implements ClientHandShake
private Properties getCredentials(DistributedMember member) {
- String authInitMethod = this.system.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME);
+ String authInitMethod = this.system.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT);
return getCredentials(authInitMethod, this.system.getSecurityProperties(),
member, false, (InternalLogWriter)this.system.getLogWriter(),
(InternalLogWriter)this.system.getSecurityLogWriter());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
index e3c5438..5cd1849 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.internal.cache.xmlcache;
import com.gemstone.gemfire.cache.CacheXmlException;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -691,7 +692,7 @@ public abstract class CacheXml implements EntityResolver2, ErrorHandler {
/** The name of the <code>overflow-directory</code> attribute */
protected static final String OVERFLOW_DIRECTORY = "overflow-directory";
/** The name of the <code>socket-buffer-size</code> attribute */
- protected static final String SOCKET_BUFFER_SIZE = DistributionConfig.SOCKET_BUFFER_SIZE_NAME;
+ protected static final String SOCKET_BUFFER_SIZE = SystemConfigurationProperties.SOCKET_BUFFER_SIZE;
/** The name of the <code>socket-read-timeout</code> attribute */
protected static final String SOCKET_READ_TIMEOUT = "socket-read-timeout";
/** The name of the <code>maximum-queue-memory</code> attribute */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
index cdc5e81..27f5302 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.logging;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
@@ -71,7 +73,7 @@ public class LogWriterFactory {
} else {
boolean defaultSource = false;
if (config instanceof DistributionConfig) {
- ConfigSource source = ((DistributionConfig) config).getConfigSource(DistributionConfig.LOG_LEVEL_NAME);
+ ConfigSource source = ((DistributionConfig) config).getConfigSource(LOG_LEVEL);
if (source == null) {
defaultSource = true;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
index 690280b..ac28941 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
@@ -16,6 +16,7 @@
*/
package com.gemstone.gemfire.management.internal.cli;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.management.cli.CliMetaData;
@@ -47,7 +48,7 @@ public class CommandManager {
private static final Object INSTANCE_LOCK = new Object();
private static CommandManager INSTANCE = null;
- public static final String USER_CMD_PACKAGES_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.USER_COMMAND_PACKAGES;
+ public static final String USER_CMD_PACKAGES_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.USER_COMMAND_PACKAGES;
public static final String USER_CMD_PACKAGES_ENV_VARIABLE = "GEMFIRE_USER_COMMAND_PACKAGES";
private Properties cacheProperties;
@@ -92,7 +93,7 @@ public class CommandManager {
// Find by packages specified in the distribution config
if (this.cacheProperties != null) {
- String cacheUserCmdPackages = this.cacheProperties.getProperty(DistributionConfig.USER_COMMAND_PACKAGES);
+ String cacheUserCmdPackages = this.cacheProperties.getProperty(SystemConfigurationProperties.USER_COMMAND_PACKAGES);
if (cacheUserCmdPackages != null && !cacheUserCmdPackages.isEmpty()) {
StringTokenizer tokenizer = new StringTokenizer(cacheUserCmdPackages, ",");
while (tokenizer.hasMoreTokens()) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
index 4ba8c36..6bc2882 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
@@ -16,12 +16,13 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
import com.gemstone.gemfire.cache.execute.ResultCollector;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.xmlcache.CacheXml;
import com.gemstone.gemfire.management.cli.CliMetaData;
import com.gemstone.gemfire.management.cli.ConverterHint;
@@ -324,7 +325,7 @@ public class ConfigCommands implements CommandMarker {
}
if (statisticSamplingEnabled != null) {
- runTimeDistributionConfigAttributes.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, statisticSamplingEnabled.toString());
+ runTimeDistributionConfigAttributes.put(STATISTIC_SAMPLING_ENABLED, statisticSamplingEnabled.toString());
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
index 4aec26d..d1ca03a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
@@ -97,8 +97,7 @@ import java.security.KeyStore;
import java.util.*;
import java.util.Map.Entry;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -415,8 +414,8 @@ public class ShellCommands implements CommandMarker {
String truststorePasswordToUse = sslConfigProps.get(Gfsh.SSL_TRUSTSTORE_PASSWORD);
// Ciphers are not passed to HttpsURLConnection. Could not find a clean way
// to pass this attribute to socket layer (see #51645)
- String sslCiphersToUse = sslConfigProps.get(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME);
- String sslProtocolsToUse = sslConfigProps.get(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME);
+ String sslCiphersToUse = sslConfigProps.get(CLUSTER_SSL_CIPHERS);
+ String sslProtocolsToUse = sslConfigProps.get(CLUSTER_SSL_PROTOCOLS);
//Commenting the code to set cipher suites in GFSH rest connect (see #51645)
/*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
index 3dd0eb5..4977649 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/ChangeLogLevelFunction.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.functions;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.execute.Function;
@@ -56,7 +58,7 @@ public class ChangeLogLevelFunction implements Function, InternalEntity {
final String logLevel = (String) args[0];
Level log4jLevel = LogWriterLogger.logWriterNametoLog4jLevel(logLevel);
logwriterLogger.setLevel(log4jLevel);
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, logLevel);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, logLevel);
// LOG:CONFIG:
logger.info(LogMarker.CONFIG, "GFSH Changed log level to {}", log4jLevel);
result.put(cache.getDistributedSystem().getDistributedMember().getId(), "New log level is " + log4jLevel);
[11/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
index d62addf..4fb939c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConflationDUnitTest.java
@@ -16,40 +16,25 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.HARegion;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.ha.HAHelper;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This test verifies the conflation functionality of the
@@ -222,8 +207,8 @@ public class ConflationDUnitTest extends DistributedTestCase
*/
private static Properties createProperties1(){
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConnectionProxyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConnectionProxyJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConnectionProxyJUnitTest.java
index 6631382..47d82a4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConnectionProxyJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ConnectionProxyJUnitTest.java
@@ -20,26 +20,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
@@ -49,7 +30,6 @@ import com.gemstone.gemfire.cache.client.internal.QueueStateImpl.SequenceIdAndEx
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.internal.cache.EventID;
@@ -57,6 +37,17 @@ import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -82,8 +73,8 @@ public class ConnectionProxyJUnitTest
{
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
this.system = DistributedSystem.connect(p);
this.cache = CacheFactory.create(system);
final String addExpectedPEM =
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
index d475224..d469ec2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DataSerializerPropogationDUnitTest.java
@@ -16,47 +16,30 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map.Entry;
-import java.util.Properties;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.TestDataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.InternalDataSerializer.SerializerAttributesHolder;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.StoppableWaitCriterion;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
@@ -114,8 +97,8 @@ public class DataSerializerPropogationDUnitTest extends DistributedTestCase {
public static void createClientCache(String host, Integer port1)
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new DataSerializerPropogationDUnitTest("temp").createCache(props);
Pool p = PoolManager.createFactory().addServer(host, port1.intValue())
.setMinConnections(1).setSubscriptionEnabled(true).setPingInterval(200)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
index 9a7d5a4..cf1102a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DestroyEntryPropagationDUnitTest.java
@@ -16,46 +16,31 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-import util.TestException;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.Connection;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.EventIDHolder;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
-import com.gemstone.gemfire.cache.client.internal.Connection;
-import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+import util.TestException;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests propagation of destroy entry operation across the vms
@@ -410,8 +395,8 @@ public class DestroyEntryPropagationDUnitTest extends DistributedTestCase {
int PORT1 = port1.intValue();
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new DestroyEntryPropagationDUnitTest("temp").createCache(props);
CacheServerTestUtil.disableShufflingOfEndpoints();
Pool p;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
index 70db594..77f71fb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
@@ -16,28 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.IOException;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.NoAvailableServersException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class DurableClientBug39997DUnitTest extends CacheTestCase {
@@ -124,9 +116,9 @@ public class DurableClientBug39997DUnitTest extends CacheTestCase {
public Properties getClientProperties() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("durable-client-id", "my_id");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, "my_id");
return props;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
index be2eb8b..9e0ec93 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
@@ -16,29 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
*
@@ -258,8 +252,8 @@ public class DurableClientQueueSizeDUnitTest extends DistributedTestCase {
public static Integer createCacheServer(Integer serverPort)
throws Exception {
Properties props = new Properties();
- props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
-// props.setProperty("log-level", "fine");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+ // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
// props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
// props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
// + ".gfs");
@@ -300,14 +294,14 @@ public class DurableClientQueueSizeDUnitTest extends DistributedTestCase {
}
public static void setSpecialDurable(Boolean bool) {
- System.setProperty("gemfire.SPECIAL_DURABLE", bool.toString());
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE", bool.toString());
}
@SuppressWarnings("deprecation")
public static void createClientCache(Host host, Integer[] ports,
String timeoutSeconds, Boolean durable, Boolean multiPool) throws Exception {
if (multiPool) {
- System.setProperty("gemfire.SPECIAL_DURABLE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE", "true");
}
Properties props = new Properties();
if (durable) {
@@ -317,7 +311,7 @@ public class DurableClientQueueSizeDUnitTest extends DistributedTestCase {
timeoutSeconds);
}
// props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
-// props.setProperty("log-level", "fine");
+ // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
// props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
// + ".gfs");
// props.setProperty("statistic-sampling-enabled", "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
index 5fcdd67..5f958d7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
@@ -16,23 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.net.SocketException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
@@ -43,15 +27,13 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.net.SocketException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
@@ -113,7 +95,7 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
SERVER4 = NetworkUtils.getServerHostName(host)+PORT4;
//CacheServerTestUtil.disableShufflingOfEndpoints();
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "false");
}
public void testDurableReconnectSingleServer() throws Exception
@@ -721,8 +703,8 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
private Properties getClientDistributedSystemProperties(
String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
return properties;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
index 5ff4269..238bbc0 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
@@ -16,26 +16,25 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.Properties;
-import java.util.concurrent.RejectedExecutionException;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.InterestResultPolicy;
import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.Properties;
+import java.util.concurrent.RejectedExecutionException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -360,8 +359,8 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
private Properties getDurableClientDistributedSystemProperties(
String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
@@ -372,8 +371,8 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
private Properties getNonDurableClientDistributedSystemProperties(
String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
return properties;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
index 1273603..aeaaeec 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
@@ -16,37 +16,26 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.MirrorType;
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.FilterProfile;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InitialImageOperation;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -723,8 +712,8 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
private Properties getClientDistributedSystemProperties(
String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
index ed9236b..ebc4dca 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
@@ -16,25 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -469,8 +466,8 @@ public class DurableResponseMatrixDUnitTest extends DistributedTestCase
String durableClientId, int durableClientTimeout)
{
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
index 058dbb7..d6f9a07 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/EventIDVerificationDUnitTest.java
@@ -16,37 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.CacheObserverAdapter;
-import com.gemstone.gemfire.internal.cache.CacheObserverHolder;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.RegionEventImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test to verify EventID generated from Cache Client is correctly passed on to
@@ -163,8 +146,8 @@ public class EventIDVerificationDUnitTest extends DistributedTestCase
PORT1 = port1.intValue();
PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new EventIDVerificationDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
index 4e06093..9271285 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
@@ -16,13 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
/**
* Runs force invalidate eviction tests with off-heap regions.
* @since Geode 1.0
@@ -51,8 +51,8 @@ public class ForceInvalidateOffHeapEvictionDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
- Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ Properties properties = super.getDistributedSystemProperties();
+ properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
index 4edbc98..4b84a11 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAInterestTestCase.java
@@ -16,14 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
@@ -31,31 +24,20 @@ import com.gemstone.gemfire.cache.client.internal.RegisterInterestTracker;
import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.tier.InterestType;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.test.dunit.*;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
+import java.util.*;
-import org.junit.experimental.categories.Category;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests Interest Registration Functionality
@@ -890,8 +872,8 @@ public class HAInterestTestCase extends DistributedTestCase {
public static void createClientPoolCache(String testName, String host) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAInterestTestCase("temp").createCache(props);
CacheServerTestUtil.disableShufflingOfEndpoints();
PoolImpl p;
@@ -924,8 +906,8 @@ public class HAInterestTestCase extends DistributedTestCase {
public static void createClientPoolCacheWithSmallRetryInterval(String testName, String host) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAInterestTestCase("temp").createCache(props);
CacheServerTestUtil.disableShufflingOfEndpoints();
PoolImpl p;
@@ -959,8 +941,8 @@ public class HAInterestTestCase extends DistributedTestCase {
public static void createClientPoolCacheConnectionToSingleServer(String testName, String hostName) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAInterestTestCase("temp").createCache(props);
PoolImpl p = (PoolImpl) PoolManager.createFactory()
.addServer(hostName, PORT1)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
index 1068534..57dcd6c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/HAStartupAndFailoverDUnitTest.java
@@ -16,42 +16,29 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.Connection;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.jayway.awaitility.Awaitility;
+import org.junit.experimental.categories.Category;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test to verify Startup. and failover during startup.
@@ -548,8 +535,8 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase {
public static void createClientCache(String testName, String host) throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAStartupAndFailoverDUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, PORT1.intValue())
@@ -577,8 +564,8 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase {
public static void createClientCacheWithLargeRetryInterval(String testName, String host) throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAStartupAndFailoverDUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, PORT1.intValue())
@@ -608,8 +595,8 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase {
String testName, String host) throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAStartupAndFailoverDUnitTest("temp").createCache(props);
CacheServerTestUtil.disableShufflingOfEndpoints();
@@ -646,8 +633,8 @@ public class HAStartupAndFailoverDUnitTest extends DistributedTestCase {
public static void createClientCacheWithIncorrectPrimary(String testName, String host) throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new HAStartupAndFailoverDUnitTest("temp").createCache(props);
final int INCORRECT_PORT = 1;
PoolImpl p = (PoolImpl)PoolManager.createFactory()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
index 36ba531..4aedd58 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InstantiatorPropagationDUnitTest.java
@@ -16,45 +16,32 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.*;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.Random;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.Instantiator;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.InternalInstantiator;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Random;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.DistributedTestUtils.unregisterInstantiatorsInThisVM;
public class InstantiatorPropagationDUnitTest extends DistributedTestCase {
private static Cache cache = null;
@@ -112,8 +99,8 @@ public class InstantiatorPropagationDUnitTest extends DistributedTestCase {
public static void createClientCache(String host, Integer port1)
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new InstantiatorPropagationDUnitTest("temp").createCache(props);
Pool p = PoolManager.createFactory().addServer(host, port1.intValue())
.setMinConnections(1).setSubscriptionEnabled(true).setPingInterval(200)
@@ -746,8 +733,8 @@ public class InstantiatorPropagationDUnitTest extends DistributedTestCase {
public static void createClientCache_EventId(String host, Integer port1) throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new InstantiatorPropagationDUnitTest("temp").createCache(props);
Pool p = PoolManager.createFactory()
.addServer(host, port1.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
index 2f374d7..7014582 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
@@ -16,30 +16,10 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import junit.framework.AssertionFailedError;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.ClientSession;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestRegistrationEvent;
-import com.gemstone.gemfire.cache.InterestRegistrationListener;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedMember;
@@ -47,18 +27,17 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException;
+import com.gemstone.gemfire.test.dunit.*;
+import junit.framework.AssertionFailedError;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test Scenario :
@@ -520,8 +499,8 @@ public class InterestListDUnitTest extends DistributedTestCase
int port, int port2) throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
new InterestListDUnitTest("temp").createCache(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListEndpointDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListEndpointDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListEndpointDUnitTest.java
index eddffcb..34b43d6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListEndpointDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListEndpointDUnitTest.java
@@ -16,23 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Properties;
-
-import junit.framework.Assert;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
@@ -41,17 +25,17 @@ import com.gemstone.gemfire.cache.client.internal.QueueConnectionImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import junit.framework.Assert;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -321,8 +305,8 @@ public class InterestListEndpointDUnitTest extends DistributedTestCase
{
CacheServerTestUtil.disableShufflingOfEndpoints();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new InterestListEndpointDUnitTest("temp").createCache(props);
Pool p;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
index d202a19..facc6d1 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListRecoveryDUnitTest.java
@@ -16,39 +16,28 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.EOFException;
-import java.net.SocketException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.client.internal.RegisterInterestTracker;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.client.internal.RegisterInterestTracker;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.EOFException;
+import java.net.SocketException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -202,8 +191,8 @@ public class InterestListRecoveryDUnitTest extends DistributedTestCase
InterestListRecoveryDUnitTest test = new InterestListRecoveryDUnitTest(
"temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = test.createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, port1.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
index c87e33d..c0d132d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
@@ -16,34 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.ClientSession;
-import com.gemstone.gemfire.cache.InterestRegistrationEvent;
-import com.gemstone.gemfire.cache.InterestRegistrationListener;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
/**
* Written to test fix for Bug #47132
@@ -180,8 +168,8 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
public void setUpClientVM(String host, int port, boolean isDurable, String vmID) {
Properties gemFireProps = new Properties();
if (isDurable) {
- gemFireProps.put("durable-client-id", vmID);
- gemFireProps.put("durable-client-timeout", ""+DURABLE_CLIENT_TIMEOUT);
+ gemFireProps.put(DistributionConfig.DURABLE_CLIENT_ID_NAME, vmID);
+ gemFireProps.put(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + DURABLE_CLIENT_TIMEOUT);
}
ClientCacheFactory clientCacheFactory = new ClientCacheFactory(gemFireProps);
clientCacheFactory.addPoolServer(host, port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
index ac2b1ee..2234634 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestResultPolicyDUnitTest.java
@@ -16,31 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.ServerConnectivityException;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* DUnit Test for use-cases of various {@link InterestResultPolicy} types.
@@ -291,8 +282,8 @@ public class InterestResultPolicyDUnitTest extends DistributedTestCase
InterestResultPolicyDUnitTest test = new InterestResultPolicyDUnitTest(
"temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = test.createCache(props);
Pool p = PoolManager.createFactory()
.addServer(host, port.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
index fdc6e1c..f61cc2c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
@@ -16,15 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
@@ -32,9 +23,18 @@ import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.cache.tier.ConnectionProxy;
-import com.gemstone.gemfire.util.test.TestUtil;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
/**
* Tests the proper intialization of redundancyLevel property.
@@ -93,8 +93,8 @@ public class RedundancyLevelJUnitTest
String path = TestUtil.getResourcePath(getClass(), "RedundancyLevelJUnitTest.xml");
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
p.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
final String addExpected =
"<ExpectedException action=add>" + expected + "</ExpectedException>";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
index 285d200..edfa3e2 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelTestBase.java
@@ -16,20 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.RegisterInterestTracker;
@@ -37,18 +24,16 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.ClientServerObserver;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests Redundancy Level Functionality
@@ -547,8 +532,8 @@ public class RedundancyLevelTestBase extends DistributedTestCase
}
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new RedundancyLevelTestBase("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
index 65b46d5..0d231d6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegionCloseDUnitTest.java
@@ -16,30 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.*;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test to verify that client side region.close() should unregister the client with the server.
@@ -103,8 +93,8 @@ public class RegionCloseDUnitTest extends DistributedTestCase
{
int PORT1 = port1.intValue() ;
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new RegionCloseDUnitTest("temp").createCache(props);
Pool p = PoolManager.createFactory()
.addServer(host, PORT1)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
index b1d4a8a..dad45f5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestBeforeRegionCreationDUnitTest.java
@@ -16,30 +16,21 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.internal.cache.CacheObserverAdapter;
import com.gemstone.gemfire.internal.cache.CacheObserverHolder;
-import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This test tests the scenario whereby a register interest has been called before
@@ -237,8 +228,8 @@ public class RegisterInterestBeforeRegionCreationDUnitTest extends DistributedTe
{
PORT1 = port1.intValue();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new RegisterInterestBeforeRegionCreationDUnitTest("temp").createCache(props);
Pool p = PoolManager.createFactory()
.addServer(host, PORT1)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
index 1a3d81f..b3c5506 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RegisterInterestKeysDUnitTest.java
@@ -16,21 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.*;
-
import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test code copied from UpdatePropagationDUnitTest
@@ -147,8 +146,8 @@ public class RegisterInterestKeysDUnitTest extends DistributedTestCase
int PORT1 = port1.intValue() ;
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new RegisterInterestKeysDUnitTest("temp").createCache(props);
CacheServerTestUtil.disableShufflingOfEndpoints();
Pool p;
[47/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
index 59ec773..8200961 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
@@ -16,7 +16,6 @@
*/
package com.gemstone.gemfire.internal;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import junit.framework.AssertionFailedError;
@@ -27,7 +26,7 @@ import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -58,48 +57,48 @@ public class SSLConfigJUnitTest {
SSL_PROPS_MAP.put("javax.net.ssl.trustStorePassword", "gemfire-trust-password");
// SSL Properties for GemFire in-cluster connections
- CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME, "jks");
- CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gemfire.keystore");
- CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME, "gemfire-key-password");
- CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gemfire.truststore");
- CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME, "gemfire-trust-password");
+ CLUSTER_SSL_PROPS_MAP.put(CLUSTER_SSL_KEYSTORE_TYPE, "jks");
+ CLUSTER_SSL_PROPS_MAP.put(CLUSTER_SSL_KEYSTORE, "/export/gemfire-configs/gemfire.keystore");
+ CLUSTER_SSL_PROPS_MAP.put(CLUSTER_SSL_KEYSTORE_PASSWORD, "gemfire-key-password");
+ CLUSTER_SSL_PROPS_MAP.put(CLUSTER_SSL_TRUSTSTORE, "/export/gemfire-configs/gemfire.truststore");
+ CLUSTER_SSL_PROPS_MAP.put(CLUSTER_SSL_TRUSTSTORE_PASSWORD, "gemfire-trust-password");
// Partially over-ridden SSL Properties for cluster
- CLUSTER_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gemfire.keystore");
- CLUSTER_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gemfire.truststore");
+ CLUSTER_SSL_PROPS_SUBSET_MAP.put(CLUSTER_SSL_KEYSTORE, "/export/gemfire-configs/gemfire.keystore");
+ CLUSTER_SSL_PROPS_SUBSET_MAP.put(CLUSTER_SSL_TRUSTSTORE, "/export/gemfire-configs/gemfire.truststore");
// SSL Properties for GemFire JMX Manager connections
- JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME, "jks");
- JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/manager.keystore");
- JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME, "manager-key-password");
- JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/manager.truststore");
- JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME, "manager-trust-password");
+ JMX_SSL_PROPS_MAP.put(JMX_MANAGER_SSL_KEYSTORE_TYPE, "jks");
+ JMX_SSL_PROPS_MAP.put(JMX_MANAGER_SSL_KEYSTORE, "/export/gemfire-configs/manager.keystore");
+ JMX_SSL_PROPS_MAP.put(JMX_MANAGER_SSL_KEYSTORE_PASSWORD, "manager-key-password");
+ JMX_SSL_PROPS_MAP.put(JMX_MANAGER_SSL_TRUSTSTORE, "/export/gemfire-configs/manager.truststore");
+ JMX_SSL_PROPS_MAP.put(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD, "manager-trust-password");
// SSL Properties for GemFire CacheServer connections
- SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks");
- SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/cacheserver.keystore");
- SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "cacheserver-key-password");
- SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/cacheserver.truststore");
- SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "cacheserver-trust-password");
+ SERVER_SSL_PROPS_MAP.put(SERVER_SSL_KEYSTORE_TYPE, "jks");
+ SERVER_SSL_PROPS_MAP.put(SERVER_SSL_KEYSTORE, "/export/gemfire-configs/cacheserver.keystore");
+ SERVER_SSL_PROPS_MAP.put(SERVER_SSL_KEYSTORE_PASSWORD, "cacheserver-key-password");
+ SERVER_SSL_PROPS_MAP.put(SERVER_SSL_TRUSTSTORE, "/export/gemfire-configs/cacheserver.truststore");
+ SERVER_SSL_PROPS_MAP.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "cacheserver-trust-password");
// SSL Properties for GemFire gateway connections
- GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_TYPE_NAME, "jks");
- GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gateway.keystore");
- GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_PASSWORD_NAME, "gateway-key-password");
- GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gateway.truststore");
- GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, "gateway-trust-password");
+ GATEWAY_SSL_PROPS_MAP.put(GATEWAY_SSL_KEYSTORE_TYPE, "jks");
+ GATEWAY_SSL_PROPS_MAP.put(GATEWAY_SSL_KEYSTORE, "/export/gemfire-configs/gateway.keystore");
+ GATEWAY_SSL_PROPS_MAP.put(GATEWAY_SSL_KEYSTORE_PASSWORD, "gateway-key-password");
+ GATEWAY_SSL_PROPS_MAP.put(GATEWAY_SSL_TRUSTSTORE, "/export/gemfire-configs/gateway.truststore");
+ GATEWAY_SSL_PROPS_MAP.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD, "gateway-trust-password");
// Partially over-ridden SSL Properties for GemFire JMX Manager connections
- JMX_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/manager.keystore");
- JMX_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/manager.truststore");
+ JMX_SSL_PROPS_SUBSET_MAP.put(JMX_MANAGER_SSL_KEYSTORE, "/export/gemfire-configs/manager.keystore");
+ JMX_SSL_PROPS_SUBSET_MAP.put(JMX_MANAGER_SSL_TRUSTSTORE, "/export/gemfire-configs/manager.truststore");
// Partially over-ridden SSL Properties for GemFire JMX Manager connections
- SERVER_PROPS_SUBSET_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/cacheserver.keystore");
- SERVER_PROPS_SUBSET_MAP.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/cacheserver.truststore");
+ SERVER_PROPS_SUBSET_MAP.put(SERVER_SSL_KEYSTORE, "/export/gemfire-configs/cacheserver.keystore");
+ SERVER_PROPS_SUBSET_MAP.put(SERVER_SSL_TRUSTSTORE, "/export/gemfire-configs/cacheserver.truststore");
// Partially over-ridden SSL Properties for GemFire JMX Manager connections
- GATEWAY_PROPS_SUBSET_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gateway.keystore");
- GATEWAY_PROPS_SUBSET_MAP.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gateway.truststore");
+ GATEWAY_PROPS_SUBSET_MAP.put(GATEWAY_SSL_KEYSTORE, "/export/gemfire-configs/gateway.keystore");
+ GATEWAY_PROPS_SUBSET_MAP.put(GATEWAY_SSL_TRUSTSTORE, "/export/gemfire-configs/gateway.truststore");
}
@@ -109,7 +108,7 @@ public class SSLConfigJUnitTest {
public void testMCastPortWithSSL() throws Exception {
Properties props = new Properties( );
// default mcast-port is not 0.
- props.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
+ props.setProperty(SSL_ENABLED, "true");
try {
new DistributionConfigImpl( props );
@@ -127,7 +126,7 @@ public class SSLConfigJUnitTest {
public void testMCastPortWithClusterSSL() throws Exception {
Properties props = new Properties( );
// default mcast-port is not 0.
- props.setProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
+ props.setProperty(CLUSTER_SSL_ENABLED, "true");
try {
new DistributionConfigImpl( props );
@@ -156,7 +155,7 @@ public class SSLConfigJUnitTest {
Properties props = new Properties();
sslciphers = "RSA_WITH_GARBAGE";
- props.setProperty(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
+ props.setProperty(SSL_CIPHERS, sslciphers);
config = new DistributionConfigImpl( props );
isEqual( config.getSSLEnabled(), sslenabled );
@@ -165,7 +164,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getSSLRequireAuthentication(), requireAuth );
sslprotocols = "SSLv7";
- props.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, sslprotocols);
+ props.setProperty(SSL_PROTOCOLS, sslprotocols);
config = new DistributionConfigImpl( props );
isEqual( config.getSSLEnabled(), sslenabled );
@@ -174,7 +173,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getSSLRequireAuthentication(), requireAuth );
requireAuth = false;
- props.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ props.setProperty(SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
config = new DistributionConfigImpl( props );
isEqual( config.getSSLEnabled(), sslenabled );
@@ -183,7 +182,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getSSLRequireAuthentication(), requireAuth );
sslenabled = true;
- props.setProperty(DistributionConfig.SSL_ENABLED_NAME, String.valueOf(sslenabled));
+ props.setProperty(SSL_ENABLED, String.valueOf(sslenabled));
props.setProperty(MCAST_PORT, "0");
config = new DistributionConfigImpl( props );
@@ -214,7 +213,7 @@ public class SSLConfigJUnitTest {
Properties props = new Properties();
sslciphers = "RSA_WITH_GARBAGE";
- props.setProperty(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
+ props.setProperty(CLUSTER_SSL_CIPHERS, sslciphers);
config = new DistributionConfigImpl( props );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -223,7 +222,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getClusterSSLRequireAuthentication(), requireAuth );
sslprotocols = "SSLv7";
- props.setProperty(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
+ props.setProperty(CLUSTER_SSL_PROTOCOLS, sslprotocols);
config = new DistributionConfigImpl( props );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -232,7 +231,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getClusterSSLRequireAuthentication(), requireAuth );
requireAuth = false;
- props.setProperty(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ props.setProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
config = new DistributionConfigImpl( props );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -241,7 +240,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getClusterSSLRequireAuthentication(), requireAuth );
sslenabled = true;
- props.setProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
+ props.setProperty(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
props.setProperty(MCAST_PORT, "0");
config = new DistributionConfigImpl( props );
@@ -346,11 +345,11 @@ public class SSLConfigJUnitTest {
boolean jmxManagerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_NAME, String.valueOf(jmxManagerSsl));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_ENABLED_NAME, String.valueOf(jmxManagerSslenabled));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_PROTOCOLS_NAME, jmxManagerSslprotocols);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_CIPHERS_NAME, jmxManagerSslciphers);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(jmxManagerSslRequireAuth));
+ gemFireProps.put(JMX_MANAGER_SSL, String.valueOf(jmxManagerSsl));
+ gemFireProps.put(JMX_MANAGER_SSL_ENABLED, String.valueOf(jmxManagerSslenabled));
+ gemFireProps.put(JMX_MANAGER_SSL_PROTOCOLS, jmxManagerSslprotocols);
+ gemFireProps.put(JMX_MANAGER_SSL_CIPHERS, jmxManagerSslciphers);
+ gemFireProps.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(jmxManagerSslRequireAuth));
try{
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
}catch(IllegalArgumentException e){
@@ -360,15 +359,15 @@ public class SSLConfigJUnitTest {
}
gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_NAME, String.valueOf(jmxManagerSsl));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_PROTOCOLS_NAME, jmxManagerSslprotocols);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_CIPHERS_NAME, jmxManagerSslciphers);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(jmxManagerSslRequireAuth));
+ gemFireProps.put(JMX_MANAGER_SSL, String.valueOf(jmxManagerSsl));
+ gemFireProps.put(JMX_MANAGER_SSL_PROTOCOLS, jmxManagerSslprotocols);
+ gemFireProps.put(JMX_MANAGER_SSL_CIPHERS, jmxManagerSslciphers);
+ gemFireProps.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(jmxManagerSslRequireAuth));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -396,15 +395,15 @@ public class SSLConfigJUnitTest {
boolean cacheServerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, cacheServerSslciphers);
- gemFireProps.put(DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -431,15 +430,15 @@ public class SSLConfigJUnitTest {
boolean gatewaySslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewaySslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewaySslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewaySslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewaySslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewaySslRequireAuth));
DistributionConfigImpl config = new DistributionConfigImpl( gemFireProps );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -469,8 +468,8 @@ public class SSLConfigJUnitTest {
//sslEnabled and clusterSSLEnabled set at the same time
Properties gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "false");
+ gemFireProps.put(SSL_ENABLED, "true");
+ gemFireProps.put(CLUSTER_SSL_ENABLED, "false");
DistributionConfigImpl config = null;
try{
config = new DistributionConfigImpl( gemFireProps );
@@ -484,10 +483,10 @@ public class SSLConfigJUnitTest {
//ssl-protocol and cluster-ssl-protocol set at the same time
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, clusterSslprotocols);
+ gemFireProps.put(SSL_ENABLED, "true");
+ gemFireProps.put(SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_ENABLED, "true");
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, clusterSslprotocols);
try{
config = new DistributionConfigImpl( gemFireProps );
throw new Exception();
@@ -500,10 +499,10 @@ public class SSLConfigJUnitTest {
//ssl-protocol and cluster-ssl-protocol set at the same time with same value
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
+ gemFireProps.put(SSL_ENABLED, "true");
+ gemFireProps.put(SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_ENABLED, "true");
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
try{
config = new DistributionConfigImpl( gemFireProps );
} catch(IllegalArgumentException e){
@@ -513,10 +512,10 @@ public class SSLConfigJUnitTest {
//ssl-cipher and cluster-ssl-cipher set at the same time
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, clusterSslciphers);
+ gemFireProps.put(SSL_ENABLED, "true");
+ gemFireProps.put(SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_ENABLED, "true");
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, clusterSslciphers);
try{
config = new DistributionConfigImpl( gemFireProps );
throw new Exception();
@@ -529,10 +528,10 @@ public class SSLConfigJUnitTest {
//ssl-cipher and cluster-ssl-cipher set at the same time with same value
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
+ gemFireProps.put(SSL_ENABLED, "true");
+ gemFireProps.put(SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_ENABLED, "true");
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
try{
config = new DistributionConfigImpl( gemFireProps );
} catch(IllegalArgumentException e){
@@ -542,10 +541,10 @@ public class SSLConfigJUnitTest {
//ssl-require-authentication and cluster-ssl-require-authentication set at the same time
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, "false");
+ gemFireProps.put(SSL_ENABLED, "true");
+ gemFireProps.put(SSL_REQUIRE_AUTHENTICATION, "true");
+ gemFireProps.put(CLUSTER_SSL_ENABLED, "true");
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, "false");
try{
config = new DistributionConfigImpl( gemFireProps );
throw new Exception();
@@ -558,10 +557,10 @@ public class SSLConfigJUnitTest {
//ssl-require-authentication and cluster-ssl-require-authentication set at the same time and have the same value
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, "true");
+ gemFireProps.put(SSL_ENABLED, "true");
+ gemFireProps.put(SSL_REQUIRE_AUTHENTICATION, "true");
+ gemFireProps.put(CLUSTER_SSL_ENABLED, "true");
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, "true");
try{
config = new DistributionConfigImpl( gemFireProps );
} catch(IllegalArgumentException e){
@@ -571,10 +570,10 @@ public class SSLConfigJUnitTest {
// only ssl-* properties provided. same should reflect in cluster-ssl properties
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.SSL_PROTOCOLS_NAME, sslprotocols);
+ gemFireProps.put(SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
+ gemFireProps.put(SSL_CIPHERS, sslciphers);
+ gemFireProps.put(SSL_PROTOCOLS, sslprotocols);
gemFireProps.putAll(getGfSecurityPropertiesSSL());
@@ -599,10 +598,10 @@ public class SSLConfigJUnitTest {
//only clutser-ssl-properties provided.
gemFireProps = new Properties();
gemFireProps.setProperty(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(clusterSslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(clusterSslRequireAuth));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, clusterSslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, clusterSslprotocols);
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(clusterSslenabled));
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(clusterSslRequireAuth));
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, clusterSslciphers);
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, clusterSslprotocols);
gemFireProps.putAll(getGfSecurityPropertiesCluster(false));
@@ -613,11 +612,11 @@ public class SSLConfigJUnitTest {
isEqual(clusterSslciphers, config.getClusterSSLCiphers());
isEqual(clusterSslRequireAuth, config.getClusterSSLRequireAuthentication());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
clusterSSLProperties = config.getClusterSSLProperties();
isEqual( SSL_PROPS_MAP, clusterSSLProperties );
@@ -637,15 +636,15 @@ public class SSLConfigJUnitTest {
boolean jmxManagerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_ENABLED_NAME, String.valueOf(jmxManagerSslenabled));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_PROTOCOLS_NAME, jmxManagerSslprotocols);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_CIPHERS_NAME, jmxManagerSslciphers);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(jmxManagerSslRequireAuth));
+ gemFireProps.put(JMX_MANAGER_SSL_ENABLED, String.valueOf(jmxManagerSslenabled));
+ gemFireProps.put(JMX_MANAGER_SSL_PROTOCOLS, jmxManagerSslprotocols);
+ gemFireProps.put(JMX_MANAGER_SSL_CIPHERS, jmxManagerSslciphers);
+ gemFireProps.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(jmxManagerSslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesJMX(false /*partialJmxSslConfigOverride*/));
@@ -660,11 +659,11 @@ public class SSLConfigJUnitTest {
isEqual( config.getJmxManagerSSLCiphers(), jmxManagerSslciphers );
isEqual( config.getJmxManagerSSLRequireAuthentication(), jmxManagerSslRequireAuth );
- isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME), config.getJmxManagerSSLKeyStore());
- isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME), config.getJmxManagerSSLKeyStoreType());
- isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME), config.getJmxManagerSSLKeyStorePassword());
- isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME), config.getJmxManagerSSLTrustStore());
- isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getJmxManagerSSLTrustStorePassword());
+ isEqual(JMX_SSL_PROPS_MAP.get(JMX_MANAGER_SSL_KEYSTORE), config.getJmxManagerSSLKeyStore());
+ isEqual(JMX_SSL_PROPS_MAP.get(JMX_MANAGER_SSL_KEYSTORE_TYPE), config.getJmxManagerSSLKeyStoreType());
+ isEqual(JMX_SSL_PROPS_MAP.get(JMX_MANAGER_SSL_KEYSTORE_PASSWORD), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(JMX_SSL_PROPS_MAP.get(JMX_MANAGER_SSL_TRUSTSTORE), config.getJmxManagerSSLTrustStore());
+ isEqual(JMX_SSL_PROPS_MAP.get(JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD), config.getJmxManagerSSLTrustStorePassword());
}
@Test
@@ -680,15 +679,15 @@ public class SSLConfigJUnitTest {
boolean cacheServerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, cacheServerSslciphers);
- gemFireProps.put(DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforCS(false));
@@ -703,11 +702,11 @@ public class SSLConfigJUnitTest {
isEqual( config.getServerSSLCiphers(), cacheServerSslciphers );
isEqual( config.getServerSSLRequireAuthentication(), cacheServerSslRequireAuth );
- isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
- isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
- isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
- isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
- isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
+ isEqual(SERVER_SSL_PROPS_MAP.get(SERVER_SSL_KEYSTORE), config.getServerSSLKeyStore());
+ isEqual(SERVER_SSL_PROPS_MAP.get(SERVER_SSL_KEYSTORE_TYPE), config.getServerSSLKeyStoreType());
+ isEqual(SERVER_SSL_PROPS_MAP.get(SERVER_SSL_KEYSTORE_PASSWORD), config.getServerSSLKeyStorePassword());
+ isEqual(SERVER_SSL_PROPS_MAP.get(SERVER_SSL_TRUSTSTORE), config.getServerSSLTrustStore());
+ isEqual(SERVER_SSL_PROPS_MAP.get(SERVER_SSL_TRUSTSTORE_PASSWORD), config.getServerSSLTrustStorePassword());
}
@Test
@@ -723,15 +722,15 @@ public class SSLConfigJUnitTest {
boolean gatewaySslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewaySslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewaySslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewaySslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewaySslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewaySslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforGateway(false));
@@ -746,11 +745,11 @@ public class SSLConfigJUnitTest {
isEqual( config.getGatewaySSLCiphers(), gatewaySslciphers );
isEqual( config.getGatewaySSLRequireAuthentication(), gatewaySslRequireAuth );
- isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
- isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
- isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
- isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
- isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(GATEWAY_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
}
@@ -767,15 +766,15 @@ public class SSLConfigJUnitTest {
boolean jmxManagerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_ENABLED_NAME, String.valueOf(jmxManagerSslenabled));
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_PROTOCOLS_NAME, jmxManagerSslprotocols);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_CIPHERS_NAME, jmxManagerSslciphers);
- gemFireProps.put(DistributionConfig.JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(jmxManagerSslRequireAuth));
+ gemFireProps.put(JMX_MANAGER_SSL_ENABLED, String.valueOf(jmxManagerSslenabled));
+ gemFireProps.put(JMX_MANAGER_SSL_PROTOCOLS, jmxManagerSslprotocols);
+ gemFireProps.put(JMX_MANAGER_SSL_CIPHERS, jmxManagerSslciphers);
+ gemFireProps.put(JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(jmxManagerSslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesJMX(true /*partialJmxSslConfigOverride*/));
@@ -790,17 +789,17 @@ public class SSLConfigJUnitTest {
isEqual( config.getJmxManagerSSLCiphers(), jmxManagerSslciphers );
isEqual( config.getJmxManagerSSLRequireAuthentication(), jmxManagerSslRequireAuth );
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
-
- isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME), config.getJmxManagerSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getJmxManagerSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getJmxManagerSSLKeyStorePassword());
- isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME), config.getJmxManagerSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getJmxManagerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(JMX_MANAGER_SSL_KEYSTORE), config.getJmxManagerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getJmxManagerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(JMX_MANAGER_SSL_TRUSTSTORE), config.getJmxManagerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getJmxManagerSSLTrustStorePassword());
}
@@ -817,15 +816,15 @@ public class SSLConfigJUnitTest {
boolean cacheServerSslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, cacheServerSslciphers);
- gemFireProps.put(DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforCS(true));
@@ -840,17 +839,17 @@ public class SSLConfigJUnitTest {
isEqual( config.getServerSSLCiphers(), cacheServerSslciphers );
isEqual( config.getServerSSLRequireAuthentication(), cacheServerSslRequireAuth );
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
-
- isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
- isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(SERVER_SSL_KEYSTORE), config.getServerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getServerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getServerSSLKeyStorePassword());
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(SERVER_SSL_TRUSTSTORE), config.getServerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getServerSSLTrustStorePassword());
}
@Test
@@ -866,15 +865,15 @@ public class SSLConfigJUnitTest {
boolean gatewaySslRequireAuth = true;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewaySslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewaySslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewaySslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewaySslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewaySslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforGateway(true));
@@ -889,17 +888,17 @@ public class SSLConfigJUnitTest {
isEqual( config.getGatewaySSLCiphers(), gatewaySslciphers );
isEqual( config.getGatewaySSLRequireAuthentication(), gatewaySslRequireAuth );
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
- isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
- isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
}
@@ -917,10 +916,10 @@ public class SSLConfigJUnitTest {
Properties gemFireProps = new Properties();
gemFireProps.put(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforCS(true));
@@ -942,17 +941,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
-
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getServerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getServerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getServerSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getServerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getServerSSLTrustStorePassword());
}
@@ -970,15 +969,15 @@ public class SSLConfigJUnitTest {
Properties gemFireProps = new Properties();
gemFireProps.put(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME, String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME, cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME, cacheServerSslciphers);
- gemFireProps.put(DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforCS(true));
@@ -1000,17 +999,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
-
- isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
- isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(SERVER_SSL_KEYSTORE), config.getServerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getServerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getServerSSLKeyStorePassword());
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(SERVER_SSL_TRUSTSTORE), config.getServerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getServerSSLTrustStorePassword());
}
@Test
@@ -1027,10 +1026,10 @@ public class SSLConfigJUnitTest {
Properties gemFireProps = new Properties();
gemFireProps.put(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforGateway(true));
@@ -1052,17 +1051,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
-
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
}
@@ -1080,15 +1079,15 @@ public class SSLConfigJUnitTest {
Properties gemFireProps = new Properties();
gemFireProps.put(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewayServerSslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewayServerSslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewayServerSslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewayServerSslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewayServerSslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewayServerSslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewayServerSslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewayServerSslRequireAuth));
gemFireProps.putAll(getGfSecurityPropertiesforGateway(true));
@@ -1105,17 +1104,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
-
- isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
- isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_KEYSTORE), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(GATEWAY_SSL_TRUSTSTORE), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getGatewaySSLTrustStorePassword());
}
@@ -1133,10 +1132,10 @@ public class SSLConfigJUnitTest {
Properties gemFireProps = new Properties();
gemFireProps.put(MCAST_PORT, "0");
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
- gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
+ gemFireProps.put(CLUSTER_SSL_ENABLED, String.valueOf(sslenabled));
+ gemFireProps.put(CLUSTER_SSL_PROTOCOLS, sslprotocols);
+ gemFireProps.put(CLUSTER_SSL_CIPHERS, sslciphers);
+ gemFireProps.put(CLUSTER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(requireAuth));
gemFireProps.putAll(getGfSecurityPropertiesJMX(true));
@@ -1158,17 +1157,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
-
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getJmxManagerSSLKeyStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getJmxManagerSSLKeyStoreType());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getJmxManagerSSLKeyStorePassword());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getJmxManagerSSLTrustStore());
- isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getJmxManagerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE), config.getJmxManagerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_TYPE), config.getJmxManagerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_KEYSTORE_PASSWORD), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE), config.getJmxManagerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(CLUSTER_SSL_TRUSTSTORE_PASSWORD), config.getJmxManagerSSLTrustStorePassword());
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
index 197c28b..704b7d5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.cache.persistence.BackupManager;
import com.gemstone.gemfire.internal.cache.persistence.RestoreScript;
@@ -33,8 +32,7 @@ import java.net.URISyntaxException;
import java.net.URL;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -44,7 +42,7 @@ import static org.junit.Assert.*;
public class BackupJUnitTest {
protected static GemFireCacheImpl cache = null;
protected static File TMP_DIR;
- protected static File CACHE_XML_FILE;
+ protected static File cacheXmlFile;
protected static DistributedSystem ds = null;
protected static Properties props = new Properties();
@@ -69,12 +67,12 @@ public class BackupJUnitTest {
TMP_DIR = tmpDirName == null ? new File("") : new File(tmpDirName);
try {
URL url = BackupJUnitTest.class.getResource("BackupJUnitTest.cache.xml");
- CACHE_XML_FILE = new File(url.toURI().getPath());
+ cacheXmlFile = new File(url.toURI().getPath());
} catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
}
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, CACHE_XML_FILE.getAbsolutePath());
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
+ props.setProperty(CACHE_XML_FILE, cacheXmlFile.getAbsolutePath());
+ props.setProperty(LOG_LEVEL, "config"); // to keep diskPerf logs smaller
}
createCache();
@@ -303,7 +301,7 @@ public class BackupJUnitTest {
backup.finishBackup(backupDir, null, false);
File cacheXmlBackup = FileUtil.find(backupDir, ".*config.cache.xml");
assertTrue(cacheXmlBackup.exists());
- byte[] expectedBytes = getBytes(CACHE_XML_FILE);
+ byte[] expectedBytes = getBytes(cacheXmlFile);
byte[] backupBytes = getBytes(cacheXmlBackup);
assertEquals(expectedBytes.length, backupBytes.length);
for(int i = 0; i < expectedBytes.length; i++) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
index ef4e6be..dd84a72 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
import com.gemstone.gemfire.internal.cache.lru.LRUClockNode;
@@ -30,8 +29,7 @@ import org.junit.experimental.categories.Category;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -57,7 +55,7 @@ public class Bug37244JUnitTest
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
+ props.setProperty(LOG_LEVEL, "info"); // to keep diskPerf logs smaller
distributedSystem = DistributedSystem.connect(props);
cache = CacheFactory.create(distributedSystem);
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
index 8432b69..fd76e65 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
@@ -36,8 +36,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -94,7 +93,7 @@ public class Bug41091DUnitTest extends CacheTestCase {
});
Properties props = new Properties();
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
props.setProperty(LOCATORS, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
getSystem(props);
@@ -114,7 +113,7 @@ public class Bug41091DUnitTest extends CacheTestCase {
public void run() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
props.setProperty(LOCATORS, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
getSystem(props);
Cache cache = getCache();
@@ -149,9 +148,9 @@ public class Bug41091DUnitTest extends CacheTestCase {
disconnectFromDS();
Properties props = new Properties();
props.setProperty(MCAST_PORT, String.valueOf(0));
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
- props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(ENABLE_NETWORK_PARTITION_DETECTION, "true");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
File logFile = new File(testName + "-locator" + locatorPort
+ ".log");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
index 451df52..a1f8c07 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.util.DelayedAction;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
@@ -27,7 +26,7 @@ import com.gemstone.gemfire.test.dunit.VM;
import java.util.HashMap;
import java.util.Map;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class Bug45934DUnitTest extends CacheTestCase {
public Bug45934DUnitTest(String name) {
@@ -46,7 +45,7 @@ public class Bug45934DUnitTest extends CacheTestCase {
// 1. create the local cache
CacheFactory cf = new CacheFactory();
cf.set(MCAST_PORT, "45934");
- cf.set(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ cf.set(CONSERVE_SOCKETS, "false");
Cache cache = getCache(cf);
// 2. create normal region locally
@@ -84,7 +83,7 @@ public class Bug45934DUnitTest extends CacheTestCase {
public Object call() throws Exception {
CacheFactory cf = new CacheFactory();
cf.set(MCAST_PORT, "45934");
- cf.set(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
+ cf.set(CONSERVE_SOCKETS, "false");
getCache(cf).<Integer, Integer> createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT)
.create(name);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
index 5881066..2e5d0aa 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerInvalidAndDestroyedEntryDUnitTest.java
@@ -24,7 +24,6 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.tier.InterestType;
import com.gemstone.gemfire.test.dunit.*;
@@ -34,6 +33,8 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This tests the fix for bug #43407 under a variety of configurations and
* also tests that tombstones are treated in a similar manner. The ticket
@@ -181,7 +182,7 @@ public class ClientServerInvalidAndDestroyedEntryDUnitTest extends CacheTestCase
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating client cache");
ClientCache c = new ClientCacheFactory()
.addPoolServer("localhost", serverPort)
- .set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel())
+ .set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel())
.create();
Region myRegion = c.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create(regionName);;
if (useTX) {
@@ -299,7 +300,7 @@ public class ClientServerInvalidAndDestroyedEntryDUnitTest extends CacheTestCase
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating client cache");
ClientCache c = new ClientCacheFactory()
.addPoolServer("localhost", serverPort)
- .set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel())
+ .set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel())
.create();
Region myRegion = c.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY).create(regionName);;
if (useTX) {
@@ -421,7 +422,7 @@ public class ClientServerInvalidAndDestroyedEntryDUnitTest extends CacheTestCase
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("creating client cache");
ClientCache c = new ClientCacheFactory()
.addPoolServer("localhost", serverPort)
- .set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel())
+ .set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel())
.setPoolSubscriptionEnabled(true)
.create();
[10/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
index 26cfdfa..38be211 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java
@@ -16,25 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.QueueStateImpl.SequenceIdAndExpirationObject;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ClientServerObserver;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
@@ -42,16 +29,16 @@ import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
import com.gemstone.gemfire.internal.cache.ha.HAHelper;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests the reliable messaging functionality - Client sends a periodic
@@ -380,8 +367,8 @@ public class ReliableMessagingDUnitTest extends DistributedTestCase {
{
ReliableMessagingDUnitTest test = new ReliableMessagingDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = test.createCache(props);
String host = NetworkUtils.getServerHostName(Host.getHost(0));
PoolImpl p = (PoolImpl)PoolManager.createFactory()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
index b7980d4..ee88dea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UnregisterInterestDUnitTest.java
@@ -19,14 +19,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.GemFireCache;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -37,13 +30,13 @@ import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.FilterProfile;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*/
@@ -313,7 +306,7 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
DistributedSystem ds = new UnregisterInterestDUnitTest("UnregisterInterestDUnitTest").getSystem();
ds.disconnect();
Properties props = new Properties();
- props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
CacheFactory cf = new CacheFactory(props);
cache = cf.create();
RegionFactory rf = ((GemFireCacheImpl)cache).createRegionFactory(RegionShortcut.REPLICATE);
@@ -329,8 +322,8 @@ public class UnregisterInterestDUnitTest extends DistributedTestCase {
ds.disconnect();
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
ClientCacheFactory ccf = new ClientCacheFactory(props);
ccf.setPoolSubscriptionEnabled(true);
ccf.addPoolServer(host.getHostName(), port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
index 08d964a..0b91136 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/UpdatePropagationDUnitTest.java
@@ -16,29 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import static junit.framework.TestCase.assertNotNull;
-import static org.junit.Assert.assertEquals;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -51,15 +29,21 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.jayway.awaitility.Awaitility;
-import com.jayway.awaitility.core.ConditionTimeoutException;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static junit.framework.TestCase.assertNotNull;
+import static org.junit.Assert.assertEquals;
/**
* Start client 1
@@ -245,12 +229,12 @@ public class UpdatePropagationDUnitTest extends JUnit4CacheTestCase {
{
ClientCache cache;
try {
- System.setProperty("gemfire.PoolImpl.DISABLE_RANDOM", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.DISABLE_RANDOM", "true");
int PORT1 = port1.intValue() ;
int PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
ClientCacheFactory cf = new ClientCacheFactory();
cf.addPoolServer(host, PORT1)
.addPoolServer(host, PORT2)
@@ -262,7 +246,7 @@ public class UpdatePropagationDUnitTest extends JUnit4CacheTestCase {
.setPoolPingInterval(300);
cache = getClientCache(cf);
} finally {
- System.setProperty("gemfire.PoolImpl.DISABLE_RANDOM", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.DISABLE_RANDOM", "false");
CacheServerTestUtil.enableShufflingOfEndpoints();
}
cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
index 639fb33..bb947d5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/VerifyUpdatesFromNonInterestEndPointDUnitTest.java
@@ -16,33 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.Connection;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.client.internal.Connection;
-import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* One Client , two servers.
@@ -160,8 +150,8 @@ public class VerifyUpdatesFromNonInterestEndPointDUnitTest extends DistributedTe
{
VerifyUpdatesFromNonInterestEndPointDUnitTest test = new VerifyUpdatesFromNonInterestEndPointDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = test.createCache(props);
Pool p;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
index 7da8d90..2da8391 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
@@ -16,43 +16,9 @@
*/
package com.gemstone.gemfire.internal.cache.wan;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
@@ -77,15 +43,18 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.RegionQueue;
import com.gemstone.gemfire.internal.cache.lru.Sizeable;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetSocketAddress;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class AsyncEventQueueTestBase extends DistributedTestCase {
@@ -153,11 +122,11 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
//props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port
+ props.setProperty(LOCATORS, "localhost[" + port
+ "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["
+ props.setProperty(START_LOCATOR, "localhost["
+ port + "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
return port;
@@ -167,11 +136,11 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + dsId);
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + port
+ props.setProperty(LOCATORS, "localhost[" + port
+ "]");
- props.setProperty(DistributionConfig.START_LOCATOR_NAME, "localhost["
+ props.setProperty(START_LOCATOR, "localhost["
+ port + "],server=true,peer=true,hostname-for-clients=localhost");
props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost["
+ remoteLocPort + "]");
@@ -686,8 +655,8 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
protected static void createCache(Integer locPort) {
AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
@@ -696,7 +665,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
public static void createCacheWithoutLocator(Integer mCastPort) {
AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "" + mCastPort);
+ props.setProperty(MCAST_PORT, "" + mCastPort);
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
}
@@ -907,8 +876,8 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
public static int createReceiver(int locPort) {
AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost[" + locPort
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + locPort
+ "]");
InternalDistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
index a099617..dbed7ad 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventListenerDUnitTest.java
@@ -16,24 +16,11 @@
*/
package com.gemstone.gemfire.internal.cache.wan.asyncqueue;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.wan.GatewayEventSubstitutionFilter;
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueFactoryImpl;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.wan.AsyncEventQueueTestBase;
@@ -41,6 +28,15 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
@@ -57,7 +53,7 @@ public class AsyncEventListenerDUnitTest extends AsyncEventQueueTestBase {
public void testCreateAsyncEventQueueWithNullListener() {
AsyncEventQueueTestBase test = new AsyncEventQueueTestBase(getTestMethodName());
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
InternalDistributedSystem ds = test.getSystem(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
index ddcc9cb..19cd517 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/asyncqueue/AsyncEventQueueValidationsJUnitTest.java
@@ -15,26 +15,22 @@
* limitations under the License.
*/
/**
- *
+ *
*/
package com.gemstone.gemfire.internal.cache.wan.asyncqueue;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueueFactory;
import com.gemstone.gemfire.cache.wan.GatewaySender.OrderPolicy;
import com.gemstone.gemfire.internal.cache.wan.AsyncEventQueueConfigurationException;
-import com.gemstone.gemfire.internal.cache.wan.MyAsyncEventListener;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-import junit.framework.TestCase;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
*
@@ -43,10 +39,10 @@ import junit.framework.TestCase;
public class AsyncEventQueueValidationsJUnitTest {
private Cache cache;
-
+
@Test
public void testConcurrentParallelAsyncEventQueueAttributesWrongDispatcherThreads() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
try {
AsyncEventQueueFactory fact = cache.createAsyncEventQueueFactory();
fact.setParallel(true);
@@ -55,15 +51,14 @@ public class AsyncEventQueueValidationsJUnitTest {
fact.create("id", new com.gemstone.gemfire.internal.cache.wan.MyAsyncEventListener());
fail("Expected AsyncEventQueueConfigurationException.");
} catch (AsyncEventQueueConfigurationException e) {
- assertTrue(e.getMessage()
- .contains(" can not be created with dispatcher threads less than 1"));
+ assertTrue(e.getMessage()
+ .contains(" can not be created with dispatcher threads less than 1"));
}
}
-
-
+
@Test
public void testConcurrentParallelAsyncEventQueueAttributesOrderPolicyThread() {
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
try {
AsyncEventQueueFactory fact = cache.createAsyncEventQueueFactory();
fact.setParallel(true);
@@ -72,10 +67,9 @@ public class AsyncEventQueueValidationsJUnitTest {
fact.create("id", new com.gemstone.gemfire.internal.cache.wan.MyAsyncEventListener());
fail("Expected AsyncEventQueueConfigurationException.");
} catch (AsyncEventQueueConfigurationException e) {
- assertTrue(e.getMessage()
- .contains("can not be created with OrderPolicy"));
+ assertTrue(e.getMessage()
+ .contains("can not be created with OrderPolicy"));
}
}
-
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
index 5aa9278..11be69d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
@@ -16,22 +16,18 @@
*/
package com.gemstone.gemfire.internal.compression;
-import java.io.File;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.compression.Compressor;
import com.gemstone.gemfire.compression.SnappyCompressor;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.PrintStream;
+import java.util.Properties;
/**
* Tests configured and badly configured cache.xml files with regards to compression.
@@ -127,7 +123,7 @@ public class CompressionCacheConfigDUnitTest extends CacheTestCase {
try {
disconnectFromDS();
Properties props = new Properties();
- props.setProperty("cache-xml-file",cacheXml);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, cacheXml);
LogWriterUtils.getLogWriter().info("<ExpectedException action=add>ClassNotFoundException</ExpectedException>");
getSystem(props);
assertNotNull(getCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
index 0100a05..6f64bd1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
@@ -16,14 +16,14 @@
*/
package com.gemstone.gemfire.internal.compression;
-import java.util.Properties;
-
import com.gemstone.gemfire.compression.SnappyCompressor;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
@SuppressWarnings("serial")
public class CompressionCacheListenerOffHeapDUnitTest extends
CompressionCacheListenerDUnitTest {
@@ -33,10 +33,10 @@ public class CompressionCacheListenerOffHeapDUnitTest extends
}
public static void caseSetUp() {
- System.setProperty("gemfire.trackOffHeapRefCounts", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "trackOffHeapRefCounts", "true");
}
public static void caseTearDown() {
- System.clearProperty("gemfire.trackOffHeapRefCounts");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "trackOffHeapRefCounts");
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
index 0cc3bdf..efd8e57 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.compression;
-import java.util.Properties;
-
import com.gemstone.gemfire.compression.Compressor;
import com.gemstone.gemfire.compression.SnappyCompressor;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -25,6 +23,8 @@ import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Properties;
+
public class CompressionRegionOperationsOffHeapDUnitTest extends
CompressionRegionOperationsDUnitTest {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
index f3ca340..582c5e3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
@@ -22,32 +22,28 @@
*/
package com.gemstone.gemfire.internal.datasource;
-import java.sql.Connection;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import junit.framework.TestCase;
-
-import javax.naming.Context;
-import javax.sql.PooledConnection;
-import javax.sql.XAConnection;
-import javax.transaction.xa.XAResource;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
+import javax.naming.Context;
+import javax.sql.PooledConnection;
+import javax.sql.XAConnection;
+import javax.transaction.xa.XAResource;
+import java.sql.Connection;
+import java.util.*;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
/**
*/
@@ -61,11 +57,11 @@ public class AbstractPoolCacheJUnitTest {
@Before
public void setUp() throws Exception {
props = new Properties();
- props.setProperty("log-level", "info");
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
String path = TestUtil.getResourcePath(AbstractPoolCacheJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
index 95d6224..ece05b3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
@@ -19,24 +19,25 @@
*/
package com.gemstone.gemfire.internal.datasource;
-import static org.junit.Assert.fail;
-
-import java.sql.Connection;
-import java.util.Properties;
-
-import javax.naming.Context;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import javax.naming.Context;
+import java.sql.Connection;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
+
//import javax.sql.PooledConnection;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
/**
*
@@ -53,9 +54,9 @@ public class CleanUpJUnitTest {
@Before
public void setUp() {
props = new Properties();
- props.setProperty("mcast-port","0");
+ props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(CleanUpJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
index c63466c..b961d8d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
@@ -21,26 +21,26 @@
*/
package com.gemstone.gemfire.internal.datasource;
-import static org.junit.Assert.fail;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import javax.naming.Context;
+import javax.sql.PooledConnection;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import javax.naming.Context;
-import javax.sql.PooledConnection;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/*
* this is a Multithreaded test for datasource connection pool.
@@ -63,9 +63,9 @@ public class ConnectionPoolCacheImplJUnitTest {
public void setUp() {
try {
props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(ConnectionPoolCacheImplJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
index e9ef04b..d2a377a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
@@ -16,9 +16,24 @@
*/
package com.gemstone.gemfire.internal.datasource;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.fail;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.apache.logging.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+import javax.transaction.UserTransaction;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
@@ -26,25 +41,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-import javax.transaction.UserTransaction;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
/**
*
@@ -68,9 +67,9 @@ public class ConnectionPoolingJUnitTest {
public void setUp() throws Exception {
encounteredException = false;
props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(ConnectionPoolingJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
index 783cda3..9384d43 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
@@ -16,25 +16,23 @@
*/
package com.gemstone.gemfire.internal.datasource;
-import java.sql.Connection;
-import java.util.Properties;
-
-import javax.naming.Context;
-
-import junit.framework.TestCase;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
+import javax.naming.Context;
+import java.sql.Connection;
+import java.util.Properties;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/*
*
@@ -49,9 +47,9 @@ public class DataSourceFactoryJUnitTest {
@Before
public void setUp() {
props = new Properties();
- props.setProperty("mcast-port","0");
+ props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(DataSourceFactoryJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty("cache-xml-file",path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
index 6f6dacf..7d5aba3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
@@ -19,23 +19,24 @@
*/
package com.gemstone.gemfire.internal.datasource;
-import static org.junit.Assert.assertNotSame;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
-//import com.gemstone.gemfire.internal.jta.CacheUtils;
-import javax.transaction.TransactionManager;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.jndi.JNDIInvoker;
-import com.gemstone.gemfire.util.test.TestUtil;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import javax.transaction.TransactionManager;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.fail;
+
+//import com.gemstone.gemfire.internal.jta.CacheUtils;
/**
*
@@ -57,9 +58,9 @@ public class RestartJUnitTest {
TransactionManager tm2 = null;
try{
props = new Properties();
- props.setProperty("mcast-port","0");
+ props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(RestartJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty("cache-xml-file",path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
index 64afaf2..4ee947b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
@@ -16,37 +16,33 @@
*/
package com.gemstone.gemfire.internal.jta;
-import static org.junit.Assert.assertNotNull;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.apache.logging.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.OutputStreamWriter;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+import java.io.*;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
import java.util.Random;
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
@Category(IntegrationTest.class)
public class BlockingTimeOutJUnitTest {
@@ -147,9 +143,9 @@ public class BlockingTimeOutJUnitTest {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
String tableName = "";
cache = new CacheFactory(props).create();
if (className != null && !className.equals("")) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
index 29a88da..121b9aa 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
@@ -24,22 +24,27 @@ package com.gemstone.gemfire.internal.jta;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.LogWriter;
-//import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-//import com.gemstone.gemfire.cache.Region;
-//import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.util.test.TestUtil;
-import java.util.Properties;
-import java.sql.*;
-
-import com.gemstone.gemfire.cache.query.QueryService;
-
import javax.naming.Context;
import javax.naming.NamingException;
import javax.sql.DataSource;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
+//import com.gemstone.gemfire.cache.AttributesFactory;
+//import com.gemstone.gemfire.cache.Region;
+//import com.gemstone.gemfire.cache.RegionAttributes;
/**
*
@@ -60,9 +65,9 @@ public class CacheUtils {
public static String init(String className) throws Exception{
Properties props = new Properties();
- props.setProperty("cache-xml-file",TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml"));
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml"));
String tableName = "";
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
index abe5a51..6b9b228 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
@@ -16,29 +16,29 @@
*/
package com.gemstone.gemfire.internal.jta;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.sql.DataSource;
import javax.transaction.UserTransaction;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.jta.CacheUtils;
-import com.gemstone.gemfire.internal.jta.JTAUtils;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This test case is to test the following test scenarios: 1) Get Simple DS
@@ -93,7 +93,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
// System.out.println ("Table name: " + tableName);
@@ -274,7 +274,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
System.out.println("Table name: " + tableName);
@@ -585,7 +585,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
// System.out.println ("Table name: " + tableName);
@@ -749,7 +749,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
// System.out.println ("Table name: " + tableName);
@@ -1008,8 +1008,8 @@ public class DataSourceJTAJUnitTest {
*/
private static DistributedSystem connect(Properties props) {
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
return DistributedSystem.connect(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
index 4ff2896..78426c6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/ExceptionJUnitTest.java
@@ -16,24 +16,16 @@
*/
package com.gemstone.gemfire.internal.jta;
-import static org.junit.Assert.*;
-
-import java.util.Properties;
-
-import junit.framework.TestCase;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.*;
+import org.junit.experimental.categories.Category;
import javax.transaction.*;
+import java.util.Properties;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
* Check if the correct expectations are being thrown when they are supposed to.
@@ -50,7 +42,7 @@ public class ExceptionJUnitTest {
@BeforeClass
public static void beforeClass() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
tm = TransactionManagerImpl.getTransactionManager();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
index a3c47e5..b78cdf7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
@@ -16,31 +16,24 @@
*/
package com.gemstone.gemfire.internal.jta;
-import junit.framework.TestCase;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.transaction.RollbackException;
-import javax.transaction.Synchronization;
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.UserTransaction;
-import javax.transaction.Status;
-
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.datasource.GemFireBasicDataSource;
import com.gemstone.gemfire.internal.datasource.GemFireTransactionDataSource;
-import com.gemstone.gemfire.internal.datasource.RestartJUnitTest;
-import com.gemstone.gemfire.util.test.TestUtil;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import junit.framework.TestCase;
+import org.junit.experimental.categories.Category;
+
+import javax.naming.Context;
+import javax.transaction.*;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class GlobalTransactionJUnitTest extends TestCase {
@@ -54,9 +47,9 @@ public class GlobalTransactionJUnitTest extends TestCase {
@Override
protected void setUp() throws Exception {
props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(GlobalTransactionJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
utx = new UserTransactionImpl();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/JtaIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/JtaIntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/JtaIntegrationJUnitTest.java
index e3feb01..24b7aee 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/JtaIntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/JtaIntegrationJUnitTest.java
@@ -16,27 +16,20 @@
*/
package com.gemstone.gemfire.internal.jta;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.apache.logging.log4j.Logger;
import org.junit.After;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import javax.transaction.Transaction;
+import javax.transaction.TransactionManager;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Moved some non-DUnit tests over from com/gemstone/gemfire/internal/jta/dunit/JTADUnitTest
@@ -58,7 +51,7 @@ public class JtaIntegrationJUnitTest {
@Test
public void testBug43987() {
//InternalDistributedSystem ds = getSystem(); // ties us in to the DS owned by DistributedTestCase.
- CacheFactory cf = new CacheFactory().set("mcast-port", "0");//(ds.getProperties());
+ CacheFactory cf = new CacheFactory().set(MCAST_PORT, "0");//(ds.getProperties());
Cache cache = cf.create(); // should just reuse the singleton DS owned by DistributedTestCase.
RegionFactory<String, String> rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
Region<String, String> r = rf.create("JTA_reg");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionImplJUnitTest.java
index f5bb3b5..33df027 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionImplJUnitTest.java
@@ -20,23 +20,17 @@
*/
package com.gemstone.gemfire.internal.jta;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.*;
+import org.junit.experimental.categories.Category;
import javax.transaction.Synchronization;
import javax.transaction.UserTransaction;
+import java.util.Properties;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
/**
*/
@@ -51,7 +45,7 @@ public class TransactionImplJUnitTest {
@BeforeClass
public static void beforeClass() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
tm = TransactionManagerImpl.getTransactionManager();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionManagerImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionManagerImplJUnitTest.java
index 5f7be9f..fa91ce9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionManagerImplJUnitTest.java
@@ -16,31 +16,19 @@
*/
package com.gemstone.gemfire.internal.jta;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.*;
+import org.junit.experimental.categories.Category;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.Synchronization;
-import javax.transaction.SystemException;
-import javax.transaction.Transaction;
-import javax.transaction.UserTransaction;
+import javax.transaction.*;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
import javax.transaction.xa.Xid;
+import java.util.Properties;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Test TransactionManagerImpl methods not tested by UserTransactionImplTest
@@ -57,7 +45,7 @@ public class TransactionManagerImplJUnitTest {
@BeforeClass
public static void beforeClass() throws Exception{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
tm = TransactionManagerImpl.getTransactionManager();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
index 6148bef..2bd6790 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
@@ -16,36 +16,31 @@
*/
package com.gemstone.gemfire.internal.jta;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.datasource.GemFireTransactionDataSource;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
+import junit.framework.TestCase;
+import org.junit.FixMethodOrder;
+import org.junit.experimental.categories.Category;
+import org.junit.runners.MethodSorters;
+
+import javax.naming.Context;
+import javax.sql.DataSource;
+import javax.transaction.UserTransaction;
+import java.io.*;
import java.sql.Connection;
import java.sql.ResultSet;
-//import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
import java.util.Random;
-import javax.naming.Context;
-import javax.sql.DataSource;
-import javax.transaction.UserTransaction;
-
-import junit.framework.TestCase;
-
-import org.junit.FixMethodOrder;
-import org.junit.experimental.categories.Category;
-import org.junit.runners.MethodSorters;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.datasource.GemFireTransactionDataSource;
-import com.gemstone.gemfire.util.test.TestUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+//import java.sql.SQLException;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Category(IntegrationTest.class)
@@ -58,7 +53,7 @@ public class TransactionTimeOutJUnitTest extends TestCase {
protected void setUp() throws Exception {
super.setUp();
props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
int pid = new Random().nextInt();
File tmpFile = File.createTempFile("dunit-cachejta_", ".xml");
tmpFile.deleteOnExit();
@@ -70,8 +65,8 @@ public class TransactionTimeOutJUnitTest extends TestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
- // props.setProperty("cache-xml-file","D:\\projects\\JTA\\cachejta.xml");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ // props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME,"D:\\projects\\JTA\\cachejta.xml");
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
cache.getLogger().fine("SWAP:running test:"+getName());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/UserTransactionImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/UserTransactionImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/UserTransactionImplJUnitTest.java
index cae89a3..6f78b0e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/UserTransactionImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/UserTransactionImplJUnitTest.java
@@ -16,26 +16,21 @@
*/
package com.gemstone.gemfire.internal.jta;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-
-import javax.transaction.Status;
-import javax.transaction.Transaction;
-import javax.transaction.UserTransaction;
-
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import javax.transaction.Status;
+import javax.transaction.Transaction;
+import javax.transaction.UserTransaction;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*/
@@ -50,7 +45,7 @@ public class UserTransactionImplJUnitTest {
@BeforeClass
public static void beforeClass() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
tm = TransactionManagerImpl.getTransactionManager();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
index e94ddf6..874a04d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
@@ -16,24 +16,10 @@
*/
package com.gemstone.gemfire.internal.jta.dunit;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.sql.SQLException;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-import javax.transaction.UserTransaction;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -42,6 +28,13 @@ import com.gemstone.gemfire.test.dunit.LogWriterUtils;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.util.test.TestUtil;
+import javax.naming.Context;
+import javax.sql.DataSource;
+import javax.transaction.UserTransaction;
+import java.io.*;
+import java.sql.SQLException;
+import java.util.Properties;
+
public class ExceptionsDUnitTest extends DistributedTestCase {
static DistributedSystem ds;
@@ -132,9 +125,9 @@ public class ExceptionsDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
// String tableName = "";
- // props.setProperty("mcast-port", "10339");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
// ds = DistributedSystem.connect(props);
ds = (new ExceptionsDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
index c66f57a..9dd4dbe 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
@@ -16,36 +16,24 @@
*/
package com.gemstone.gemfire.internal.jta.dunit;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+import java.io.*;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
+
public class IdleTimeOutDUnitTest extends DistributedTestCase {
static DistributedSystem ds;
@@ -140,9 +128,9 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
String tableName = "";
- // props.setProperty("mcast-port", "10339");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
// ds = DistributedSystem.connect(props);
ds = (new IdleTimeOutDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
index fb617d9..644809f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
@@ -16,40 +16,27 @@
*/
package com.gemstone.gemfire.internal.jta.dunit;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.RMIException;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
+import org.apache.logging.log4j.Logger;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+import java.io.*;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class LoginTimeOutDUnitTest extends DistributedTestCase {
private static final Logger logger = LogService.getLogger();
@@ -145,8 +132,8 @@ public class LoginTimeOutDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
- props.setProperty("mcast-port", "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(MCAST_PORT, "0");
String tableName = "";
cache = new CacheFactory(props).create();
if (className != null && !className.equals("")) {
[07/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
index 0194132..f284f02 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
@@ -16,24 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.management.DistributedRegionMXBean;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.ManagerMXBean;
@@ -49,10 +33,21 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOG_LEVEL;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.NAME;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
/**
* The GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest class is test suite of test cases testing the Gfsh
* 'get' data command when a cache miss occurs on data in a Region with a CacheLoader defined.
@@ -146,8 +141,8 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
private Properties createDistributedSystemProperties(final String gemfireName) {
Properties distributedSystemProperties = new Properties();
- distributedSystemProperties.setProperty(LOG_LEVEL_NAME, GEMFIRE_LOG_LEVEL);
- distributedSystemProperties.setProperty(NAME_NAME, gemfireName);
+ distributedSystemProperties.setProperty(LOG_LEVEL, GEMFIRE_LOG_LEVEL);
+ distributedSystemProperties.setProperty(NAME, gemfireName);
return distributedSystemProperties;
}
@@ -270,7 +265,7 @@ public class GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest extends C
}
public String getName() {
- return getConfiguration().getProperty(NAME_NAME);
+ return getConfiguration().getProperty(SystemConfigurationProperties.NAME);
}
public VM getVm() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
index b27e76e..0be65d2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
@@ -16,21 +16,21 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-import com.gemstone.gemfire.util.test.TestUtil;
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
* @since GemFire 8.1
@@ -48,10 +48,10 @@ public class HTTPServiceSSLSupportJUnitTest {
@After
public void tearDown() throws Exception {
- System.clearProperty("gemfire.javax.net.ssl.keyStore");
- System.clearProperty("gemfire.javax.net.ssl.keyStorePassword");
- System.clearProperty("gemfire.javax.net.ssl.trustStore");
- System.clearProperty("gemfire.javax.net.ssl.trustStorePassword");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStore");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStorePassword");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStore");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStorePassword");
System.clearProperty("gemfireSecurityPropertyFile");
}
@@ -73,7 +73,7 @@ public class HTTPServiceSSLSupportJUnitTest {
public void testSSLWithClusterSSL() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
localProps.setProperty(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
localProps.setProperty(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME, "password");
@@ -100,15 +100,15 @@ public class HTTPServiceSSLSupportJUnitTest {
public void testSSLWithDeprecatedClusterSSL_HTTPService() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
- System.setProperty("gemfire.javax.net.ssl.keyStore", jks.getCanonicalPath());
- System.setProperty("gemfire.javax.net.ssl.keyStorePassword", "password");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStore", jks.getCanonicalPath());
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStorePassword", "password");
localProps.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, "SSL");
localProps.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
- System.setProperty("gemfire.javax.net.ssl.trustStore", jks.getCanonicalPath());
- System.setProperty("gemfire.javax.net.ssl.trustStorePassword", "password");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStore", jks.getCanonicalPath());
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStorePassword", "password");
DistributionConfigImpl config = new DistributionConfigImpl(localProps);
@@ -128,7 +128,7 @@ public class HTTPServiceSSLSupportJUnitTest {
public void testSSLWithDeprecatedClusterSSL_HTTPService_WithSSL_Properties() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
localProps.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, "SSL");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
index 0707766..4bd6cd5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
@@ -25,12 +25,10 @@ import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
import com.gemstone.gemfire.management.internal.cli.shell.GfshConfig;
-import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.ClassRule;
-import org.junit.Ignore;
import org.junit.Test;
import org.junit.contrib.java.lang.system.ProvideSystemProperty;
import org.junit.experimental.categories.Category;
@@ -38,6 +36,8 @@ import org.junit.experimental.categories.Category;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase.commandResultToString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -57,8 +57,8 @@ public class HelpCommandsIntegrationTest {
jmxPort = AvailablePortHelper.getRandomAvailableTCPPort();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "");
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ localProps.setProperty(LOCATORS, "");
+ localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
index 3e6946a..456da75 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -16,21 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
@@ -41,20 +30,20 @@ import com.gemstone.gemfire.management.internal.cli.domain.Stock;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
@Category(DistributedTest.class)
public class IndexCommandsDUnitTest extends CliCommandTestBase {
@@ -611,8 +600,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(DistributionConfig.NAME_NAME, "Locator");
- locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
try {
@@ -639,8 +628,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
// Start the default manager
Properties managerProps = new Properties();
- managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ managerProps.setProperty(MCAST_PORT, "0");
+ managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
// Create a cache in VM 1
@@ -649,8 +638,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
@Override
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
getSystem(localProps);
assertNotNull(getCache());
@@ -692,8 +681,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
getCache().close();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
@@ -737,8 +726,8 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
getCache().close();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
@@ -777,7 +766,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, VM1Name);
+ props.setProperty(SystemConfigurationProperties.NAME, VM1Name);
props.setProperty(DistributionConfig.GROUPS_NAME, group1);
getSystem(props);
Region parReg = createParReg(parRegName, getCache(), String.class, Stock.class);
@@ -811,7 +800,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, VM1Name);
+ props.setProperty(SystemConfigurationProperties.NAME, VM1Name);
props.setProperty(DistributionConfig.GROUPS_NAME, group1);
getSystem(props);
Region parReg = createParReg(parRegName, getCache(), String.class, Stock.class);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
index 02a5554..469ff7b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
@@ -16,30 +16,26 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.Serializable;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.Serializable;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
+import static com.gemstone.gemfire.test.dunit.Assert.assertNotNull;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getDUnitLogLevel;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+
/**
* The ListAndDescribeDiskStoreCommandsDUnitTest class is a test suite of functional tests cases testing the proper
* functioning of the 'list disk-store' and 'describe disk-store' commands. </p>
@@ -126,8 +122,8 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
private Properties createDistributedSystemProperties(final String gemfireName) {
final Properties distributedSystemProperties = new Properties();
- distributedSystemProperties.setProperty(LOG_LEVEL_NAME, getDUnitLogLevel());
- distributedSystemProperties.setProperty(NAME_NAME, gemfireName);
+ distributedSystemProperties.setProperty(SystemConfigurationProperties.LOG_LEVEL, getDUnitLogLevel());
+ distributedSystemProperties.setProperty(SystemConfigurationProperties.NAME, gemfireName);
return distributedSystemProperties;
}
@@ -174,7 +170,7 @@ public class ListAndDescribeDiskStoreCommandsDUnitTest extends CliCommandTestBas
}
public String getName() {
- return getDistributedSystemConfiguration().getProperty(NAME_NAME);
+ return getDistributedSystemConfiguration().getProperty(SystemConfigurationProperties.NAME);
}
public VM getVm() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index e747685..e190dba 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -16,22 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.compression.SnappyCompressor;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.RegionEntryContext;
import com.gemstone.gemfire.management.cli.Result.Status;
@@ -46,8 +34,12 @@ import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
@Category(DistributedTest.class)
public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
@@ -69,11 +61,11 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
private Properties createProperties(String name, String groups) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.NAME_NAME, name);
+ props.setProperty(SystemConfigurationProperties.NAME, name);
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index 313f782..fb50491 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -16,33 +16,12 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.Index;
import com.gemstone.gemfire.cache.query.IndexStatistics;
import com.gemstone.gemfire.cache.query.IndexType;
import com.gemstone.gemfire.cache.query.SelectResults;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.lang.MutableIdentifiable;
import com.gemstone.gemfire.internal.lang.ObjectUtils;
@@ -55,6 +34,16 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.SerializableRunnableIF;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.Serializable;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicLong;
+
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getDUnitLogLevel;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
/**
* The ListIndexCommandDUnitTest class is distributed test suite of test cases for testing the index-based GemFire shell
@@ -138,7 +127,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
final Properties distributedSystemProperties = new Properties();
distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
- distributedSystemProperties.setProperty(DistributionConfig.NAME_NAME, gemfireName);
+ distributedSystemProperties.setProperty(SystemConfigurationProperties.NAME, gemfireName);
return distributedSystemProperties;
}
@@ -328,7 +317,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
}
public String getName() {
- return getConfiguration().getProperty(DistributionConfig.NAME_NAME);
+ return getConfiguration().getProperty(SystemConfigurationProperties.NAME);
}
public VM getVm() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
index c8e0ed9..fb21bf3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -16,33 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -57,6 +34,18 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.getServerHostName;
@Category(DistributedTest.class)
public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
@@ -88,11 +77,11 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
private Properties createProperties(String name, String groups) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.NAME_NAME, name);
+ props.setProperty(SystemConfigurationProperties.NAME, name);
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
return props;
}
@@ -180,8 +169,8 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
private Properties createProperties(Host host, int locatorPort) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, getServerHostName(host) + "[" + locatorPort + "]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, getServerHostName(host) + "[" + locatorPort + "]");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index 5238765..a4d5496 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -16,22 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.IgnoredException.*;
-import static com.gemstone.gemfire.test.dunit.Invoke.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.IOException;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.lang.ThreadUtils;
@@ -39,24 +25,25 @@ import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.cli.Result.Status;
import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
-import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
+import com.gemstone.gemfire.management.internal.cli.result.*;
import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.SectionResultData;
-import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
-import com.gemstone.gemfire.management.internal.cli.result.ResultData;
-import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
+import static com.gemstone.gemfire.test.dunit.Invoke.invokeInEveryVM;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
/**
* Dunit class for testing gemfire function commands : GC, Shutdown
*/
@@ -71,7 +58,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
invokeInEveryVM(new SerializableRunnable("reset log level") {
public void run() {
if (cachedLogLevel != null) {
- System.setProperty("gemfire.log-level", cachedLogLevel);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, cachedLogLevel);
cachedLogLevel = null;
}
}
@@ -82,7 +69,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testGCForGroup() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
String command = "gc --group=Group1";
@@ -137,7 +124,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
public void testShowLogDefault() throws IOException {
Properties props = new Properties();
try {
- props.setProperty("log-file", "testShowLogDefault.log");
+ props.setProperty(DistributionConfig.LOG_FILE_NAME, "testShowLogDefault.log");
setUpJmxManagerOnVm0ThenConnect(props);
final VM vm1 = Host.getHost(0).getVM(0);
final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
@@ -159,7 +146,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testShowLogNumLines() {
Properties props = new Properties();
- props.setProperty("log-file", "testShowLogNumLines.log");
+ props.setProperty(DistributionConfig.LOG_FILE_NAME, "testShowLogNumLines.log");
try {
setUpJmxManagerOnVm0ThenConnect(props);
final VM vm1 = Host.getHost(0).getVM(0);
@@ -414,7 +401,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
String serverName1 = (String) vm0.invoke(new SerializableCallable() {
@Override
public Object call() throws Exception {
- cachedLogLevel = System.getProperty("gemfire.log-level");
+ cachedLogLevel = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "log-level");
return GemFireCacheImpl.getInstance().getDistributedSystem().getDistributedMember().getId();
}
});
@@ -422,7 +409,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
String serverName2 = (String) vm1.invoke(new SerializableCallable() {
@Override
public Object call() throws Exception {
- cachedLogLevel = System.getProperty("gemfire.log-level");
+ cachedLogLevel = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "log-level");
return GemFireCacheImpl.getInstance().getDistributedSystem().getDistributedMember().getId();
}
});
@@ -452,7 +439,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testChangeLogLevelForGrps() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
final VM vm1 = Host.getHost(0).getVM(1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
index 57b94db..a60cf6c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
@@ -16,19 +16,11 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.logging.LogWriterImpl;
@@ -39,10 +31,19 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
+import static com.gemstone.gemfire.test.dunit.Assert.fail;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+
/**
* Dunit class for testing gemfire function commands : export logs
*/
@@ -85,7 +86,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
@Test
public void testExportLogsForGroup() throws IOException {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Manager");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
String dir = getCurrentTimeString();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
index ef26a59..d58a226 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -16,21 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CopyOnWriteArrayList;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
@@ -46,10 +35,23 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
/**
* A distributed test suite of test cases for testing the queue commands that are part of Gfsh.
*
@@ -90,7 +92,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
diskStoreDir.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
getSystem(localProps);
getCache();
@@ -102,7 +104,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
vm2.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm2Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
getSystem(localProps);
getCache();
@@ -257,8 +259,8 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(DistributionConfig.NAME_NAME, "Locator");
- locatorProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
try {
@@ -285,8 +287,8 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
// Start the default manager
Properties managerProps = new Properties();
- managerProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- managerProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ managerProps.setProperty(MCAST_PORT, "0");
+ managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
// Create a cache in VM 1
@@ -295,8 +297,8 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
@Override
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
getSystem(localProps);
assertNotNull(getCache());
@@ -360,8 +362,8 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
assertTrue(cache.isClosed());
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- localProps.setProperty(DistributionConfig.LOCATORS_NAME, "localhost:" + locatorPort);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
getSystem(localProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
index 334d2e1..a77aeee 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
@@ -16,25 +16,11 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
-import static com.gemstone.gemfire.management.internal.cli.CliUtil.*;
-import static com.gemstone.gemfire.management.internal.cli.i18n.CliStrings.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.NetworkUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
import com.gemstone.gemfire.internal.ClassBuilder;
@@ -50,10 +36,24 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static com.gemstone.gemfire.management.internal.cli.CliUtil.getAllNormalMembers;
+import static com.gemstone.gemfire.management.internal.cli.i18n.CliStrings.*;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.NetworkUtils.getIPLiteral;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
/**
* DUnit test to test export and import of shared configuration.
*/
@@ -133,15 +133,15 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File(locator1LogFilePath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, locator1Name);
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "config");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_START_NAME, "true");
- locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(locator1JmxHost));
- locatorProps.setProperty(JMX_MANAGER_PORT_NAME, String.valueOf(locator1JmxPort));
- locatorProps.setProperty(HTTP_SERVICE_PORT_NAME, String.valueOf(locator1HttpPort));
+ locatorProps.setProperty(NAME, locator1Name);
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "config");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
+ locatorProps.setProperty(JMX_MANAGER, "true");
+ locatorProps.setProperty(JMX_MANAGER_START, "true");
+ locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS, String.valueOf(locator1JmxHost));
+ locatorProps.setProperty(JMX_MANAGER_PORT, String.valueOf(locator1JmxPort));
+ locatorProps.setProperty(HTTP_SERVICE_PORT, String.valueOf(locator1HttpPort));
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator1Port, locatorLogFile, null, locatorProps);
@@ -175,10 +175,10 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() {
Properties localProps = new Properties();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locator1Port);
- localProps.setProperty(GROUPS_NAME, groupName);
- localProps.setProperty(NAME_NAME, "DataMember");
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locator1Port);
+ localProps.setProperty(GROUPS, groupName);
+ localProps.setProperty(SystemConfigurationProperties.NAME, "DataMember");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
@@ -286,11 +286,11 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
public void run() {
final File locatorLogFile = new File(locator2LogFilePath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, locator2Name);
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
- locatorProps.setProperty(LOCATORS_NAME, "localhost:" + locator1Port);
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, locator2Name);
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
+ locatorProps.setProperty(LOCATORS, "localhost:" + locator1Port);
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator2Port, locatorLogFile, null, locatorProps);
@@ -317,8 +317,8 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
assertNotNull(clusterConfig);
assertTrue(clusterConfig.getCacheXmlContent().contains(region2Name));
assertTrue(clusterConfig.getJarNames().contains(deployedJarName));
- assertTrue(clusterConfig.getGemfireProperties().getProperty(LOG_LEVEL_NAME).equals(logLevel));
- assertTrue(clusterConfig.getGemfireProperties().getProperty(STATISTIC_ARCHIVE_FILE_NAME).equals(startArchiveFileName));
+ assertTrue(clusterConfig.getGemfireProperties().getProperty(LOG_LEVEL).equals(logLevel));
+ assertTrue(clusterConfig.getGemfireProperties().getProperty(STATISTIC_ARCHIVE_FILE).equals(startArchiveFileName));
} catch (IOException e) {
fail("Unable to create a locator with a shared configuration", e);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
index fec6c5e..06ebd15 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommandsDUnitTest.java
@@ -16,15 +16,10 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.File;
-import java.util.concurrent.TimeUnit;
-
import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
import com.gemstone.gemfire.distributed.LocatorLauncher;
import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.util.IOUtils;
@@ -36,10 +31,15 @@ import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
import com.gemstone.gemfire.management.internal.cli.util.CommandStringBuilder;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+
@Category(DistributedTest.class)
public class ShellCommandsDUnitTest extends CliCommandTestBase {
@@ -63,11 +63,11 @@ public class ShellCommandsDUnitTest extends CliCommandTestBase {
final int jmxManagerPort = ports[0];
final int locatorPort = ports[1];
- System.setProperty("gemfire.jmx-manager-port", String.valueOf(jmxManagerPort));
- System.setProperty("gemfire.jmx-manager-http-port", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port", String.valueOf(jmxManagerPort));
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-http-port", "0");
- assertEquals(String.valueOf(jmxManagerPort), System.getProperty("gemfire.jmx-manager-port"));
- assertEquals("0", System.getProperty("gemfire.jmx-manager-http-port"));
+ assertEquals(String.valueOf(jmxManagerPort), System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-port"));
+ assertEquals("0", System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "jmx-manager-http-port"));
final String pathname = (getClass().getSimpleName() + "_" + getTestMethodName());
final File workingDirectory = new File(pathname);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
index df01f14..42ef6eb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
@@ -16,24 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Invoke.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionContext;
@@ -55,6 +37,20 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Invoke.invokeInEveryVM;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
/**
* This DUnit tests uses same code as GemFireDeadlockDetectorDUnitTest and uses the command processor for executing the
@@ -166,7 +162,7 @@ public class ShowDeadlockDUnitTest extends JUnit4CacheTestCase {
private Properties createProperties(Host host, int locatorPort) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
// props.setProperty(DistributionConfig.LOCATORS_NAME, getServerHostName(host) + "[" + locatorPort + "]");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
index 2a20672..cc7017a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
@@ -16,45 +16,36 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.Properties;
-import javax.management.ObjectName;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.management.CacheServerMXBean;
-import com.gemstone.gemfire.management.DistributedRegionMXBean;
-import com.gemstone.gemfire.management.DistributedSystemMXBean;
-import com.gemstone.gemfire.management.ManagementService;
-import com.gemstone.gemfire.management.MemberMXBean;
-import com.gemstone.gemfire.management.RegionMXBean;
+import com.gemstone.gemfire.management.*;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.cli.Result.Status;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
import com.gemstone.gemfire.management.internal.cli.remote.CommandProcessor;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
+import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+
@Category(DistributedTest.class)
public class ShowMetricsDUnitTest extends CliCommandTestBase {
@@ -62,7 +53,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
private void createLocalSetUp() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, "Controller");
+ localProps.setProperty(SystemConfigurationProperties.NAME, "Controller");
getSystem(localProps);
Cache cache = getCache();
RegionFactory<Integer, Integer> dataRegionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE);
@@ -83,7 +74,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
@@ -126,7 +117,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.NAME_NAME, vm1Name);
+ localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index 2614091..61a20d9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -16,13 +16,7 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.LogWriterUtils.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.cli.Result.Status;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
@@ -32,10 +26,18 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.assertFalse;
+import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
+import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+
/***
* DUnit test for 'show stack-trace' command
*/
@@ -51,11 +53,11 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
private Properties createProperties(Host host, String name, String groups) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.NAME_NAME, name);
+ props.setProperty(SystemConfigurationProperties.NAME, name);
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
index d02dff5..ee80360 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/UserCommandsDUnitTest.java
@@ -16,13 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassBuilder;
import com.gemstone.gemfire.internal.ClassPathLoader;
@@ -33,10 +26,16 @@ import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
-
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
+
/**
* Unit tests for configuring user commands.
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java
index 9f84a36..6e55000 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java
@@ -16,12 +16,7 @@
*/
package com.gemstone.gemfire.management.internal.cli.functions;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.management.internal.cli.domain.DataCommandResult;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.AfterClass;
@@ -31,6 +26,7 @@ import org.junit.experimental.categories.Category;
import java.util.List;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -87,7 +83,7 @@ public class DataCommandFunctionJUnitTest {
@BeforeClass
public static void setUp() throws Exception {
cache = new CacheFactory().
- set(DistributionConfig.MCAST_PORT_NAME, "0").
+ set(MCAST_PORT, "0").
create();
RegionFactory factory = cache.createRegionFactory(RegionShortcut.PARTITION);
region1 = factory.create(PARTITIONED_REGION);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
index f0c685b..e6ee71b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
@@ -16,30 +16,12 @@
*/
package com.gemstone.gemfire.management.internal.configuration;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.test.dunit.Wait.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DiskStoreFactory;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.SharedConfiguration;
@@ -57,6 +39,19 @@ import com.gemstone.gemfire.test.dunit.VM;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.dunit.cache.internal.JUnit4CacheTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
+import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
/**
* Tests the starting up of shared configuration, installation of {@link ConfigurationRequestHandler}
@@ -99,10 +94,10 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator1Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, locator1Name);
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, locator1Name);
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator1Port, locatorLogFile, null, locatorProps);
@@ -148,11 +143,11 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator2Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, locator2Name);
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(LOCATORS_NAME, "localhost:" + locator1Port);
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, locator2Name);
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(LOCATORS, "localhost:" + locator1Port);
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator2Port, locatorLogFile, null, locatorProps);
@@ -234,10 +229,10 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator1Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, "Locator1");
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "info");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator1");
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "info");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator1Port, locatorLogFile, null, locatorProps);
@@ -266,9 +261,9 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
@Override
public Object call() {
Properties localProps = new Properties();
- localProps.setProperty(MCAST_PORT_NAME, "0");
- localProps.setProperty(LOCATORS_NAME, "localhost:" + locator1Port);
- localProps.setProperty(GROUPS_NAME, testGroup);
+ localProps.setProperty(MCAST_PORT, "0");
+ localProps.setProperty(LOCATORS, "localhost:" + locator1Port);
+ localProps.setProperty(GROUPS, testGroup);
getSystem(localProps);
Cache cache = getCache();
@@ -293,7 +288,7 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
assertTrue(scw.addXmlEntity(xmlEntity, new String[] {testGroup}));
//Modify property and cache attributes
Properties clusterProperties = new Properties();
- clusterProperties.setProperty(LOG_LEVEL_NAME, clusterLogLevel);
+ clusterProperties.setProperty(LOG_LEVEL, clusterLogLevel);
XmlEntity cacheEntity = XmlEntity.builder().withType(CacheXml.CACHE).build();
Map<String, String> cacheAttributes = new HashMap<String, String>();
cacheAttributes.put(CacheXml.COPY_ON_READ, "true");
@@ -301,7 +296,7 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
//assertTrue(scw.modifyProperties(clusterProperties, null)); // TODO: why is this commented out?
assertTrue(scw.modifyPropertiesAndCacheAttributes(clusterProperties, cacheEntity, null));
- clusterProperties.setProperty(LOG_LEVEL_NAME, groupLogLevel);
+ clusterProperties.setProperty(LOG_LEVEL, groupLogLevel);
assertTrue(scw.modifyPropertiesAndCacheAttributes(clusterProperties, cacheEntity, new String[]{testGroup}));
//Add a jar
@@ -326,11 +321,11 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator2Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(NAME_NAME, "Locator2");
- locatorProps.setProperty(MCAST_PORT_NAME, "0");
- locatorProps.setProperty(LOG_LEVEL_NAME, "info");
- locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
- locatorProps.setProperty(LOCATORS_NAME, "localhost:" + locator1Port);
+ locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator2");
+ locatorProps.setProperty(MCAST_PORT, "0");
+ locatorProps.setProperty(LOG_LEVEL, "info");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
+ locatorProps.setProperty(LOCATORS, "localhost:" + locator1Port);
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator2Port, locatorLogFile, null, locatorProps);
@@ -358,14 +353,14 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
assertNotNull(clusterConfig);
assertNotNull(clusterConfig.getJarNames());
assertTrue(clusterConfig.getJarNames().contains("foo.jar"));
- assertTrue(clusterConfig.getGemfireProperties().getProperty(LOG_LEVEL_NAME).equals(clusterLogLevel));
+ assertTrue(clusterConfig.getGemfireProperties().getProperty(LOG_LEVEL).equals(clusterLogLevel));
assertNotNull(clusterConfig.getCacheXmlContent());
Configuration testGroupConfiguration = entireConfiguration.get(testGroup);
assertNotNull(testGroupConfiguration);
assertNotNull(testGroupConfiguration.getJarNames());
assertTrue(testGroupConfiguration.getJarNames().contains("bar.jar"));
- assertTrue(testGroupConfiguration.getGemfireProperties().getProperty(LOG_LEVEL_NAME).equals(groupLogLevel));
+ assertTrue(testGroupConfiguration.getGemfireProperties().getProperty(LOG_LEVEL).equals(groupLogLevel));
assertNotNull(testGroupConfiguration.getCacheXmlContent());
assertTrue(testGroupConfiguration.getCacheXmlContent().contains(REGION1));
@@ -400,13 +395,13 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
assertNull(configResponse.getJarNames());
assertNull(configResponse.getJars());
assertTrue(clusterConfiguration.getJarNames().isEmpty());
- assertTrue(clusterConfiguration.getGemfireProperties().getProperty(LOG_LEVEL_NAME).equals(clusterLogLevel));
+ assertTrue(clusterConfiguration.getGemfireProperties().getProperty(LOG_LEVEL).equals(clusterLogLevel));
Configuration testGroupConfiguration = requestedConfiguration.get(testGroup);
assertNotNull(testGroupConfiguration);
assertFalse(testGroupConfiguration.getCacheXmlContent().contains(REGION1));
assertTrue(testGroupConfiguration.getJarNames().isEmpty());
- assertTrue(testGroupConfiguration.getGemfireProperties().getProperty(LOG_LEVEL_NAME).equals(groupLogLevel));
+ assertTrue(testGroupConfiguration.getGemfireProperties().getProperty(LOG_LEVEL).equals(groupLogLevel));
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
Map<InternalDistributedMember, Collection<String>> locatorsWithSharedConfiguration = cache.getDistributionManager().getAllHostedLocatorsWithSharedConfiguration();
[58/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index 2a7c144..89db1eb 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -56,6 +56,8 @@ import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Implements the acceptor thread on the bridge server. Accepts connections from
* the edge and starts up threads to process requests from these.
@@ -601,13 +603,12 @@ public class AcceptorImpl extends Acceptor implements Runnable
}
String authenticator = this.cache.getDistributedSystem().getProperties()
- .getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ .getProperty(SECURITY_CLIENT_AUTHENTICATOR);
isAuthenticationRequired = (authenticator != null && authenticator.length() > 0) ? true
: false;
String postAuthzFactoryName = this.cache.getDistributedSystem()
- .getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME);
+ .getProperties().getProperty(SECURITY_CLIENT_ACCESSOR_PP);
isPostAuthzCallbackPresent = (postAuthzFactoryName != null && postAuthzFactoryName
.length() > 0) ? true : false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
index 517d497..ba2a7a8 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheClientNotifier.java
@@ -54,6 +54,8 @@ import java.security.Principal;
import java.util.*;
import java.util.concurrent.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Class <code>CacheClientNotifier</code> works on the server and manages
* client socket connections to clients requesting notification of updates and
@@ -312,7 +314,7 @@ public class CacheClientNotifier {
DistributedSystem system = this.getCache().getDistributedSystem();
Properties sysProps = system.getProperties();
String authenticator = sysProps
- .getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ .getProperty(SECURITY_CLIENT_AUTHENTICATOR);
//TODO;hitesh for conflation
if (clientVersion.compareTo(Version.GFE_603) >= 0) {
byte[] overrides = HandShake.extractOverrides(new byte[] { (byte) dis.read() });
@@ -349,13 +351,13 @@ public class CacheClientNotifier {
securityLogWriter.fine("CacheClientNotifier: successfully verified credentials for proxyID: " + proxyID + " having principal: " + principal.getName());
}
String postAuthzFactoryName = sysProps
- .getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME);
+ .getProperty(SECURITY_CLIENT_ACCESSOR_PP);
if (postAuthzFactoryName != null && postAuthzFactoryName.length() > 0) {
if (principal == null) {
securityLogWriter.warning(
LocalizedStrings.CacheClientNotifier_CACHECLIENTNOTIFIER_POST_PROCESS_AUTHORIZATION_CALLBACK_ENABLED_BUT_AUTHENTICATION_CALLBACK_0_RETURNED_WITH_NULL_CREDENTIALS_FOR_PROXYID_1,
new Object[] {
- DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, proxyID });
+ SECURITY_CLIENT_AUTHENTICATOR, proxyID });
}
Method authzMethod = ClassLoadUtil
.methodFromName(postAuthzFactoryName);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
index 8c2fda7..9bc8956 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/HandShake.java
@@ -240,7 +240,7 @@ public class HandShake implements ClientHandShake
// Note: credentials should always be the last piece in handshake for
// Diffie-Hellman key exchange to work
String authenticator = this.system.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ SECURITY_CLIENT_AUTHENTICATOR);
if (clientVersion.compareTo(Version.GFE_603) >= 0) {
setOverrides(new byte[] { dis.readByte() });
} else {
@@ -1784,7 +1784,7 @@ public class HandShake implements ClientHandShake
AuthenticationFailedException {
String methodName = this.system.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ SECURITY_CLIENT_AUTHENTICATOR);
return verifyCredentials(methodName, this.credentials, this.system
.getSecurityProperties(), (InternalLogWriter)this.system.getLogWriter(), (InternalLogWriter)this.system
.getSecurityLogWriter(), this.id.getDistributedMember());
@@ -1814,7 +1814,7 @@ public class HandShake implements ClientHandShake
return;
}
String authenticator = this.system.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ SECURITY_CLIENT_AUTHENTICATOR);
Properties peerWanProps = readCredentials(dis, dos, authenticator,
this.system);
verifyCredentials(authenticator, peerWanProps, this.system
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
index 0c99033..c35ccb5 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
@@ -24,7 +24,6 @@ import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.client.internal.AbstractOp;
import com.gemstone.gemfire.cache.client.internal.Connection;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
@@ -61,6 +60,8 @@ import java.util.Random;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Provides an implementation for the server socket end of the hierarchical
* cache connection. Each server connection runs in its own thread to maximize
@@ -1035,7 +1036,7 @@ public class ServerConnection implements Runnable {
DistributedSystem system = this.getDistributedSystem();
String methodName = system.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ SECURITY_CLIENT_AUTHENTICATOR);
Principal principal = HandShake.verifyCredentials(methodName, credentials,
system.getSecurityProperties(), (InternalLogWriter)system.getLogWriter(), (InternalLogWriter)system
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java
index ea90e6e..01c36bd 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerHandShakeProcessor.java
@@ -47,6 +47,8 @@ import java.net.SocketTimeoutException;
import java.security.Principal;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* A <code>ServerHandShakeProcessor</code> verifies the client's version compatibility with server.
*
@@ -362,9 +364,9 @@ public class ServerHandShakeProcessor {
Properties systemProperties = system.getProperties();
//hitesh:auth callbacks
String authzFactoryName = systemProperties
- .getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME);
+ .getProperty(SECURITY_CLIENT_ACCESSOR);
String postAuthzFactoryName = systemProperties
- .getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME);
+ .getProperty(SECURITY_CLIENT_ACCESSOR_PP);
AuthorizeRequest authzRequest = null;
AuthorizeRequestPP postAuthzRequest = null;
@@ -377,7 +379,7 @@ public class ServerHandShakeProcessor {
if (securityLogWriter.warningEnabled()) {
securityLogWriter.warning(
LocalizedStrings.ServerHandShakeProcessor_0_AUTHORIZATION_ENABLED_BUT_AUTHENTICATION_CALLBACK_1_RETURNED_WITH_NULL_CREDENTIALS_FOR_PROXYID_2,
- new Object[] {connection.getName(), DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, connection.getProxyID()});
+ new Object[] {connection.getName(), SECURITY_CLIENT_AUTHENTICATOR, connection.getProxyID()});
}
}
authzRequest = new AuthorizeRequest(authzFactoryName,
@@ -393,7 +395,7 @@ public class ServerHandShakeProcessor {
if (securityLogWriter.warningEnabled()) {
securityLogWriter.warning(
LocalizedStrings.ServerHandShakeProcessor_0_POSTPROCESS_AUTHORIZATION_ENABLED_BUT_NO_AUTHENTICATION_CALLBACK_2_IS_CONFIGURED,
- new Object[] {connection.getName(), DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME});
+ new Object[] {connection.getName(), SECURITY_CLIENT_AUTHENTICATOR});
}
}
postAuthzRequest = new AuthorizeRequestPP(
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
index 892bff8..5cfa58d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
@@ -48,6 +48,8 @@ import java.util.Properties;
import java.util.Set;
import java.util.concurrent.Callable;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class GeodeSecurityUtil {
private static Logger logger = LogService.getLogger();
@@ -231,8 +233,8 @@ public class GeodeSecurityUtil {
if(securityProps==null)
return;
- String shiroConfig = securityProps.getProperty(DistributionConfig.SECURITY_SHIRO_INIT_NAME);
- String customAuthenticator =securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ String shiroConfig = securityProps.getProperty(DistributionConfig.SECURITY_SHIRO_INIT);
+ String customAuthenticator =securityProps.getProperty(SECURITY_CLIENT_AUTHENTICATOR);
if (!com.gemstone.gemfire.internal.lang.StringUtils.isBlank(shiroConfig)) {
IniSecurityManagerFactory factory = new IniSecurityManagerFactory("classpath:"+shiroConfig);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
index 4a29dd3..2bb5183 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.internal.security.shiro;
import com.gemstone.gemfire.cache.operations.OperationContext;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassLoadUtil;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.lang.StringUtils;
@@ -44,6 +43,7 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
import static com.gemstone.gemfire.management.internal.security.ResourceConstants.ACCESS_DENIED_MESSAGE;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class CustomAuthRealm extends AuthorizingRealm{
public static final String REALM_NAME = "CUSTOMAUTHREALM";
@@ -58,9 +58,9 @@ public class CustomAuthRealm extends AuthorizingRealm{
public CustomAuthRealm(Properties securityProps) {
this.securityProps = securityProps;
- this.authzFactoryName = securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME);
- this.postAuthzFactoryName = securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME);
- this.authenticatorFactoryName = securityProps.getProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME);
+ this.authzFactoryName = securityProps.getProperty(SECURITY_CLIENT_ACCESSOR);
+ this.postAuthzFactoryName = securityProps.getProperty(SECURITY_CLIENT_ACCESSOR_PP);
+ this.authenticatorFactoryName = securityProps.getProperty(SECURITY_CLIENT_AUTHENTICATOR);
this.cachedAuthZCallback = new ConcurrentHashMap<>();
this.cachedPostAuthZCallback = new ConcurrentHashMap<>();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index d19c59f..a3d78ed 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -49,6 +49,8 @@ import java.util.concurrent.Semaphore;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicLong;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/** <p>Connection is a socket holder that sends and receives serialized
message objects. A Connection may be closed to preserve system
resources and will automatically be reopened when it's needed.</p>
@@ -2335,7 +2337,7 @@ public class Connection implements Runnable {
String authInit = System
.getProperty(DistributionConfigImpl.SECURITY_SYSTEM_PREFIX
- + DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME);
+ + SECURITY_PEER_AUTH_INIT);
boolean isSecure = authInit != null && authInit.length() != 0;
if (isSecure) {
@@ -3855,7 +3857,7 @@ public class Connection implements Runnable {
try {
String authInit = System
.getProperty(DistributionConfigImpl.SECURITY_SYSTEM_PREFIX
- + DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME);
+ + SECURITY_PEER_AUTH_INIT);
boolean isSecure = authInit!= null && authInit.length() != 0 ;
if (isSecure) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
index f386726..aa0241e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
@@ -69,6 +69,7 @@ import com.gemstone.gemfire.management.internal.configuration.domain.SharedConfi
import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusRequest;
import com.gemstone.gemfire.management.internal.configuration.messages.SharedConfigurationStatusResponse;
import com.gemstone.gemfire.management.internal.security.ResourceOperation;
+import com.gemstone.gemfire.security.AuthenticationFailedException;
import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.CliOption;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
index d199648..7f3847a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
@@ -46,6 +46,8 @@ import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.atomic.AtomicBoolean;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* OperationInvoker JMX Implementation
*
@@ -109,7 +111,7 @@ public class JmxOperationInvoker implements OperationInvoker {
Entry<String, String> entry = it.next();
String key = entry.getKey();
String value = entry.getValue();
- if (key.startsWith("javax.") || key.startsWith("cluster-ssl") || key.startsWith(DistributionConfig.JMX_MANAGER_SSL_NAME)) {
+ if (key.startsWith("javax.") || key.startsWith("cluster-ssl") || key.startsWith(JMX_MANAGER_SSL)) {
key = checkforSystemPropertyPrefix(entry.getKey());
if((key.equals(Gfsh.SSL_ENABLED_CIPHERS) || key.equals(Gfsh.SSL_ENABLED_PROTOCOLS)) && "any".equals(value)){
continue;
@@ -224,7 +226,7 @@ public class JmxOperationInvoker implements OperationInvoker {
String returnKey = key;
if (key.startsWith("javax."))
returnKey = key;
- if (key.startsWith("cluster-ssl") || key.startsWith(DistributionConfig.JMX_MANAGER_SSL_NAME)) {
+ if (key.startsWith("cluster-ssl") || key.startsWith(JMX_MANAGER_SSL)) {
if (key.endsWith("keystore")) {
returnKey = Gfsh.SSL_KEYSTORE;
} else if (key.endsWith("keystore-password")) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 4b61979..615823c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -36,8 +36,7 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests cacheserver ssl support added. See https://svn.gemstone.com/trac/gemfire/ticket/48995 for details
@@ -108,23 +107,18 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
String cacheServerSslprotocols = "any";
String cacheServerSslciphers = "any";
boolean cacheServerSslRequireAuth = true;
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME,
- String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME,
- cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME,
- cacheServerSslciphers);
- gemFireProps.put(
- DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME,
- String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
String keyStore = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, SERVER_KEY_STORE);
String trustStore = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, SERVER_TRUST_STORE);
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks");
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStore);
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password");
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStore);
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks");
+ gemFireProps.put(SERVER_SSL_KEYSTORE, keyStore);
+ gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password");
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStore);
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password");
StringWriter sw = new StringWriter();
PrintWriter writer = new PrintWriter(sw);
@@ -149,21 +143,21 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
String keyStorePath = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, keyStore);
String trustStorePath = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, trustStore);
//using new server-ssl-* properties
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME,
+ gemFireProps.put(SERVER_SSL_ENABLED,
String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME,
+ gemFireProps.put(SERVER_SSL_PROTOCOLS,
cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME,
+ gemFireProps.put(SERVER_SSL_CIPHERS,
cacheServerSslciphers);
gemFireProps.put(
- DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME,
+ SERVER_SSL_REQUIRE_AUTHENTICATION,
String.valueOf(cacheServerSslRequireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks");
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStorePath);
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password");
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStorePath);
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks");
+ gemFireProps.put(SERVER_SSL_KEYSTORE, keyStorePath);
+ gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password");
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStorePath);
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password");
StringWriter sw = new StringWriter();
PrintWriter writer = new PrintWriter(sw);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
index c9d5e84..86691f9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/SSLNoClientAuthDUnitTest.java
@@ -34,8 +34,7 @@ import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Test for GEODE-396
@@ -101,23 +100,23 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase {
String cacheServerSslprotocols = "any";
String cacheServerSslciphers = "any";
boolean cacheServerSslRequireAuth = false;
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME,
+ gemFireProps.put(SERVER_SSL_ENABLED,
String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME,
+ gemFireProps.put(SERVER_SSL_PROTOCOLS,
cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME,
+ gemFireProps.put(SERVER_SSL_CIPHERS,
cacheServerSslciphers);
gemFireProps.put(
- DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME,
+ SERVER_SSL_REQUIRE_AUTHENTICATION,
String.valueOf(cacheServerSslRequireAuth));
String keyStore = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, DEFAULT_STORE);
String trustStore = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, DEFAULT_STORE);
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks");
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStore);
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password");
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStore);
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks");
+ gemFireProps.put(SERVER_SSL_KEYSTORE, keyStore);
+ gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password");
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStore);
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password");
StringWriter sw = new StringWriter();
PrintWriter writer = new PrintWriter(sw);
@@ -142,21 +141,21 @@ public class SSLNoClientAuthDUnitTest extends DistributedTestCase {
String keyStorePath = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, keyStore);
String trustStorePath = TestUtil.getResourcePath(SSLNoClientAuthDUnitTest.class, trustStore);
//using new server-ssl-* properties
- gemFireProps.put(DistributionConfig.SERVER_SSL_ENABLED_NAME,
+ gemFireProps.put(SERVER_SSL_ENABLED,
String.valueOf(cacheServerSslenabled));
- gemFireProps.put(DistributionConfig.SERVER_SSL_PROTOCOLS_NAME,
+ gemFireProps.put(SERVER_SSL_PROTOCOLS,
cacheServerSslprotocols);
- gemFireProps.put(DistributionConfig.SERVER_SSL_CIPHERS_NAME,
+ gemFireProps.put(SERVER_SSL_CIPHERS,
cacheServerSslciphers);
gemFireProps.put(
- DistributionConfig.SERVER_SSL_REQUIRE_AUTHENTICATION_NAME,
+ SERVER_SSL_REQUIRE_AUTHENTICATION,
String.valueOf(cacheServerSslRequireAuth));
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks");
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, keyStorePath);
- gemFireProps.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "password");
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, trustStorePath);
- gemFireProps.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks");
+ gemFireProps.put(SERVER_SSL_KEYSTORE, keyStorePath);
+ gemFireProps.put(SERVER_SSL_KEYSTORE_PASSWORD, "password");
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE, trustStorePath);
+ gemFireProps.put(SERVER_SSL_TRUSTSTORE_PASSWORD, "password");
StringWriter sw = new StringWriter();
PrintWriter writer = new PrintWriter(sw);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
index 824192d..986bf5a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
@@ -26,7 +26,6 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.cache.*;
@@ -43,8 +42,7 @@ import org.junit.experimental.categories.Category;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests the Off-Heap Memory thresholds of {@link ResourceManager}
@@ -1761,7 +1759,7 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
private Properties getOffHeapProperties() {
Properties p = new Properties();
p.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
- p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ p.setProperty(OFF_HEAP_MEMORY_SIZE, "1m");
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
index 2bdcb88..e63ac6d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
@@ -68,9 +68,9 @@ public class QueryParamsAuthorizationDUnitTest extends CacheTestCase {
public Object call() throws Exception {
CacheFactory cf = new CacheFactory()
.set(MCAST_PORT, "0")
- .set(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME,
+ .set(SECURITY_CLIENT_ACCESSOR,
"com.gemstone.gemfire.cache.query.dunit.QueryAuthorization.create")
- .set(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, DummyAuthenticator.class.getName() + ".create");
+ .set(SECURITY_CLIENT_AUTHENTICATOR, DummyAuthenticator.class.getName() + ".create");
Cache cache = getCache(cf);
cache.createRegionFactory(RegionShortcut.REPLICATE).create(regName);
CacheServer server = cache.addCacheServer();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
index 1d94573..800c8f9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/snapshot/RegionSnapshotJUnitTest.java
@@ -246,7 +246,7 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase {
CacheFactory cf = new CacheFactory().set(MCAST_PORT, "0")
.set(LOG_LEVEL, "error")
.setPdxSerializer(new MyPdxSerializer())
- .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "1");
+ .set(DISTRIBUTED_SYSTEM_ID, "1");
cache = cf.create();
RegionType rt = RegionType.REPLICATE;
@@ -266,7 +266,7 @@ public class RegionSnapshotJUnitTest extends SnapshotTestCase {
CacheFactory cf2 = new CacheFactory().set(MCAST_PORT, "0")
.set(LOG_LEVEL, "error")
.setPdxSerializer(new MyPdxSerializer())
- .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "100");
+ .set(DISTRIBUTED_SYSTEM_ID, "100");
cache = cf2.create();
final Map<Integer, Object> read = new HashMap<Integer, Object>();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
index 0c9dfaa..045d82e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/Bug38741DUnitTest.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.CopyHelper;
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.NanoTimer;
import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue;
@@ -39,6 +38,8 @@ import java.util.Properties;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*
* @since GemFire bugfix5.7
@@ -337,7 +338,7 @@ public class Bug38741DUnitTest extends ClientServerTestCase {
public Properties getDistributedSystemProperties() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
index aaa585a..56ee019 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheLogRollDUnitTest.java
@@ -414,8 +414,8 @@ public class CacheLogRollDUnitTest extends CacheTestCase {
props.put(LOG_FILE, logfile);
props.put(LOG_FILE_SIZE_LIMIT, "1");
props.put(LOG_LEVEL, "config");
- props.put(DistributionConfig.SECURITY_LOG_FILE_NAME, sec_logfile);
- props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
+ props.put(SECURITY_LOG_FILE, sec_logfile);
+ props.put(SECURITY_LOG_LEVEL, "config");
DistributedSystem ds = getSystem(props);
InternalDistributedSystem ids = (InternalDistributedSystem) ds;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
index 6ba30f2..3a2ee73 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/CacheXmlGeode10DUnitTest.java
@@ -39,6 +39,8 @@ import com.gemstone.gemfire.test.dunit.IgnoredException;
import java.util.List;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
private static final long serialVersionUID = -6437436147079728413L;
@@ -58,7 +60,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
@SuppressWarnings("rawtypes")
public void testEnableOffHeapMemory() {
try {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE, "1m");
final String regionName = "testEnableOffHeapMemory";
@@ -82,7 +84,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
assertEquals(true, ((LocalRegion)regionAfter).getOffHeap());
regionAfter.localDestroyRegion();
} finally {
- System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME);
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE);
}
}
@@ -158,7 +160,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
final float high = 95.0f;
try {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE, "1m");
Cache c;
ResourceManagerCreation rmc = new ResourceManagerCreation();
@@ -236,7 +238,7 @@ public class CacheXmlGeode10DUnitTest extends CacheXml81DUnitTest {
assertEquals(0f, c.getResourceManager().getEvictionOffHeapPercentage());
assertEquals(0f, c.getResourceManager().getCriticalOffHeapPercentage());
} finally {
- System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME);
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + OFF_HEAP_MEMORY_SIZE);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
index c9c059a..6253bad 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckOverflowRegionCCEOffHeapDUnitTest.java
@@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests Distributed Ack Overflow Region with ConcurrencyChecksEnabled and OffHeap memory.
*
@@ -55,7 +56,7 @@ public class DistributedAckOverflowRegionCCEOffHeapDUnitTest extends Distributed
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
index f81b0df..ebafa99 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEOffHeapDUnitTest.java
@@ -18,12 +18,13 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests Distributed Ack Persistent Region with ConcurrencyChecksEnabled and OffHeap memory.
@@ -55,7 +56,7 @@ public class DistributedAckPersistentRegionCCEOffHeapDUnitTest extends Distribut
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
index 3b7a065..5802d76 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEDUnitTest.java
@@ -58,7 +58,7 @@ public class DistributedAckRegionCCEDUnitTest extends DistributedAckRegionDUnitT
Properties p = super.getDistributedSystemProperties();
p.put(CONSERVE_SOCKETS, "false");
if (distributedSystemID > 0) {
- p.put(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+distributedSystemID);
+ p.put(DISTRIBUTED_SYSTEM_ID, ""+distributedSystemID);
}
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
index f1ba65e..505b1eb 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionCCEOffHeapDUnitTest.java
@@ -18,12 +18,12 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests Distributed Ack Region with ConcurrencyChecksEnabled and OffHeap memory.
@@ -55,7 +55,7 @@ public class DistributedAckRegionCCEOffHeapDUnitTest extends DistributedAckRegio
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
index 2f6bea9..7033533 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionOffHeapDUnitTest.java
@@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests Distributed Ack Region with OffHeap memory.
*
@@ -55,7 +56,7 @@ public class DistributedAckRegionOffHeapDUnitTest extends DistributedAckRegionDU
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
index 7c302b5..1ec0d65 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEOffHeapDUnitTest.java
@@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests Distributed Ack Region with ConcurrencyChecksEnabled and OffHeap memory.
*
@@ -55,7 +56,7 @@ public class DistributedNoAckRegionCCEOffHeapDUnitTest extends DistributedNoAckR
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
index de7b4df..83e2df3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionOffHeapDUnitTest.java
@@ -18,13 +18,13 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests Distributed NoAck Region with OffHeap memory.
*
@@ -55,7 +55,7 @@ public class DistributedNoAckRegionOffHeapDUnitTest extends DistributedNoAckRegi
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
index f068360..d1e53f7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEDUnitTest.java
@@ -61,7 +61,7 @@ public class GlobalRegionCCEDUnitTest extends GlobalRegionDUnitTest {
Properties p = super.getDistributedSystemProperties();
p.put(CONSERVE_SOCKETS, "false");
if (distributedSystemID > 0) {
- p.put(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""
+ p.put(DISTRIBUTED_SYSTEM_ID, ""
+ distributedSystemID);
}
return p;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
index 1ac1966..2bc57d6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionCCEOffHeapDUnitTest.java
@@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests Global Region with ConcurrencyChecksEnabled and OffHeap memory.
*
@@ -55,7 +56,7 @@ public class GlobalRegionCCEOffHeapDUnitTest extends GlobalRegionCCEDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
index 95ce20a..8d660f3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/GlobalRegionOffHeapDUnitTest.java
@@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests Global Region with OffHeap memory.
*
@@ -62,7 +63,7 @@ public class GlobalRegionOffHeapDUnitTest extends GlobalRegionDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
index 5dc4848..90f2931 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/OffHeapLRUEvictionControllerDUnitTest.java
@@ -16,7 +16,6 @@
*/
package com.gemstone.gemfire.cache30;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
@@ -26,6 +25,8 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the basic functionality of the lru eviction
* controller and its statistics using off-heap regions.
@@ -57,7 +58,7 @@ public class OffHeapLRUEvictionControllerDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ properties.setProperty(OFF_HEAP_MEMORY_SIZE, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
index ae2a698..04165fc 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/PartitionedRegionOffHeapDUnitTest.java
@@ -18,13 +18,14 @@ package com.gemstone.gemfire.cache30;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests Partitioned Region with OffHeap memory.
*
@@ -54,7 +55,7 @@ public class PartitionedRegionOffHeapDUnitTest extends PartitionedRegionDUnitTes
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "10m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "10m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
index aa87ad7..555d01b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
@@ -30,6 +30,7 @@ import java.io.FileWriter;
import java.util.Properties;
import static org.assertj.core.api.Assertions.assertThat;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Integration tests for AbstractLauncher class. These tests require file system I/O.
@@ -51,8 +52,8 @@ public class AbstractLauncherIntegrationTest {
this.gemfirePropertiesFile = this.temporaryFolder.newFile(DistributionConfig.GEMFIRE_PREFIX + "properties");
this.expectedGemfireProperties = new Properties();
- this.expectedGemfireProperties.setProperty(SystemConfigurationProperties.NAME, "memberOne");
- this.expectedGemfireProperties.setProperty(DistributionConfig.GROUPS_NAME, "groupOne, groupTwo");
+ this.expectedGemfireProperties.setProperty(NAME, "memberOne");
+ this.expectedGemfireProperties.setProperty(GROUPS, "groupOne, groupTwo");
this.expectedGemfireProperties.store(new FileWriter(this.gemfirePropertiesFile, false), this.testName.getMethodName());
assertThat(this.gemfirePropertiesFile).isNotNull();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
index 09317c6..8dc0d03 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
@@ -63,7 +63,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
config.setProperty(ROLES, "");
- config.setProperty(DistributionConfig.GROUPS_NAME, "");
+ config.setProperty(GROUPS, "");
config.setProperty(SystemConfigurationProperties.NAME, "");
InternalDistributedSystem system = getSystem(config);
@@ -123,7 +123,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
config.setProperty(MCAST_PORT, "0");
config.setProperty(LOCATORS, "");
config.setProperty(ROLES, rolesProp);
- config.setProperty(DistributionConfig.GROUPS_NAME, groupsProp);
+ config.setProperty(GROUPS, groupsProp);
InternalDistributedSystem system = getSystem(config);
try {
@@ -277,7 +277,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
public void run() {
//disconnectFromDS();
Properties config = new Properties();
- config.setProperty(DistributionConfig.GROUPS_NAME, makeGroupsString(vm));
+ config.setProperty(GROUPS, makeGroupsString(vm));
getSystem(config);
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 95592f2..77abf1d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -271,7 +271,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -378,7 +378,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
File logFile = new File("");
if (logFile.exists()) {
@@ -494,7 +494,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
// properties.put("log-level", "fine");
@@ -627,7 +627,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -772,7 +772,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -909,7 +909,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
index 38c4dab..6d34bed 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
@@ -49,7 +49,7 @@ import java.net.InetAddress;
import java.util.*;
import java.util.function.IntSupplier;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
import static org.junit.Assert.*;
@@ -105,10 +105,10 @@ public class LocatorJUnitTest {
Properties dsprops = new Properties();
int jmxPort = getRandomAvailablePort(SOCKET);
dsprops.setProperty(MCAST_PORT, "0");
- dsprops.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "" + jmxPort);
- dsprops.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- dsprops.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
- dsprops.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
+ dsprops.setProperty(JMX_MANAGER_PORT, "" + jmxPort);
+ dsprops.setProperty(JMX_MANAGER_START, "true");
+ dsprops.setProperty(JMX_MANAGER_HTTP_PORT, "0");
+ dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "disableManagement", "false"); // not needed
try {
locator = Locator.startLocatorAndDS(port, new File("testJmxManager.log"), dsprops);
@@ -135,8 +135,8 @@ public class LocatorJUnitTest {
public void testNoThreadLeftBehind() throws Exception {
Properties dsprops = new Properties();
dsprops.setProperty(MCAST_PORT, "0");
- dsprops.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
- dsprops.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
+ dsprops.setProperty(JMX_MANAGER_START, "false");
+ dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
JGroupsMessenger.THROW_EXCEPTION_ON_START_HOOK = true;
int threadCount = Thread.activeCount();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 63e0514..4285ed9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -72,7 +72,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.setPort(this.locatorPort)
.setWorkingDirectory(this.workingDirectory)
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
- .set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
+ .set(DISABLE_AUTO_RECONNECT, "true")
.set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0")
.build();
@@ -87,7 +87,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
final DistributedSystem distributedSystem = locator.getDistributedSystem();
assertNotNull(distributedSystem);
- assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
+ assertEquals("true", distributedSystem.getProperties().getProperty(DISABLE_AUTO_RECONNECT));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index b48a797..d039aef 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -92,7 +92,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setForce(true)
.setMemberName(getUniqueName())
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
+ .set(DISABLE_AUTO_RECONNECT, "true")
.set(LOG_LEVEL, "config")
.set(MCAST_PORT, "0")
.build();
@@ -110,7 +110,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
final DistributedSystem distributedSystem = cache.getDistributedSystem();
assertNotNull(distributedSystem);
- assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
+ assertEquals("true", distributedSystem.getProperties().getProperty(DISABLE_AUTO_RECONNECT));
assertEquals("config", distributedSystem.getProperties().getProperty(LOG_LEVEL));
assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index da367d7..2c5391d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -140,7 +140,7 @@ public class DistributionConfigJUnitTest {
assertTrue(setter.getName().startsWith("set"));
assertEquals(setter.getParameterCount(), 1);
- if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+ if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(SECURITY_LOG_LEVEL))) {
Class clazz = attributes.get(attr).type();
try {
setter.invoke(mock(DistributionConfig.class), any(clazz));
@@ -160,7 +160,7 @@ public class DistributionConfigJUnitTest {
assertTrue(getter.getName().startsWith("get"));
assertEquals(getter.getParameterCount(), 0);
- if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(DistributionConfig.SECURITY_LOG_LEVEL_NAME))) {
+ if (!(attr.equalsIgnoreCase(LOG_LEVEL) || attr.equalsIgnoreCase(SECURITY_LOG_LEVEL))) {
Class clazz = attributes.get(attr).type();
Class returnClass = getter.getReturnType();
if (returnClass.isPrimitive()) {
@@ -208,8 +208,8 @@ public class DistributionConfigJUnitTest {
@Test
public void testGetAttributeObject() {
assertEquals(config.getAttributeObject(LOG_LEVEL), "config");
- assertEquals(config.getAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME), "config");
- assertEquals(config.getAttributeObject(DistributionConfig.REDUNDANCY_ZONE_NAME), "");
+ assertEquals(config.getAttributeObject(SECURITY_LOG_LEVEL), "config");
+ assertEquals(config.getAttributeObject(REDUNDANCY_ZONE), "");
assertEquals(config.getAttributeObject(ENABLE_CLUSTER_CONFIGURATION).getClass(), Boolean.class);
}
@@ -235,8 +235,8 @@ public class DistributionConfigJUnitTest {
}
}
assertEquals(modifiables.size(), 2);
- assertEquals(modifiables.get(0), DistributionConfig.HTTP_SERVICE_PORT_NAME);
- assertEquals(modifiables.get(1), DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME);
+ assertEquals(modifiables.get(0), HTTP_SERVICE_PORT);
+ assertEquals(modifiables.get(1), JMX_MANAGER_HTTP_PORT);
}
@Test
@@ -254,8 +254,8 @@ public class DistributionConfigJUnitTest {
assertEquals(modifiables.size(), 10);
assertEquals(modifiables.get(0), ARCHIVE_DISK_SPACE_LIMIT);
assertEquals(modifiables.get(1), ARCHIVE_FILE_SIZE_LIMIT);
- assertEquals(modifiables.get(2), DistributionConfig.HTTP_SERVICE_PORT_NAME);
- assertEquals(modifiables.get(3), DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME);
+ assertEquals(modifiables.get(2), HTTP_SERVICE_PORT);
+ assertEquals(modifiables.get(3), JMX_MANAGER_HTTP_PORT);
assertEquals(modifiables.get(4), LOG_DISK_SPACE_LIMIT);
assertEquals(modifiables.get(5), LOG_FILE_SIZE_LIMIT);
assertEquals(modifiables.get(6), LOG_LEVEL);
@@ -276,13 +276,13 @@ public class DistributionConfigJUnitTest {
@Test
public void testValidAttributeObject() {
- config.setAttributeObject(DistributionConfig.HTTP_SERVICE_PORT_NAME, 8080, ConfigSource.api());
+ config.setAttributeObject(HTTP_SERVICE_PORT, 8080, ConfigSource.api());
assertEquals(config.getHttpServicePort(), 8080);
}
@Test(expected = IllegalArgumentException.class)
public void testOutOfRangeAttributeObject() {
- config.setAttributeObject(DistributionConfig.HTTP_SERVICE_PORT_NAME, -1, ConfigSource.api());
+ config.setAttributeObject(HTTP_SERVICE_PORT, -1, ConfigSource.api());
}
@Test
@@ -291,7 +291,7 @@ public class DistributionConfigJUnitTest {
config.setAttribute(LOG_LEVEL, "config", ConfigSource.api());
assertEquals(config.getLogLevel(), 700);
- config.setAttributeObject(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "debug", ConfigSource.api());
+ config.setAttributeObject(SECURITY_LOG_LEVEL, "debug", ConfigSource.api());
assertEquals(config.getSecurityLogLevel(), 500);
}
@@ -313,21 +313,21 @@ public class DistributionConfigJUnitTest {
@Test
public void testAttributesAlwaysModifiable() {
config.modifiable = false;
- assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME));
- assertTrue(config.isAttributeModifiable(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME));
+ assertTrue(config.isAttributeModifiable(HTTP_SERVICE_PORT));
+ assertTrue(config.isAttributeModifiable(JMX_MANAGER_HTTP_PORT));
config.modifiable = true;
- assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME));
- assertTrue(config.isAttributeModifiable(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME));
+ assertTrue(config.isAttributeModifiable(HTTP_SERVICE_PORT));
+ assertTrue(config.isAttributeModifiable(JMX_MANAGER_HTTP_PORT));
}
@Test
public void testSecurityProps(){
Properties props = new Properties();
- props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
- props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
- props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
+ props.put(SECURITY_CLIENT_AUTHENTICATOR, JSONAuthorization.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create");
+ props.put(SECURITY_LOG_LEVEL, "config");
// add another non-security property to verify it won't get put in the security properties
props.put(ACK_WAIT_THRESHOLD, 2);
@@ -338,9 +338,9 @@ public class DistributionConfigJUnitTest {
@Test
public void testSecurityPropsWithNoSetter(){
Properties props = new Properties();
- props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
- props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
- props.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "config");
+ props.put(SECURITY_CLIENT_AUTHENTICATOR, JSONAuthorization.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create");
+ props.put(SECURITY_LOG_LEVEL, "config");
// add another non-security property to verify it won't get put in the security properties
props.put(ACK_WAIT_THRESHOLD, 2);
props.put("security-username", "testName");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
index ed5a60f..e9f2fb6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystemJUnitTest.java
@@ -568,7 +568,7 @@ public class InternalDistributedSystemJUnitTest
try {
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, "finest");
Properties apiProps = new Properties();
- apiProps.setProperty(DistributionConfig.GROUPS_NAME, "foo, bar");
+ apiProps.setProperty(GROUPS, "foo, bar");
{
if (propFileExisted) {
propFile.renameTo(new File(DistributionConfig.GEMFIRE_PREFIX + "properties.sav"));
@@ -591,7 +591,7 @@ public class InternalDistributedSystemJUnitTest
}
DistributionConfigImpl dci = new DistributionConfigImpl(apiProps);
assertEquals(null, dci.getAttributeSource(MCAST_PORT));
- assertEquals(ConfigSource.api(), dci.getAttributeSource(DistributionConfig.GROUPS_NAME));
+ assertEquals(ConfigSource.api(), dci.getAttributeSource(GROUPS));
assertEquals(ConfigSource.sysprop(), dci.getAttributeSource(LOG_LEVEL));
assertEquals(ConfigSource.Type.FILE, dci.getAttributeSource("name").getType());
assertEquals(ConfigSource.Type.SECURE_FILE, dci.getAttributeSource(STATISTIC_SAMPLE_RATE).getType());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
index da8e8de..5291181 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
@@ -103,7 +103,7 @@ public class MembershipJUnitTest {
nonDefault.put(MCAST_PORT, String.valueOf(mcastPort));
nonDefault.put(LOG_FILE, "");
nonDefault.put(LOG_LEVEL, "fine");
- nonDefault.put(DistributionConfig.GROUPS_NAME, "red, blue");
+ nonDefault.put(GROUPS, "red, blue");
nonDefault.put(MEMBER_TIMEOUT, "2000");
nonDefault.put(LOCATORS, localHost.getHostName() + '[' + port + ']');
DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
[21/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
index b6bce88..e1aabc0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
@@ -29,66 +29,33 @@
package com.gemstone.gemfire.cache30;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-
-import junit.framework.AssertionFailedError;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.CommitIncompleteException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ResourceEvent;
import com.gemstone.gemfire.distributed.internal.ResourceEventsListener;
import com.gemstone.gemfire.distributed.internal.locks.DLockBatch;
import com.gemstone.gemfire.distributed.internal.locks.DLockService;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
-import com.gemstone.gemfire.internal.cache.CommitReplyException;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXState;
-import com.gemstone.gemfire.internal.cache.TXStateInterface;
-import com.gemstone.gemfire.internal.cache.TXStateProxyImpl;
-//import com.gemstone.gemfire.internal.cache.locks.TXLockId;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.locks.TXLockBatch;
import com.gemstone.gemfire.internal.cache.locks.TXLockService;
import com.gemstone.gemfire.internal.cache.locks.TXLockServiceImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import junit.framework.AssertionFailedError;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+
+//import com.gemstone.gemfire.internal.cache.locks.TXLockId;
public class TXDistributedDUnitTest extends CacheTestCase {
public TXDistributedDUnitTest(String name) {
@@ -526,7 +493,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
@Override
public Properties getDistributedSystemProperties() {
Properties p = super.getDistributedSystemProperties();
- p.put("log-level", LogWriterUtils.getDUnitLogLevel());
+ p.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
index 040d15f..aa87ad7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTest.java
@@ -16,12 +16,8 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.assertj.core.api.Assertions.*;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -29,8 +25,11 @@ import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.io.FileWriter;
+import java.util.Properties;
+
+import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests for AbstractLauncher class. These tests require file system I/O.
@@ -49,10 +48,10 @@ public class AbstractLauncherIntegrationTest {
@Before
public void setUp() throws Exception {
- this.gemfirePropertiesFile = this.temporaryFolder.newFile("gemfire.properties");
+ this.gemfirePropertiesFile = this.temporaryFolder.newFile(DistributionConfig.GEMFIRE_PREFIX + "properties");
this.expectedGemfireProperties = new Properties();
- this.expectedGemfireProperties.setProperty(DistributionConfig.NAME_NAME, "memberOne");
+ this.expectedGemfireProperties.setProperty(SystemConfigurationProperties.NAME, "memberOne");
this.expectedGemfireProperties.setProperty(DistributionConfig.GROUPS_NAME, "groupOne, groupTwo");
this.expectedGemfireProperties.store(new FileWriter(this.gemfirePropertiesFile, false), this.testName.getMethodName());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
index 5f4debd..128e1df 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherIntegrationTestCase.java
@@ -16,26 +16,6 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileReader;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.util.List;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
-import org.junit.rules.TestName;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.FileUtil;
@@ -46,6 +26,22 @@ import com.gemstone.gemfire.internal.process.ProcessStreamReader.InputListener;
import com.gemstone.gemfire.internal.process.ProcessUtils;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.internal.util.StopWatch;
+import org.apache.logging.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.rules.TestName;
+
+import java.io.*;
+import java.net.ServerSocket;
+import java.util.List;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
/**
* @since GemFire 8.0
@@ -80,7 +76,7 @@ public abstract class AbstractLauncherIntegrationTestCase {
@Before
public final void setUpAbstractLauncherIntegrationTestCase() throws Exception {
- System.setProperty("gemfire." + DistributionConfig.MCAST_PORT_NAME, Integer.toString(0));
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, Integer.toString(0));
logger.info(EXPECTED_EXCEPTION_ADD, EXPECTED_EXCEPTION_MBEAN_NOT_REGISTERED);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
index 4111270..96e88c3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
@@ -16,19 +16,17 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.internal.lang.StringUtils;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.lang.StringUtils;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static org.junit.Assert.*;
/**
* The AbstractLauncherTest class is a test suite of unit tests testing the contract and functionality
@@ -72,22 +70,22 @@ public class AbstractLauncherTest {
public void testIsSet() {
final Properties properties = new Properties();
- assertFalse(properties.containsKey(DistributionConfig.NAME_NAME));
- assertFalse(AbstractLauncher.isSet(properties, DistributionConfig.NAME_NAME));
+ assertFalse(properties.containsKey(SystemConfigurationProperties.NAME));
+ assertFalse(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
- properties.setProperty(DistributionConfig.NAME_NAME, "");
+ properties.setProperty(SystemConfigurationProperties.NAME, "");
- assertTrue(properties.containsKey(DistributionConfig.NAME_NAME));
- assertFalse(AbstractLauncher.isSet(properties, DistributionConfig.NAME_NAME));
+ assertTrue(properties.containsKey(SystemConfigurationProperties.NAME));
+ assertFalse(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
- properties.setProperty(DistributionConfig.NAME_NAME, " ");
+ properties.setProperty(SystemConfigurationProperties.NAME, " ");
- assertTrue(properties.containsKey(DistributionConfig.NAME_NAME));
- assertFalse(AbstractLauncher.isSet(properties, DistributionConfig.NAME_NAME));
+ assertTrue(properties.containsKey(SystemConfigurationProperties.NAME));
+ assertFalse(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
- properties.setProperty(DistributionConfig.NAME_NAME, "memberOne");
+ properties.setProperty(SystemConfigurationProperties.NAME, "memberOne");
- assertTrue(AbstractLauncher.isSet(properties, DistributionConfig.NAME_NAME));
+ assertTrue(AbstractLauncher.isSet(properties, SystemConfigurationProperties.NAME));
assertFalse(AbstractLauncher.isSet(properties, "NaMe"));
}
@@ -116,8 +114,8 @@ public class AbstractLauncherTest {
Properties distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertTrue(distributedSystemProperties.containsKey(DistributionConfig.NAME_NAME));
- assertEquals("memberOne", distributedSystemProperties.getProperty(DistributionConfig.NAME_NAME));
+ assertTrue(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
+ assertEquals("memberOne", distributedSystemProperties.getProperty(SystemConfigurationProperties.NAME));
launcher = createAbstractLauncher(null, "22");
@@ -128,7 +126,7 @@ public class AbstractLauncherTest {
distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertFalse(distributedSystemProperties.containsKey(DistributionConfig.NAME_NAME));
+ assertFalse(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
launcher = createAbstractLauncher(StringUtils.EMPTY_STRING, "333");
@@ -139,7 +137,7 @@ public class AbstractLauncherTest {
distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertFalse(distributedSystemProperties.containsKey(DistributionConfig.NAME_NAME));
+ assertFalse(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
launcher = createAbstractLauncher(" ", "4444");
@@ -150,7 +148,7 @@ public class AbstractLauncherTest {
distributedSystemProperties = launcher.getDistributedSystemProperties();
assertNotNull(distributedSystemProperties);
- assertFalse(distributedSystemProperties.containsKey(DistributionConfig.NAME_NAME));
+ assertFalse(distributedSystemProperties.containsKey(SystemConfigurationProperties.NAME));
}
@Test
@@ -168,7 +166,7 @@ public class AbstractLauncherTest {
Properties distributedSystemProperties = launcher.getDistributedSystemProperties(defaults);
assertNotNull(distributedSystemProperties);
- assertEquals(launcher.getMemberName(), distributedSystemProperties.getProperty(DistributionConfig.NAME_NAME));
+ assertEquals(launcher.getMemberName(), distributedSystemProperties.getProperty(SystemConfigurationProperties.NAME));
assertEquals("testValue", distributedSystemProperties.getProperty("testKey"));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherRemoteIntegrationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherRemoteIntegrationTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherRemoteIntegrationTestCase.java
index ecfb952..826641d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherRemoteIntegrationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLocatorLauncherRemoteIntegrationTestCase.java
@@ -16,13 +16,13 @@
*/
package com.gemstone.gemfire.distributed;
-import java.util.ArrayList;
-import java.util.List;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.process.ProcessStreamReader;
import org.junit.After;
import org.junit.Before;
-import com.gemstone.gemfire.internal.process.ProcessStreamReader;
+import java.util.ArrayList;
+import java.util.List;
public abstract class AbstractLocatorLauncherRemoteIntegrationTestCase extends AbstractLocatorLauncherIntegrationTestCase {
@@ -53,7 +53,7 @@ public abstract class AbstractLocatorLauncherRemoteIntegrationTestCase extends A
*/
protected List<String> getJvmArguments() {
final List<String> jvmArguments = new ArrayList<String>();
- jvmArguments.add("-Dgemfire.log-level=config");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "log-level=config");
return jvmArguments;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherIntegrationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherIntegrationTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherIntegrationTestCase.java
index d4943a0..0df2019 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherIntegrationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherIntegrationTestCase.java
@@ -16,21 +16,21 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
-
-import java.util.concurrent.Callable;
-
+import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
+import com.gemstone.gemfire.distributed.ServerLauncher.ServerState;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.cache.AbstractCacheServer;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.rules.ErrorCollector;
import org.junit.rules.TemporaryFolder;
-import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
-import com.gemstone.gemfire.distributed.ServerLauncher.ServerState;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.cache.AbstractCacheServer;
+import java.util.concurrent.Callable;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertNotNull;
/**
* @since GemFire 8.0
@@ -49,7 +49,7 @@ public abstract class AbstractServerLauncherIntegrationTestCase extends Abstract
@Before
public final void setUpServerLauncherTest() throws Exception {
- System.setProperty("gemfire." + DistributionConfig.MCAST_PORT_NAME, Integer.toString(0));
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, Integer.toString(0));
final int port = AvailablePortHelper.getRandomAvailableTCPPort();
System.setProperty(AbstractCacheServer.TEST_OVERRIDE_DEFAULT_PORT_PROPERTY, String.valueOf(port));
this.serverPort = port;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherRemoteIntegrationTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherRemoteIntegrationTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherRemoteIntegrationTestCase.java
index ec7a23b..7bca8bf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherRemoteIntegrationTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractServerLauncherRemoteIntegrationTestCase.java
@@ -16,16 +16,17 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.process.ProcessStreamReader;
+import org.junit.After;
+import org.junit.Before;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Callable;
-import org.junit.After;
-import org.junit.Before;
-
-import com.gemstone.gemfire.internal.process.ProcessStreamReader;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
public abstract class AbstractServerLauncherRemoteIntegrationTestCase extends AbstractServerLauncherIntegrationTestCase {
@@ -56,7 +57,7 @@ public abstract class AbstractServerLauncherRemoteIntegrationTestCase extends Ab
*/
protected List<String> getJvmArguments() {
final List<String> jvmArguments = new ArrayList<String>();
- jvmArguments.add("-Dgemfire.log-level=config");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "log-level=config");
return jvmArguments;
}
@@ -81,10 +82,9 @@ public abstract class AbstractServerLauncherRemoteIntegrationTestCase extends Ab
}
final ServerLauncher.ServerState serverState = launcher.status();
assertNotNull(serverState);
- logger.info("serverState: "+serverState);
+ logger.info("serverState: " + serverState);
return AbstractLauncher.Status.ONLINE.equals(serverState.getStatus());
- }
- catch (RuntimeException e) {
+ } catch (RuntimeException e) {
logger.error(e, e);
return false;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
index 7fd6df9..3537232 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedMemberDUnitTest.java
@@ -16,18 +16,6 @@
*/
package com.gemstone.gemfire.distributed;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.IncompatibleSystemException;
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -42,6 +30,14 @@ import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+
/**
* Tests the functionality of the {@link DistributedMember} class.
*
@@ -65,11 +61,11 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testDefaults() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
config.setProperty(DistributionConfig.ROLES_NAME, "");
config.setProperty(DistributionConfig.GROUPS_NAME, "");
- config.setProperty(DistributionConfig.NAME_NAME, "");
+ config.setProperty(SystemConfigurationProperties.NAME, "");
InternalDistributedSystem system = getSystem(config);
try {
@@ -96,9 +92,9 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testNonDefaultName() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
- config.setProperty(DistributionConfig.NAME_NAME, "nondefault");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
+ config.setProperty(SystemConfigurationProperties.NAME, "nondefault");
InternalDistributedSystem system = getSystem(config);
try {
@@ -125,8 +121,8 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
final List bothList = Arrays.asList(new String[] {"A","B","C","D","E","F","G"});
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
config.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
config.setProperty(DistributionConfig.GROUPS_NAME, groupsProp);
@@ -159,21 +155,21 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
Host.getHost(0).getVM(0).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.NAME_NAME, "name0");
+ config.setProperty(SystemConfigurationProperties.NAME, "name0");
getSystem(config);
}
});
Host.getHost(0).getVM(1).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.NAME_NAME, "name1");
+ config.setProperty(SystemConfigurationProperties.NAME, "name1");
getSystem(config);
}
});
Host.getHost(0).getVM(2).invoke(new SerializableRunnable() {
public void run() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.NAME_NAME, "name0");
+ config.setProperty(SystemConfigurationProperties.NAME, "name0");
try {
getSystem(config);
fail("expected IncompatibleSystemException");
@@ -366,9 +362,9 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testGetId() {
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
- config.setProperty(DistributionConfig.NAME_NAME, "foobar");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
+ config.setProperty(SystemConfigurationProperties.NAME, "foobar");
InternalDistributedSystem system = getSystem(config);
try {
@@ -426,7 +422,7 @@ public class DistributedMemberDUnitTest extends JUnit4DistributedTestCase {
@Override
public Object call() throws Exception {
Properties config = new Properties();
- config.setProperty(DistributionConfig.NAME_NAME, name);
+ config.setProperty(SystemConfigurationProperties.NAME, name);
DistributedSystem ds = getSystem(config);
return ds.getDistributedMember();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
index 6e70340..455e8ae 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemConnectPerf.java
@@ -17,8 +17,12 @@
package com.gemstone.gemfire.distributed;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import java.io.*;
-import java.util.*;
+
+import java.io.PrintStream;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This program is used to measure the amount of time it takes to
@@ -97,9 +101,9 @@ public class DistributedSystemConnectPerf {
System.setProperty("DistributionManager.VERBOSE", "true");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.LOCATORS_NAME,
+ props.setProperty(LOCATORS,
"localhost[" + port + "]");
long totalConnect = 0;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
index 6578f77..e267e41 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/DistributedSystemDUnitTest.java
@@ -16,22 +16,6 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertSame;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.net.Inet4Address;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.NetworkInterface;
-import java.util.Enumeration;
-import java.util.Properties;
-import java.util.concurrent.TimeoutException;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.GemFireConfigException;
import com.gemstone.gemfire.SystemConnectException;
@@ -40,13 +24,7 @@ import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionException;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystemJUnitTest;
-import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.SizeableRunnable;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroupsMessenger;
@@ -54,13 +32,22 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershi
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.RMIException;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.net.Inet4Address;
+import java.net.Inet6Address;
+import java.net.InetAddress;
+import java.net.NetworkInterface;
+import java.util.Enumeration;
+import java.util.Properties;
+import java.util.concurrent.TimeoutException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+import static org.junit.Assert.*;
/**
* Tests the functionality of the {@link DistributedSystem} class.
@@ -84,8 +71,8 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
disconnectAllFromDS();
int locatorPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
Properties p = getDistributedSystemProperties();
- p.put(DistributionConfig.LOCATORS_NAME, "");
- p.put(DistributionConfig.START_LOCATOR_NAME, "localhost["+locatorPort+"]");
+ p.put(LOCATORS, "");
+ p.put(START_LOCATOR, "localhost[" + locatorPort + "]");
p.put(DistributionConfig.DISABLE_TCP_NAME, "true");
InternalDistributedSystem ds = (InternalDistributedSystem)DistributedSystem.connect(p);
try {
@@ -152,10 +139,10 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testGetSameSystemTwice() {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
- config.setProperty("locators", "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
// set a flow-control property for the test (bug 37562)
- config.setProperty("mcast-flow-control", "3000000,0.20,3000");
+ config.setProperty(DistributionConfig.MCAST_FLOW_CONTROL_NAME, "3000000,0.20,3000");
DistributedSystem system1 = DistributedSystem.connect(config);
DistributedSystem system2 = DistributedSystem.connect(config);
@@ -171,16 +158,16 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testGetDifferentSystem() {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
- config.setProperty("locators", "");
- config.setProperty("mcast-flow-control", "3000000,0.20,3000");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
+ config.setProperty(DistributionConfig.MCAST_FLOW_CONTROL_NAME, "3000000,0.20,3000");
DistributedSystem system1 = DistributedSystem.connect(config);
- config.setProperty("mcast-address", "224.0.0.1");
+ config.setProperty(MCAST_ADDRESS, "224.0.0.1");
try {
DistributedSystem.connect(config);
- if (System.getProperty("gemfire.mcast-address") == null) {
+ if (System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "mcast-address") == null) {
fail("Should have thrown an IllegalStateException");
}
}
@@ -199,8 +186,8 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testGetDifferentSystemAfterClose() {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
- config.setProperty("locators", "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
DistributedSystem system1 = DistributedSystem.connect(config);
system1.disconnect();
@@ -217,26 +204,26 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
Properties config = new Properties();
// a loner is all this test needs
int unusedPort = 0;
- config.setProperty("mcast-port", "0");
- config.setProperty("locators", "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
DistributedSystem system1 = DistributedSystem.connect(config);
assertTrue(config != system1.getProperties());
- assertEquals(unusedPort, Integer.parseInt(system1.getProperties().getProperty("mcast-port")));
+ assertEquals(unusedPort, Integer.parseInt(system1.getProperties().getProperty(MCAST_PORT)));
system1.disconnect();
assertTrue(config != system1.getProperties());
- assertEquals(unusedPort, Integer.parseInt(system1.getProperties().getProperty("mcast-port")));
+ assertEquals(unusedPort, Integer.parseInt(system1.getProperties().getProperty(MCAST_PORT)));
}
@Test
public void testIsolatedDistributedSystem() throws Exception {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
- config.setProperty("locators", "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
try {
// make sure isolated distributed system can still create a cache and region
@@ -255,8 +242,8 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
public void testSpecificTcpPort() throws Exception {
Properties config = new Properties();
int tcpPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- config.put("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
- config.setProperty("tcp-port", String.valueOf(tcpPort));
+ config.put(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+ config.setProperty(TCP_PORT, String.valueOf(tcpPort));
InternalDistributedSystem system = getSystem(config);
DistributionManager dm = (DistributionManager)system.getDistributionManager();
GMSMembershipManager mgr = (GMSMembershipManager)dm.getMembershipManager();
@@ -283,10 +270,10 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
}
if (loopback != null) {
Properties config = new Properties();
- config.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ config.put(MCAST_PORT, "0");
String locators = InetAddress.getLocalHost().getHostName()+":"+DistributedTestUtils.getDUnitLocatorPort();
- config.put(DistributionConfig.LOCATORS_NAME, locators);
- config.setProperty(DistributionConfig.BIND_ADDRESS_NAME, loopback.getHostAddress());
+ config.put(LOCATORS, locators);
+ config.setProperty(BIND_ADDRESS, loopback.getHostAddress());
LogWriterUtils.getLogWriter().info("attempting to connect with " + loopback +" and locators=" + locators);
try {
InternalDistributedSystem system = getSystem(config);
@@ -304,7 +291,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
public void testUDPPortRange() throws Exception {
Properties config = new Properties();
int unicastPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- config.put("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.put(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
// Minimum 3 ports required in range for UDP, FD_SOCK and TcpConduit.
config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME,
""+unicastPort+"-"+(unicastPort+2));
@@ -347,7 +334,7 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testMembershipPortRangeWithExactThreeValues() throws Exception {
Properties config = new Properties();
- config.setProperty("locators", "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
int portRange = 3;
int portStartRange = getPortRange(portRange);
int portEndRange = portStartRange + portRange - 1;
@@ -374,8 +361,8 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
final int mcastPort = AvailablePort.getRandomAvailablePort(AvailablePort.MULTICAST);
final int[] socketPorts = AvailablePortHelper.getRandomAvailableTCPPorts(2);
final int unicastPort = socketPorts[0];
- config.setProperty("mcast-port", String.valueOf(mcastPort));
- config.setProperty("start-locator", "localhost["+socketPorts[1]+"]");
+ config.setProperty(MCAST_PORT, String.valueOf(mcastPort));
+ config.setProperty(START_LOCATOR, "localhost[" + socketPorts[1] + "]");
config.setProperty(DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME,
""+unicastPort+"-"+(unicastPort+2));
InternalDistributedSystem system = (InternalDistributedSystem)DistributedSystem.connect(config);
@@ -386,8 +373,8 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
vm.invoke(new CacheSerializableRunnable("start conflicting system") {
public void run2() {
try {
- String locators = (String)config.remove("start-locator");
- config.put("locators", locators);
+ String locators = (String) config.remove(START_LOCATOR);
+ config.put(LOCATORS, locators);
DistributedSystem system = DistributedSystem.connect(config);
system.disconnect();
} catch (GemFireConfigException e) {
@@ -418,8 +405,8 @@ public class DistributedSystemDUnitTest extends JUnit4DistributedTestCase {
@Test
public void testEmptyCacheXmlFile() throws Exception {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
- config.setProperty("locators", "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
config.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, "");
DistributedSystem sys = DistributedSystem.connect(config);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/HostedLocatorsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/HostedLocatorsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/HostedLocatorsDUnitTest.java
index d11dea3..57bc30c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/HostedLocatorsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/HostedLocatorsDUnitTest.java
@@ -16,34 +16,35 @@
*/
package com.gemstone.gemfire.distributed;
-import static com.gemstone.gemfire.test.dunit.Assert.*;
-import static com.gemstone.gemfire.test.dunit.Host.*;
-import static com.gemstone.gemfire.internal.AvailablePortHelper.*;
-
-import java.io.File;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-import com.gemstone.gemfire.test.dunit.Host;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.util.StopWatch;
+import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import com.gemstone.gemfire.test.dunit.internal.JUnit4DistributedTestCase;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
+import static com.gemstone.gemfire.test.dunit.Assert.*;
+import static com.gemstone.gemfire.test.dunit.Host.getHost;
/**
* Extracted from LocatorLauncherLocalIntegrationTest.
@@ -84,8 +85,8 @@ public class HostedLocatorsDUnitTest extends JUnit4DistributedTestCase {
@Override
public Object call() throws Exception {
try {
- System.setProperty("gemfire.locators", dunitLocator);
- System.setProperty("gemfire.mcast-port", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "locators", dunitLocator);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
final String name = uniqueName + "-" + whichvm;
final File subdir = new File(name);
@@ -103,8 +104,8 @@ public class HostedLocatorsDUnitTest extends JUnit4DistributedTestCase {
waitForLocatorToStart(launcher, TIMEOUT_MILLISECONDS, 10, true);
return null;
} finally {
- System.clearProperty("gemfire.locators");
- System.clearProperty("gemfire.mcast-port");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "locators");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT);
}
}
});
@@ -192,8 +193,8 @@ public class HostedLocatorsDUnitTest extends JUnit4DistributedTestCase {
@Override
public Object call() throws Exception {
try {
- System.setProperty("gemfire.locators", dunitLocator);
- System.setProperty("gemfire.mcast-port", "0");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "locators", dunitLocator);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT, "0");
final String name = uniqueName + "-" + whichvm;
final File subdir = new File(name);
@@ -211,8 +212,8 @@ public class HostedLocatorsDUnitTest extends JUnit4DistributedTestCase {
waitForLocatorToStart(launcher, TIMEOUT_MILLISECONDS, 10, true);
return launcher.getPort();
} finally {
- System.clearProperty("gemfire.locators");
- System.clearProperty("gemfire.mcast-port");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "locators");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + MCAST_PORT);
}
}
});
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
index e10e81d..acc3b75 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LauncherMemberMXBeanIntegrationTest.java
@@ -16,28 +16,25 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.process.ProcessUtils;
+import com.gemstone.gemfire.management.MemberMXBean;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import javax.management.*;
import java.lang.management.ManagementFactory;
import java.util.Properties;
import java.util.Set;
import java.util.concurrent.Callable;
-import javax.management.MBeanServer;
-import javax.management.MBeanServerInvocationHandler;
-import javax.management.ObjectName;
-import javax.management.Query;
-import javax.management.QueryExp;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.process.ProcessUtils;
-import com.gemstone.gemfire.management.MemberMXBean;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Tests querying of MemberMXBean which is used by MBeanProcessController to
@@ -63,8 +60,8 @@ public class LauncherMemberMXBeanIntegrationTest extends AbstractLauncherIntegra
@Test
public void testQueryForMemberMXBean() throws Exception {
final Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty("name", getUniqueName());
new CacheFactory(props).create();
@@ -90,8 +87,8 @@ public class LauncherMemberMXBeanIntegrationTest extends AbstractLauncherIntegra
@Test
public void testQueryForMemberMXBeanWithProcessId() throws Exception {
final Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty("name", getUniqueName());
new CacheFactory(props).create();
@@ -117,8 +114,8 @@ public class LauncherMemberMXBeanIntegrationTest extends AbstractLauncherIntegra
@Test
public void testQueryForMemberMXBeanWithMemberName() throws Exception {
final Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty("name", getUniqueName());
new CacheFactory(props).create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
index 8b70221..8506620 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorDUnitTest.java
@@ -49,6 +49,8 @@ import java.util.List;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the ability of the {@link Locator} API to start and stop
* locators running in remote VMs.
@@ -132,11 +134,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String locators = NetworkUtils.getServerHostName(host) + "[" + port1 + "]";
final Properties properties = new Properties();
- properties.put("mcast-port", "0");
- properties.put("start-locator", locators);
- properties.put("log-level", LogWriterUtils.getDUnitLogLevel());
- properties.put("security-peer-auth-init", "com.gemstone.gemfire.distributed.AuthInitializer.create");
- properties.put("security-peer-authenticator", "com.gemstone.gemfire.distributed.MyAuthenticator.create");
+ properties.put(MCAST_PORT, "0");
+ properties.put(START_LOCATOR, locators);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, "com.gemstone.gemfire.distributed.AuthInitializer.create");
+ properties.put(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, "com.gemstone.gemfire.distributed.MyAuthenticator.create");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
properties.put(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "false");
system = (InternalDistributedSystem) DistributedSystem.connect(properties);
@@ -144,9 +146,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
assertEquals("expected the VM to have NORMAL vmKind",
DistributionManager.NORMAL_DM_TYPE, system.getDistributedMember().getVmKind());
- properties.remove("start-locator");
- properties.put("log-level", LogWriterUtils.getDUnitLogLevel());
- properties.put("locators", locators);
+ properties.remove(START_LOCATOR);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ properties.put(LOCATORS, locators);
SerializableRunnable startSystem = new SerializableRunnable("start system") {
public void run() {
system = (InternalDistributedSystem) DistributedSystem.connect(properties);
@@ -203,8 +205,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
}
});
- properties.put("start-locator", locators);
- properties.put("log-level", LogWriterUtils.getDUnitLogLevel());
+ properties.put(START_LOCATOR, locators);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
system = (InternalDistributedSystem) DistributedSystem.connect(properties);
System.out.println("done connecting distributed system. Membership view is " +
MembershipManagerHelper.getMembershipManager(system).getView());
@@ -227,7 +229,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
assertFalse("should not have become lock grantor", service.isLockGrantor());
// Now demonstrate that a new member can join and use the lock service
- properties.remove("start-locator");
+ properties.remove(START_LOCATOR);
vm3.invoke(startSystem);
vm3.invoke(new SerializableRunnable("get the lock service and lock something(2)") {
public void run() {
@@ -266,12 +268,12 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String locators = host0 + "[" + port1 + "]," +
host0 + "[" + port2 + "]";
final Properties properties = new Properties();
- properties.put("mcast-port", "0");
- properties.put("locators", locators);
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
- properties.put("log-level", LogWriterUtils.getDUnitLogLevel());
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, locators);
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
SerializableCallable startLocator1 = new SerializableCallable("start locator1") {
@@ -373,10 +375,10 @@ public class LocatorDUnitTest extends DistributedTestCase {
DistributedTestUtils.deleteLocatorStateFile(port1);
final String locators = NetworkUtils.getServerHostName(host) + "[" + port1 + "]";
final Properties properties = new Properties();
- properties.put("mcast-port", "0");
- properties.put("locators", locators);
- properties.put("enable-network-partition-detection", "true");
- properties.put("disable-auto-reconnect", "true");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, locators);
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
File logFile = new File("");
if (logFile.exists()) {
@@ -489,12 +491,12 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String locators = host0 + "[" + port1 + "]," +
host0 + "[" + port2 + "]";
final Properties properties = new Properties();
- properties.put("mcast-port", "0");
- properties.put("locators", locators);
- properties.put("enable-network-partition-detection", "true");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
- properties.put("log-level", LogWriterUtils.getDUnitLogLevel());
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, locators);
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
// properties.put("log-level", "fine");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -622,11 +624,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String locators = host0 + "[" + port1 + "],"
+ host0 + "[" + port2 + "]";
final Properties properties = new Properties();
- properties.put("mcast-port", "0");
- properties.put("locators", locators);
- properties.put("enable-network-partition-detection", "true");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, locators);
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
SerializableRunnable stopLocator = getStopLocatorRunnable();
@@ -767,12 +769,12 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String locators = host0 + "[" + port1 + "]," + host0 + "[" + port2 + "]";
final Properties properties = new Properties();
- properties.put("mcast-port", "0");
- properties.put("locators", locators);
- properties.put("enable-network-partition-detection", "true");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
- properties.put("log-level", LogWriterUtils.getDUnitLogLevel());
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, locators);
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
SerializableRunnable stopLocator = getStopLocatorRunnable();
@@ -904,11 +906,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String locators = host0 + "[" + port1 + "],"
+ host0 + "[" + port2 + "]";
final Properties properties = new Properties();
- properties.put("mcast-port", "0");
- properties.put("locators", locators);
- properties.put("enable-network-partition-detection", "true");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, locators);
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
SerializableRunnable disconnect =
@@ -1020,8 +1022,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
DistributedTestUtils.deleteLocatorStateFile(port1);
String locators = NetworkUtils.getServerHostName(host) + "[" + port + "]";
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
final String expected = "java.net.ConnectException";
final String addExpected =
@@ -1090,8 +1092,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
File logFile = new File("");
try {
Properties locProps = new Properties();
- locProps.setProperty("mcast-port", "0");
- locProps.setProperty("member-timeout", "1000");
+ locProps.setProperty(MCAST_PORT, "0");
+ locProps.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
locProps.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
Locator.startLocatorAndDS(port, logFile, locProps);
@@ -1107,9 +1109,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
public void run() {
//System.setProperty("p2p.joinTimeout", "5000");
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
- props.setProperty("member-timeout", "1000");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
DistributedSystem.connect(props);
}
};
@@ -1117,9 +1119,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
vm2.invoke(connect);
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
- props.setProperty("member-timeout", "1000");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.MEMBER_TIMEOUT_NAME, "1000");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
@@ -1186,7 +1188,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
try {
final Properties props = new Properties();
- props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
+ props.setProperty(LOCATORS, locators);
props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
props.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -1320,8 +1322,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
host0 + "[" + port2 + "]";
final Properties dsProps = new Properties();
- dsProps.setProperty("locators", locators);
- dsProps.setProperty("mcast-port", "0");
+ dsProps.setProperty(LOCATORS, locators);
+ dsProps.setProperty(MCAST_PORT, "0");
dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
vm0.invoke(new SerializableRunnable("Start locator on " + port1) {
@@ -1355,8 +1357,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
new SerializableRunnable("Connect to " + locators) {
public void run() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
DistributedSystem.connect(props);
}
};
@@ -1364,8 +1366,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
vm2.invoke(connect);
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
system = (InternalDistributedSystem) DistributedSystem.connect(props);
@@ -1438,7 +1440,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
host0 + "[" + port3 + "]";
final Properties dsProps = new Properties();
- dsProps.setProperty(DistributionConfig.LOCATORS_NAME, locators);
+ dsProps.setProperty(LOCATORS, locators);
dsProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
dsProps.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
dsProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
@@ -1503,7 +1505,7 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String newLocators = host0 + "[" + port2 + "]," +
host0 + "[" + port3 + "]";
- dsProps.setProperty("locators", newLocators);
+ dsProps.setProperty(LOCATORS, newLocators);
final InternalDistributedMember currentCoordinator = GMSJoinLeaveTestHelper.getCurrentCoordinator();
DistributedMember vm3ID = vm3.invoke(() -> GMSJoinLeaveTestHelper.getInternalDistributedSystem().getDM().getDistributionManagerId());
@@ -1647,11 +1649,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
File logFile = new File("");
try {
Properties props = new Properties();
- props.setProperty("mcast-port", String.valueOf(mcastport));
- props.setProperty("locators", locators);
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
- props.setProperty("mcast-ttl", "0");
- props.setProperty("enable-network-partition-detection", "true");
+ props.setProperty(MCAST_PORT, String.valueOf(mcastport));
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_TTL, "0");
+ props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
Locator.startLocatorAndDS(port1, logFile, null, props);
@@ -1665,11 +1667,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
File logFile = new File("");
try {
Properties props = new Properties();
- props.setProperty("mcast-port", String.valueOf(mcastport));
- props.setProperty("locators", locators);
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
- props.setProperty("mcast-ttl", "0");
- props.setProperty("enable-network-partition-detection", "true");
+ props.setProperty(MCAST_PORT, String.valueOf(mcastport));
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_TTL, "0");
+ props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
Locator.startLocatorAndDS(port2, logFile, null, props);
} catch (IOException ex) {
@@ -1682,11 +1684,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
new SerializableRunnable("Connect to " + locators) {
public void run() {
Properties props = new Properties();
- props.setProperty("mcast-port", String.valueOf(mcastport));
- props.setProperty("locators", locators);
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
- props.setProperty("mcast-ttl", "0");
- props.setProperty("enable-network-partition-detection", "true");
+ props.setProperty(MCAST_PORT, String.valueOf(mcastport));
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_TTL, "0");
+ props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
DistributedSystem.connect(props);
}
};
@@ -1695,11 +1697,11 @@ public class LocatorDUnitTest extends DistributedTestCase {
vm2.invoke(connect);
Properties props = new Properties();
- props.setProperty("mcast-port", String.valueOf(mcastport));
- props.setProperty("locators", locators);
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
- props.setProperty("mcast-ttl", "0");
- props.setProperty("enable-network-partition-detection", "true");
+ props.setProperty(MCAST_PORT, String.valueOf(mcastport));
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_TTL, "0");
+ props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
WaitCriterion ev = new WaitCriterion() {
@@ -1749,8 +1751,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
final String locators = NetworkUtils.getServerHostName(host) + "[" + port1 + "]";
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
system = (InternalDistributedSystem) DistributedSystem.connect(props);
system.disconnect();
@@ -1794,9 +1796,9 @@ public class LocatorDUnitTest extends DistributedTestCase {
new SerializableRunnable("Connect to " + locators) {
public void run() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", locators);
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, locators);
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
DistributedSystem.connect(props);
}
};
@@ -1828,8 +1830,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
File stateFile = new File("locator" + port1 + "state.dat");
VM vm0 = Host.getHost(0).getVM(0);
final Properties p = new Properties();
- p.setProperty(DistributionConfig.LOCATORS_NAME, Host.getHost(0).getHostName() + "[" + port1 + "]");
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ p.setProperty(LOCATORS, Host.getHost(0).getHostName() + "[" + port1 + "]");
+ p.setProperty(MCAST_PORT, "0");
p.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
if (stateFile.exists()) {
stateFile.delete();
@@ -1914,8 +1916,8 @@ public class LocatorDUnitTest extends DistributedTestCase {
System.setProperty(InternalLocator.LOCATORS_PREFERRED_AS_COORDINATORS, "true");
System.setProperty("p2p.joinTimeout", "1000");
Properties locProps = new Properties();
- locProps.put("mcast-port", "0");
- locProps.put("log-level", LogWriterUtils.getDUnitLogLevel());
+ locProps.put(MCAST_PORT, "0");
+ locProps.put(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
Locator.startLocatorAndDS(port, logFile, locProps);
} catch (IOException ex) {
com.gemstone.gemfire.test.dunit.Assert.fail("While starting locator on port " + port, ex);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
index d25427a..38c4dab 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorJUnitTest.java
@@ -16,48 +16,44 @@
*/
package com.gemstone.gemfire.distributed;
-import static com.gemstone.gemfire.distributed.internal.DistributionConfig.*;
-import static com.gemstone.gemfire.internal.AvailablePort.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-import java.util.function.IntSupplier;
-
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TemporaryFolder;
-
import com.gemstone.gemfire.SystemConnectException;
import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionRequest;
import com.gemstone.gemfire.cache.client.internal.locator.ClientConnectionResponse;
import com.gemstone.gemfire.cache.client.internal.locator.QueueConnectionRequest;
import com.gemstone.gemfire.cache.client.internal.locator.QueueConnectionResponse;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.distributed.internal.membership.gms.messenger.JGroupsMessenger;
import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.management.internal.JmxManagerAdvisor.JmxManagerProfile;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.*;
+import java.util.function.IntSupplier;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.internal.AvailablePort.SOCKET;
+import static com.gemstone.gemfire.internal.AvailablePort.getRandomAvailablePort;
+import static org.junit.Assert.*;
+
@Category(IntegrationTest.class)
@RunWith(Parameterized.class)
@Parameterized.UseParametersRunnerFactory(CategoryWithParameterizedRunnerFactory.class)
@@ -108,19 +104,19 @@ public class LocatorJUnitTest {
public void testGfshConnectShouldSucceedIfJmxManagerStartIsTrueInLocator() throws Exception {
Properties dsprops = new Properties();
int jmxPort = getRandomAvailablePort(SOCKET);
- dsprops.setProperty("mcast-port", "0");
- dsprops.setProperty("jmx-manager-port", ""+jmxPort);
- dsprops.setProperty("jmx-manager-start", "true");
- dsprops.setProperty("jmx-manager-http-port", "0");
- dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- System.setProperty("gemfire.disableManagement", "false"); // not needed
+ dsprops.setProperty(MCAST_PORT, "0");
+ dsprops.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "" + jmxPort);
+ dsprops.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+ dsprops.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
+ dsprops.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "disableManagement", "false"); // not needed
try {
locator = Locator.startLocatorAndDS(port, new File("testJmxManager.log"), dsprops);
List<JmxManagerProfile> alreadyManaging = GemFireCacheImpl.getInstance().getJmxManagerAdvisor().adviseAlreadyManaging();
assertEquals(1, alreadyManaging.size());
assertEquals(GemFireCacheImpl.getInstance().getMyId(), alreadyManaging.get(0).getDistributedMember());
} finally {
- System.clearProperty("gemfire.enabledManagement");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "enabledManagement");
}
}
@@ -138,9 +134,9 @@ public class LocatorJUnitTest {
@Test
public void testNoThreadLeftBehind() throws Exception {
Properties dsprops = new Properties();
- dsprops.setProperty("mcast-port", "0");
- dsprops.setProperty("jmx-manager-start", "false");
- dsprops.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ dsprops.setProperty(MCAST_PORT, "0");
+ dsprops.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
+ dsprops.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
JGroupsMessenger.THROW_EXCEPTION_ON_START_HOOK = true;
int threadCount = Thread.activeCount();
@@ -166,8 +162,8 @@ public class LocatorJUnitTest {
@Test
public void testServerOnly() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
locator = Locator.startLocatorAndDS(port, tmpFile, null, props, false, true, null);
assertFalse(locator.isPeerLocator());
assertTrue(locator.isServerLocator());
@@ -178,8 +174,8 @@ public class LocatorJUnitTest {
@Test
public void testBothPeerAndServer() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty(ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "false");
locator = Locator.startLocatorAndDS(port, tmpFile, null, props);
assertTrue(locator.isPeerLocator());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
index 5f442a2..ba7e8c6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
@@ -16,9 +16,17 @@
*/
package com.gemstone.gemfire.distributed;
-import static com.googlecode.catchexception.apis.BDDCatchException.*;
-import static org.assertj.core.api.BDDAssertions.*;
-import static org.assertj.core.api.BDDAssertions.then;
+import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
+import com.gemstone.gemfire.distributed.LocatorLauncher.Command;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TemporaryFolder;
+import org.junit.rules.TestName;
import java.io.File;
import java.io.FileNotFoundException;
@@ -27,18 +35,10 @@ import java.io.IOException;
import java.net.InetAddress;
import java.util.Properties;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TemporaryFolder;
-import org.junit.rules.TestName;
-
-import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
-import com.gemstone.gemfire.distributed.LocatorLauncher.Command;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.googlecode.catchexception.apis.BDDCatchException.caughtException;
+import static com.googlecode.catchexception.apis.BDDCatchException.when;
+import static org.assertj.core.api.BDDAssertions.assertThat;
+import static org.assertj.core.api.BDDAssertions.then;
/**
* Integration tests for LocatorLauncher. These tests require file system I/O.
@@ -116,8 +116,8 @@ public class LocatorLauncherIntegrationTest {
public void testBuildWithMemberNameSetInGemFirePropertiesOnStart() throws Exception {
// given: gemfire.properties with a name
Properties gemfireProperties = new Properties();
- gemfireProperties.setProperty(DistributionConfig.NAME_NAME, "locator123");
- useGemFirePropertiesFileInTemporaryFolder("gemfire.properties", gemfireProperties);
+ gemfireProperties.setProperty(SystemConfigurationProperties.NAME, "locator123");
+ useGemFirePropertiesFileInTemporaryFolder(DistributionConfig.GEMFIRE_PREFIX + "properties", gemfireProperties);
// when: starting with null MemberName
LocatorLauncher launcher = new Builder()
@@ -134,7 +134,7 @@ public class LocatorLauncherIntegrationTest {
@Test
public void testBuildWithNoMemberNameOnStart() throws Exception {
// given: gemfire.properties with no name
- useGemFirePropertiesFileInTemporaryFolder("gemfire.properties", new Properties());
+ useGemFirePropertiesFileInTemporaryFolder(DistributionConfig.GEMFIRE_PREFIX + "properties", new Properties());
// when: no MemberName is specified
when(new Builder()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
index 9fd1cd8..46cd55f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherLocalIntegrationTest.java
@@ -16,37 +16,33 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.lang.management.ManagementFactory;
-import java.net.BindException;
-import java.net.InetAddress;
-
-import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.DistributionLocator;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
import com.gemstone.gemfire.internal.process.ProcessType;
import com.gemstone.gemfire.internal.process.ProcessUtils;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import java.io.File;
+import java.lang.management.ManagementFactory;
+import java.net.BindException;
+import java.net.InetAddress;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
+
/**
* Tests usage of LocatorLauncher as a local API in existing JVM.
*
@@ -78,7 +74,7 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
.set(DistributionConfig.CLUSTER_CONFIGURATION_DIR, this.clusterConfigDirectory)
.set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0")
+ .set(MCAST_PORT, "0")
.build();
try {
@@ -92,9 +88,9 @@ public class LocatorLauncherLocalIntegrationTest extends AbstractLocatorLauncher
assertNotNull(distributedSystem);
assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
- assertEquals("0", distributedSystem.getProperties().getProperty(DistributionConfig.MCAST_PORT_NAME));
+ assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
assertEquals("config", distributedSystem.getProperties().getProperty(DistributionConfig.LOG_LEVEL_NAME));
- assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(DistributionConfig.NAME_NAME));
+ assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
} catch (Throwable e) {
this.errorCollector.addError(e);
}
[14/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
index 30e6d79..a7f24b6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
@@ -16,26 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-
-import java.io.File;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.FileUtil;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
public class PersistentPartitionedRegionJUnitTest {
@@ -201,8 +195,8 @@ public class PersistentPartitionedRegionJUnitTest {
private Region createRegion(int ttl) {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("log-level", "info");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
// props.setProperty("log-file", "junit.log");
cache = new CacheFactory(props).create();
cache.createDiskStoreFactory()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RegionListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RegionListenerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RegionListenerJUnitTest.java
index e35016e..15abb22 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RegionListenerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RegionListenerJUnitTest.java
@@ -16,20 +16,16 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.*;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class RegionListenerJUnitTest {
@@ -52,8 +48,8 @@ public class RegionListenerJUnitTest {
afterCreateInvoked.set(true);
}
};
-
- GemFireCacheImpl cache = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0").create();
+
+ GemFireCacheImpl cache = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0").create();
cache.addRegionListener(listener);
Region region = cache.createRegionFactory(RegionShortcut.REPLICATE).create("region");
assertEquals(DataPolicy.EMPTY, region.getAttributes().getDataPolicy());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
index 9b1f29e..0f78749 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
@@ -16,70 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.UserTransaction;
-
import com.gemstone.gemfire.TXExpiryJUnitTest;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.CacheEvent;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
-import com.gemstone.gemfire.cache.TransactionDataNotColocatedException;
-import com.gemstone.gemfire.cache.TransactionDataRebalancedException;
-import com.gemstone.gemfire.cache.TransactionEvent;
-import com.gemstone.gemfire.cache.TransactionException;
-import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.TransactionListener;
-import com.gemstone.gemfire.cache.TransactionWriter;
-import com.gemstone.gemfire.cache.TransactionWriterException;
-import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
import com.gemstone.gemfire.cache.query.CqEvent;
import com.gemstone.gemfire.cache.query.CqListener;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -87,6 +32,7 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
@@ -96,15 +42,15 @@ import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.transaction.RollbackException;
+import javax.transaction.Status;
+import javax.transaction.UserTransaction;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
/**
*
@@ -3464,7 +3410,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
@@ -3676,7 +3622,7 @@ protected static class ClientListener extends CacheListenerAdapter {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
index 7a0293a..988721b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
@@ -19,22 +19,18 @@
*/
package com.gemstone.gemfire.internal.cache;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.admin.remote.ShutdownAllRequest;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import java.io.File;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
*
*/
@@ -50,8 +46,8 @@ public class RunCacheInOldGemfire {
protected Cache createCache(String mcastPort) {
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, mcastPort);
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, mcastPort);
+ config.setProperty(LOCATORS, "");
config.setProperty(DistributionConfig.LOG_FILE_NAME, "oldgemfire.log");
InternalDistributedSystem localsystem = (InternalDistributedSystem)DistributedSystem.connect(config);
Cache cache = CacheFactory.create(localsystem);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
index 671bdf7..7cedbd0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/SingleHopStatsDUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.ClientMetadataService;
@@ -39,6 +38,9 @@ import java.util.Map;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class SingleHopStatsDUnitTest extends CacheTestCase {
private final String Region_Name = "42010";
@@ -139,8 +141,8 @@ public class SingleHopStatsDUnitTest extends CacheTestCase {
private void createClient(int port0, int port1, int port2, String colocation) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new SingleHopStatsDUnitTest(
"SingleHopStatsDUnitTest");
DistributedSystem distributedSystem = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
index 6150bff..ff00082 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXManagerImplJUnitTest.java
@@ -16,16 +16,9 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
@@ -33,15 +26,13 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* junit test for suspend and resume methods
@@ -62,8 +53,8 @@ public class TXManagerImplJUnitTest {
protected void createCache() {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("locators", "");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
cache = new CacheFactory(props).create();
region = cache.createRegionFactory(RegionShortcut.REPLICATE).create("testRegion");
}
@@ -314,7 +305,7 @@ public class TXManagerImplJUnitTest {
@Test
public void testSuspendTimeout() throws Exception {
cache.close();
- System.setProperty("gemfire.suspendedTxTimeout", "1");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "suspendedTxTimeout", "1");
createCache();
TXManagerImpl mgr = (TXManagerImpl) cache.getCacheTransactionManager();
assertEquals(1, mgr.getSuspendedTransactionTimeout());
@@ -328,7 +319,7 @@ public class TXManagerImplJUnitTest {
} catch (IllegalStateException expected) {
}
assertNull(region.get("key"));
- System.setProperty("gemfire.suspendedTxTimeout", "");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "suspendedTxTimeout", "");
}
@Test
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
index b1d1e64..c1688a7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TXReservationMgrJUnitTest.java
@@ -16,22 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Collections;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Collections;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class TXReservationMgrJUnitTest {
@@ -48,8 +46,8 @@ public class TXReservationMgrJUnitTest {
@Before
public void setUp() throws Exception {
Properties p = new Properties();
- p.setProperty("mcast-port", "0");
- p.setProperty("locators", "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
this.ds = DistributedSystem.connect(p);
this.c = CacheFactory.create(this.ds);
AttributesFactory af = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
index 9bd99b1..91b0153 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
@@ -16,20 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.net.InetAddress;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -37,6 +24,17 @@ import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedM
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import java.net.InetAddress;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class TombstoneCreationJUnitTest {
@@ -55,8 +53,8 @@ public class TombstoneCreationJUnitTest {
public void testDestroyCreatesTombstone() throws Exception {
String name = nameRule.getMethodName();
Properties props = new Properties();
- props.put(DistributionConfig.LOCATORS_NAME, "");
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.put(LOCATORS, "");
+ props.put(MCAST_PORT, "0");
props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(props));
RegionFactory f = cache.createRegionFactory(RegionShortcut.REPLICATE);
@@ -92,8 +90,8 @@ public class TombstoneCreationJUnitTest {
public void testConcurrentCreateAndDestroy() throws Exception {
String name = nameRule.getMethodName();
Properties props = new Properties();
- props.put(DistributionConfig.LOCATORS_NAME, "");
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.put(LOCATORS, "");
+ props.put(MCAST_PORT, "0");
props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
final GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(props));
RegionFactory f = cache.createRegionFactory(RegionShortcut.REPLICATE);
@@ -167,8 +165,8 @@ public class TombstoneCreationJUnitTest {
public void testOlderEventIgnoredEvenIfTombstoneHasExpired() throws Exception {
String name = nameRule.getMethodName();
Properties props = new Properties();
- props.put(DistributionConfig.LOCATORS_NAME, "");
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.put(LOCATORS, "");
+ props.put(MCAST_PORT, "0");
props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
final GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(props));
RegionFactory f = cache.createRegionFactory(RegionShortcut.REPLICATE);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
index 3f556e5..90ac6b8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
@@ -21,23 +21,14 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.Delta;
import com.gemstone.gemfire.InvalidDeltaException;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
-import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
import com.gemstone.gemfire.internal.cache.execute.data.CustId;
@@ -114,7 +105,7 @@ public class TransactionsWithDeltaDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionJUnitTest.java
index 8bb6bca..bff92ca 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionJUnitTest.java
@@ -19,24 +19,20 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.internal.cache.LocalRegion.NonTXEntry;
import com.gemstone.gemfire.internal.cache.Token.Tombstone;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* This test creates an entry and verifies if {@link UpdateOperation} applies
@@ -72,8 +68,8 @@ public class UpdateVersionJUnitTest {
@Test
public void testUpdateVersionAfterCreate() {
-
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
Region region = cache.createRegionFactory(RegionShortcut.REPLICATE).create(regionName);
try {
@@ -124,7 +120,7 @@ public class UpdateVersionJUnitTest {
@Test
public void testUpdateVersionAfterUpdate() {
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
Region region = cache.createRegionFactory(RegionShortcut.REPLICATE).create(regionName);
try {
@@ -180,7 +176,7 @@ public class UpdateVersionJUnitTest {
@Test
public void testUpdateVersionAfterDestroy() {
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
Region region = cache.createRegionFactory(RegionShortcut.REPLICATE).create(regionName);
try {
@@ -241,8 +237,8 @@ public class UpdateVersionJUnitTest {
@Test
public void testUpdateVersionAfterCreateOnPR() {
-
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create(regionName);
try {
@@ -293,7 +289,7 @@ public class UpdateVersionJUnitTest {
@Test
public void testUpdateVersionAfterUpdateOnPR() {
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create(regionName);
try {
@@ -349,7 +345,7 @@ public class UpdateVersionJUnitTest {
@Test
public void testUpdateVersionAfterDestroyOnPR() {
- Cache cache = new CacheFactory().set("mcast-port", "0").create();
+ Cache cache = new CacheFactory().set(MCAST_PORT, "0").create();
Region region = cache.createRegionFactory(RegionShortcut.PARTITION).create(regionName);
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
index f4a0588..8a3ba0a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorJUnitTest.java
@@ -16,33 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.control;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryPoolMXBean;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.management.ListenerNotFoundException;
-import javax.management.NotificationEmitter;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import util.TestException;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.LowMemoryException;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.control.ResourceManager;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -50,6 +24,23 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.Resou
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.apache.logging.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import util.TestException;
+
+import javax.management.ListenerNotFoundException;
+import javax.management.NotificationEmitter;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryPoolMXBean;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
*
@@ -64,7 +55,7 @@ public class MemoryMonitorJUnitTest {
@Before
public void setUp() throws Exception {
Properties p = new Properties();
- p.setProperty("mcast-port", "0");
+ p.setProperty(MCAST_PORT, "0");
this.ds = DistributedSystem.connect(p);
this.cache = (GemFireCacheImpl)CacheFactory.create(this.ds);
HeapMemoryMonitor.setTestDisableMemoryUpdates(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
index 893bebe..e8f9864 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
@@ -16,24 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.control;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EvictionAlgorithm;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
@@ -42,6 +25,16 @@ import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.Resou
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.apache.logging.log4j.Logger;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*/
@@ -56,7 +49,7 @@ public class MemoryMonitorOffHeapJUnitTest {
@Before
public void setUp() throws Exception {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ p.setProperty(MCAST_PORT, "0");
p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
this.ds = DistributedSystem.connect(p);
this.cache = (GemFireCacheImpl) CacheFactory.create(this.ds);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
index 05febda..7e355f3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
@@ -16,44 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.control;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyBoolean;
-import static org.mockito.Matchers.anyInt;
-import static org.mockito.Matchers.eq;
-import static org.mockito.Mockito.doReturn;
-import static org.mockito.Mockito.spy;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Set;
-import java.util.TreeSet;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.CyclicBarrier;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
@@ -70,26 +33,19 @@ import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.ColocationHelper;
-import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.PRHARedundancyProvider;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceObserverAdapter;
import com.gemstone.gemfire.internal.cache.partitioned.BucketCountLoadProbe;
import com.gemstone.gemfire.internal.cache.partitioned.LoadProbe;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.TimeoutException;
+
+import static org.mockito.Matchers.*;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.spy;
/**
*
@@ -104,11 +60,11 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
Invoke.invokeInEveryVM(new SerializableRunnable() {
public void run() {
InternalResourceManager.setResourceObserver(null);
- System.clearProperty("gemfire.resource.manager.threads");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "resource.manager.threads");
}
});
InternalResourceManager.setResourceObserver(null);
- System.clearProperty("gemfire.resource.manager.threads");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "resource.manager.threads");
}
/**
@@ -796,7 +752,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
private DistributedMember setRedundancyZone(VM vm, final String zone) {
return (DistributedMember) vm.invoke(new SerializableCallable("set redundancy zone") {
public Object call() {
- System.setProperty("gemfire.resource.manager.threads", "2");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "resource.manager.threads", "2");
Properties props = new Properties();
props.setProperty(DistributionConfig.REDUNDANCY_ZONE_NAME, zone);
DistributedSystem system = getSystem(props);
@@ -1247,13 +1203,13 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
@Override
public void run () {
- System.setProperty("gemfire.LOG_REBALANCE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "LOG_REBALANCE", "true");
}
});
try {
recoverRedundancyParallelAsyncEventQueue(true);
} finally {
- System.setProperty("gemfire.LOG_REBALANCE", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "LOG_REBALANCE", "false");
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionPersistOnlySyncJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionPersistOnlySyncJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionPersistOnlySyncJUnitTest.java
index 6dd9867..f086325 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionPersistOnlySyncJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/DiskRegionPersistOnlySyncJUnitTest.java
@@ -16,24 +16,24 @@
*/
package com.gemstone.gemfire.internal.cache.diskPerf;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Arrays;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.RegionAttributes;
import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DiskRegionHelperFactory;
import com.gemstone.gemfire.internal.cache.DiskRegionProperties;
import com.gemstone.gemfire.internal.cache.DiskRegionTestingBase;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Arrays;
+
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* Disk region perf test for Persist only with sync writes.
@@ -87,8 +87,8 @@ public class DiskRegionPersistOnlySyncJUnitTest extends DiskRegionTestingBase
Arrays.fill(value, (byte)77);
String config = "ENTRY_SIZE=" + ENTRY_SIZE + " OP_COUNT=" + OP_COUNT
+ " UNIQUE_KEYS=" + UNIQUE_KEYS + " opLogEnabled="
- + !Boolean.getBoolean("gemfire.disableOpLog") + " syncWrites="
- + Boolean.getBoolean("gemfire.syncWrites");
+ + !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableOpLog") + " syncWrites="
+ + Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "syncWrites");
if (ra.getDiskStoreName() != null) {
config += " diskStoreName="+ra.getDiskStoreName();
} else {
@@ -190,8 +190,8 @@ public class DiskRegionPersistOnlySyncJUnitTest extends DiskRegionTestingBase
Arrays.fill(value, (byte)77);
String config = "ENTRY_SIZE=" + ENTRY_SIZE + " OP_COUNT=" + OP_COUNT
+ " UNIQUE_KEYS=" + UNIQUE_KEYS + " opLogEnabled="
- + !Boolean.getBoolean("gemfire.disableOpLog") + " syncWrites="
- + Boolean.getBoolean("gemfire.syncWrites");
+ + !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableOpLog") + " syncWrites="
+ + Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "syncWrites");
if (ra.getDiskStoreName() != null) {
config += " diskStoreName="+ra.getDiskStoreName();
} else {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
index 5e2da16..c4392ee 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
@@ -16,26 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.diskPerf;
-import java.io.File;
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class MultiThreadedOplogPerJUnitPerformanceTest
@@ -103,9 +99,9 @@ public class MultiThreadedOplogPerJUnitPerformanceTest
public void testPerf()
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "info");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
index 9a7fb8b..f579a93 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/Bug51193DUnitTest.java
@@ -16,25 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.util.ArrayList;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -46,6 +35,12 @@ import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.ArrayList;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
@SuppressWarnings("serial")
public class Bug51193DUnitTest extends DistributedTestCase {
@@ -76,7 +71,7 @@ public class Bug51193DUnitTest extends DistributedTestCase {
}
public static void closeCache() {
- System.clearProperty("gemfire.CLIENT_FUNCTION_TIMEOUT");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "CLIENT_FUNCTION_TIMEOUT");
if (cache != null && !cache.isClosed()) {
cache.close();
cache.getDistributedSystem().disconnect();
@@ -88,12 +83,12 @@ public class Bug51193DUnitTest extends DistributedTestCase {
Integer timeout) throws Exception {
try {
if (timeout > 0) {
- System.setProperty("gemfire.CLIENT_FUNCTION_TIMEOUT",
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "CLIENT_FUNCTION_TIMEOUT",
String.valueOf(timeout));
}
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
// props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
// + ".gfs");
// props.setProperty("statistic-sampling-enabled", "true");
@@ -109,7 +104,7 @@ public class Bug51193DUnitTest extends DistributedTestCase {
crf.create(REGION_NAME);
} finally {
- System.clearProperty("gemfire.CLIENT_FUNCTION_TIMEOUT");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "CLIENT_FUNCTION_TIMEOUT");
}
}
@@ -117,7 +112,7 @@ public class Bug51193DUnitTest extends DistributedTestCase {
public static Integer createServerCache(Boolean createPR)
throws Exception {
Properties props = new Properties();
- props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
Bug51193DUnitTest test = new Bug51193DUnitTest("Bug51193DUnitTest");
DistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
index fef088f..fc1cd6f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
@@ -16,35 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -56,17 +34,16 @@ import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
import com.gemstone.gemfire.security.templates.DummyAuthenticator;
import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class DistributedRegionFunctionExecutionDUnitTest extends DistributedTestCase {
@@ -824,7 +801,7 @@ public class DistributedRegionFunctionExecutionDUnitTest extends DistributedTest
assertNotNull(ds);
ds.disconnect();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = (InternalDistributedSystem)DistributedSystem.connect(props);
DM dm = ds.getDistributionManager();
@@ -912,25 +889,25 @@ public class DistributedRegionFunctionExecutionDUnitTest extends DistributedTest
public static void createCacheInVm_41367() {
Properties props = new Properties();
- props.put(DistributionConfig.NAME_NAME, "SecurityServer");
- props.put("security-client-authenticator", DummyAuthenticator.class.getName() + ".create");
+ props.put(SystemConfigurationProperties.NAME, "SecurityServer");
+ props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, DummyAuthenticator.class.getName() + ".create");
new DistributedRegionFunctionExecutionDUnitTest("temp").createCache(props);
}
public static void createCacheInClientVm() {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("locators", "");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
new DistributedRegionFunctionExecutionDUnitTest("temp")
.createCache(new Properties());
}
public static void createCacheInClientVm_41367() {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("locators", "");
- props.put(DistributionConfig.NAME_NAME, "SecurityClient");
- props.put("security-client-auth-init", UserPasswordAuthInit.class.getName() + ".create");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
+ props.put(SystemConfigurationProperties.NAME, "SecurityClient");
+ props.put(DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create");
props.put("security-username", "reader1");
props.put("security-password", "reader1");
new DistributedRegionFunctionExecutionDUnitTest("temp").createCache(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
index 6db487b..1ff0a50 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/FunctionServiceStatsDUnitTest.java
@@ -16,49 +16,27 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.PartitionAttributesImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionTestHelper;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/*
* This is DUnite Test to test the Function Execution stats under various
@@ -422,8 +400,8 @@ public class FunctionServiceStatsDUnitTest extends PRClientServerTestBase{
public Object call() throws Exception {
try {
Properties props = new Properties();
- props.put("mcast-port", "0");
- props.put("locators", "");
+ props.put(MCAST_PORT, "0");
+ props.put(LOCATORS, "");
DistributedSystem ds = getSystem(props);
assertNotNull(ds);
ds.disconnect();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
index ada68c9..c37e01f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/MemberFunctionExecutionDUnitTest.java
@@ -16,27 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
-import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.Function;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.ResultCollector;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -48,12 +29,13 @@ import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.ClassBuilder;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.lang.reflect.Constructor;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class MemberFunctionExecutionDUnitTest extends CacheTestCase {
private static final String TEST_FUNCTION6 = TestFunction.TEST_FUNCTION6;
@@ -348,7 +330,7 @@ public class MemberFunctionExecutionDUnitTest extends CacheTestCase {
assertNotNull(ds);
ds.disconnect();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = (InternalDistributedSystem)DistributedSystem.connect(props);
DM dm = ds.getDistributionManager();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
index 0d65dbb..4ad95fc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
@@ -16,42 +16,24 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.Locator;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Properties;
/**
*
@@ -112,7 +94,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
@Override
public Object call() throws Exception {
Properties props = new Properties();
- props.put("groups", groups);
+ props.put(DistributionConfig.GROUPS_NAME, groups);
if (regionName != null) {
Cache c = null;
try {
@@ -688,7 +670,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
c.getLogger().info("SWAP:invoking function from client on g0");
@@ -786,7 +768,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
c.getLogger().info("SWAP:invoking function from client on g0");
@@ -863,7 +845,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
IgnoredException ex = IgnoredException.addIgnoredException("No member found");
@@ -943,7 +925,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
IgnoredException expected = IgnoredException.addIgnoredException("No member found");
@@ -1020,7 +1002,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1069,7 +1051,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1118,7 +1100,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1185,7 +1167,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
c.getLogger().info("SWAP:invoking function from client on g0");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
index c3cc81a..cf22c97 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
@@ -16,18 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.execute.Execution;
@@ -44,16 +33,16 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
PRClientServerTestBase {
@@ -399,7 +388,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
"PRClientServerRegionFunctionExecutionFailoverDUnitTest");
Properties props = new Properties();
props = new Properties();
- props.setProperty("locators", locator);
+ props.setProperty(LOCATORS, locator);
DistributedSystem ds = test.getSystem(props);
cache = new CacheFactory(props).create(ds);
@@ -433,8 +422,8 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
public static void createClientWithLocator(String host, int port0) {
Properties props = new Properties();
props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
CacheTestCase test = new PRClientServerRegionFunctionExecutionFailoverDUnitTest(
"PRClientServerRegionFunctionExecutionFailoverDUnitTest");
DistributedSystem ds = test.getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
index d69595a..7b56a60 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerTestBase.java
@@ -16,49 +16,27 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryOperation;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.execute.Execution;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.cache.execute.ResultCollector;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class PRClientServerTestBase extends CacheTestCase {
@@ -591,8 +569,8 @@ public class PRClientServerTestBase extends CacheTestCase {
server3.invoke(() -> PRClientServerTestBase.createCacheInVm( props ));
Properties props2 = new Properties();
- props2.setProperty("mcast-port", "0");
- props2.setProperty("locators", "");
+ props2.setProperty(MCAST_PORT, "0");
+ props2.setProperty(LOCATORS, "");
client.invoke(() -> PRClientServerTestBase.createCacheInVm( props2 ));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
index 12a143d..9462fab 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRCustomPartitioningDUnitTest.java
@@ -21,28 +21,8 @@ package com.gemstone.gemfire.internal.cache.execute;
* for put and get functionality in case of Custom Partitioning.
*/
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryOperation;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.ReplyException;
@@ -51,11 +31,13 @@ import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDUnitTestCase;
import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore.BucketVisitor;
import com.gemstone.gemfire.internal.cache.xmlcache.Declarable2;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.Serializable;
+import java.util.*;
public class PRCustomPartitioningDUnitTest extends
PartitionedRegionDUnitTestCase {
@@ -86,7 +68,7 @@ public class PRCustomPartitioningDUnitTest extends
public static void createCacheInVm() throws Exception{
Properties props = new Properties();
- //props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ //props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
//props.setProperty(DistributionConfig.LOCATORS_NAME, "");
new PRCustomPartitioningDUnitTest("temp").createCache(props);
}
[29/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
index e8afdb2..0c99033 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ServerConnection.java
@@ -17,24 +17,6 @@
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.Socket;
-import java.nio.ByteBuffer;
-import java.nio.channels.SelectableChannel;
-import java.nio.channels.SelectionKey;
-import java.nio.channels.Selector;
-import java.security.Principal;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.SystemFailure;
@@ -49,12 +31,7 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.tier.Acceptor;
-import com.gemstone.gemfire.internal.cache.tier.CachedRegionHelper;
-import com.gemstone.gemfire.internal.cache.tier.ClientHandShake;
-import com.gemstone.gemfire.internal.cache.tier.Command;
-import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
-import com.gemstone.gemfire.internal.cache.tier.MessageType;
+import com.gemstone.gemfire.internal.cache.tier.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.command.Default;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
@@ -66,6 +43,23 @@ import com.gemstone.gemfire.internal.util.Breadcrumbs;
import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.security.AuthenticationRequiredException;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.Socket;
+import java.nio.ByteBuffer;
+import java.nio.channels.SelectableChannel;
+import java.nio.channels.SelectionKey;
+import java.nio.channels.Selector;
+import java.security.Principal;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Random;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.LinkedBlockingQueue;
/**
* Provides an implementation for the server socket end of the hierarchical
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/TXFailoverCommand.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/TXFailoverCommand.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/TXFailoverCommand.java
index 789b312..c31d9cf 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/TXFailoverCommand.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/command/TXFailoverCommand.java
@@ -16,30 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets.command;
-import java.io.IOException;
-
import com.gemstone.gemfire.cache.TransactionDataNodeHasDepartedException;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.ReplyException;
import com.gemstone.gemfire.distributed.internal.WaitForViewInstallation;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.cache.FindRemoteTXMessage;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.PeerTXStateStub;
-import com.gemstone.gemfire.internal.cache.TXId;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXState;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
-import com.gemstone.gemfire.internal.cache.TXStateProxyImpl;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.FindRemoteTXMessage.FindRemoteTXMessageReplyProcessor;
import com.gemstone.gemfire.internal.cache.tier.Command;
import com.gemstone.gemfire.internal.cache.tier.sockets.BaseCommand;
import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
import com.gemstone.gemfire.internal.cache.tier.sockets.ServerConnection;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+
+import java.io.IOException;
/**
* Used for bootstrapping txState/PeerTXStateStub on the server.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/ClientTXStateStub.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/ClientTXStateStub.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/ClientTXStateStub.java
index 88e4ed8..855297f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/ClientTXStateStub.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/tx/ClientTXStateStub.java
@@ -24,29 +24,22 @@ import com.gemstone.gemfire.cache.client.internal.ServerRegionDataAccess;
import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.TXCommitMessage;
-import com.gemstone.gemfire.internal.cache.TXLockRequest;
-import com.gemstone.gemfire.internal.cache.TXRegionLockRequestImpl;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
-import com.gemstone.gemfire.internal.cache.TXStateStub;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.locks.TXRegionLockRequest;
import com.gemstone.gemfire.internal.cache.tx.TransactionalOperation.ServerRegionOperation;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+import javax.transaction.Status;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
-import javax.transaction.Status;
-
-import org.apache.logging.log4j.Logger;
-
public class ClientTXStateStub extends TXStateStub {
private static final Logger logger = LogService.getLogger();
@@ -75,7 +68,7 @@ public class ClientTXStateStub extends TXStateStub {
/**
* System property to disable conflict checks on clients.
*/
- private static final boolean DISABLE_CONFLICT_CHECK_ON_CLIENT = Boolean.getBoolean("gemfire.disableConflictChecksOnClient");
+ private static final boolean DISABLE_CONFLICT_CHECK_ON_CLIENT = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableConflictChecksOnClient");
/**
* @return true if transactional operation recording is enabled (test hook)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
index d9180a2..2f02422 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
@@ -16,28 +16,10 @@
*/
package com.gemstone.gemfire.internal.cache.versions;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Collections;
-import java.util.ConcurrentModificationException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.ReentrantReadWriteLock;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.MembershipListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -51,6 +33,17 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.ReentrantReadWriteLock;
/**
* RegionVersionVector tracks the highest region-level version number of
@@ -60,18 +53,18 @@ import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
public abstract class RegionVersionVector<T extends VersionSource<?>> implements DataSerializableFixedID, MembershipListener {
private static final Logger logger = LogService.getLogger();
-
- public static boolean DEBUG = Boolean.getBoolean("gemfire.VersionVector.VERBOSE"); //TODO:LOG:CONVERT: REMOVE THIS
+
+ public static boolean DEBUG = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "VersionVector.VERBOSE"); //TODO:LOG:CONVERT: REMOVE THIS
//////////////////// The following statics exist for unit testing. ////////////////////////////
/** maximum ms wait time while waiting for dominance to be achieved */
- public static long MAX_DOMINANCE_WAIT_TIME = Long.getLong("gemfire.max-dominance-wait-time", 5000);
+ public static long MAX_DOMINANCE_WAIT_TIME = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "max-dominance-wait-time", 5000);
/** maximum ms pause time while waiting for dominance to be achieved */
- public static long DOMINANCE_PAUSE_TIME = Math.min(Long.getLong("gemfire.dominance-pause-time", 300), MAX_DOMINANCE_WAIT_TIME);
+ public static long DOMINANCE_PAUSE_TIME = Math.min(Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "dominance-pause-time", 300), MAX_DOMINANCE_WAIT_TIME);
private static int INITIAL_CAPACITY = 2;
private static int CONCURRENCY_LEVEL = 2;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
index 3c70a4b..c57aebc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/AbstractGatewaySenderEventProcessor.java
@@ -16,41 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache.wan;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.GemFireException;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.wan.GatewayEventFilter;
import com.gemstone.gemfire.cache.wan.GatewayQueueEvent;
import com.gemstone.gemfire.cache.wan.GatewaySender;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.Conflatable;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.EnumListenerEvent;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.RegionQueue;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.wan.parallel.ConcurrentParallelGatewaySenderQueue;
import com.gemstone.gemfire.internal.cache.wan.parallel.ParallelGatewaySenderQueue;
import com.gemstone.gemfire.internal.cache.wan.serial.SerialGatewaySenderQueue;
@@ -59,6 +33,13 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentHashMap;
/**
* EventProcessor responsible for peeking from queue and handling over the events
@@ -353,13 +334,13 @@ public abstract class AbstractGatewaySenderEventProcessor extends Thread {
* practice.
*/
protected static final int FAILURE_MAP_MAXSIZE = Integer.getInteger(
- "gemfire.GatewaySender.FAILURE_MAP_MAXSIZE", 1000000);
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.FAILURE_MAP_MAXSIZE", 1000000);
/**
* The maximum interval for logging failures of the same event in millis.
*/
protected static final int FAILURE_LOG_MAX_INTERVAL = Integer.getInteger(
- "gemfire.GatewaySender.FAILURE_LOG_MAX_INTERVAL", 300000);
+ DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.FAILURE_LOG_MAX_INTERVAL", 300000);
public final boolean skipFailureLogging(Integer batchId) {
boolean skipLogging = false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java
index 5c26bfe..b516ca1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/serial/SerialGatewaySenderQueue.java
@@ -16,51 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache.wan.serial;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Deque;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.PriorityQueue;
-import java.util.Set;
-import java.util.concurrent.LinkedBlockingDeque;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEvent;
import com.gemstone.gemfire.cache.asyncqueue.internal.AsyncEventQueueImpl;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.cache.Conflatable;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.RegionEventImpl;
-import com.gemstone.gemfire.internal.cache.RegionQueue;
-import com.gemstone.gemfire.internal.cache.Token;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.cache.wan.AbstractGatewaySender;
@@ -70,8 +33,14 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
-import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
import com.gemstone.gemfire.pdx.internal.PeerTypeRegistration;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.LinkedBlockingDeque;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
/**
* @since GemFire 7.0
@@ -164,7 +133,7 @@ public class SerialGatewaySenderQueue implements RegionQueue {
* Whether the <code>Gateway</code> queue should be no-ack instead of ack.
*/
private static final boolean NO_ACK = Boolean
- .getBoolean("gemfire.gateway-queue-no-ack");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "gateway-queue-no-ack");
private volatile long lastDispatchedKey = -1;
@@ -200,7 +169,7 @@ public class SerialGatewaySenderQueue implements RegionQueue {
} else {
this.isDiskSynchronous = false;
}
- if (Boolean.getBoolean("gemfire.gateway-queue-sync")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "gateway-queue-sync")) {
this.keyPutNoSync = false;
this.maxPendingPuts = 0;
this.pendingPuts = null;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
index d2ff280..e3c5438 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheXml.java
@@ -16,21 +16,16 @@
*/
package com.gemstone.gemfire.internal.cache.xmlcache;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ServiceLoader;
-
-import org.xml.sax.Attributes;
-import org.xml.sax.ErrorHandler;
-import org.xml.sax.InputSource;
-import org.xml.sax.SAXException;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXParseException;
-import org.xml.sax.ext.EntityResolver2;
-
import com.gemstone.gemfire.cache.CacheXmlException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import org.xml.sax.*;
+import org.xml.sax.ext.EntityResolver2;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ServiceLoader;
/**
* The abstract superclass of classes that convert XML into a {@link
@@ -696,7 +691,7 @@ public abstract class CacheXml implements EntityResolver2, ErrorHandler {
/** The name of the <code>overflow-directory</code> attribute */
protected static final String OVERFLOW_DIRECTORY = "overflow-directory";
/** The name of the <code>socket-buffer-size</code> attribute */
- protected static final String SOCKET_BUFFER_SIZE = "socket-buffer-size";
+ protected static final String SOCKET_BUFFER_SIZE = DistributionConfig.SOCKET_BUFFER_SIZE_NAME;
/** The name of the <code>socket-read-timeout</code> attribute */
protected static final String SOCKET_READ_TIMEOUT = "socket-read-timeout";
/** The name of the <code>maximum-queue-memory</code> attribute */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/concurrent/Atomics.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/concurrent/Atomics.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/concurrent/Atomics.java
index f922416..8940a69 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/concurrent/Atomics.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/concurrent/Atomics.java
@@ -17,15 +17,16 @@
package com.gemstone.gemfire.internal.concurrent;
-import java.util.concurrent.atomic.AtomicLong;
-
import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.StatisticsType;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.LocalStatisticsImpl;
import com.gemstone.gemfire.internal.StatisticsManager;
import com.gemstone.gemfire.internal.StatisticsTypeImpl;
import com.gemstone.gemfire.internal.stats50.Atomic50StatisticsImpl;
+import java.util.concurrent.atomic.AtomicLong;
+
public class Atomics {
private Atomics() { }
@@ -33,7 +34,7 @@ public class Atomics {
* Whether per-thread stats are used. Striping is disabled for the
* IBM JVM due to bug 38226
*/
- private static final boolean STRIPED_STATS_DISABLED = Boolean.getBoolean("gemfire.STRIPED_STATS_DISABLED")
+ private static final boolean STRIPED_STATS_DISABLED = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "STRIPED_STATS_DISABLED")
|| "IBM Corporation".equals(System.getProperty("java.vm.vendor", "unknown"));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/jndi/JNDIInvoker.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/jndi/JNDIInvoker.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/jndi/JNDIInvoker.java
index 2743537..82165a7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/jndi/JNDIInvoker.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/jndi/JNDIInvoker.java
@@ -16,22 +16,8 @@
*/
package com.gemstone.gemfire.internal.jndi;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NameNotFoundException;
-import javax.naming.NamingException;
-import javax.naming.NoInitialContextException;
-import javax.transaction.SystemException;
-import javax.transaction.TransactionManager;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.internal.datasource.AbstractDataSource;
@@ -43,6 +29,15 @@ import com.gemstone.gemfire.internal.jta.TransactionManagerImpl;
import com.gemstone.gemfire.internal.jta.TransactionUtils;
import com.gemstone.gemfire.internal.jta.UserTransactionImpl;
+import javax.naming.*;
+import javax.transaction.SystemException;
+import javax.transaction.TransactionManager;
+import java.lang.reflect.Method;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
/**
* <p>
* Utility class for binding DataSources and Transactional resources to JNDI
@@ -111,7 +106,7 @@ public class JNDIInvoker {
* as a JTA transaction manager. Also region operations will <b>not</b> participate in
* an ongoing JTA transaction.
*/
- private static Boolean IGNORE_JTA = Boolean.getBoolean("gemfire.ignoreJTA");
+ private static Boolean IGNORE_JTA = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ignoreJTA");
/**
* Bind the transaction resources. Bind UserTransaction and
@@ -221,7 +216,7 @@ public class JNDIInvoker {
}
}
dataSourceList.clear();
- IGNORE_JTA = Boolean.getBoolean("gemfire.ignoreJTA");
+ IGNORE_JTA = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ignoreJTA");
}
/*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
index edd66c2..5100fc4 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogConfig.java
@@ -16,8 +16,6 @@
*/
package com.gemstone.gemfire.internal.logging;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-
import java.io.File;
public interface LogConfig {
@@ -27,7 +25,7 @@ public interface LogConfig {
*
* @see com.gemstone.gemfire.internal.logging.LogWriterImpl
*/
- public int getLogLevel();
+ int getLogLevel();
/**
* Returns the value of the <a
* href="../DistributedSystem.html#log-file">"log-file"</a> property
@@ -35,19 +33,19 @@ public interface LogConfig {
* @return <code>null</code> if logging information goes to standard
* out
*/
- public File getLogFile();
+ File getLogFile();
/**
* Returns the value of the <a
* href="../DistributedSystem.html#log-file-size-limit">"log-file-size-limit"</a>
* property
*/
- public int getLogFileSizeLimit();
+ int getLogFileSizeLimit();
/**
* Returns the value of the <a
* href="../DistributedSystem.html#log-disk-space-limit">"log-disk-space-limit"</a>
* property
*/
- public int getLogDiskSpaceLimit();
+ int getLogDiskSpaceLimit();
/**
* Returns the value of the <a
@@ -59,7 +57,7 @@ public interface LogConfig {
* <p> The default value is: {@link DistributionConfig#DEFAULT_NAME}.
* @return the system's name.
*/
- public String getName();
-
- public String toLoggerString();
+ String getName();
+
+ String toLoggerString();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
index 63ed4b0..cdc5e81 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/LogWriterFactory.java
@@ -16,7 +16,6 @@
*/
package com.gemstone.gemfire.internal.logging;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/ManagerLogWriter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/ManagerLogWriter.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/ManagerLogWriter.java
index b4e32c0..353813c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/ManagerLogWriter.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/ManagerLogWriter.java
@@ -16,28 +16,21 @@
*/
package com.gemstone.gemfire.internal.logging;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FilenameFilter;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.regex.Pattern;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
-import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
import com.gemstone.gemfire.internal.util.LogFileUtils;
+import java.io.*;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Date;
+import java.util.regex.Pattern;
+
/**
* Implementation of {@link LogWriterI18n} for distributed system members.
* Its just like {@link LocalLogWriter} except it has support for rolling
@@ -47,7 +40,7 @@ import com.gemstone.gemfire.internal.util.LogFileUtils;
*/
public class ManagerLogWriter extends LocalLogWriter {
- public static final String TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY = "gemfire.logging.test.fileSizeLimitInKB";
+ public static final String TEST_FILE_SIZE_LIMIT_IN_KB_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "logging.test.fileSizeLimitInKB";
private final boolean fileSizeLimitInKB;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogConfig.java
index f915994..fdb7a87 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogConfig.java
@@ -16,10 +16,10 @@
*/
package com.gemstone.gemfire.internal.logging;
-import java.io.File;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import java.io.File;
+
/**
* LogConfig implementation for Security logging configuration that delegates
* to a DistributionConfig.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogWriter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogWriter.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogWriter.java
index b94c2ad..80a2c79 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogWriter.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityLogWriter.java
@@ -16,6 +16,7 @@
*/
package com.gemstone.gemfire.internal.logging;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.i18n.StringId;
/**
@@ -32,7 +33,7 @@ import com.gemstone.gemfire.i18n.StringId;
*/
public final class SecurityLogWriter extends LogWriterImpl implements InternalLogWriter {
- public static final String SECURITY_PREFIX = "security-";
+ public static final String SECURITY_PREFIX = DistributionConfig.SECURITY_PREFIX_NAME;
private final int logLevel;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityManagerLogWriter.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityManagerLogWriter.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityManagerLogWriter.java
index d051cef..9dde226 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityManagerLogWriter.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/SecurityManagerLogWriter.java
@@ -16,10 +16,9 @@
*/
package com.gemstone.gemfire.internal.logging;
-import java.io.PrintStream;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.i18n.StringId;
+
+import java.io.PrintStream;
/**
* A log writer for security related logs. This will prefix all messages with
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AppenderContext.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AppenderContext.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AppenderContext.java
index 4e9cf88..f8e65b3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AppenderContext.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/AppenderContext.java
@@ -16,12 +16,12 @@
*/
package com.gemstone.gemfire.internal.logging.log4j;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
import org.apache.logging.log4j.core.Logger;
import org.apache.logging.log4j.core.LoggerContext;
import org.apache.logging.log4j.core.config.LoggerConfig;
-import com.gemstone.gemfire.internal.logging.LogService;
-
/**
* Provides the LoggerContext and LoggerConfig for GemFire appenders to attach
* to. These appenders include AlertAppender and LogWriterAppender.
@@ -30,7 +30,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
public class AppenderContext {
/** "com.gemstone" is a good alternative for limiting alerts to just gemstone packages, otherwise ROOT is used */
- public static final String LOGGER_PROPERTY = "gemfire.logging.appenders.LOGGER";
+ public static final String LOGGER_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "logging.appenders.LOGGER";
public AppenderContext() {
this(System.getProperty(LOGGER_PROPERTY, ""));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
index 263527e..a050269 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders.java
@@ -16,40 +16,26 @@
*/
package com.gemstone.gemfire.internal.logging.log4j;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Level;
-import org.apache.logging.log4j.core.Appender;
-import org.apache.logging.log4j.core.config.AppenderRef;
-import org.apache.logging.log4j.core.config.LoggerConfig;
-
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.internal.logging.LogConfig;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.ManagerLogWriter;
-import com.gemstone.gemfire.internal.logging.SecurityManagerLogWriter;
+import com.gemstone.gemfire.internal.logging.*;
import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
import com.gemstone.gemfire.internal.util.LogFileUtils;
+import java.io.*;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicInteger;
+
/**
* Holds on to one or many instances of LogWriterAppender and provides
* convenience methods for controlling their lifecycles.
*
*/
public class LogWriterAppenders {
- public final static String APPEND_TO_LOG_FILE = "gemfire.append-log";
+ public final static String APPEND_TO_LOG_FILE = DistributionConfig.GEMFIRE_PREFIX + "append-log";
private static final boolean ALLOW_REDIRECT = true;
public enum Identifier {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLogger.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLogger.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLogger.java
index dc36f95..a17f8c7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLogger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLogger.java
@@ -16,8 +16,14 @@
*/
package com.gemstone.gemfire.internal.logging.log4j;
-import java.util.logging.Handler;
-
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.i18n.LogWriterI18n;
+import com.gemstone.gemfire.i18n.StringId;
+import com.gemstone.gemfire.internal.logging.GemFireHandler;
+import com.gemstone.gemfire.internal.logging.InternalLogWriter;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.logging.log4j.message.GemFireParameterizedMessageFactory;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -26,13 +32,7 @@ import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.spi.AbstractLogger;
import org.apache.logging.log4j.spi.ExtendedLoggerWrapper;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.i18n.LogWriterI18n;
-import com.gemstone.gemfire.i18n.StringId;
-import com.gemstone.gemfire.internal.logging.GemFireHandler;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.log4j.message.GemFireParameterizedMessageFactory;
+import java.util.logging.Handler;
/**
* Implements GemFireLogger with custom levels while also bridging LogWriter
@@ -47,7 +47,7 @@ implements InternalLogWriter, GemFireLogger {
private static final long serialVersionUID = 446081244292135L;
// TODO:LOG:SECURITY: need to use this either here if isSecure==true or in the security LogWriterAppender's PatternLayout but not both places
- public static final String SECURITY_PREFIX = "security-";
+ public static final String SECURITY_PREFIX = DistributionConfig.SECURITY_PREFIX_NAME;
private final ExtendedLoggerWrapper logWrapper;
private final String connectionName;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index 9940b7d..ffd5b0a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -16,24 +16,18 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.List;
-import java.util.NavigableSet;
+import com.gemstone.gemfire.OutOfOffHeapMemoryException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
import java.util.concurrent.ConcurrentSkipListSet;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.atomic.AtomicReferenceArray;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.OutOfOffHeapMemoryException;
-import com.gemstone.gemfire.internal.logging.LogService;
-
/**
* Manages the free lists and slabs for a MemoryAllocator
*/
@@ -273,7 +267,7 @@ public class FreeListManager {
* Set this to "true" to perform data integrity checks on allocated and reused Chunks. This may clobber
* performance so turn on only when necessary.
*/
- final boolean validateMemoryWithFill = Boolean.getBoolean("gemfire.validateOffHeapWithFill");
+ final boolean validateMemoryWithFill = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "validateOffHeapWithFill");
/**
* Every allocated chunk smaller than TINY_MULTIPLE*TINY_FREE_LIST_COUNT will allocate a chunk of memory that is a multiple of this value.
* Sizes are always rounded up to the next multiple of this constant
@@ -282,14 +276,14 @@ public class FreeListManager {
* This does not account for the additional internal fragmentation caused by the off-heap header
* which currently is always 8 bytes.
*/
- public final static int TINY_MULTIPLE = Integer.getInteger("gemfire.OFF_HEAP_ALIGNMENT", 8);
+ public final static int TINY_MULTIPLE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_ALIGNMENT", 8);
static {
verifyOffHeapAlignment(TINY_MULTIPLE);
}
/**
* Number of free lists to keep for tiny allocations.
*/
- public final static int TINY_FREE_LIST_COUNT = Integer.getInteger("gemfire.OFF_HEAP_FREE_LIST_COUNT", 16384);
+ public final static int TINY_FREE_LIST_COUNT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_FREE_LIST_COUNT", 16384);
static {
verifyOffHeapFreeListCount(TINY_FREE_LIST_COUNT);
}
@@ -507,16 +501,16 @@ public class FreeListManager {
static void verifyOffHeapAlignment(int tinyMultiple) {
if (tinyMultiple <= 0 || (tinyMultiple & 3) != 0) {
- throw new IllegalStateException("gemfire.OFF_HEAP_ALIGNMENT must be a multiple of 8.");
+ throw new IllegalStateException(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_ALIGNMENT must be a multiple of 8.");
}
if (tinyMultiple > 256) {
// this restriction exists because of the dataSize field in the object header.
- throw new IllegalStateException("gemfire.OFF_HEAP_ALIGNMENT must be <= 256 and a multiple of 8.");
+ throw new IllegalStateException(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_ALIGNMENT must be <= 256 and a multiple of 8.");
}
}
static void verifyOffHeapFreeListCount(int tinyFreeListCount) {
if (tinyFreeListCount <= 0) {
- throw new IllegalStateException("gemfire.OFF_HEAP_FREE_LIST_COUNT must be >= 1.");
+ throw new IllegalStateException(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_FREE_LIST_COUNT must be >= 1.");
}
}
static void verifyHugeMultiple(int hugeMultiple) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
index 71603f4..318130e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorImpl.java
@@ -16,30 +16,18 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionService;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* This allocator is somewhat like an Arena allocator.
@@ -55,8 +43,8 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
public class MemoryAllocatorImpl implements MemoryAllocator {
static final Logger logger = LogService.getLogger();
-
- public static final String FREE_OFF_HEAP_MEMORY_PROPERTY = "gemfire.free-off-heap-memory";
+
+ public static final String FREE_OFF_HEAP_MEMORY_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "free-off-heap-memory";
private volatile OffHeapMemoryStats stats;
@@ -82,7 +70,7 @@ public class MemoryAllocatorImpl implements MemoryAllocator {
return result;
}
- private static final boolean DO_EXPENSIVE_VALIDATION = Boolean.getBoolean("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION");
+ private static final boolean DO_EXPENSIVE_VALIDATION = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_DO_EXPENSIVE_VALIDATION");
public static MemoryAllocator create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, int slabCount,
long offHeapMemorySize, long maxSlabSize) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
index 2f2bf1a..47f25b0 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
@@ -16,15 +16,10 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import java.lang.reflect.Method;
-
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
@@ -32,13 +27,15 @@ import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.lang.reflect.Method;
+
/**
* Enables off-heap storage by creating a MemoryAllocator.
*
* @since Geode 1.0
*/
public class OffHeapStorage implements OffHeapMemoryStats {
- public static final String STAY_CONNECTED_ON_OUTOFOFFHEAPMEMORY_PROPERTY = "gemfire.offheap.stayConnectedOnOutOfOffHeapMemory";
+ public static final String STAY_CONNECTED_ON_OUTOFOFFHEAPMEMORY_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "offheap.stayConnectedOnOutOfOffHeapMemory";
// statistics type
private static final StatisticsType statsType;
@@ -125,7 +122,7 @@ public class OffHeapStorage implements OffHeapMemoryStats {
}
public static long calcMaxSlabSize(long offHeapMemorySize) {
- final String offHeapSlabConfig = System.getProperty("gemfire.OFF_HEAP_SLAB_SIZE");
+ final String offHeapSlabConfig = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE");
long result = 0;
if (offHeapSlabConfig != null && !offHeapSlabConfig.equals("")) {
result = parseLongWithUnits(offHeapSlabConfig, MAX_SLAB_SIZE, 1024*1024);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
index 563ba4d..283a0cf 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
@@ -17,6 +17,8 @@
package com.gemstone.gemfire.internal.offheap;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
@@ -27,9 +29,9 @@ import java.util.concurrent.atomic.AtomicInteger;
* To enable free operation tracking set: -Dgemfire.trackOffHeapFreedRefCounts=true.
*/
public class ReferenceCountHelper {
-
- public static final String TRACK_OFFHEAP_REFERENCES = "gemfire.trackOffHeapRefCounts";
- public static final String TRACK_OFFHEAP_FREES = "gemfire.trackOffHeapFreedRefCounts";
+
+ public static final String TRACK_OFFHEAP_REFERENCES = DistributionConfig.GEMFIRE_PREFIX + "trackOffHeapRefCounts";
+ public static final String TRACK_OFFHEAP_FREES = DistributionConfig.GEMFIRE_PREFIX + "trackOffHeapFreedRefCounts";
private static final ReferenceCountHelperImpl inst = new ReferenceCountHelperImpl(Boolean.getBoolean(TRACK_OFFHEAP_REFERENCES), Boolean.getBoolean(TRACK_OFFHEAP_FREES));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/process/FileProcessController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/FileProcessController.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/FileProcessController.java
index 84440e2..6b4108c 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/FileProcessController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/FileProcessController.java
@@ -16,6 +16,13 @@
*/
package com.gemstone.gemfire.internal.process;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.process.ControlFileWatchdog.ControlRequestHandler;
+import com.gemstone.gemfire.lang.AttachAPINotFoundException;
+import org.apache.logging.log4j.Logger;
+
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
@@ -24,13 +31,6 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.concurrent.atomic.AtomicReference;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.process.ControlFileWatchdog.ControlRequestHandler;
-import com.gemstone.gemfire.lang.AttachAPINotFoundException;
-
/**
* Controls a {@link ControllableProcess} using files to communicate between
* processes.
@@ -40,7 +40,7 @@ import com.gemstone.gemfire.lang.AttachAPINotFoundException;
public class FileProcessController implements ProcessController {
private static final Logger logger = LogService.getLogger();
- public static final String STATUS_TIMEOUT_PROPERTY = "gemfire.FileProcessController.STATUS_TIMEOUT";
+ public static final String STATUS_TIMEOUT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "FileProcessController.STATUS_TIMEOUT";
private final long statusTimeoutMillis;
private final FileControllerParameters arguments;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/process/LocalProcessLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/LocalProcessLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/LocalProcessLauncher.java
index b7cd708..e6d614a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/LocalProcessLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/LocalProcessLauncher.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.process;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
@@ -36,7 +38,7 @@ import java.io.IOException;
*/
public final class LocalProcessLauncher {
- public static final String PROPERTY_IGNORE_IS_PID_ALIVE = "gemfire.test.LocalProcessLauncher.ignoreIsPidAlive";
+ public static final String PROPERTY_IGNORE_IS_PID_ALIVE = DistributionConfig.GEMFIRE_PREFIX + "test.LocalProcessLauncher.ignoreIsPidAlive";
private final int pid;
private final File pidFile;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessControllerFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessControllerFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessControllerFactory.java
index 693c676..6625cc0 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessControllerFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessControllerFactory.java
@@ -16,18 +16,13 @@
*/
package com.gemstone.gemfire.internal.process;
-import java.io.BufferedReader;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileReader;
-import java.io.FilenameFilter;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
-import com.gemstone.gemfire.internal.util.IOUtils;
-import com.gemstone.gemfire.internal.util.StopWatch;
-
/**
* Manages which implementation of {@link ProcessController} will be used and
* constructs the instance.
@@ -36,7 +31,7 @@ import com.gemstone.gemfire.internal.util.StopWatch;
*/
public final class ProcessControllerFactory {
- public static final String PROPERTY_DISABLE_ATTACH_API = "gemfire.test.ProcessControllerFactory.DisableAttachApi";
+ public static final String PROPERTY_DISABLE_ATTACH_API = DistributionConfig.GEMFIRE_PREFIX + "test.ProcessControllerFactory.DisableAttachApi";
private final boolean disableAttachApi;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessLauncherContext.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessLauncherContext.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessLauncherContext.java
index 336207c..30e0fa8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessLauncherContext.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessLauncherContext.java
@@ -17,16 +17,13 @@
package com.gemstone.gemfire.internal.process;
-import java.io.BufferedOutputStream;
-import java.io.FileDescriptor;
-import java.io.FileOutputStream;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.io.TeeOutputStream;
import com.gemstone.gemfire.internal.io.TeePrintStream;
+import java.io.*;
+import java.util.Properties;
+
/**
* Thread based context for launching a process. GemFire internals can acquire
* optional configuration details from a process launcher via this context.
@@ -35,7 +32,7 @@ import com.gemstone.gemfire.internal.io.TeePrintStream;
*/
public final class ProcessLauncherContext {
- public static final String OVERRIDDEN_DEFAULTS_PREFIX = "gemfire.default.";
+ public static final String OVERRIDDEN_DEFAULTS_PREFIX = DistributionConfig.GEMFIRE_PREFIX + "default.";
/**
* Default value for {@link #isRedirectingOutput()}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessType.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessType.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessType.java
index 17e5dd5..ea79c93 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessType.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/process/ProcessType.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.process;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
/**
* Enumeration of GemFire {@link ControllableProcess} types and the file names
* associated with controlling its lifecycle.
@@ -26,7 +28,7 @@ public enum ProcessType {
LOCATOR ("LOCATOR", "vf.gf.locator"),
SERVER ("SERVER", "vf.gf.server");
- public static final String TEST_PREFIX_PROPERTY = "gemfire.test.ProcessType.TEST_PREFIX";
+ public static final String TEST_PREFIX_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "test.ProcessType.TEST_PREFIX";
private static final String SUFFIX_PID = "pid";
private static final String SUFFIX_STOP_REQUEST = "stop.cmd";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
index f8da7a8..892bff8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/GeodeSecurityUtil.java
@@ -17,11 +17,6 @@
package com.gemstone.gemfire.internal.security;
-import java.security.AccessController;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Callable;
-
import com.gemstone.gemfire.cache.operations.OperationContext;
import com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
import com.gemstone.gemfire.cache.operations.OperationContext.Resource;
@@ -34,7 +29,6 @@ import com.gemstone.gemfire.management.internal.security.ResourceOperationContex
import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.security.GemFireSecurityException;
import com.gemstone.gemfire.security.NotAuthorizedException;
-
import org.apache.commons.lang.StringUtils;
import org.apache.logging.log4j.Logger;
import org.apache.shiro.SecurityUtils;
@@ -49,6 +43,11 @@ import org.apache.shiro.realm.Realm;
import org.apache.shiro.subject.Subject;
import org.apache.shiro.util.ThreadContext;
+import java.security.AccessController;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.Callable;
+
public class GeodeSecurityUtil {
private static Logger logger = LogService.getLogger();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
index cb2b66b..4a29dd3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/security/shiro/CustomAuthRealm.java
@@ -16,19 +16,6 @@
*/
package com.gemstone.gemfire.internal.security.shiro;
-import static com.gemstone.gemfire.management.internal.security.ResourceConstants.*;
-
-import java.lang.reflect.Method;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.Principal;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import javax.management.remote.JMXPrincipal;
-import javax.security.auth.Subject;
-
import com.gemstone.gemfire.cache.operations.OperationContext;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassLoadUtil;
@@ -37,19 +24,27 @@ import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.management.internal.security.ResourceConstants;
import com.gemstone.gemfire.security.AccessControl;
import com.gemstone.gemfire.security.Authenticator;
-
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
-import org.apache.shiro.authc.AuthenticationException;
-import org.apache.shiro.authc.AuthenticationInfo;
-import org.apache.shiro.authc.AuthenticationToken;
-import org.apache.shiro.authc.SimpleAuthenticationInfo;
-import org.apache.shiro.authc.UsernamePasswordToken;
+import org.apache.shiro.authc.*;
import org.apache.shiro.authz.AuthorizationInfo;
import org.apache.shiro.authz.Permission;
import org.apache.shiro.realm.AuthorizingRealm;
import org.apache.shiro.subject.PrincipalCollection;
+import javax.management.remote.JMXPrincipal;
+import javax.security.auth.Subject;
+import java.lang.reflect.Method;
+import java.security.AccessControlContext;
+import java.security.AccessController;
+import java.security.Principal;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+
+import static com.gemstone.gemfire.management.internal.security.ResourceConstants.ACCESS_DENIED_MESSAGE;
+
public class CustomAuthRealm extends AuthorizingRealm{
public static final String REALM_NAME = "CUSTOMAUTHREALM";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/EntryLogger.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/EntryLogger.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/EntryLogger.java
index e025c7d..e3475ef 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/EntryLogger.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/EntryLogger.java
@@ -16,15 +16,10 @@
*/
package com.gemstone.gemfire.internal.sequencelog;
-import java.util.UUID;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.cache.CachedDeserializable;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.DiskEntry.RecoveredEntry;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PlaceHolderDiskRegion;
-import com.gemstone.gemfire.internal.cache.Token;
import com.gemstone.gemfire.internal.cache.persistence.DiskStoreID;
import com.gemstone.gemfire.internal.offheap.StoredObject;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
@@ -41,8 +36,8 @@ public class EntryLogger {
private static final SequenceLogger GRAPH_LOGGER = SequenceLoggerImpl.getInstance();
private static ThreadLocal<String> SOURCE = new ThreadLocal<String>();
private static ThreadLocal<String> SOURCE_TYPE = new ThreadLocal<String>();
-
- public static final String TRACK_VALUES_PROPERTY = "gemfire.EntryLogger.TRACK_VALUES";
+
+ public static final String TRACK_VALUES_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "EntryLogger.TRACK_VALUES";
private static final boolean TRACK_VALUES = Boolean.getBoolean(TRACK_VALUES_PROPERTY);
public static void clearSource() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/SequenceLoggerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/SequenceLoggerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/SequenceLoggerImpl.java
index 678bc11..8353e8e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/SequenceLoggerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/sequencelog/SequenceLoggerImpl.java
@@ -16,25 +16,25 @@
*/
package com.gemstone.gemfire.internal.sequencelog;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.OSProcess;
+import com.gemstone.gemfire.internal.sequencelog.io.OutputStreamAppender;
+
import java.io.File;
import java.io.FileNotFoundException;
import java.util.EnumSet;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.LinkedBlockingQueue;
-import com.gemstone.gemfire.internal.OSProcess;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.sequencelog.io.OutputStreamAppender;
-
/**
*
*/
public class SequenceLoggerImpl implements SequenceLogger {
private static final SequenceLoggerImpl INSTANCE;
-
- public static final String ENABLED_TYPES_PROPERTY = "gemfire.SequenceLoggerImpl.ENABLED_TYPES";
-
+
+ public static final String ENABLED_TYPES_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "GraphLoggerImpl.ENABLED_TYPES";
+
private final EnumSet<GraphType> enabledTypes;
static {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/size/ObjectGraphSizer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/size/ObjectGraphSizer.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/size/ObjectGraphSizer.java
index a058015..0bbe279 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/size/ObjectGraphSizer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/size/ObjectGraphSizer.java
@@ -16,6 +16,10 @@
*/
package com.gemstone.gemfire.internal.size;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.ClassPathLoader;
+import com.gemstone.gemfire.internal.size.ObjectTraverser.Visitor;
+
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
import java.util.HashMap;
@@ -23,12 +27,10 @@ import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
-import com.gemstone.gemfire.internal.ClassPathLoader;
-import com.gemstone.gemfire.internal.size.ObjectTraverser.Visitor;
-
public class ObjectGraphSizer {
- private static final String SIZE_OF_CLASS_NAME = System.getProperty("gemfire.ObjectSizer.SIZE_OF_CLASS", ReflectionSingleObjectSizer.class.getName());
+ private static final String SIZE_OF_CLASS_NAME = System
+ .getProperty(DistributionConfig.GEMFIRE_PREFIX + "ObjectSizer.SIZE_OF_CLASS", ReflectionSingleObjectSizer.class.getName());
static final SingleObjectSizer SIZE_OF_UTIL;
private static ObjectFilter NULL_FILTER = new ObjectFilter() {
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandler.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandler.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandler.java
index 659d4b2..5c5154a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandler.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/statistics/StatMonitorHandler.java
@@ -16,25 +16,25 @@
*/
package com.gemstone.gemfire.internal.statistics;
+import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import org.apache.logging.log4j.Logger;
+
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.SynchronousQueue;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-
/**
* @since GemFire 7.0
*/
public class StatMonitorHandler implements SampleHandler {
private static final Logger logger = LogService.getLogger();
-
- static final String ENABLE_MONITOR_THREAD = "gemfire.stats.enableMonitorThread";
+
+ static final String ENABLE_MONITOR_THREAD = DistributionConfig.GEMFIRE_PREFIX + "stats.enableMonitorThread";
static final boolean enableMonitorThread = Boolean.getBoolean(ENABLE_MONITOR_THREAD);
/** The registered monitors */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/stats50/VMStats50.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/stats50/VMStats50.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/stats50/VMStats50.java
index d611326..53d8f0e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/stats50/VMStats50.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/stats50/VMStats50.java
@@ -16,33 +16,16 @@
*/
package com.gemstone.gemfire.internal.stats50;
-import java.lang.management.ClassLoadingMXBean;
-import java.lang.management.GarbageCollectorMXBean;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryMXBean;
-import java.lang.management.MemoryPoolMXBean;
-import java.lang.management.MemoryUsage;
-import java.lang.management.OperatingSystemMXBean;
-import java.lang.management.ThreadInfo;
-import java.lang.management.ThreadMXBean;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
-import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
import com.gemstone.gemfire.internal.VMStatsContract;
+import java.lang.management.*;
+import java.lang.reflect.Method;
+import java.util.*;
+
/**
* Statistics related to a Java VM.
* This version is hardcoded to use 1.5 MXBean stats from java.lang.management.
@@ -109,7 +92,7 @@ public class VMStats50 implements VMStatsContract {
private long threadStartCount = 0;
private long[] allThreadIds = null;
- private final static boolean THREAD_STATS_ENABLED = Boolean.getBoolean("gemfire.enableThreadStats");
+ private final static boolean THREAD_STATS_ENABLED = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "enableThreadStats");
private final Map<Long,ThreadStatInfo> threadMap = THREAD_STATS_ENABLED ? new HashMap<Long,ThreadStatInfo>() : null;
private final static StatisticsType threadType;
private final static int thread_blockedId;
@@ -175,14 +158,14 @@ public class VMStats50 implements VMStatsContract {
if (THREAD_STATS_ENABLED) {
if (threadBean.isThreadCpuTimeSupported()) {
if (!threadBean.isThreadCpuTimeEnabled()) {
- if (Boolean.getBoolean("gemfire.enableCpuTime")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "enableCpuTime")) {
threadBean.setThreadCpuTimeEnabled(true);
}
}
}
if (threadBean.isThreadContentionMonitoringSupported()) {
if (!threadBean.isThreadContentionMonitoringEnabled()) {
- if (Boolean.getBoolean("gemfire.enableContentionTime")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "enableContentionTime")) {
threadBean.setThreadContentionMonitoringEnabled(true);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index ed20f21..d19c59f 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -16,67 +16,18 @@
*/
package com.gemstone.gemfire.internal.tcp;
-import java.io.BufferedInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InterruptedIOException;
-import java.io.OutputStream;
-import java.net.ConnectException;
-import java.net.Inet6Address;
-import java.net.InetSocketAddress;
-import java.net.Socket;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.nio.ByteBuffer;
-import java.nio.channels.CancelledKeyException;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.ClosedSelectorException;
-import java.nio.channels.SocketChannel;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.Semaphore;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.ConflationKey;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DirectReplyProcessor;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.ReplyMessage;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
-import com.gemstone.gemfire.distributed.internal.ReplySender;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.direct.DirectChannel;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
import com.gemstone.gemfire.i18n.StringId;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ByteArrayDataInput;
-import com.gemstone.gemfire.internal.DSFIDFactory;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.SystemTimer;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.SystemTimer.SystemTimerTask;
-import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
@@ -84,6 +35,19 @@ import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.tcp.MsgReader.Header;
import com.gemstone.gemfire.internal.util.concurrent.ReentrantSemaphore;
+import org.apache.logging.log4j.Logger;
+
+import java.io.*;
+import java.net.*;
+import java.nio.ByteBuffer;
+import java.nio.channels.CancelledKeyException;
+import java.nio.channels.ClosedChannelException;
+import java.nio.channels.ClosedSelectorException;
+import java.nio.channels.SocketChannel;
+import java.util.*;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
/** <p>Connection is a socket holder that sends and receives serialized
message objects. A Connection may be closed to preserve system
@@ -116,7 +80,7 @@ public class Connection implements Runnable {
* Small buffer used for send socket buffer on receiver connections
* and receive buffer on sender connections.
*/
- public final static int SMALL_BUFFER_SIZE = Integer.getInteger("gemfire.SMALL_BUFFER_SIZE",4096).intValue();
+ public final static int SMALL_BUFFER_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "SMALL_BUFFER_SIZE", 4096).intValue();
/** counter to give connections a unique id */
private static AtomicLong idCounter = new AtomicLong(1);
@@ -1002,7 +966,7 @@ public class Connection implements Runnable {
/** time between connection attempts*/
private static final int RECONNECT_WAIT_TIME
- = Integer.getInteger("gemfire.RECONNECT_WAIT_TIME", 2000).intValue();
+ = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "RECONNECT_WAIT_TIME", 2000).intValue();
/** creates a new connection to a remote server.
* We are initiating this connection; the other side must accept us
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
index 7a2b356..1aeecda 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/MsgStreamer.java
@@ -16,9 +16,17 @@
*/
package com.gemstone.gemfire.internal.tcp;
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.distributed.internal.DMStats;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionMessage;
+import com.gemstone.gemfire.internal.*;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.logging.LogService;
import it.unimi.dsi.fastutil.objects.Object2ObjectMap;
import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.objects.ObjectIterator;
+import org.apache.logging.log4j.Logger;
import java.io.IOException;
import java.io.OutputStream;
@@ -28,20 +36,6 @@ import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.ByteBufferWriter;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
-import com.gemstone.gemfire.internal.ObjToByteArraySerializer;
-import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LogService;
-
/** <p>MsgStreamer supports streaming a message to a tcp Connection
* in chunks. This allows us to send a message without needing to
* perserialize it completely in memory thus saving buffer memory.
@@ -752,7 +746,7 @@ public class MsgStreamer extends OutputStream implements
* Use -Dgemfire.ASCII_STRINGS=true if all String instances contain
* ASCII characters. Setting this to true gives a performance improvement.
*/
- private static final boolean ASCII_STRINGS = Boolean.getBoolean("gemfire.ASCII_STRINGS");
+ private static final boolean ASCII_STRINGS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ASCII_STRINGS");
/**
* Writes two bytes of length information
[65/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/03f5e0c0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/03f5e0c0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/03f5e0c0
Branch: refs/heads/develop
Commit: 03f5e0c0864d4e955029f39fe682723dea0efe71
Parents: ff81dbf
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Tue May 31 13:05:56 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../SharedConfigurationEndToEndDUnitTest.java | 18 +++++++++---------
.../gemfire/distributed/AbstractLauncher.java | 2 ++
.../internal/cli/help/utils/HelpUtils.java | 3 ++-
.../com/gemstone/gemfire/GemFireTestCase.java | 4 +---
.../gemfire/distributed/AbstractLauncherTest.java | 1 +
.../LocatorLauncherIntegrationTest.java | 1 +
.../gemfire/distributed/LocatorLauncherTest.java | 1 +
.../ServerLauncherIntegrationTest.java | 1 +
.../gemfire/distributed/ServerLauncherTest.java | 1 +
.../commands/GemfireDataCommandsDUnitTest.java | 2 +-
...onWithCacheLoaderDuringCacheMissDUnitTest.java | 3 +--
...ListAndDescribeDiskStoreCommandsDUnitTest.java | 1 +
.../cli/commands/ShowMetricsDUnitTest.java | 2 +-
13 files changed, 23 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
index 5c3d99f..e1bd685 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationEndToEndDUnitTest.java
@@ -51,7 +51,7 @@ import java.util.Set;
import static com.gemstone.gemfire.cache.RegionShortcut.PARTITION;
import static com.gemstone.gemfire.cache.RegionShortcut.REPLICATE;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.internal.AvailablePortHelper.getRandomAvailableTCPPorts;
import static com.gemstone.gemfire.internal.FileUtil.delete;
import static com.gemstone.gemfire.internal.FileUtil.deleteMatching;
@@ -347,13 +347,13 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
final Properties locatorProps = new Properties();
locatorProps.setProperty(NAME, locator1Name);
locatorProps.setProperty(MCAST_PORT, "0");
- locatorProps.setProperty(SystemConfigurationProperties.LOG_LEVEL, "config");
- locatorProps.setProperty(SystemConfigurationProperties.ENABLE_CLUSTER_CONFIGURATION, "true");
- locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER, "true");
- locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER_START, "true");
- locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER_BIND_ADDRESS, String.valueOf(jmxHost));
- locatorProps.setProperty(SystemConfigurationProperties.JMX_MANAGER_PORT, String.valueOf(jmxPort));
- locatorProps.setProperty(SystemConfigurationProperties.HTTP_SERVICE_PORT, String.valueOf(httpPort));
+ locatorProps.setProperty(LOG_LEVEL, "config");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
+ locatorProps.setProperty(JMX_MANAGER, "true");
+ locatorProps.setProperty(JMX_MANAGER_START, "true");
+ locatorProps.setProperty(JMX_MANAGER_BIND_ADDRESS, String.valueOf(jmxHost));
+ locatorProps.setProperty(JMX_MANAGER_PORT, String.valueOf(jmxPort));
+ locatorProps.setProperty(HTTP_SERVICE_PORT, String.valueOf(httpPort));
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locator1Port, locatorLogFile, null, locatorProps);
@@ -392,7 +392,7 @@ public class SharedConfigurationEndToEndDUnitTest extends CliCommandTestBase {
public Object call() {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
- localProps.setProperty(SystemConfigurationProperties.LOCATORS, "localhost:" + locator1Port);
+ localProps.setProperty(LOCATORS, "localhost:" + locator1Port);
localProps.setProperty(NAME, "DataMember");
getSystem(localProps);
Cache cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
index cc27a03..7178ca6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
@@ -46,6 +46,8 @@ import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* The AbstractLauncher class is a base class for implementing various launchers to construct and run different GemFire
* processes, like Cache Servers, Locators, Managers, HTTP servers and so on.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
index b15feda..5d74fa0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/help/utils/HelpUtils.java
@@ -16,7 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.cli.help.utils;
-import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.management.cli.CliMetaData;
import com.gemstone.gemfire.management.internal.cli.help.format.*;
import com.gemstone.gemfire.management.internal.cli.modes.CommandModes;
@@ -30,6 +29,8 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* @since GemFire 7.0
*/
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
index cd4e615..7e623e2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/GemFireTestCase.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import org.junit.After;
import org.junit.Before;
@@ -26,8 +25,7 @@ import org.junit.rules.TestName;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertTrue;
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
index 1d05217..9d4a169 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/AbstractLauncherTest.java
@@ -27,6 +27,7 @@ import java.util.Properties;
import java.util.concurrent.TimeUnit;
import static org.junit.Assert.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* The AbstractLauncherTest class is a test suite of unit tests testing the contract and functionality
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
index 63e7b99..f5f43f4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherIntegrationTest.java
@@ -39,6 +39,7 @@ import static com.googlecode.catchexception.apis.BDDCatchException.caughtExcepti
import static com.googlecode.catchexception.apis.BDDCatchException.when;
import static org.assertj.core.api.BDDAssertions.assertThat;
import static org.assertj.core.api.BDDAssertions.then;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Integration tests for LocatorLauncher. These tests require file system I/O.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
index e635af6..0e87ae0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
@@ -32,6 +32,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import static org.junit.Assert.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* The LocatorLauncherTest class is a test suite of test cases for testing the contract and functionality of
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
index f781374..da7d4e4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
@@ -38,6 +38,7 @@ import static com.googlecode.catchexception.apis.BDDCatchException.caughtExcepti
import static com.googlecode.catchexception.apis.BDDCatchException.when;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.BDDAssertions.then;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Integration tests for ServerLauncher class. These tests may require file system and/or network I/O.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
index 7d694cd..0d1f4f3 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
@@ -45,6 +45,7 @@ import java.util.Collections;
import java.util.concurrent.atomic.AtomicBoolean;
import static org.junit.Assert.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* The ServerLauncherTest class is a test suite of unit tests testing the contract, functionality and invariants
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
index 59eab66..0ced468 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GemfireDataCommandsDUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.CompiledValue;
import com.gemstone.gemfire.cache.query.internal.QCompiler;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.management.DistributedRegionMXBean;
@@ -57,6 +56,7 @@ import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.IgnoredException.addIgnoredException;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Dunit class for testing gemfire data commands : get, put, remove, select, rebalance
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
index 79e8b23..ebfe3f0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/GetCommandOnRegionWithCacheLoaderDuringCacheMissDUnitTest.java
@@ -41,8 +41,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOG_LEVEL;
-import static com.gemstone.gemfire.distributed.NAME;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.Host.getHost;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
index d6ae20f..1aa21f8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeDiskStoreCommandsDUnitTest.java
@@ -35,6 +35,7 @@ import static com.gemstone.gemfire.test.dunit.Assert.assertNotNull;
import static com.gemstone.gemfire.test.dunit.Host.getHost;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getDUnitLogLevel;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* The ListAndDescribeDiskStoreCommandsDUnitTest class is a test suite of functional tests cases testing the proper
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/03f5e0c0/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
index b439e20..6bb228c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.management.*;
import com.gemstone.gemfire.management.cli.Result;
@@ -45,6 +44,7 @@ import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
import static com.gemstone.gemfire.test.dunit.Assert.assertTrue;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(DistributedTest.class)
public class ShowMetricsDUnitTest extends CliCommandTestBase {
[56/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
index 804314b..3d77dad 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -99,7 +99,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in this VM
props.setProperty(SystemConfigurationProperties.NAME, "Controller");
- props.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ props.setProperty(GROUPS, "Group1");
getSystem(props);
getCache();
@@ -107,7 +107,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
vm.invoke(new SerializableRunnable() {
public void run() {
props.setProperty(SystemConfigurationProperties.NAME, vmName);
- props.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ props.setProperty(GROUPS, "Group2");
getSystem(props);
getCache();
}
@@ -185,7 +185,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in this VM
props.setProperty(SystemConfigurationProperties.NAME, "Controller");
- props.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ props.setProperty(GROUPS, "Group1");
getSystem(props);
getCache();
@@ -193,7 +193,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
vm.invoke(new SerializableRunnable() {
public void run() {
props.setProperty(SystemConfigurationProperties.NAME, vmName);
- props.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ props.setProperty(GROUPS, "Group2");
getSystem(props);
getCache();
}
@@ -262,7 +262,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Create the cache in this VM
props.setProperty(SystemConfigurationProperties.NAME, "Controller");
- props.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ props.setProperty(GROUPS, "Group1");
getSystem(props);
getCache();
@@ -270,7 +270,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
vm.invoke(new SerializableRunnable() {
public void run() {
props.setProperty(SystemConfigurationProperties.NAME, vmName);
- props.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ props.setProperty(GROUPS, "Group2");
getSystem(props);
getCache();
}
@@ -367,7 +367,7 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
// Start the default manager
Properties managerProps = new Properties();
managerProps.setProperty(MCAST_PORT, "0");
- managerProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ managerProps.setProperty(GROUPS, groupName);
managerProps.setProperty(LOCATORS, "localhost:" + locatorPort);
setUpJmxManagerOnVm0ThenConnect(managerProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index 60d80c9..02c4ba3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -485,7 +485,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
getSystem(localProps);
assertNotNull(getCache());
}
@@ -523,7 +523,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
@@ -575,7 +575,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
@@ -821,7 +821,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
final String diskStore2Name = "testCreateDiskStore2";
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
+ localProps.setProperty(GROUPS, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
CommandResult cmdResult = executeCommand(CliStrings.LIST_DISK_STORE);
@@ -841,7 +841,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
getCache();
}
@@ -857,7 +857,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
}
@@ -940,7 +940,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
final String region2Name = "testDestroyDiskStoreRegion2";
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
+ localProps.setProperty(GROUPS, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
CommandResult cmdResult = executeCommand(CliStrings.LIST_DISK_STORE);
@@ -960,7 +960,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1,Group2");
+ localProps.setProperty(GROUPS, "Group1,Group2");
getSystem(localProps);
Cache cache = getCache();
@@ -986,7 +986,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
Cache cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
index ba5974d..4fa3ddb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommandsDUnitTest.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.functions.TestFunction;
import com.gemstone.gemfire.management.DistributedRegionMXBean;
import com.gemstone.gemfire.management.ManagementService;
@@ -43,6 +42,7 @@ import java.util.Properties;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Dunit class for testing gemfire function commands : execute function, destroy function, list function
@@ -271,8 +271,8 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testExecuteFunctionOnMember() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(NAME, "Manager");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
FunctionService.registerFunction(function);
@@ -303,7 +303,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void testExecuteFunctionOnMembers() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
FunctionService.registerFunction(function);
@@ -337,7 +337,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void testExecuteFunctionOnMembersWithArgs() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_RETURN_ARGS);
FunctionService.registerFunction(function);
@@ -373,7 +373,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void testExecuteFunctionOnMembersWithArgsAndCustomResultCollector() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION_RETURN_ARGS);
FunctionService.registerFunction(function);
@@ -410,7 +410,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void testExecuteFunctionOnGroups() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
+ localProps.setProperty(GROUPS, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
FunctionService.registerFunction(function);
@@ -422,7 +422,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
Cache cache = getCache();
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -435,7 +435,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
Cache cache = getCache();
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -489,7 +489,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void testDestroyOnGroups() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
+ localProps.setProperty(GROUPS, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
FunctionService.registerFunction(function);
@@ -501,7 +501,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
Cache cache = getCache();
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -515,7 +515,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
Cache cache = getCache();
Function function = new TestFunction(true, TestFunction.TEST_FUNCTION1);
@@ -553,7 +553,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void testListFunction() {
// Create the default setup, putting the Manager VM into Group1
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
// Find no functions
@@ -579,7 +579,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void run() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
@@ -598,7 +598,7 @@ public class FunctionCommandsDUnitTest extends CliCommandTestBase {
public void run() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group3");
+ localProps.setProperty(GROUPS, "Group3");
getSystem(localProps);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
index 4bd6cd5..4ff0325 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HelpCommandsIntegrationTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.management.internal.cli.commands;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.management.internal.cli.CommandManager;
@@ -36,8 +35,7 @@ import org.junit.experimental.categories.Category;
import java.util.Map;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.management.internal.cli.commands.CliCommandTestBase.commandResultToString;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -59,9 +57,9 @@ public class HelpCommandsIntegrationTest {
Properties localProps = new Properties();
localProps.setProperty(LOCATORS, "");
localProps.setProperty(MCAST_PORT, "0");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
+ localProps.setProperty(JMX_MANAGER, "true");
+ localProps.setProperty(JMX_MANAGER_START, "true");
+ localProps.setProperty(JMX_MANAGER_PORT, String.valueOf(jmxPort));
new CacheFactory(localProps).create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
index 88ba958..b4a1f5f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -639,7 +639,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
getSystem(localProps);
assertNotNull(getCache());
@@ -682,7 +682,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
@@ -727,7 +727,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
@@ -766,7 +766,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
public Object call() throws Exception {
Properties props = new Properties();
props.setProperty(SystemConfigurationProperties.NAME, VM1Name);
- props.setProperty(DistributionConfig.GROUPS_NAME, group1);
+ props.setProperty(GROUPS, group1);
getSystem(props);
Region parReg = createParReg(parRegName, getCache(), String.class, Stock.class);
parReg.put("MSFT", new Stock("MSFT", 27));
@@ -800,7 +800,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
public Object call() throws Exception {
Properties props = new Properties();
props.setProperty(SystemConfigurationProperties.NAME, VM1Name);
- props.setProperty(DistributionConfig.GROUPS_NAME, group1);
+ props.setProperty(GROUPS, group1);
getSystem(props);
Region parReg = createParReg(parRegName, getCache(), String.class, Stock.class);
parReg.put("MSFT", new Stock("MSFT", 27));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index 385d200..3123399 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -68,7 +68,7 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(SystemConfigurationProperties.NAME, name);
- props.setProperty(DistributionConfig.GROUPS_NAME, groups);
+ props.setProperty(GROUPS, groups);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
index 28ae887..1377551 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -81,7 +81,7 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(SystemConfigurationProperties.NAME, name);
- props.setProperty(DistributionConfig.GROUPS_NAME, groups);
+ props.setProperty(GROUPS, groups);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index 689d33a..042df6f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -72,7 +72,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
public void testGCForGroup() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
String command = "gc --group=Group1";
CommandResult cmdResult = executeCommand(command);
@@ -442,7 +442,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
public void testChangeLogLevelForGrps() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
+ localProps.setProperty(GROUPS, "Group0");
final VM vm1 = Host.getHost(0).getVM(1);
final VM vm2 = Host.getHost(0).getVM(2);
@@ -455,7 +455,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, grp1);
+ localProps.setProperty(GROUPS, grp1);
getSystem(localProps);
Cache cache = getCache();
return cache.getDistributedSystem().getDistributedMember().getId();
@@ -466,7 +466,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Override
public Object call() throws Exception {
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, grp2);
+ localProps.setProperty(GROUPS, grp2);
getSystem(localProps);
Cache cache = getCache();
return cache.getDistributedSystem().getDistributedMember().getId();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
index a60cf6c..6595ca0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.logging.LogWriterImpl;
import com.gemstone.gemfire.management.cli.Result;
@@ -43,6 +42,7 @@ import java.util.Properties;
import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
import static com.gemstone.gemfire.test.dunit.Assert.fail;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Dunit class for testing gemfire function commands : export logs
@@ -87,7 +87,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
public void testExportLogsForGroup() throws IOException {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
String dir = getCurrentTimeString();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
index d1ee565..e1c906d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -78,7 +78,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
final String diskStoreName = "testAsyncEventQueueDiskStore";
Properties localProps = new Properties();
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group0");
+ localProps.setProperty(GROUPS, "Group0");
setUpJmxManagerOnVm0ThenConnect(localProps);
CommandResult cmdResult = executeCommand(CliStrings.LIST_ASYNC_EVENT_QUEUES);
@@ -95,7 +95,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
getCache();
}
@@ -107,7 +107,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
public void run() {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group2");
+ localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
}
@@ -301,7 +301,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
getSystem(localProps);
assertNotNull(getCache());
}
@@ -366,7 +366,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index 9a4aacd..2e4e2e4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -60,7 +60,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(SystemConfigurationProperties.NAME, name);
- props.setProperty(DistributionConfig.GROUPS_NAME, groups);
+ props.setProperty(GROUPS, groups);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
index e56ab85..210bca1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilCustomRealmJUnitTest.java
@@ -17,11 +17,11 @@
package com.gemstone.gemfire.management.internal.security;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
import org.junit.BeforeClass;
import org.junit.experimental.categories.Category;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* this test and ShiroUtilWithIniFileJunitTest uses the same test body, but initialize the SecurityUtils differently.
@@ -32,8 +32,8 @@ import org.junit.experimental.categories.Category;
public class GeodeSecurityUtilCustomRealmJUnitTest extends GeodeSecurityUtilWithIniFileJUnitTest {
@BeforeClass
public static void beforeClass() throws Exception{
- props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
- props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_AUTHENTICATOR, JSONAuthorization.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create");
JSONAuthorization.setUpWithJsonFile("shiro-ini.json");
GeodeSecurityUtil.initSecurity(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
index 8568b1a..be1f8f1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/GeodeSecurityUtilWithIniFileJUnitTest.java
@@ -18,7 +18,6 @@
package com.gemstone.gemfire.management.internal.security;
import com.gemstone.gemfire.cache.operations.OperationContext;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.security.GeodeSecurityUtil;
import com.gemstone.gemfire.security.GemFireSecurityException;
import com.gemstone.gemfire.test.junit.categories.SecurityTest;
@@ -32,6 +31,7 @@ import org.junit.experimental.categories.Category;
import java.util.Properties;
import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* this test and ShiroUtilCustomRealmJUunitTest uses the same test body, but initialize the SecurityUtils differently.
@@ -42,7 +42,7 @@ public class GeodeSecurityUtilWithIniFileJUnitTest {
protected static Properties props = new Properties();
@BeforeClass
public static void beforeClass() throws Exception{
- props.setProperty(DistributionConfig.SECURITY_SHIRO_INIT_NAME, "shiro.ini");
+ props.setProperty(SECURITY_SHIRO_INIT, "shiro.ini");
GeodeSecurityUtil.initSecurity(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
index f4a4e59..ffb5d79 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
@@ -24,8 +24,7 @@ import org.junit.rules.ExternalResource;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class JsonAuthorizationCacheStartRule extends ExternalResource {
private Cache cache;
@@ -58,14 +57,14 @@ public class JsonAuthorizationCacheStartRule extends ExternalResource {
properties.put(SystemConfigurationProperties.NAME, JsonAuthorizationCacheStartRule.class.getSimpleName());
properties.put(LOCATORS, "");
properties.put(MCAST_PORT, "0");
- properties.put(DistributionConfig.JMX_MANAGER_NAME, "true");
- properties.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- properties.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxManagerPort));
- properties.put(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
- properties.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME,
+ properties.put(JMX_MANAGER, "true");
+ properties.put(JMX_MANAGER_START, "true");
+ properties.put(JMX_MANAGER_PORT, String.valueOf(jmxManagerPort));
+ properties.put(HTTP_SERVICE_PORT, String.valueOf(httpPort));
+ properties.put(SECURITY_CLIENT_AUTHENTICATOR,
JSONAuthorization.class.getName() + ".create");
if (doAuthorization) {
- properties.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
+ properties.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create");
}
JSONAuthorization.setUpWithJsonFile(jsonFile);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
index 6ec3c10..010db07 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/MultiUserDUnitTest.java
@@ -18,7 +18,6 @@
package com.gemstone.gemfire.management.internal.security;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.management.cli.Result.Status;
import com.gemstone.gemfire.management.internal.cli.HeadlessGfsh;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
index f7dd2eb..b17edd0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
@@ -19,13 +19,11 @@ package com.gemstone.gemfire.management.internal.security;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import org.junit.rules.ExternalResource;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class ShiroCacheStartRule extends ExternalResource {
private Cache cache;
@@ -43,11 +41,11 @@ public class ShiroCacheStartRule extends ExternalResource {
properties.put(SystemConfigurationProperties.NAME, ShiroCacheStartRule.class.getSimpleName());
properties.put(LOCATORS, "");
properties.put(MCAST_PORT, "0");
- properties.put(DistributionConfig.JMX_MANAGER_NAME, "true");
- properties.put(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- properties.put(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxManagerPort));
- properties.put(DistributionConfig.HTTP_SERVICE_PORT_NAME, "0");
- properties.put(DistributionConfig.SECURITY_SHIRO_INIT_NAME, shiroFile);
+ properties.put(JMX_MANAGER, "true");
+ properties.put(JMX_MANAGER_START, "true");
+ properties.put(JMX_MANAGER_PORT, String.valueOf(jmxManagerPort));
+ properties.put(HTTP_SERVICE_PORT, "0");
+ properties.put(SECURITY_SHIRO_INIT, shiroFile);
cache = new CacheFactory(properties).create();
cache.addCacheServer().start();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
index 5e135f9..0d60e81 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/memcached/IntegrationJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.memcached;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import net.spy.memcached.MemcachedClient;
@@ -30,7 +29,7 @@ import java.net.InetSocketAddress;
import java.util.Properties;
import java.util.concurrent.Future;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -43,7 +42,7 @@ public class IntegrationJUnitTest {
public void testGemFireProperty() throws Exception {
Properties props = new Properties();
final int port = AvailablePortHelper.getRandomAvailableTCPPort();
- props.setProperty(DistributionConfig.MEMCACHED_PORT_NAME, port + "");
+ props.setProperty(MEMCACHED_PORT, port + "");
props.setProperty(MCAST_PORT, "0");
CacheFactory cf = new CacheFactory(props);
Cache cache = cf.create();
@@ -65,8 +64,8 @@ public class IntegrationJUnitTest {
public void testMemcachedBindAddress() throws Exception {
Properties props = new Properties();
final int port = AvailablePortHelper.getRandomAvailableTCPPort();
- props.setProperty(DistributionConfig.MEMCACHED_PORT_NAME, port + "");
- props.setProperty(DistributionConfig.MEMCACHED_BIND_ADDRESS_NAME, "127.0.0.1");
+ props.setProperty(MEMCACHED_PORT, port + "");
+ props.setProperty(MEMCACHED_BIND_ADDRESS, "127.0.0.1");
props.put(MCAST_PORT, "0");
CacheFactory cf = new CacheFactory(props);
Cache cache = cf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
index f4a30d6..6ae9d88 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/DistributedSystemIdDUnitTest.java
@@ -107,7 +107,7 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
SerializableCallable createSystem = new SerializableCallable() {
public Object call() throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, dsId);
props.setProperty(LOCATORS, "localhost[" + locatorPort + "]");
getSystem(props);
return null;
@@ -121,7 +121,7 @@ public class DistributedSystemIdDUnitTest extends DistributedTestCase {
public Object call() throws Exception {
int port = AvailablePortHelper.getRandomAvailableTCPPort();
Properties props = new Properties();
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, dsId);
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "]");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
index 2f93cc3..1c4db64 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/JSONPdxClientServerDUnitTest.java
@@ -25,7 +25,6 @@ import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -44,7 +43,7 @@ import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
*/
@@ -563,7 +562,7 @@ public class JSONPdxClientServerDUnitTest extends CacheTestCase {
public Object call() throws Exception {
Properties props = new Properties();
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, dsId);
getSystem(props);
AttributesFactory af = new AttributesFactory();
af.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
index 129727b..5f5465f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxClientServerDUnitTest.java
@@ -34,8 +34,7 @@ import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -672,7 +671,7 @@ public class PdxClientServerDUnitTest extends CacheTestCase {
public Object call() throws Exception {
Properties props = new Properties();
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, dsId);
getSystem(props);
AttributesFactory af = new AttributesFactory();
af.setScope(Scope.DISTRIBUTED_ACK);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
index 561341d..0ae185a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/pdx/PdxInstanceJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.pdx;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -38,7 +37,7 @@ import java.lang.reflect.InvocationTargetException;
import java.math.BigInteger;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -55,7 +54,7 @@ public class PdxInstanceJUnitTest {
// make it a loner
this.c = (GemFireCacheImpl) new CacheFactory()
.set(MCAST_PORT, "0")
- .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "255")
+ .set(DISTRIBUTED_SYSTEM_ID, "255")
.setPdxReadSerialized(true)
.create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
index 2b3a427..582d084 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/security/generator/LdapUserCredentialGenerator.java
@@ -29,6 +29,8 @@ import java.security.Principal;
import java.util.Properties;
import java.util.Random;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class LdapUserCredentialGenerator extends CredentialGenerator {
private static final Logger logger = LogService.getLogger();
@@ -97,7 +99,7 @@ public class LdapUserCredentialGenerator extends CredentialGenerator {
final Properties props = new Properties();
props.setProperty(UserPasswordAuthInit.USER_NAME, USER_PREFIX + ((index % 10) + 1));
props.setProperty(UserPasswordAuthInit.PASSWORD, USER_PREFIX + ((index % 10) + 1));
- props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
+ props.setProperty(SECURITY_CLIENT_DHALGO, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
if (serverAuthEnabled) {
final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
@@ -134,7 +136,7 @@ public class LdapUserCredentialGenerator extends CredentialGenerator {
throw new IllegalArgumentException("LDAP: [" + userName + "] not a valid user");
}
- props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
+ props.setProperty(SECURITY_CLIENT_DHALGO, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
if (serverAuthEnabled) {
final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
@@ -150,7 +152,7 @@ public class LdapUserCredentialGenerator extends CredentialGenerator {
final Properties props = new Properties();
props.setProperty(UserPasswordAuthInit.USER_NAME, "invalid" + index);
props.setProperty(UserPasswordAuthInit.PASSWORD, "none");
- props.setProperty(DistributionConfig.SECURITY_CLIENT_DHALGO_NAME, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
+ props.setProperty(SECURITY_CLIENT_DHALGO, CIPHERS[RANDOM.nextInt(CIPHERS.length)]);
if (serverAuthEnabled) {
final String keyStoreFile = TestUtil.getResourcePath(PKCSCredentialGenerator.class, PKCSCredentialGenerator.keyStoreDir + "/publickeyfile");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
index fa54b7a..f4a5897 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/DistributedTestUtils.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.test.dunit;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManagerHelper;
import com.gemstone.gemfire.internal.InternalDataSerializer;
@@ -30,6 +29,8 @@ import java.util.Properties;
import static org.junit.Assert.assertEquals;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* <code>DistributedTestUtils</code> provides static utility methods that
* affect the runtime environment or artifacts generated by a DistributedTest.
@@ -125,8 +126,8 @@ public class DistributedTestUtils {
Properties dsProperties = DUnitEnv.get().getDistributedSystemProperties();
// our tests do not expect auto-reconnect to be on by default
- if (!dsProperties.contains(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME)) {
- dsProperties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ if (!dsProperties.contains(DISABLE_AUTO_RECONNECT)) {
+ dsProperties.put(DISABLE_AUTO_RECONNECT, "true");
}
for (Iterator<Map.Entry<Object,Object>> iterator = properties.entrySet().iterator(); iterator.hasNext();) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
index 8f3cd28..a1fa2dd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/test/dunit/standalone/DUnitLauncher.java
@@ -250,7 +250,7 @@ public class DUnitLauncher {
Properties p = getDistributedSystemProperties();
// I never want this locator to end up starting a jmx manager
// since it is part of the unit test framework
- p.setProperty(DistributionConfig.JMX_MANAGER_NAME, "false");
+ p.setProperty(JMX_MANAGER, "false");
//Disable the shared configuration on this locator.
//Shared configuration tests create their own locator
p.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -259,7 +259,7 @@ public class DUnitLauncher {
System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
// disable auto-reconnect - tests fly by so fast that it will never be
// able to do so successfully anyway
- p.setProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ p.setProperty(DISABLE_AUTO_RECONNECT, "true");
try {
Locator.startLocatorAndDS(locatorPort, locatorLogFile, p);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
index adc73bb..1ba65ce 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Add.java
@@ -62,7 +62,7 @@ public class WANBootStrapping_Site1_Add {
// Create a locator and a cache
System.out.println("Creating cache ...It will take some time..");
Cache cache = new CacheFactory().set(MCAST_PORT,
- "0").set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + 1).set(
+ "0").set(DISTRIBUTED_SYSTEM_ID, "" + 1).set(
LOCATORS, "localhost[" + 10101 + "]").set(
START_LOCATOR,
"localhost[" + 10101
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
index c469b4f..c002a2c 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site1_Remove.java
@@ -49,8 +49,8 @@ public class WANBootStrapping_Site1_Remove {
//start a stand alone locator with distributed-system-is = -1
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
- properties.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+ (-1));
- properties.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 20202 + "]");
+ properties.setProperty(DISTRIBUTED_SYSTEM_ID, ""+ (-1));
+ properties.setProperty(REMOTE_LOCATORS, "localhost[" + 20202 + "]");
properties.setProperty(LOG_LEVEL, "warning");
Locator locator = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
index 059aa99..b2d14b9 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Add.java
@@ -61,10 +61,10 @@ public class WANBootStrapping_Site2_Add {
System.out.println("Creating cache ...It will take some time..");
Cache cache = new CacheFactory()
.set(MCAST_PORT, "0")
- .set(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+2)
+ .set(DISTRIBUTED_SYSTEM_ID, ""+2)
.set(LOCATORS, "localhost[" + 20202 + "]")
.set(START_LOCATOR, "localhost[" + 20202 + "],server=true,peer=true,hostname-for-clients=localhost")
- .set(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 10101 + "]")
+ .set(REMOTE_LOCATORS, "localhost[" + 10101 + "]")
.set(LOG_LEVEL, "warning")
.create();
System.out.println("Cache Created");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
index 751f13d..8abaa9e 100644
--- a/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
+++ b/geode-core/src/test/java/com/main/WANBootStrapping_Site2_Remove.java
@@ -46,8 +46,8 @@ public class WANBootStrapping_Site2_Remove {
System.out.println("Starting a locator with negative ds id -2");
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
- properties.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+ (-2));
- properties.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + 10101 + "]");
+ properties.setProperty(DISTRIBUTED_SYSTEM_ID, ""+ (-2));
+ properties.setProperty(REMOTE_LOCATORS, "localhost[" + 10101 + "]");
properties.setProperty(LOG_LEVEL, "warning");
Locator locator = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
index 290660c..5f51611 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/cache/query/cq/dunit/CqStateDUnitTest.java
@@ -107,9 +107,9 @@ public class CqStateDUnitTest extends HelperTestCase {
public Properties getAuthenticatedServerProperties() {
Properties props = new Properties();
props.put(MCAST_PORT, "0");
- props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, CloseCacheAuthorization.class.getName() + ".create");
- props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME, CloseCacheAuthorization.class.getName() + ".create");
- props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, DummyAuthenticator.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_ACCESSOR, CloseCacheAuthorization.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_ACCESSOR_PP, CloseCacheAuthorization.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_AUTHENTICATOR, DummyAuthenticator.class.getName() + ".create");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
index 1a0fa28..17e85ec 100755
--- a/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientToServerDeltaDUnitTest.java
@@ -28,7 +28,6 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CqListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.i18n.LogWriterI18n;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
@@ -41,8 +40,7 @@ import java.io.DataOutput;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Test client to server flow for delta propogation
@@ -442,7 +440,7 @@ public class ClientToServerDeltaDUnitTest extends DistributedTestCase {
secondUpdate = null;
error = false;
Properties props = new Properties();
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME,
+ props.setProperty(DELTA_PROPAGATION,
enableDelta.toString());
new ClientToServerDeltaDUnitTest("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
index c321b53..bc83d7d 100644
--- a/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
+++ b/geode-cq/src/test/java/com/gemstone/gemfire/management/CacheServerManagementDUnitTest.java
@@ -241,7 +241,7 @@ public class CacheServerManagementDUnitTest extends LocatorTestBase {
props.setProperty(MCAST_PORT, String.valueOf(0));
props.setProperty(LOCATORS, otherLocators);
props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
- props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER_HTTP_PORT, "0");
props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
File logFile = new File(getUniqueName() + "-locator" + locatorPort + ".log");
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
index b7945b9..98675d0 100644
--- a/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
+++ b/geode-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/repository/IndexRepositoryImplPerformanceTest.java
@@ -24,6 +24,7 @@ import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
import com.gemstone.gemfire.cache.lucene.*;
+import com.gemstone.gemfire.cache.lucene.internal.LuceneIndexStats;
import com.gemstone.gemfire.cache.lucene.internal.LuceneServiceImpl;
import com.gemstone.gemfire.cache.lucene.internal.directory.RegionDirectory;
import com.gemstone.gemfire.cache.lucene.internal.distributed.TopEntriesCollector;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
index f4f3e40..4d9e959 100644
--- a/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
+++ b/geode-pulse/src/test/java/com/vmware/gemfire/tools/pulse/tests/Server.java
@@ -18,7 +18,6 @@
*/
package com.vmware.gemfire.tools.pulse.tests;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.security.shiro.CustomAuthRealm;
import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
import com.gemstone.gemfire.management.internal.security.AccessControlMBean;
@@ -45,6 +44,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class Server {
private static final String DEFAULT_HOST = "127.0.0.1"; //"localhost"
private static final int DEFAULT_PORT = 9999;
@@ -64,8 +65,8 @@ public class Server {
if (jsonAuthFile != null) {
System.setProperty("spring.profiles.active", "pulse.authentication.gemfire");
Properties props = new Properties();
- props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, JSONAuthorization.class.getName() + ".create");
- //props.put(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, JSONAuthorization.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_AUTHENTICATOR, JSONAuthorization.class.getName() + ".create");
+ //props.put(SECURITY_CLIENT_ACCESSOR, JSONAuthorization.class.getName() + ".create");
JSONAuthorization.setUpWithJsonFile(jsonAuthFile);
Map<String, Object> env = new HashMap<String, Object>();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
index 0fb0b3e..0a9069d 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/UpdateVersionDUnitTest.java
@@ -768,10 +768,10 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
props.setProperty(USE_CLUSTER_CONFIGURATION, "false");
props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
test.getSystem(props);
@@ -928,7 +928,7 @@ public class UpdateVersionDUnitTest extends DistributedTestCase {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
props.setProperty(USE_CLUSTER_CONFIGURATION, "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
index 0ae3739..28ccd96 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/WANTestBase.java
@@ -159,7 +159,7 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
StringBuffer localLocatorBuffer = new StringBuffer(localLocatorsList.toString());
localLocatorBuffer.deleteCharAt(0);
localLocatorBuffer.deleteCharAt(localLocatorBuffer.lastIndexOf("]"));
@@ -173,7 +173,7 @@ public class WANTestBase extends DistributedTestCase{
remoteLocatorBuffer.deleteCharAt(remoteLocatorBuffer.lastIndexOf("]"));
String remoteLocator = remoteLocatorBuffer.toString();
remoteLocator = remoteLocator.replace(" ", "");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, remoteLocator);
+ props.setProperty(REMOTE_LOCATORS, remoteLocator);
test.getSystem(props);
}
@@ -183,7 +183,7 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
@@ -196,7 +196,7 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
@@ -209,7 +209,7 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + locatorPort + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
@@ -222,7 +222,7 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + locatorPort + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
test.getSystem(props);
@@ -235,10 +235,10 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
}
@@ -248,10 +248,10 @@ public class WANTestBase extends DistributedTestCase{
Properties props = test.getDistributedSystemProperties();
props.put(LOG_LEVEL, "fine");
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + oldPort + "]");
props.setProperty(START_LOCATOR, "localhost[" + oldPort + "],server=true,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
}
@@ -262,10 +262,10 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + port + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
}
@@ -277,10 +277,10 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + localPort + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=true,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
}
@@ -292,10 +292,10 @@ public class WANTestBase extends DistributedTestCase{
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, ""+dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, ""+dsId);
props.setProperty(LOCATORS, "localhost[" + localPort + "]");
props.setProperty(START_LOCATOR, "localhost[" + port + "],server=false,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost[" + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
}
@@ -860,10 +860,10 @@ public class WANTestBase extends DistributedTestCase{
WANTestBase test = new WANTestBase(getTestMethodName());
Properties props = test.getDistributedSystemProperties();
if (management) {
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
- props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "false");
+ props.setProperty(JMX_MANAGER_PORT, "0");
+ props.setProperty(JMX_MANAGER_HTTP_PORT, "0");
}
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "localhost[" + locPort + "]");
@@ -881,18 +881,18 @@ public class WANTestBase extends DistributedTestCase{
Properties gemFireProps = test.getDistributedSystemProperties();
gemFireProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewaySslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewaySslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewaySslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewaySslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewaySslRequireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_TYPE_NAME, "jks");
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME,
+ gemFireProps.put(GATEWAY_SSL_KEYSTORE_TYPE, "jks");
+ gemFireProps.put(GATEWAY_SSL_KEYSTORE,
TestUtil.getResourcePath(WANTestBase.class, "/com/gemstone/gemfire/cache/client/internal/client.keystore"));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_PASSWORD_NAME, "password");
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME,
+ gemFireProps.put(GATEWAY_SSL_KEYSTORE_PASSWORD, "password");
+ gemFireProps.put(GATEWAY_SSL_TRUSTSTORE,
TestUtil.getResourcePath(WANTestBase.class, "/com/gemstone/gemfire/cache/client/internal/client.truststore"));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ gemFireProps.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD, "password");
gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.setProperty(LOCATORS, "localhost[" + locPort + "]");
@@ -946,8 +946,7 @@ public class WANTestBase extends DistributedTestCase{
public static Integer createCacheServer() {
CacheServer server1 = cache.addCacheServer();
assertNotNull(server1);
- int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- server1.setPort(port);
+ server1.setPort(0);
try {
server1.start();
}
@@ -1975,18 +1974,18 @@ public class WANTestBase extends DistributedTestCase{
Properties gemFireProps = test.getDistributedSystemProperties();
gemFireProps.put(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_ENABLED_NAME, String.valueOf(gatewaySslenabled));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_PROTOCOLS_NAME, gatewaySslprotocols);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_CIPHERS_NAME, gatewaySslciphers);
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(gatewaySslRequireAuth));
+ gemFireProps.put(GATEWAY_SSL_ENABLED, String.valueOf(gatewaySslenabled));
+ gemFireProps.put(GATEWAY_SSL_PROTOCOLS, gatewaySslprotocols);
+ gemFireProps.put(GATEWAY_SSL_CIPHERS, gatewaySslciphers);
+ gemFireProps.put(GATEWAY_SSL_REQUIRE_AUTHENTICATION, String.valueOf(gatewaySslRequireAuth));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_TYPE_NAME, "jks");
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME,
+ gemFireProps.put(GATEWAY_SSL_KEYSTORE_TYPE, "jks");
+ gemFireProps.put(GATEWAY_SSL_KEYSTORE,
TestUtil.getResourcePath(WANTestBase.class, "/com/gemstone/gemfire/cache/client/internal/cacheserver.keystore"));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_PASSWORD_NAME, "password");
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME,
+ gemFireProps.put(GATEWAY_SSL_KEYSTORE_PASSWORD, "password");
+ gemFireProps.put(GATEWAY_SSL_TRUSTSTORE,
TestUtil.getResourcePath(WANTestBase.class, "/com/gemstone/gemfire/cache/client/internal/cacheserver.truststore"));
- gemFireProps.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ gemFireProps.put(GATEWAY_SSL_TRUSTSTORE_PASSWORD, "password");
gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.setProperty(LOCATORS, "localhost[" + locPort + "]");
@@ -3685,7 +3684,7 @@ public class WANTestBase extends DistributedTestCase{
// of WANTestBase (instead of instances of the subclass). So we can't override
// this method so that only the off-heap subclasses allocate off heap memory.
Properties props = new Properties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "300m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "300m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
index a8776c3..b668827 100644
--- a/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
+++ b/geode-wan/src/test/java/com/gemstone/gemfire/internal/cache/wan/misc/NewWanAuthenticationDUnitTest.java
@@ -187,11 +187,11 @@ public class NewWanAuthenticationDUnitTest extends WANTestBase {
Properties authProps = new Properties();
if (clientauthenticator != null) {
authProps.setProperty(
- DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME,
+ SECURITY_CLIENT_AUTHENTICATOR,
clientauthenticator);
}
if (accessor != null) {
- authProps.setProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME,
+ authProps.setProperty(SECURITY_CLIENT_ACCESSOR,
accessor);
}
if (clientAuthInit != null) {
[37/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ServerBlackList.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ServerBlackList.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ServerBlackList.java
index c6e8b75..0edd260 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ServerBlackList.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ServerBlackList.java
@@ -16,23 +16,19 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl.PoolTask;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.ServerLocation;
+import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.cache.client.internal.PoolImpl.PoolTask;
-import com.gemstone.gemfire.distributed.internal.ServerLocation;
-import com.gemstone.gemfire.internal.logging.LogService;
-
/**
* This class is designed to prevent the client from spinning
* and reconnected to the same failed server over and over.
@@ -60,7 +56,7 @@ public class ServerBlackList {
protected final ListenerBroadcaster broadcaster = new ListenerBroadcaster();
//not final for tests.
- static int THRESHOLD = Integer.getInteger("gemfire.ServerBlackList.THRESHOLD", 3).intValue();
+ static int THRESHOLD = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "ServerBlackList.THRESHOLD", 3).intValue();
protected final long pingInterval;
public ServerBlackList(long pingInterval) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListener.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListener.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListener.java
index 3bb0a1c..3ee08a1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListener.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/locator/wan/LocatorMembershipListener.java
@@ -16,12 +16,12 @@
*/
package com.gemstone.gemfire.cache.client.internal.locator.wan;
-import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
+import java.util.Set;
+import java.util.concurrent.ConcurrentMap;
+
/**
* A listener to handle membership when new locator is added to remote locator
* metadata. This listener is expected to inform all other locators in remote
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
index f1b3eca..a3f5e3b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
@@ -20,20 +20,13 @@ import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.GatewayConfigurationException;
-import com.gemstone.gemfire.cache.client.AllConnectionsInUseException;
-import com.gemstone.gemfire.cache.client.NoAvailableServersException;
-import com.gemstone.gemfire.cache.client.ServerConnectivityException;
-import com.gemstone.gemfire.cache.client.ServerOperationException;
-import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
-import com.gemstone.gemfire.cache.client.internal.Connection;
-import com.gemstone.gemfire.cache.client.internal.ConnectionFactory;
-import com.gemstone.gemfire.cache.client.internal.Endpoint;
-import com.gemstone.gemfire.cache.client.internal.EndpointManager;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.cache.client.internal.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl.PoolTask;
-import com.gemstone.gemfire.cache.client.internal.QueueConnectionImpl;
import com.gemstone.gemfire.distributed.PoolCancelledException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
import com.gemstone.gemfire.internal.cache.PoolStats;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -41,27 +34,14 @@ import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.security.GemFireSecurityException;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
import java.net.SocketException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
+import java.util.*;
+import java.util.concurrent.*;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;
-import org.apache.logging.log4j.Logger;
-
/**
* Manages client to server connections for the connection pool. This class contains
* all of the pooling logic to checkout/checkin connections.
@@ -71,8 +51,8 @@ import org.apache.logging.log4j.Logger;
*/
public class ConnectionManagerImpl implements ConnectionManager {
private static final Logger logger = LogService.getLogger();
-
- static long AQUIRE_TIMEOUT = Long.getLong("gemfire.ConnectionManager.AQUIRE_TIMEOUT", 10 * 1000).longValue();
+
+ static long AQUIRE_TIMEOUT = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "ConnectionManager.AQUIRE_TIMEOUT", 10 * 1000).longValue();
private final String poolName;
private final PoolStats poolStats;
protected final long prefillRetry; // ms // make this an int
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/internal/FunctionServiceManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/internal/FunctionServiceManager.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/internal/FunctionServiceManager.java
index 3a3e261..91108c1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/internal/FunctionServiceManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/execute/internal/FunctionServiceManager.java
@@ -16,19 +16,6 @@
*/
package com.gemstone.gemfire.cache.execute.internal;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-
-import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionService;
import com.gemstone.gemfire.cache.client.ClientCache;
@@ -44,18 +31,16 @@ import com.gemstone.gemfire.cache.execute.FunctionService;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.InternalEntity;
-import com.gemstone.gemfire.internal.cache.AbstractRegion;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.execute.DistributedRegionFunctionExecutor;
-import com.gemstone.gemfire.internal.cache.execute.MemberFunctionExecutor;
-import com.gemstone.gemfire.internal.cache.execute.PartitionedRegionFunctionExecutor;
-import com.gemstone.gemfire.internal.cache.execute.ServerFunctionExecutor;
-import com.gemstone.gemfire.internal.cache.execute.ServerRegionFunctionExecutor;
+import com.gemstone.gemfire.internal.cache.execute.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+
/**
* Provides the entry point into execution of user defined {@linkplain Function}s.
* <p>
@@ -74,7 +59,7 @@ public final class FunctionServiceManager {
/**
* use when the optimization to execute onMember locally is not desired.
*/
- public static final boolean RANDOM_onMember = Boolean.getBoolean("gemfire.randomizeOnMember");
+ public static final boolean RANDOM_onMember = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "randomizeOnMember");
public FunctionServiceManager() {
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/AbstractGroupOrRangeJunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/AbstractGroupOrRangeJunction.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/AbstractGroupOrRangeJunction.java
index 02bd924..a14dda8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/AbstractGroupOrRangeJunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/AbstractGroupOrRangeJunction.java
@@ -20,25 +20,16 @@
*/
package com.gemstone.gemfire.cache.query.internal;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-
-import com.gemstone.gemfire.cache.query.FunctionDomainException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.parse.OQLLexerTokenTypes;
import com.gemstone.gemfire.cache.query.internal.types.StructTypeImpl;
import com.gemstone.gemfire.cache.query.types.ObjectType;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.util.*;
+
/**
*
*/
@@ -47,7 +38,7 @@ public abstract class AbstractGroupOrRangeJunction extends
/** left operand */
final CompiledValue[] _operands;
private static final int INDEX_RESULT_THRESHOLD_DEFAULT = 100;
- public static final String INDX_THRESHOLD_PROP_STR = "gemfire.Query.INDEX_THRESHOLD_SIZE";
+ public static final String INDX_THRESHOLD_PROP_STR = DistributionConfig.GEMFIRE_PREFIX + "Query.INDEX_THRESHOLD_SIZE";
private static final int indexThresholdSize = Integer.getInteger(INDX_THRESHOLD_PROP_STR, INDEX_RESULT_THRESHOLD_DEFAULT).intValue();
private int _operator = 0;
private CompiledValue iterOperands;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledValue.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledValue.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledValue.java
index 7b5cf4b..b31a4f6 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledValue.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledValue.java
@@ -16,10 +16,13 @@
*/
package com.gemstone.gemfire.cache.query.internal;
-import java.util.*;
import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.parse.OQLLexerTokenTypes;
-import com.gemstone.gemfire.cache.query.types.*;
+import com.gemstone.gemfire.cache.query.types.ObjectType;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
+import java.util.List;
+import java.util.Set;
/**
* Class Description
@@ -47,7 +50,7 @@ public interface CompiledValue {
public final static int FIELD = -16;
public final static int GROUP_BY_SELECT = -17;
public static final int INDEX_RESULT_THRESHOLD_DEFAULT = 100;
- public static final String INDX_THRESHOLD_PROP_STR = "gemfire.Query.INDEX_THRESHOLD_SIZE";
+ public static final String INDX_THRESHOLD_PROP_STR = DistributionConfig.GEMFIRE_PREFIX + "Query.INDEX_THRESHOLD_SIZE";
public static final String INDEX_INFO = "index_info";
public static final int indexThresholdSize = Integer.getInteger(INDX_THRESHOLD_PROP_STR, INDEX_RESULT_THRESHOLD_DEFAULT).intValue();
public static final String RESULT_TYPE = "result_type";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
index 9e56e53..665c5a4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQuery.java
@@ -17,17 +17,6 @@
package com.gemstone.gemfire.cache.query.internal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicLong;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheRuntimeException;
@@ -38,29 +27,16 @@ import com.gemstone.gemfire.cache.client.internal.UserAttributes;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.cache.query.FunctionDomainException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryInvalidException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.QueryStatistics;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.cq.InternalCqQuery;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.CachePerfStats;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalDataSet;
-import com.gemstone.gemfire.internal.cache.PRQueryProcessor;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicLong;
+
/**
* Thread-safe implementation of com.gemstone.persistence.query.Query
@@ -86,7 +62,7 @@ public class DefaultQuery implements Query {
private static final Object[] EMPTY_ARRAY = new Object[0];
public static boolean QUERY_VERBOSE =
- Boolean.getBoolean("gemfire.Query.VERBOSE");
+ Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE");
/**
* System property to cleanup the compiled query. The compiled query
@@ -94,7 +70,7 @@ public class DefaultQuery implements Query {
* By default its set to 10 minutes, the time is set in MilliSecs.
*/
public static final int COMPILED_QUERY_CLEAR_TIME = Integer.getInteger(
- "gemfire.Query.COMPILED_QUERY_CLEAR_TIME", 10 * 60 * 1000).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "Query.COMPILED_QUERY_CLEAR_TIME", 10 * 60 * 1000).intValue();
public static int TEST_COMPILED_QUERY_CLEAR_TIME = -1;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQueryService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQueryService.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQueryService.java
index 392cb9d..cbfc051 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQueryService.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/DefaultQueryService.java
@@ -16,19 +16,6 @@
*/
package com.gemstone.gemfire.cache.query.internal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.LowMemoryException;
import com.gemstone.gemfire.cache.Region;
@@ -37,35 +24,13 @@ import com.gemstone.gemfire.cache.client.internal.InternalPool;
import com.gemstone.gemfire.cache.client.internal.ProxyCache;
import com.gemstone.gemfire.cache.client.internal.ServerProxy;
import com.gemstone.gemfire.cache.client.internal.UserAttributes;
-import com.gemstone.gemfire.cache.query.AmbiguousNameException;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqQuery;
-import com.gemstone.gemfire.cache.query.CqServiceStatistics;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexCreationException;
-import com.gemstone.gemfire.cache.query.IndexExistsException;
-import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.MultiIndexCreationException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryExecutionLowMemoryException;
-import com.gemstone.gemfire.cache.query.QueryInvalidException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.cq.ClientCQ;
import com.gemstone.gemfire.cache.query.internal.cq.CqService;
import com.gemstone.gemfire.cache.query.internal.cq.InternalCqQuery;
-import com.gemstone.gemfire.cache.query.internal.index.AbstractIndex;
-import com.gemstone.gemfire.cache.query.internal.index.IndexCreationData;
-import com.gemstone.gemfire.cache.query.internal.index.IndexData;
-import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
-import com.gemstone.gemfire.cache.query.internal.index.IndexUtils;
-import com.gemstone.gemfire.cache.query.internal.index.PartitionedIndex;
+import com.gemstone.gemfire.cache.query.internal.index.*;
import com.gemstone.gemfire.cache.query.internal.parse.OQLLexerTokenTypes;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.ForceReattemptException;
import com.gemstone.gemfire.internal.cache.InternalCache;
import com.gemstone.gemfire.internal.cache.LocalRegion;
@@ -74,6 +39,10 @@ import com.gemstone.gemfire.internal.cache.control.MemoryThresholds;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.Map.Entry;
/**
* @version $Revision: 1.2 $
@@ -85,11 +54,11 @@ public class DefaultQueryService implements QueryService {
* System property to allow query on region with heterogeneous objects.
* By default its set to false.
*/
- public static final boolean QUERY_HETEROGENEOUS_OBJECTS =
- Boolean.valueOf(System.getProperty("gemfire.QueryService.QueryHeterogeneousObjects", "true")).booleanValue();
+ public static final boolean QUERY_HETEROGENEOUS_OBJECTS =
+ Boolean.valueOf(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "QueryService.QueryHeterogeneousObjects", "true")).booleanValue();
- public static boolean COPY_ON_READ_AT_ENTRY_LEVEL =
- Boolean.valueOf(System.getProperty("gemfire.QueryService.CopyOnReadAtEntryLevel", "false")).booleanValue();
+ public static boolean COPY_ON_READ_AT_ENTRY_LEVEL =
+ Boolean.valueOf(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "QueryService.CopyOnReadAtEntryLevel", "false")).booleanValue();
/** Test purpose only */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceProvider.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceProvider.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceProvider.java
index 81d8532..d31ec8a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceProvider.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/cq/CqServiceProvider.java
@@ -16,21 +16,22 @@
*/
package com.gemstone.gemfire.cache.query.internal.cq;
+import com.gemstone.gemfire.cache.query.internal.cq.spi.CqServiceFactory;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+
import java.io.DataInput;
import java.io.IOException;
import java.util.Iterator;
import java.util.ServiceLoader;
-import com.gemstone.gemfire.cache.query.internal.cq.spi.CqServiceFactory;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-
public class CqServiceProvider {
private static final CqServiceFactory factory;
// System property to maintain the CQ event references for optimizing the updates.
// This will allows to run the CQ query only once during update events.
- public static boolean MAINTAIN_KEYS =
- Boolean.valueOf(System.getProperty("gemfire.cq.MAINTAIN_KEYS", "true")).booleanValue();
+ public static boolean MAINTAIN_KEYS =
+ Boolean.valueOf(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "cq.MAINTAIN_KEYS", "true")).booleanValue();
/**
* A debug flag used for testing vMotion during CQ registration
*/
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
index 0e29178..82b8860 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/IndexManager.java
@@ -21,62 +21,23 @@
*/
package com.gemstone.gemfire.cache.query.internal.index;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.Callable;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.FutureTask;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.AmbiguousNameException;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexExistsException;
-import com.gemstone.gemfire.cache.query.IndexInvalidException;
-import com.gemstone.gemfire.cache.query.IndexMaintenanceException;
-import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.IndexStatistics;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.MultiIndexCreationException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
-import com.gemstone.gemfire.cache.query.internal.CompiledPath;
-import com.gemstone.gemfire.cache.query.internal.CompiledValue;
-import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
-import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
-import com.gemstone.gemfire.cache.query.internal.MapIndexable;
-import com.gemstone.gemfire.cache.query.internal.NullToken;
-import com.gemstone.gemfire.cache.query.internal.QueryMonitor;
-import com.gemstone.gemfire.cache.query.internal.QueryObserver;
-import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.internal.*;
import com.gemstone.gemfire.cache.query.internal.index.AbstractIndex.InternalIndexStatistics;
import com.gemstone.gemfire.cache.query.internal.parse.OQLLexerTokenTypes;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.CachePerfStats;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
-import com.gemstone.gemfire.internal.cache.TXStateProxy;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicLong;
/**
*/
@@ -109,9 +70,9 @@ public class IndexManager {
private IndexUpdaterThread updater;
// Threshold for Queue.
- private final int INDEX_MAINTENANCE_BUFFER = Integer.getInteger("gemfire.AsynchIndexMaintenanceThreshold", -1).intValue();
+ private final int INDEX_MAINTENANCE_BUFFER = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "AsynchIndexMaintenanceThreshold", -1).intValue();
- public static boolean JOIN_OPTIMIZATION = !Boolean.getBoolean("gemfire.index.DisableJoinOptimization");
+ public static boolean JOIN_OPTIMIZATION = !Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "index.DisableJoinOptimization");
// Added for test purposes only.
public static boolean INPLACE_OBJECT_MODIFICATION_FOR_TEST = false;
@@ -129,14 +90,14 @@ public class IndexManager {
* In case of in-place modification the EntryEvent will not have the old-value, without this
* the old-values are not removed from the index-maps thus resulting in inconsistent results.
*/
- public static final boolean INPLACE_OBJECT_MODIFICATION =
- Boolean.valueOf(System.getProperty("gemfire.index.INPLACE_OBJECT_MODIFICATION", "false")).booleanValue();
+ public static final boolean INPLACE_OBJECT_MODIFICATION =
+ Boolean.valueOf(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "index.INPLACE_OBJECT_MODIFICATION", "false")).booleanValue();
/**
* System property to turn-off the compact-index support.
*/
- public static final boolean RANGEINDEX_ONLY =
- Boolean.valueOf(System.getProperty("gemfire.index.RANGEINDEX_ONLY", "false")).booleanValue();
+ public static final boolean RANGEINDEX_ONLY =
+ Boolean.valueOf(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "index.RANGEINDEX_ONLY", "false")).booleanValue();
/** For test purpose only */
public static boolean TEST_RANGEINDEX_ONLY = false;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewayReceiver.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewayReceiver.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewayReceiver.java
index ba757ad..a80fbd4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewayReceiver.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewayReceiver.java
@@ -16,11 +16,12 @@
*/
package com.gemstone.gemfire.cache.wan;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.io.IOException;
import java.util.List;
-import com.gemstone.gemfire.cache.server.CacheServer;
-
/**
* A GatewayReceiver that receives the events from a <code>GatewaySender</code>.
* GatewayReceiver is used in conjunction with a {@link GatewaySender} to
@@ -76,7 +77,7 @@ public interface GatewayReceiver {
* re-applied or not is decided by this attribute.
*/
public static final boolean APPLY_RETRIES = Boolean
- .getBoolean("gemfire.GatewayReceiver.ApplyRetries");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "GatewayReceiver.ApplyRetries");
/**
* Starts this receiver. Once the receiver is running, its
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewaySender.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewaySender.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewaySender.java
index bc6c184..d559a1a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewaySender.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/wan/GatewaySender.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.cache.wan;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.util.List;
/**
@@ -47,7 +49,7 @@ public interface GatewaySender {
* block.
*/
public static final int DEFAULT_SOCKET_READ_TIMEOUT = Integer.getInteger(
- "gemfire.cache.gatewaySender.default-socket-read-timeout", 0).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "cache.gatewaySender.default-socket-read-timeout", 0).intValue();
/**
* The default minimum socket read timeout.
@@ -58,7 +60,7 @@ public interface GatewaySender {
* Size of the oplog file used for the persistent queue in bytes
*/
static public final int QUEUE_OPLOG_SIZE
- = Integer.getInteger("gemfire.cache.gatewaySender.queueOpLogSize", 1024*1024*100).intValue();
+ = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "cache.gatewaySender.queueOpLogSize", 1024 * 1024 * 100).intValue();
/**
@@ -89,7 +91,7 @@ public interface GatewaySender {
public static final int DEFAULT_PARALLELISM_REPLICATED_REGION = Integer
.getInteger(
- "gemfire.cache.gatewaySender.defaultParallelismForReplicatedRegion",
+ DistributionConfig.GEMFIRE_PREFIX + "cache.gatewaySender.defaultParallelismForReplicatedRegion",
113).intValue();
public static final int DEFAULT_DISTRIBUTED_SYSTEM_ID = -1;
@@ -110,26 +112,27 @@ public interface GatewaySender {
* dead and should be aborted
*/
public static final long GATEWAY_SENDER_TIMEOUT
- = Integer.getInteger("gemfire.GATEWAY_SENDER_TIMEOUT", 30).intValue();
+ = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "GATEWAY_SENDER_TIMEOUT", 30).intValue();
/**
* The obsolete socket read timeout java system property. Since customers have
* been given this property, it is used to log a warning.
*/
- public static final String GATEWAY_CONNECTION_READ_TIMEOUT_PROPERTY = "gemfire.GatewaySender.GATEWAY_CONNECTION_READ_TIMEOUT";
-
- public static final int GATEWAY_CONNECTION_IDLE_TIMEOUT = Integer.getInteger("gemfire.GatewaySender.GATEWAY_CONNECTION_IDLE_TIMEOUT", -1).intValue();
+ public static final String GATEWAY_CONNECTION_READ_TIMEOUT_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.GATEWAY_CONNECTION_READ_TIMEOUT";
+
+ public static final int GATEWAY_CONNECTION_IDLE_TIMEOUT = Integer
+ .getInteger(DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.GATEWAY_CONNECTION_IDLE_TIMEOUT", -1).intValue();
/**
* If the System property is set, use it. Otherwise, set default to 'true'.
*/
- public static final boolean REMOVE_FROM_QUEUE_ON_EXCEPTION =
- (System.getProperty("gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION") != null)
- ? Boolean.getBoolean("gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION")
+ public static final boolean REMOVE_FROM_QUEUE_ON_EXCEPTION =
+ (System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION") != null)
+ ? Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION")
: true;
-
- public static final boolean EARLY_ACK = Boolean.getBoolean("gemfire.GatewaySender.EARLY_ACK");
+
+ public static final boolean EARLY_ACK = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "GatewaySender.EARLY_ACK");
public static final boolean DEFAULT_IS_PARALLEL = false;
@@ -140,7 +143,7 @@ public interface GatewaySender {
* in case receiver is not up and running. Default is set to 1000 milliseconds i.e. 1 second.
*/
public static final int CONNECTION_RETRY_INTERVAL = Integer.getInteger(
- "gemfire.gateway-connection-retry-interval", 1000).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "gateway-connection-retry-interval", 1000).intValue();
/**
* The order policy. This enum is applicable only when concurrency-level is > 1.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
index c29185a..9be157c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/AbstractLauncher.java
@@ -17,29 +17,6 @@
package com.gemstone.gemfire.distributed;
-import java.io.File;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.net.BindException;
-import java.net.InetAddress;
-import java.net.URL;
-import java.sql.Timestamp;
-import java.text.SimpleDateFormat;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.logging.FileHandler;
-import java.util.logging.Level;
-import java.util.logging.Logger;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.unsafe.RegisterSignalHandlerSupport;
@@ -56,6 +33,19 @@ import com.gemstone.gemfire.internal.process.ProcessUtils;
import com.gemstone.gemfire.internal.util.SunAPINotFoundException;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonObject;
+import java.io.*;
+import java.net.BindException;
+import java.net.InetAddress;
+import java.net.URL;
+import java.sql.Timestamp;
+import java.text.SimpleDateFormat;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.logging.FileHandler;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
/**
* The AbstractLauncher class is a base class for implementing various launchers to construct and run different GemFire
* processes, like Cache Servers, Locators, Managers, HTTP servers and so on.
@@ -81,7 +71,7 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
);
public static final String DEFAULT_WORKING_DIRECTORY = SystemUtils.CURRENT_DIRECTORY;
- public static final String SIGNAL_HANDLER_REGISTRATION_SYSTEM_PROPERTY = "gemfire.launcher.registerSignalHandlers";
+ public static final String SIGNAL_HANDLER_REGISTRATION_SYSTEM_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "launcher.registerSignalHandlers";
protected static final String OPTION_PREFIX = "-";
@@ -295,7 +285,7 @@ public abstract class AbstractLauncher<T extends Comparable<T>> implements Runna
}
if (!StringUtils.isBlank(getMemberName())) {
- distributedSystemProperties.setProperty(DistributionConfig.NAME_NAME, getMemberName());
+ distributedSystemProperties.setProperty(SystemConfigurationProperties.NAME, getMemberName());
}
// Set any other GemFire Distributed System/Distribution Config directory-based properties as necessary
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
index eaf1ee7..96ea8ea 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
@@ -17,18 +17,6 @@
package com.gemstone.gemfire.distributed;
-import java.io.File;
-import java.net.InetAddress;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.StatisticsFactory;
@@ -48,6 +36,13 @@ import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
import com.gemstone.gemfire.redis.GemFireRedisServer;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import java.io.File;
+import java.net.InetAddress;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
/**
* A "connection" to a GemFire distributed system. A
* <code>DistributedSystem</code> is created by invoking the {@link
@@ -1974,7 +1969,7 @@ public abstract class DistributedSystem implements StatisticsFactory {
* @see #getPropertiesFile()
* @since Geode 1.0
*/
- public static final String PROPERTIES_FILE_DEFAULT = "gemfire.properties";
+ public static final String PROPERTIES_FILE_DEFAULT = DistributionConfig.GEMFIRE_PREFIX + "properties";
/**
* Returns the current value of {@link #PROPERTIES_FILE_PROPERTY} system
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
index a0cfc4f..52e9c34 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
@@ -17,29 +17,6 @@
package com.gemstone.gemfire.distributed;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.net.ConnectException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.TreeMap;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.logging.Level;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
import com.gemstone.gemfire.cache.client.internal.locator.LocatorStatusResponse;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
@@ -50,20 +27,7 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.lang.ObjectUtils;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.lang.SystemUtils;
-import com.gemstone.gemfire.internal.process.ConnectionFailedException;
-import com.gemstone.gemfire.internal.process.ControlNotificationHandler;
-import com.gemstone.gemfire.internal.process.ControllableProcess;
-import com.gemstone.gemfire.internal.process.FileAlreadyExistsException;
-import com.gemstone.gemfire.internal.process.MBeanInvocationFailedException;
-import com.gemstone.gemfire.internal.process.PidUnavailableException;
-import com.gemstone.gemfire.internal.process.ProcessController;
-import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
-import com.gemstone.gemfire.internal.process.ProcessControllerParameters;
-import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
-import com.gemstone.gemfire.internal.process.ProcessType;
-import com.gemstone.gemfire.internal.process.ProcessUtils;
-import com.gemstone.gemfire.internal.process.StartupStatusListener;
-import com.gemstone.gemfire.internal.process.UnableToControlProcessException;
+import com.gemstone.gemfire.internal.process.*;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.lang.AttachAPINotFoundException;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonArray;
@@ -73,6 +37,22 @@ import joptsimple.OptionException;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.net.ConnectException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.logging.Level;
+
/**
* The LocatorLauncher class is a launcher for a GemFire Locator.
*
@@ -1729,9 +1709,9 @@ public final class LocatorLauncher extends AbstractLauncher<String> {
protected void validateOnStart() {
if (Command.START.equals(getCommand())) {
if (StringUtils.isBlank(getMemberName())
- && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.NAME_NAME)
- && !isSet(getDistributedSystemProperties(), DistributionConfig.NAME_NAME)
- && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), DistributionConfig.NAME_NAME))
+ && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME)
+ && !isSet(getDistributedSystemProperties(), SystemConfigurationProperties.NAME)
+ && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), SystemConfigurationProperties.NAME))
{
throw new IllegalStateException(LocalizedStrings.Launcher_Builder_MEMBER_NAME_VALIDATION_ERROR_MESSAGE
.toLocalizedString("Locator"));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
index c95e301..252f701 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
@@ -17,31 +17,8 @@
package com.gemstone.gemfire.distributed;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.ServiceLoader;
-import java.util.TreeMap;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.internal.DefaultServerLauncherCacheProvider;
@@ -49,30 +26,13 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.GemFireVersion;
import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.cache.AbstractCacheServer;
-import com.gemstone.gemfire.internal.cache.CacheConfig;
-import com.gemstone.gemfire.internal.cache.CacheServerLauncher;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerHelper;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.lang.ObjectUtils;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.lang.SystemUtils;
-import com.gemstone.gemfire.internal.process.ClusterConfigurationNotAvailableException;
-import com.gemstone.gemfire.internal.process.ConnectionFailedException;
-import com.gemstone.gemfire.internal.process.ControlNotificationHandler;
-import com.gemstone.gemfire.internal.process.ControllableProcess;
-import com.gemstone.gemfire.internal.process.FileAlreadyExistsException;
-import com.gemstone.gemfire.internal.process.MBeanInvocationFailedException;
-import com.gemstone.gemfire.internal.process.PidUnavailableException;
-import com.gemstone.gemfire.internal.process.ProcessController;
-import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
-import com.gemstone.gemfire.internal.process.ProcessControllerParameters;
-import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
-import com.gemstone.gemfire.internal.process.ProcessType;
-import com.gemstone.gemfire.internal.process.StartupStatusListener;
-import com.gemstone.gemfire.internal.process.UnableToControlProcessException;
+import com.gemstone.gemfire.internal.process.*;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.lang.AttachAPINotFoundException;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
@@ -80,11 +40,26 @@ import com.gemstone.gemfire.management.internal.cli.json.GfJsonArray;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonException;
import com.gemstone.gemfire.management.internal.cli.json.GfJsonObject;
import com.gemstone.gemfire.pdx.PdxSerializer;
-
import joptsimple.OptionException;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.SERVER_BIND_ADDRESS;
+
/**
* The ServerLauncher class is a launcher class with main method to start a GemFire Server (implying a GemFire Cache
* Server process).
@@ -119,7 +94,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
helpMap.put("pid", LocalizedStrings.ServerLauncher_SERVER_PID_HELP.toLocalizedString());
helpMap.put("rebalance", LocalizedStrings.ServerLauncher_SERVER_REBALANCE_HELP.toLocalizedString());
helpMap.put("redirect-output", LocalizedStrings.ServerLauncher_SERVER_REDIRECT_OUTPUT_HELP.toLocalizedString());
- helpMap.put("server-bind-address", LocalizedStrings.ServerLauncher_SERVER_BIND_ADDRESS_HELP.toLocalizedString());
+ helpMap.put(SERVER_BIND_ADDRESS, LocalizedStrings.ServerLauncher_SERVER_BIND_ADDRESS_HELP.toLocalizedString());
helpMap.put("hostname-for-clients", LocalizedStrings.ServerLauncher_SERVER_HOSTNAME_FOR_CLIENT_HELP.toLocalizedString());
helpMap.put("server-port", LocalizedStrings.ServerLauncher_SERVER_PORT_HELP.toLocalizedString(String.valueOf(getDefaultServerPort())));
}
@@ -1438,7 +1413,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
parser.accepts("pid").withRequiredArg().ofType(Integer.class);
parser.accepts("rebalance");
parser.accepts("redirect-output");
- parser.accepts("server-bind-address").withRequiredArg().ofType(String.class);
+ parser.accepts(SERVER_BIND_ADDRESS).withRequiredArg().ofType(String.class);
parser.accepts("server-port").withRequiredArg().ofType(Integer.class);
parser.accepts("spring-xml-location").withRequiredArg().ofType(String.class);
parser.accepts("version");
@@ -1522,8 +1497,8 @@ public class ServerLauncher extends AbstractLauncher<String> {
setPid((Integer) options.valueOf("pid"));
}
- if (options.has("server-bind-address")) {
- setServerBindAddress(ObjectUtils.toString(options.valueOf("server-bind-address")));
+ if (options.has(SERVER_BIND_ADDRESS)) {
+ setServerBindAddress(ObjectUtils.toString(options.valueOf(SERVER_BIND_ADDRESS)));
}
if (options.has("server-port")) {
@@ -2287,9 +2262,9 @@ public class ServerLauncher extends AbstractLauncher<String> {
protected void validateOnStart() {
if (Command.START.equals(getCommand())) {
if (StringUtils.isBlank(getMemberName())
- && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.NAME_NAME)
- && !isSet(getDistributedSystemProperties(), DistributionConfig.NAME_NAME)
- && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), DistributionConfig.NAME_NAME))
+ && !isSet(System.getProperties(), DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME)
+ && !isSet(getDistributedSystemProperties(), SystemConfigurationProperties.NAME)
+ && !isSet(loadGemFireProperties(DistributedSystem.getPropertyFileURL()), SystemConfigurationProperties.NAME))
{
throw new IllegalStateException(LocalizedStrings.Launcher_Builder_MEMBER_NAME_VALIDATION_ERROR_MESSAGE
.toLocalizedString("Server"));
@@ -2342,7 +2317,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
* An enumerated type representing valid commands to the Server launcher.
*/
public static enum Command {
- START("start", "assign-buckets", "disable-default-server", "rebalance", "server-bind-address", "server-port", "force", "debug", "help"),
+ START("start", "assign-buckets", "disable-default-server", "rebalance", SERVER_BIND_ADDRESS, "server-port", "force", "debug", "help"),
STATUS("status", "member", "pid", "dir", "debug", "help"),
STOP("stop", "member", "pid", "dir", "debug", "help"),
UNSPECIFIED("unspecified"),
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
new file mode 100644
index 0000000..40a11bb
--- /dev/null
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
@@ -0,0 +1,183 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed;
+
+import com.gemstone.gemfire.distributed.internal.ConfigAttribute;
+
+/**
+ * Created by ukohlmeyer on 26/05/2016.
+ */
+public interface SystemConfigurationProperties {
+ String ACK_SEVERE_ALERT_THRESHOLD = "ack-severe-alert-threshold";
+ String ACK_WAIT_THRESHOLD = "ack-wait-threshold";
+ String ARCHIVE_DISK_SPACE_LIMIT = "archive-disk-space-limit";
+ String ARCHIVE_FILE_SIZE_LIMIT = "archive-file-size-limit";
+ String ASYNC_DISTRIBUTION_TIMEOUT = "async-distribution-timeout";
+ String ASYNC_MAX_QUEUE_SIZE = "async-max-queue-size";
+ String ASYNC_QUEUE_TIMEOUT = "async-queue-timeout";
+ String BIND_ADDRESS = "bind-address";
+ String CACHE_XML_FILE = "cache-xml-file";
+ String CLUSTER_CONFIGURATION_DIR = "cluster-configuration-dir";
+ String CLUSTER_SSL_CIPHERS = "cluster-ssl-ciphers";
+ String CLUSTER_SSL_ENABLED = "cluster-ssl-enabled";
+ String CLUSTER_SSL_KEYSTORE = "cluster-ssl-keystore";
+ String CLUSTER_SSL_KEYSTORE_PASSWORD = "cluster-ssl-keystore-password";
+ String CLUSTER_SSL_KEYSTORE_TYPE = "cluster-ssl-keystore-type";
+ String CLUSTER_SSL_PROTOCOLS = "cluster-ssl-protocols";
+ String CLUSTER_SSL_REQUIRE_AUTHENTICATION = "cluster-ssl-require-authentication";
+ String CLUSTER_SSL_TRUSTSTORE = "cluster-ssl-truststore";
+ String CLUSTER_SSL_TRUSTSTORE_PASSWORD = "cluster-ssl-truststore-password";
+ String CONFLATE_EVENTS = "conflate-events";
+ String CONSERVE_SOCKETS = "conserve-sockets";
+ String DELTA_PROPAGATION = "delta-propagation";
+ String DEPLOY_WORKING_DIR = "deploy-working-dir";
+ String DISABLE_AUTO_RECONNECT = "disable-auto-reconnect";
+ String DISABLE_TCP = "disable-tcp";
+ String DISTRIBUTED_SYSTEM_ID = "distributed-system-id";
+ String DURABLE_CLIENT_ID = "durable-client-id";
+ String DURABLE_CLIENT_TIMEOUT = "durable-client-timeout";
+ String ENABLE_CLUSTER_CONFIGURATION = "enable-cluster-configuration";
+ String ENABLE_NETWORK_PARTITION_DETECTION = "enable-network-partition-detection";
+ String ENABLE_TIME_STATISTICS = "enable-time-statistics";
+ String ENFORE_UNIQUE_HOST = "enforce-unique-host";
+ String GATEWAY_SSL_CIPHERS = "gateway-ssl-ciphers";
+ String GATEWAY_SSL_ENABLED = "gateway-ssl-enabled";
+ String GATEWAY_SSL_KEYSTORE = "gateway-ssl-keystore";
+ String GATEWAY_SSL_KEYSTORE_PASSWORD = "gateway-ssl-keystore-password";
+ String GATEWAY_SSL_KEYSTORE_TYPE = "gateway-ssl-keystore-type";
+ String GATEWAY_SSL_PROTOCOLS = "gateway-ssl-protocols";
+ String GATEWAY_SSL_REQUIRE_AUTHENTICATION = "gateway-ssl-require-authentication";
+ String GATEWAY_SSL_TRUSTSTORE = "gateway-ssl-truststore";
+ String GATEWAY_SSL_TRUSTSTORE_PASSWORD = "gateway-ssl-truststore-password";
+ String GROUPS = "groups";
+ String HTTP_SERVICE_BIND_ADDRESS = "http-service-bind-address";
+ String HTTP_SERVICE_PORT = "http-service-port";
+ String HTTP_SERVICE_SSL_CIPHERS = "http-service-ssl-ciphers";
+ String HTTP_SERVICE_SSL_ENABLED = "http-service-ssl-enabled";
+ String HTTP_SERVICE_SSL_KEYSTORE = "http-service-ssl-keystore";
+ String HTTP_SERVICE_SSL_KEYSTORE_PASSWORD = "http-service-ssl-keystore-password";
+ String HTTP_SERVICE_SSL_KEYSTORE_TYPE = "http-service-ssl-keystore-type";
+ String HTTP_SERVICE_SSL_PROTOCOLS = "http-service-ssl-protocols";
+ String HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION = "http-service-ssl-require-authentication";
+ String HTTP_SERVICE_SSL_TRUSTSTORE = "http-service-ssl-truststore";
+ String HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD = "http-service-ssl-truststore-password";
+ String JMX_MANAGER = "jmx-manager";
+ String JMX_MANAGER_ACCESS_FILE = "jmx-manager-access-file";
+ String JMX_MANAGER_BIND_ADDRESS = "jmx-manager-bind-address";
+ String JMX_MANAGER_HOSTNAME_FOR_CLIENTS = "jmx-manager-hostname-for-clients";
+ String JMX_MANAGER_HTTP_PORT = "jmx-manager-http-port";
+ String JMX_MANAGER_PASSWORD_FILE = "jmx-manager-password-file";
+ String JMX_MANAGER_PORT = "jmx-manager-port";
+ String JMX_MANAGER_SSL = "jmx-manager-ssl";
+ String JMX_MANAGER_START = "jmx-manager-start";
+ String JMX_MANAGER_UPDATE_RATE = "jmx-manager-update-rate";
+ String JMX_MANAGER_SSL_CIPHERS = "jmx-manager-ssl-ciphers";
+ String JMX_MANAGER_SSL_ENABLED = "jmx-manager-ssl-enabled";
+ String JMX_MANAGER_SSL_KEYSTORE = "jmx-manager-ssl-keystore";
+ String JMX_MANAGER_SSL_KEYSTORE_PASSWORD = "jmx-manager-ssl-keystore-password";
+ String JMX_MANAGER_SSL_KEYSTORE_TYPE = "jmx-manager-ssl-keystore-type";
+ String JMX_MANAGER_SSL_PROTOCOLS = "jmx-manager-ssl-protocols";
+ String JMX_MANAGER_SSL_REQUIRE_AUTHENTICATION = "jmx-manager-ssl-require-authentication";
+ String JMX_MANAGER_SSL_TRUSTSTORE = "jmx-manager-ssl-truststore";
+ String JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD = "jmx-manager-ssl-truststore-password";
+ String LICENCE_APPLICATION_CACHE = "license-application-cache";
+ String LICENCE_DATA_MANAGEMENT = "license-data-management";
+ String LICENCE_SERVER_TIMEOUT = "license-server-timeout";
+ String LICENCE_WORKING_DIR = "license-working-dir";
+ String LOAD_CLUSTER_CONFIGURATION_FROM_DIR = "load-cluster-configuration-from-dir";
+ String LOCATOR_WAIT_TIME = "locator-wait-time";
+ String LOCATORS = "locators";
+ String LOG_DISK_SPACE_LIMIT = "log-disk-space-limit";
+ String LOG_FILE = "log-file";
+ String LOG_FILE_SIZE_LIMIT = "log-file-size-limit";
+ String LOG_LEVEL = "log-level";
+ String MAX_NUM_RECONNECT_TRIES = "max-num-reconnect-tries";
+ String MAX_WAIT_TIME_RECONNECT = "max-wait-time-reconnect";
+ String MCAST_ADDRESS = "mcast-address";
+ String MCAST_FLOW_CONTROL = "mcast-flow-control";
+ String MCAST_PORT = "mcast-port";
+ String MCAST_RECV_BUFFER_SIZE = "mcast-recv-buffer-size";
+ String MCAST_SEND_BUFFER_SIZE = "mcast-send-buffer-size";
+ String MCAST_TTL = "mcast-ttl";
+ String MEMBER_TIMEOUT = "member-timeout";
+ String MEMBERSHIP_PORT_RANGE = "membership-port-range";
+ String MEMCACHED_BIND_ADDRESS = "memcached-bind-address";
+ String MEMCACHED_PORT = "memcached-port";
+ String MEMCACHED_PROTOCOL = "memcached-protocol";
+
+ /**
+ * The name of the "name" property
+ */
+ @ConfigAttribute(type = String.class)
+ String NAME = "name";
+ String REDUNDANCY_ZONE = "redundancy-zone";
+ String REMOTE_LOCATORS = "remote-locators";
+ String REMOVE_UNRESPONSIVE_CLIENT = "remove-unresponsive-client";
+ String ROLES = "roles";
+ String SECURITY_PREFIX = "security-";
+ String SECURITY_CLIENT_ACCESSOR = SECURITY_PREFIX + "client-accessor";
+ String SECURITY_CLIENT_ACCESSOR_PP = SECURITY_PREFIX + "client-accessor-pp";
+ String SECURITY_CLIENT_AUTH_INIT = SECURITY_PREFIX + "client-auth-init";
+ String SECURITY_CLIENT_AUTHENTICATOR = SECURITY_PREFIX + "client-authenticator";
+ String SECURITY_CLIENT_DHALGO = SECURITY_PREFIX + "client-dhalgo";
+ String SECURITY_LOG_FILE = SECURITY_PREFIX + "log-file";
+ String SECURITY_LOG_LEVEL = SECURITY_PREFIX + "log-level";
+ String SECURITY_PEER_AUTH_INIT = SECURITY_PREFIX + "peer-auth-init";
+ String SECURITY_PEER_AUTHENTICATOR = SECURITY_PREFIX + "peer-authenticator";
+ String SECURITY_PEER_VERIFY_MEMBER_TIMEOUT = SECURITY_PREFIX + "peer-verifymember-timeout";
+ String SERVER_BIND_ADDRESS = "server-bind-address";
+ String SERVER_SSL_CIPHERS = "server-ssl-ciphers";
+ String SERVER_SSL_ENABLED = "server-ssl-enabled";
+ String SERVER_SSL_KEYSTORE = "server-ssl-keystore";
+ String SERVER_SSL_KEYSTORE_PASSWORD = "server-ssl-keystore-password";
+ String SERVER_SSL_KEYSTORE_TYPE = "server-ssl-keystore-type";
+ String SERVER_SSL_PROTOCOLS = "server-ssl-protocols";
+ String SERVER_SSL_REQUIRE_AUTHENTICATION = "server-ssl-require-authentication";
+ String SERVER_SSL_TRUSTSTORE = "server-ssl-truststore";
+ String SERVER_SSL_TRUSTSTORE_PASSWORD = "server-ssl-truststore-password";
+ String SOCKET_BUFFER_SIZE = "socket-buffer-size";
+ String SOCKET_LEASE_TIME = "socket-lease-time";
+ String START_DEV_REST_API = "start-dev-rest-api";
+ String START_LOCATOR = "start-locator";
+ String STATISTIC_ARCHIVE_FILE = "statistic-archive-file";
+ String STATISTIC_SAMPLE_RATE = "statistic-sample-rate";
+ String STATISTIC_SAMPLING_ENABLED = "statistic-sampling-enabled";
+ String TCP_PORT = "tcp-port";
+ String UDP_FRAGMENT_SIZE = "udp-fragment-size";
+ String UDP_RECV_BUFFER_SIZE = "udp-recv-buffer-size";
+ String UDP_SEND_BUFFER_SIZE = "udp-send-buffer-size";
+ String USE_CLUSTER_CONFIGURATION = "use-cluster-configuration";
+ String USER_COMMAND_PACKAGES = "user-command-packages";
+ String OFF_HEAP_MEMORY_SIZE = "off-heap-memory-size";
+
+ String REDIS_PORT = "redis-port";
+ String REDIS_BIND_ADDRESS = "redis-bind-address";
+ String REDIS_PASSWORD = "redis-password";
+ String LOCK_MEMORY = "lock-memory";
+ String SECURITY_SHIRO_INIT = SECURITY_PREFIX + "shiro-init";
+ String DISTRIBUTED_TRANSACTIONS = "distributed-transactions";
+
+ @Deprecated
+ String SSL_ENABLED = "ssl-enabled";
+ @Deprecated
+ String SSL_PROTOCOLS = "ssl-protocols";
+ @Deprecated
+ String SSL_CIPHERS = "ssl-ciphers";
+ @Deprecated
+ String SSL_REQUIRE_AUTHENTICATION = "ssl-require-authentication";
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
index ae11e5d..3b08779 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
@@ -16,20 +16,10 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.lang.reflect.Method;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
-
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.InvalidValueException;
import com.gemstone.gemfire.UnmodifiableException;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.AbstractConfig;
import com.gemstone.gemfire.internal.ConfigSource;
import com.gemstone.gemfire.internal.SocketCreator;
@@ -38,6 +28,11 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogWriterImpl;
import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+
/**
* Provides an implementation of <code>DistributionConfig</code> that
* knows how to read the configuration file.
@@ -101,8 +96,7 @@ public abstract class AbstractDistributionConfig
}
}
-
- @ConfigAttributeChecker(name=START_LOCATOR_NAME)
+ @ConfigAttributeChecker(name = START_LOCATOR)
protected String checkStartLocator(String value) {
if (value != null && value.trim().length() > 0) {
// throws IllegalArgumentException if string is malformed
@@ -111,39 +105,42 @@ public abstract class AbstractDistributionConfig
return value;
}
-
- @ConfigAttributeChecker(name=TCP_PORT_NAME)
+ @ConfigAttributeChecker(name = TCP_PORT)
protected int checkTcpPort(int value) {
if ( getSSLEnabled() && value != 0 ) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {TCP_PORT_NAME, Integer.valueOf(value), SSL_ENABLED_NAME}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
+ .toLocalizedString(new Object[] { TCP_PORT, Integer.valueOf(value), SSL_ENABLED_NAME }));
}
if ( getClusterSSLEnabled() && value != 0 ) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {TCP_PORT_NAME, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
+ .toLocalizedString(new Object[] { TCP_PORT, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME }));
}
return value;
}
- @ConfigAttributeChecker(name=MCAST_PORT_NAME)
+ @ConfigAttributeChecker(name = MCAST_PORT)
protected int checkMcastPort(int value) {
if ( getSSLEnabled() && value != 0 ) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {MCAST_PORT_NAME, Integer.valueOf(value), SSL_ENABLED_NAME}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
+ .toLocalizedString(new Object[] { MCAST_PORT, Integer.valueOf(value), SSL_ENABLED_NAME }));
}
if ( getClusterSSLEnabled() && value != 0 ) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE.toLocalizedString(new Object[] {MCAST_PORT_NAME, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_0_WHEN_2_IS_TRUE
+ .toLocalizedString(new Object[] { MCAST_PORT, Integer.valueOf(value), CLUSTER_SSL_ENABLED_NAME }));
}
return value;
}
-
- @ConfigAttributeChecker(name=MCAST_ADDRESS_NAME)
+ @ConfigAttributeChecker(name = MCAST_ADDRESS)
protected InetAddress checkMcastAddress(InetAddress value) {
if (!value.isMulticastAddress()) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_IT_WAS_NOT_A_MULTICAST_ADDRESS.toLocalizedString(new Object[] {MCAST_ADDRESS_NAME, value}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_IT_WAS_NOT_A_MULTICAST_ADDRESS
+ .toLocalizedString(new Object[] { MCAST_ADDRESS, value }));
}
return value;
}
- @ConfigAttributeChecker(name=BIND_ADDRESS_NAME)
+ @ConfigAttributeChecker(name = BIND_ADDRESS)
protected String checkBindAddress(String value) {
if (value != null && value.length() > 0 &&
!SocketCreator.isLocalHost(value)) {
@@ -155,8 +152,7 @@ public abstract class AbstractDistributionConfig
return value;
}
-
- @ConfigAttributeChecker(name=SERVER_BIND_ADDRESS_NAME)
+ @ConfigAttributeChecker(name = SERVER_BIND_ADDRESS)
protected String checkServerBindAddress(String value) {
if (value != null && value.length() > 0 &&
!SocketCreator.isLocalHost(value)) {
@@ -171,7 +167,8 @@ public abstract class AbstractDistributionConfig
@ConfigAttributeChecker(name=SSL_ENABLED_NAME)
protected Boolean checkSSLEnabled(Boolean value) {
if ( value.booleanValue() && (getMcastPort() != 0) ) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0.toLocalizedString(new Object[] {SSL_ENABLED_NAME, value, MCAST_PORT_NAME}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0
+ .toLocalizedString(new Object[] { SSL_ENABLED_NAME, value, MCAST_PORT }));
}
return value;
}
@@ -179,7 +176,8 @@ public abstract class AbstractDistributionConfig
@ConfigAttributeChecker(name=CLUSTER_SSL_ENABLED_NAME)
protected Boolean checkClusterSSLEnabled(Boolean value) {
if ( value.booleanValue() && (getMcastPort() != 0) ) {
- throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0.toLocalizedString(new Object[] {CLUSTER_SSL_ENABLED_NAME, value, MCAST_PORT_NAME}));
+ throw new IllegalArgumentException(LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_ITS_VALUE_MUST_BE_FALSE_WHEN_2_IS_NOT_0
+ .toLocalizedString(new Object[] { CLUSTER_SSL_ENABLED_NAME, value, MCAST_PORT }));
}
return value;
}
@@ -200,7 +198,7 @@ public abstract class AbstractDistributionConfig
@ConfigAttributeChecker(name=DISTRIBUTED_SYSTEM_ID_NAME)
protected int checkDistributedSystemId(int value) {
String distributedSystemListener = System
- .getProperty("gemfire.DistributedSystemListener");
+ .getProperty(DistributionConfig.GEMFIRE_PREFIX + "DistributedSystemListener");
//this check is specific for Jayesh's use case of WAN BootStraping
if(distributedSystemListener == null){
if (value < MIN_DISTRIBUTED_SYSTEM_ID) {
@@ -235,7 +233,7 @@ public abstract class AbstractDistributionConfig
* If <code>value</code> is not a valid locator
* configuration
*/
- @ConfigAttributeChecker(name=LOCATORS_NAME)
+ @ConfigAttributeChecker(name = LOCATORS)
protected String checkLocators(String value) {
// validate locators value
StringBuffer sb = new StringBuffer();
@@ -403,7 +401,7 @@ public abstract class AbstractDistributionConfig
@ConfigAttributeChecker(name=SECURITY_PEER_AUTH_INIT_NAME)
protected String checkSecurityPeerAuthInit(String value) {
if (value != null && value.length() > 0 && getMcastPort() != 0) {
- String mcastInfo = MCAST_PORT_NAME + "[" + getMcastPort() + "]";
+ String mcastInfo = MCAST_PORT + "[" + getMcastPort() + "]";
throw new IllegalArgumentException(
LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_2_MUST_BE_0_WHEN_SECURITY_IS_ENABLED
.toLocalizedString(new Object[] {
@@ -416,7 +414,7 @@ public abstract class AbstractDistributionConfig
@ConfigAttributeChecker(name=SECURITY_PEER_AUTHENTICATOR_NAME)
protected String checkSecurityPeerAuthenticator(String value) {
if (value != null && value.length() > 0 && getMcastPort() != 0) {
- String mcastInfo = MCAST_PORT_NAME + "[" + getMcastPort() + "]";
+ String mcastInfo = MCAST_PORT + "[" + getMcastPort() + "]";
throw new IllegalArgumentException(
LocalizedStrings.AbstractDistributionConfig_COULD_NOT_SET_0_TO_1_BECAUSE_2_MUST_BE_0_WHEN_SECURITY_IS_ENABLED
.toLocalizedString(
@@ -710,35 +708,35 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_LOG_DISK_SPACE_LIMIT_NAME
.toLocalizedString());
- m.put(LOCATORS_NAME,
+ m.put(LOCATORS,
LocalizedStrings.AbstractDistributionConfig_LOCATORS_NAME_0
.toLocalizedString(DEFAULT_LOCATORS));
-
- m.put(LOCATOR_WAIT_TIME_NAME,
+
+ m.put(LOCATOR_WAIT_TIME,
LocalizedStrings.AbstractDistributionConfig_LOCATOR_WAIT_TIME_NAME_0
.toLocalizedString(Integer.valueOf(DEFAULT_LOCATOR_WAIT_TIME)));
- m.put(TCP_PORT_NAME,
+ m.put(TCP_PORT,
LocalizedStrings.AbstractDistributionConfig_TCP_PORT_NAME_0_1_2
.toLocalizedString( new Object[] {
Integer.valueOf(DEFAULT_TCP_PORT),
Integer.valueOf(MIN_TCP_PORT),
Integer.valueOf(MAX_TCP_PORT)}));
- m.put(MCAST_PORT_NAME,
+ m.put(MCAST_PORT,
LocalizedStrings.AbstractDistributionConfig_MCAST_PORT_NAME_0_1_2
.toLocalizedString(new Object[] {
Integer.valueOf(DEFAULT_MCAST_PORT),
Integer.valueOf(MIN_MCAST_PORT),
Integer.valueOf(MAX_MCAST_PORT)}));
- m.put(MCAST_ADDRESS_NAME,
+ m.put(MCAST_ADDRESS,
LocalizedStrings.AbstractDistributionConfig_MCAST_ADDRESS_NAME_0_1
.toLocalizedString(new Object[] {
Integer.valueOf(DEFAULT_MCAST_PORT),
DEFAULT_MCAST_ADDRESS}));
- m.put(MCAST_TTL_NAME,
+ m.put(MCAST_TTL,
LocalizedStrings.AbstractDistributionConfig_MCAST_TTL_NAME_0_1_2
.toLocalizedString(new Object[] {
Integer.valueOf(DEFAULT_MCAST_TTL),
@@ -803,15 +801,15 @@ public abstract class AbstractDistributionConfig
LocalizedStrings.AbstractDistributionConfig_ROLES_NAME_0
.toLocalizedString(DEFAULT_ROLES));
- m.put(BIND_ADDRESS_NAME,
+ m.put(BIND_ADDRESS,
LocalizedStrings.AbstractDistributionConfig_BIND_ADDRESS_NAME_0
.toLocalizedString(DEFAULT_BIND_ADDRESS));
- m.put(SERVER_BIND_ADDRESS_NAME,
+ m.put(SERVER_BIND_ADDRESS,
LocalizedStrings.AbstractDistributionConfig_SERVER_BIND_ADDRESS_NAME_0
.toLocalizedString(DEFAULT_BIND_ADDRESS));
- m.put(NAME_NAME, "A name that uniquely identifies a member in its distributed system." +
+ m.put(SystemConfigurationProperties.NAME, "A name that uniquely identifies a member in its distributed system." +
" Multiple members in the same distributed system can not have the same name." +
" Defaults to \"\".");
@@ -904,9 +902,9 @@ public abstract class AbstractDistributionConfig
.toLocalizedString( new Object[] {
Integer.valueOf(DEFAULT_ASYNC_MAX_QUEUE_SIZE),
Integer.valueOf(MIN_ASYNC_MAX_QUEUE_SIZE),
- Integer.valueOf(MAX_ASYNC_MAX_QUEUE_SIZE)}));
+ Integer.valueOf(MAX_ASYNC_MAX_QUEUE_SIZE) }));
- m.put(START_LOCATOR_NAME,
+ m.put(START_LOCATOR,
LocalizedStrings.AbstractDistributionConfig_START_LOCATOR_NAME
.toLocalizedString());
@@ -1148,7 +1146,7 @@ public abstract class AbstractDistributionConfig
return dcAttDescriptions;
}
- static final InetAddress _getDefaultMcastAddress() {
+ public static final InetAddress _getDefaultMcastAddress() {
String ipLiteral;
if ( SocketCreator.preferIPv6Addresses() ) {
ipLiteral = "FF38::1234"; // fix for bug 30014
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DSClock.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DSClock.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DSClock.java
index ff92d55..d13610a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DSClock.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DSClock.java
@@ -16,11 +16,6 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.util.Date;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.internal.SystemTimer;
import com.gemstone.gemfire.internal.SystemTimer.SystemTimerTask;
@@ -29,6 +24,10 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.DateFormatter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.util.Date;
+import java.util.concurrent.atomic.AtomicLong;
/**
* DSClock tracks the system time. The most useful method is
@@ -115,7 +114,7 @@ public class DSClock {
* @since GemFire 8.0
*/
public void setCacheTimeOffset(DistributedMember coord, long offset, boolean isJoin) {
- if (Boolean.getBoolean("gemfire.disable-distributed-clock")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disable-distributed-clock")) {
return;
}
if (isLoner) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisor.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisor.java
index 08cf39d..cefe9da 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionAdvisor.java
@@ -17,23 +17,6 @@
package com.gemstone.gemfire.distributed.internal;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -47,11 +30,19 @@ import com.gemstone.gemfire.internal.cache.UpdateAttributesProcessor;
import com.gemstone.gemfire.internal.cache.persistence.PersistentMemberID;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.internal.util.ArrayUtils;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Provides advice on sending distribution messages. For a given operation,
@@ -83,13 +74,13 @@ public class DistributionAdvisor {
* profileVersionSequencer.
*/
public static final int START_VERSION_NUMBER = Integer.getInteger(
- "gemfire.DistributionAdvisor.startVersionNumber", 1).intValue();
+ DistributionConfig.GEMFIRE_PREFIX + "DistributionAdvisor.startVersionNumber", 1).intValue();
/**
* Specifies the starting serial number for the serialNumberSequencer.
*/
public static final int START_SERIAL_NUMBER = Integer.getInteger(
- "gemfire.Cache.startSerialNumber",
+ DistributionConfig.GEMFIRE_PREFIX + "Cache.startSerialNumber",
1 // Integer.MAX_VALUE-10
).intValue();
@@ -109,7 +100,7 @@ public class DistributionAdvisor {
* if a rollover has occurred.
*/
public static final int ROLLOVER_THRESHOLD = Integer.getInteger(
- "gemfire.CacheDistributionAdvisor.rolloverThreshold",
+ DistributionConfig.GEMFIRE_PREFIX + "CacheDistributionAdvisor.rolloverThreshold",
1000).intValue();
/**
[31/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
index 40821c2..3855adc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionDataStore.java
@@ -16,50 +16,10 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.locks.Lock;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheRuntimeException;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryExistsException;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.InterestRegistrationEvent;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionException;
import com.gemstone.gemfire.cache.execute.ResultSender;
@@ -70,8 +30,10 @@ import com.gemstone.gemfire.cache.query.internal.index.IndexCreationData;
import com.gemstone.gemfire.cache.query.internal.index.PartitionedIndex;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.i18n.StringId;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.BucketRegion.RawValue;
import com.gemstone.gemfire.internal.cache.LocalRegion.RegionPerfStats;
@@ -81,13 +43,7 @@ import com.gemstone.gemfire.internal.cache.execute.BucketMovedException;
import com.gemstone.gemfire.internal.cache.execute.FunctionStats;
import com.gemstone.gemfire.internal.cache.execute.PartitionedRegionFunctionResultSender;
import com.gemstone.gemfire.internal.cache.execute.RegionFunctionContextImpl;
-import com.gemstone.gemfire.internal.cache.partitioned.Bucket;
-import com.gemstone.gemfire.internal.cache.partitioned.PRLocallyDestroyedException;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionFunctionStreamingMessage;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserver;
-import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverHolder;
-import com.gemstone.gemfire.internal.cache.partitioned.RedundancyAlreadyMetException;
-import com.gemstone.gemfire.internal.cache.partitioned.RemoveBucketMessage;
+import com.gemstone.gemfire.internal.cache.partitioned.*;
import com.gemstone.gemfire.internal.cache.partitioned.RemoveBucketMessage.RemoveBucketResponse;
import com.gemstone.gemfire.internal.cache.persistence.BackupManager;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
@@ -102,7 +58,16 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantReadWriteLock;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantReadWriteLock.StoppableReadLock;
import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantReadWriteLock.StoppableWriteLock;
-import com.gemstone.gemfire.i18n.StringId;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.locks.Lock;
/**
* Implementation of DataStore (DS) for a PartitionedRegion (PR). This will be
@@ -177,7 +142,7 @@ public class PartitionedRegionDataStore implements HasCachePerfStats
* Update an entry's last access time if a client is interested in the entry.
*/
private static final boolean UPDATE_ACCESS_TIME_ON_INTEREST = Boolean
- .getBoolean("gemfire.updateAccessTimeOnClientInterest");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "updateAccessTimeOnClientInterest");
//Only for testing
@@ -745,8 +710,8 @@ public class PartitionedRegionDataStore implements HasCachePerfStats
factory.setCacheLoader(this.loader);
}
factory.setEnableAsyncConflation(true);
-
- if (Boolean.getBoolean("gemfire.PRDebug")) {
+
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
factory.addCacheListener(createDebugBucketListener());
}
@@ -806,7 +771,7 @@ public class PartitionedRegionDataStore implements HasCachePerfStats
LocalRegion rootRegion = PartitionedRegionHelper.getPRRoot(this.partitionedRegion.getCache());
BucketRegion bucketRegion = null;
- if (Boolean.getBoolean("gemfire.PRDebug")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
logger.info(LocalizedMessage.create(
LocalizedStrings.PartitionedRegionDataStore_CREATEBUCKETREGION_CREATING_BUCKETID_0_NAME_1,
new Object[] {this.partitionedRegion.bucketStringForLogs(bucketId), bucketRegionName}));
@@ -853,7 +818,7 @@ public class PartitionedRegionDataStore implements HasCachePerfStats
// Determine the size of the bucket (the Region in this case is mirrored,
// get initial image has populated the bucket, compute the size of the
// region)
- if (Boolean.getBoolean("gemfire.PRDebug")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
dumpBuckets();
dumpBucket(bucketId, bucketRegion);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelper.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelper.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelper.java
index 6ce783a..8fe8f45 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelper.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionHelper.java
@@ -17,35 +17,8 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryDestroyedException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.EntryOperation;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
-import com.gemstone.gemfire.cache.FixedPartitionResolver;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionExistsException;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.partition.PartitionNotAvailableException;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
@@ -53,6 +26,7 @@ import com.gemstone.gemfire.distributed.DistributedLockService;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.MembershipListener;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -63,6 +37,10 @@ import com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.util.*;
/**
*/
@@ -99,7 +77,7 @@ public class PartitionedRegionHelper
* modify shared meta-data and this property controls the delay before giving
* up trying to acquire a global lock
*/
- static final String VM_OWNERSHIP_WAIT_TIME_PROPERTY = "gemfire.VM_OWNERSHIP_WAIT_TIME";
+ static final String VM_OWNERSHIP_WAIT_TIME_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + "VM_OWNERSHIP_WAIT_TIME";
/** Wait forever for ownership */
static final long VM_OWNERSHIP_WAIT_TIME_DEFAULT = Long.MAX_VALUE;
@@ -248,7 +226,7 @@ public class PartitionedRegionHelper
factory.setScope(Scope.DISTRIBUTED_ACK);
factory.setDataPolicy(DataPolicy.REPLICATE);
factory.addCacheListener(new FixedPartitionAttributesListener());
- if (Boolean.getBoolean("gemfire.PRDebug")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
factory.addCacheListener( new CacheListenerAdapter() {
@Override
public void afterCreate(EntryEvent event)
@@ -932,7 +910,7 @@ public class PartitionedRegionHelper
* @param callingMethod methodName of the calling method.
*/
public static void logForDataLoss(PartitionedRegion partitionedRegion, int bucketId, String callingMethod) {
- if (! Boolean.getBoolean("gemfire.PRDebug")) {
+ if (!Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PRDebug")) {
return;
}
Region root = PartitionedRegionHelper.getPRRoot(partitionedRegion.getCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluator.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluator.java
index 5ca17a8..987d8a0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegionQueryEvaluator.java
@@ -16,60 +16,16 @@
*/
package com.gemstone.gemfire.internal.cache;
-import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
-import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.LinkedBlockingQueue;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CopyHelper;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryExecutionLowMemoryException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.internal.CompiledGroupBySelect;
-import com.gemstone.gemfire.cache.query.internal.CompiledSelect;
-import com.gemstone.gemfire.cache.query.internal.CompiledSortCriterion;
-import com.gemstone.gemfire.cache.query.internal.CompiledValue;
-import com.gemstone.gemfire.cache.query.internal.CumulativeNonDistinctResults;
-import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
-import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
-import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.internal.*;
import com.gemstone.gemfire.cache.query.internal.IndexTrackingQueryObserver.IndexInfo;
-import com.gemstone.gemfire.cache.query.internal.NWayMergeResults;
-import com.gemstone.gemfire.cache.query.internal.OrderByComparator;
-import com.gemstone.gemfire.cache.query.internal.PRQueryTraceInfo;
-import com.gemstone.gemfire.cache.query.internal.QueryExecutionContext;
-import com.gemstone.gemfire.cache.query.internal.QueryMonitor;
-import com.gemstone.gemfire.cache.query.internal.ResultsSet;
-import com.gemstone.gemfire.cache.query.internal.SortedResultsBag;
-import com.gemstone.gemfire.cache.query.internal.SortedStructBag;
-import com.gemstone.gemfire.cache.query.internal.StructSet;
import com.gemstone.gemfire.cache.query.internal.utils.PDXUtils;
import com.gemstone.gemfire.cache.query.types.ObjectType;
import com.gemstone.gemfire.cache.query.types.StructType;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.ReplyException;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.NanoTimer;
@@ -78,6 +34,12 @@ import com.gemstone.gemfire.internal.cache.partitioned.QueryMessage;
import com.gemstone.gemfire.internal.cache.partitioned.StreamingPartitionOperation;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import it.unimi.dsi.fastutil.ints.IntOpenHashSet;
+import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.*;
/**
* This class sends the query on various <code>PartitionedRegion</code> data
@@ -113,7 +75,8 @@ public class PartitionedRegionQueryEvaluator extends StreamingPartitionOperation
public interface TestHook {
public void hook(final int spot) throws RuntimeException;
}
- private static final int MAX_PR_QUERY_RETRIES = Integer.getInteger("gemfire.MAX_PR_QUERY_RETRIES", 10).intValue();
+
+ private static final int MAX_PR_QUERY_RETRIES = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "MAX_PR_QUERY_RETRIES", 10).intValue();
private final PartitionedRegion pr;
private volatile Map<InternalDistributedMember,List<Integer>> node2bucketIds;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolFactoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolFactoryImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolFactoryImpl.java
index 102d0ef..1b6ce7a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolFactoryImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolFactoryImpl.java
@@ -16,20 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-import java.util.StringTokenizer;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.CacheException;
@@ -40,12 +26,22 @@ import com.gemstone.gemfire.cache.client.internal.LocatorDiscoveryCallback;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.wan.GatewaySender;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.pdx.internal.TypeRegistry;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Properties;
/**
* Implementation of PoolFactory.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java
index 6a6ae3b..c59d098 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/PoolStats.java
@@ -16,14 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache;
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+
/**
* GemFire statistics about a Pool
*
@@ -37,7 +35,7 @@ public class PoolStats {
//////////////////// Statistic "Id" Fields ////////////////////
private static final String INITIAL_CONTACTS = "initialContactCount"; // gauge
- private static final String KNOWN_LOCATORS = "locators"; // gauge
+ private static final String KNOWN_LOCATORS = LOCATORS; // gauge
private static final String REQUESTS_TO_LOCATOR = "locatorRequests"; // counter
private static final String RESPONSES_FROM_LOCATOR = "locatorResponses"; // counter
private static final String ENDPOINTS_KNOWN = "servers"; // gauge
@@ -83,7 +81,7 @@ public class PoolStats {
_type = f.createType(statName, statName,
new StatisticDescriptor[] {
f.createIntGauge(INITIAL_CONTACTS, "Number of contacts initially by user", "contacts"),
- f.createIntGauge(KNOWN_LOCATORS, "Current number of locators discovered", "locators"),
+ f.createIntGauge(KNOWN_LOCATORS, "Current number of locators discovered", LOCATORS),
f.createIntGauge(ENDPOINTS_KNOWN, "Current number of servers discovered", "servers"),
f.createIntGauge(SUBSCRIPTION_SERVERS, "Number of servers hosting this clients subscriptions", "servers"),
f.createLongCounter(REQUESTS_TO_LOCATOR, "Number of requests from this connection pool to a locator", "requests"),
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEvictorTask.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEvictorTask.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEvictorTask.java
index 2c0115e..e47ae91 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEvictorTask.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/RegionEvictorTask.java
@@ -16,17 +16,17 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Iterator;
-import java.util.List;
-import java.util.concurrent.Callable;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.cache.RegionDestroyedException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.Callable;
/**
*
@@ -46,7 +46,7 @@ public class RegionEvictorTask implements Callable<Object> {
static {
EVICTION_BURST_PAUSE_TIME_MILLIS = Integer.getInteger(
- "gemfire.evictionBurstPauseTimeMillis", 1000);
+ DistributionConfig.GEMFIRE_PREFIX + "evictionBurstPauseTimeMillis", 1000);
}
private static volatile long lastTaskCompletionTime = 0;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
index 6642ec6..bd19104 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/SearchLoadAndWriteProcessor.java
@@ -18,53 +18,12 @@
package com.gemstone.gemfire.internal.cache;
/* enumerate each imported class because conflict with dl.u.c.TimeoutException */
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.locks.Lock;
-
-import org.apache.logging.log4j.Logger;
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.GemFireException;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.CacheEvent;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.ObjectSizer;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.HighPriorityDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.MembershipListener;
-import com.gemstone.gemfire.distributed.internal.PooledDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.ProcessorKeeper21;
-import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
-import com.gemstone.gemfire.distributed.internal.SerialDistributionMessage;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.InternalDataSerializer;
@@ -76,6 +35,16 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
import com.gemstone.gemfire.internal.offheap.annotations.Retained;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.util.*;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.locks.Lock;
/**
@@ -97,7 +66,7 @@ public class SearchLoadAndWriteProcessor implements MembershipListener {
public static final int SMALL_BLOB_SIZE =
Integer.getInteger("DistributionManager.OptimizedUpdateByteLimit", 2000).intValue();
- static final long RETRY_TIME = Long.getLong("gemfire.search-retry-interval", 2000).longValue();
+ static final long RETRY_TIME = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "search-retry-interval", 2000).longValue();
private InternalDistributedMember selectedNode;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
index ccc2fc4..f392f04 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXEntryState.java
@@ -17,36 +17,14 @@
package com.gemstone.gemfire.internal.cache;
-import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.TX_ENTRY_STATE;
-
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.CacheRuntimeException;
-import com.gemstone.gemfire.cache.CacheWriter;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryDestroyedException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.EntryNotFoundException;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TimeoutException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.DataSerializableFixedID;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.delta.Delta;
-import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
import com.gemstone.gemfire.internal.cache.versions.VersionTag;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.lang.StringUtils;
@@ -58,6 +36,16 @@ import com.gemstone.gemfire.internal.offheap.annotations.Released;
import com.gemstone.gemfire.internal.offheap.annotations.Retained;
import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
import com.gemstone.gemfire.pdx.PdxSerializationException;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+
+import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.TX_ENTRY_STATE;
/**
* TXEntryState is the entity that tracks transactional changes, except for
@@ -188,7 +176,7 @@ public class TXEntryState implements Releasable
* Benefits of read conflict detection are at:
* https://wiki.gemstone.com/display/PR/Read+conflict+detection
*/
- private static final boolean DETECT_READ_CONFLICTS = Boolean.getBoolean("gemfire.detectReadConflicts");
+ private static final boolean DETECT_READ_CONFLICTS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "detectReadConflicts");
// @todo darrel: optimize footprint by having this field on a subclass
// that is only created by TXRegionState when it knows its region needs refCounts.
@@ -246,7 +234,7 @@ public class TXEntryState implements Releasable
/**
* Use this system property if you need to display/log string values in conflict messages
*/
- private static final boolean VERBOSE_CONFLICT_STRING = Boolean.getBoolean("gemfire.verboseConflictString");
+ private static final boolean VERBOSE_CONFLICT_STRING = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "verboseConflictString");
/**
* This constructor is used to create a singleton used by LocalRegion to
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
index 49926e6..df0176d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TXManagerImpl.java
@@ -17,50 +17,13 @@
package com.gemstone.gemfire.internal.cache;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
-import java.util.concurrent.locks.LockSupport;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.GemFireException;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.TransactionDataRebalancedException;
-import com.gemstone.gemfire.cache.TransactionId;
-import com.gemstone.gemfire.cache.TransactionInDoubtException;
-import com.gemstone.gemfire.cache.TransactionListener;
-import com.gemstone.gemfire.cache.TransactionWriter;
-import com.gemstone.gemfire.cache.UnsupportedOperationInTransactionException;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.TXManagerCancelledException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.HighPriorityDistributionMessage;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.distributed.internal.MembershipListener;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.SystemTimer.SystemTimerTask;
import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
@@ -70,6 +33,20 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.util.concurrent.CustomEntryConcurrentHashMap;
import com.gemstone.gemfire.internal.util.concurrent.CustomEntryConcurrentHashMap.HashEntry;
import com.gemstone.gemfire.internal.util.concurrent.CustomEntryConcurrentHashMap.MapCallback;
+import org.apache.logging.log4j.Logger;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import java.util.concurrent.locks.LockSupport;
/** <p>The internal implementation of the {@link CacheTransactionManager}
* interface returned by {@link GemFireCacheImpl#getCacheTransactionManager}.
@@ -120,7 +97,7 @@ public class TXManagerImpl implements CacheTransactionManager,
/**
* the number of client initiated transactions to store for client failover
*/
- public final static int FAILOVER_TX_MAP_SIZE = Integer.getInteger("gemfire.transactionFailoverMapSize", 1000);
+ public final static int FAILOVER_TX_MAP_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "transactionFailoverMapSize", 1000);
/**
* used to store TXCommitMessages for client initiated transactions, so that when a client failsover,
@@ -142,7 +119,7 @@ public class TXManagerImpl implements CacheTransactionManager,
/**
* A flag to allow persistent transactions. public for testing.
*/
- public static boolean ALLOW_PERSISTENT_TRANSACTIONS = Boolean.getBoolean("gemfire.ALLOW_PERSISTENT_TRANSACTIONS");
+ public static boolean ALLOW_PERSISTENT_TRANSACTIONS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "ALLOW_PERSISTENT_TRANSACTIONS");
/**
* this keeps track of all the transactions that were initiated locally.
@@ -152,7 +129,7 @@ public class TXManagerImpl implements CacheTransactionManager,
/**
* the time in minutes after which any suspended transaction are rolled back. default is 30 minutes
*/
- private volatile long suspendedTXTimeout = Long.getLong("gemfire.suspendedTxTimeout", 30);
+ private volatile long suspendedTXTimeout = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "suspendedTxTimeout", 30);
/**
* Thread-specific flag to indicate whether the transactions managed by this
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TombstoneService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TombstoneService.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TombstoneService.java
index 44c5d58..7036d45 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TombstoneService.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/TombstoneService.java
@@ -16,37 +16,29 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.ConcurrentModificationException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.NoSuchElementException;
-import java.util.Queue;
-import java.util.Set;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicLong;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.util.ObjectSizer;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
-import com.gemstone.gemfire.internal.cache.control.ResourceListener;
-import com.gemstone.gemfire.internal.cache.versions.CompactVersionHolder;
-import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.internal.cache.versions.VersionTag;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
-import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
-import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.size.ReflectionSingleObjectSizer;
-import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
+import com.gemstone.gemfire.CancelException;
+import com.gemstone.gemfire.SystemFailure;
+import com.gemstone.gemfire.cache.util.ObjectSizer;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
+import com.gemstone.gemfire.internal.cache.control.ResourceListener;
+import com.gemstone.gemfire.internal.cache.versions.CompactVersionHolder;
+import com.gemstone.gemfire.internal.cache.versions.VersionSource;
+import com.gemstone.gemfire.internal.cache.versions.VersionTag;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
+import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import com.gemstone.gemfire.internal.size.ReflectionSingleObjectSizer;
+import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicLong;
/**
* Tombstones are region entries that have been destroyed but are held
@@ -58,8 +50,8 @@ import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
* and timing out tombstones.
*
*/
-public class TombstoneService implements ResourceListener<MemoryEvent> {
- private static final Logger logger = LogService.getLogger();
+public class TombstoneService implements ResourceListener<MemoryEvent> {
+ private static final Logger logger = LogService.getLogger();
/**
* The default tombstone expiration period, in milliseconds for replicated
@@ -71,7 +63,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
* The default is 600,000 milliseconds (10 minutes).
*/
public static long REPLICATED_TOMBSTONE_TIMEOUT = Long.getLong(
- "gemfire.tombstone-timeout", 600000L).longValue();
+ DistributionConfig.GEMFIRE_PREFIX + "tombstone-timeout", 600000L).longValue();
/**
* The default tombstone expiration period in millis for non-replicated
@@ -83,33 +75,34 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
* The default is 480,000 milliseconds (8 minutes)
*/
public static long CLIENT_TOMBSTONE_TIMEOUT = Long.getLong(
- "gemfire.non-replicated-tombstone-timeout", 480000);
+ DistributionConfig.GEMFIRE_PREFIX + "non-replicated-tombstone-timeout", 480000);
/**
* The max number of tombstones in an expired batch. This covers
* all replicated regions, including PR buckets. The default is
* 100,000 expired tombstones.
*/
- public static long EXPIRED_TOMBSTONE_LIMIT = Long.getLong("gemfire.tombstone-gc-threshold", 100000);
+ public static long EXPIRED_TOMBSTONE_LIMIT = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "tombstone-gc-threshold", 100000);
/**
* The interval to scan for expired tombstones in the queues
*/
- public static long DEFUNCT_TOMBSTONE_SCAN_INTERVAL = Long.getLong("gemfire.tombstone-scan-interval", 60000);
+ public static long DEFUNCT_TOMBSTONE_SCAN_INTERVAL = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "tombstone-scan-interval", 60000);
/**
* The threshold percentage of free max memory that will trigger tombstone GCs.
* The default percentage is somewhat less than the LRU Heap evictor so that
* we evict tombstones before we start evicting cache data.
*/
- public static double GC_MEMORY_THRESHOLD = Integer.getInteger("gemfire.tombstone-gc-memory-threshold",
+ public static double GC_MEMORY_THRESHOLD = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "tombstone-gc-memory-threshold",
30 /*100-HeapLRUCapacityController.DEFAULT_HEAP_PERCENTAGE*/) * 0.01;
/** this is a test hook for causing the tombstone service to act as though free memory is low */
public static boolean FORCE_GC_MEMORY_EVENTS = false;
public final static Object debugSync = new Object();
- public final static boolean DEBUG_TOMBSTONE_COUNT = Boolean.getBoolean("gemfire.TombstoneService.DEBUG_TOMBSTONE_COUNT"); // TODO:LOG:replace TombstoneService.DEBUG_TOMBSTONE_COUNT
+ public final static boolean DEBUG_TOMBSTONE_COUNT = Boolean
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "TombstoneService.DEBUG_TOMBSTONE_COUNT"); // TODO:LOG:replace TombstoneService.DEBUG_TOMBSTONE_COUNT
public static boolean IDLE_EXPIRATION = false; // dunit test hook for forced batch expiration
@@ -274,8 +267,8 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
int count = getGCBlockCount();
if (count > 0) {
// if any delta GII is on going as provider at this member, not to do tombstone GC
- if (logger.isDebugEnabled()) {
- logger.debug("gcTombstones skipped due to {} Delta GII on going", count);
+ if (logger.isDebugEnabled()) {
+ logger.debug("gcTombstones skipped due to {} Delta GII on going", count);
}
return null;
}
@@ -285,8 +278,8 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
Tombstone currentTombstone;
StoppableReentrantLock lock = null;
boolean locked = false;
- if (logger.isDebugEnabled()) {
- logger.debug("gcTombstones invoked for region {} and version map {}", r, regionGCVersions);
+ if (logger.isDebugEnabled()) {
+ logger.debug("gcTombstones invoked for region {} and version map {}", r, regionGCVersions);
}
Set<Tombstone> removals = new HashSet<Tombstone>();
VersionSource myId = r.getVersionMember();
@@ -308,23 +301,23 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
currentTombstone = this.replicatedTombstoneSweeper.currentTombstone;
}
if (currentTombstone != null && currentTombstone.region == r) {
- VersionSource destroyingMember = currentTombstone.getMemberID();
+ VersionSource destroyingMember = currentTombstone.getMemberID();
if (destroyingMember == null) {
destroyingMember = myId;
}
Long maxReclaimedRV = regionGCVersions.get(destroyingMember);
- if (maxReclaimedRV != null && currentTombstone.getRegionVersion() <= maxReclaimedRV.longValue()) {
+ if (maxReclaimedRV != null && currentTombstone.getRegionVersion() <= maxReclaimedRV.longValue()) {
removals.add(currentTombstone);
}
}
for (Tombstone t: queue) {
if (t.region == r) {
- VersionSource destroyingMember = t.getMemberID();
+ VersionSource destroyingMember = t.getMemberID();
if (destroyingMember == null) {
destroyingMember = myId;
}
Long maxReclaimedRV = regionGCVersions.get(destroyingMember);
- if (maxReclaimedRV != null && t.getRegionVersion() <= maxReclaimedRV.longValue()) {
+ if (maxReclaimedRV != null && t.getRegionVersion() <= maxReclaimedRV.longValue()) {
removals.add(t);
removalSize += t.getSize();
}
@@ -362,7 +355,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
Set<Object> removedKeys = new HashSet();
for (Tombstone t: removals) {
- if (t.region.getRegionMap().removeTombstone(t.entry, t, false, true) && isBucket) {
+ if (t.region.getRegionMap().removeTombstone(t.entry, t, false, true) && isBucket) {
removedKeys.add(t.entry.getKey());
}
}
@@ -388,11 +381,11 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
Tombstone currentTombstone = this.nonReplicatedTombstoneSweeper.currentTombstone;
long removalSize = 0;
VersionSource myId = r.getVersionMember();
- if (logger.isDebugEnabled()) {
- logger.debug("gcTombstones invoked for region {} and keys {}", r, tombstoneKeys);
+ if (logger.isDebugEnabled()) {
+ logger.debug("gcTombstones invoked for region {} and keys {}", r, tombstoneKeys);
}
if (currentTombstone != null && currentTombstone.region == r) {
- VersionSource destroyingMember = currentTombstone.getMemberID();
+ VersionSource destroyingMember = currentTombstone.getMemberID();
if (destroyingMember == null) {
destroyingMember = myId;
}
@@ -402,7 +395,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
}
for (Tombstone t: queue) {
if (t.region == r) {
- VersionSource destroyingMember = t.getMemberID();
+ VersionSource destroyingMember = t.getMemberID();
if (destroyingMember == null) {
destroyingMember = myId;
}
@@ -424,7 +417,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
//TODO - RVV - to support persistent client regions
//we need to actually record this as a destroy on disk, because
//the GCC RVV doesn't make sense on the client.
- t.region.getRegionMap().removeTombstone(t.entry, t, false, true);
+ t.region.getRegionMap().removeTombstone(t.entry, t, false, true);
}
}
@@ -466,13 +459,13 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
int entryVersion = entryTag.getEntryVersion();
for (Tombstone t: queue) {
if (t.region == r) {
- VersionSource destroyingMember = t.getMemberID();
+ VersionSource destroyingMember = t.getMemberID();
if (destroyingMember == null) {
destroyingMember = myId;
}
if (t.region == r
&& t.entry.getKey().equals(re.getKey())
- && t.getEntryVersion() == entryVersion) {
+ && t.getEntryVersion() == entryVersion) {
return true;
}
}
@@ -490,19 +483,19 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
+ (this.replicatedTombstoneSweeper.expiredTombstones != null?
" expired batch size = " + this.replicatedTombstoneSweeper.expiredTombstones.size() : "");
}
- private static class Tombstone extends CompactVersionHolder {
- // tombstone overhead size
+ private static class Tombstone extends CompactVersionHolder {
+ // tombstone overhead size
public static int PER_TOMBSTONE_OVERHEAD = ReflectionSingleObjectSizer.REFERENCE_SIZE // queue's reference to the tombstone
- + ReflectionSingleObjectSizer.REFERENCE_SIZE * 3 // entry, region, member ID
- + ReflectionSingleObjectSizer.REFERENCE_SIZE // region entry value (Token.TOMBSTONE)
- + 18; // version numbers and timestamp
+ + ReflectionSingleObjectSizer.REFERENCE_SIZE * 3 // entry, region, member ID
+ + ReflectionSingleObjectSizer.REFERENCE_SIZE // region entry value (Token.TOMBSTONE)
+ + 18; // version numbers and timestamp
RegionEntry entry;
LocalRegion region;
-
+
Tombstone(RegionEntry entry, LocalRegion region, VersionTag destroyedVersion) {
- super(destroyedVersion);
+ super(destroyedVersion);
this.entry = entry;
this.region = region;
}
@@ -514,10 +507,10 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
@Override
public String toString() {
- String v = super.toString();
+ String v = super.toString();
StringBuilder sb = new StringBuilder();
sb.append("(").append(entry.getKey()).append("; ")
- .append(region.getName()).append("; ").append(v)
+ .append(region.getName()).append("; ").append(v)
.append(")");
return sb.toString();
}
@@ -652,7 +645,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
for (Tombstone t: this.expiredTombstones) {
if (t.region == r
&& t.entry.getKey().equals(re.getKey())
- && t.getEntryVersion() == entryVersion) {
+ && t.getEntryVersion() == entryVersion) {
return true;
}
}
@@ -677,8 +670,8 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
int count = cache.getTombstoneService().getGCBlockCount();
if (count > 0) {
// if any delta GII is on going as provider at this member, not to do tombstone GC
- if (logger.isDebugEnabled()) {
- logger.debug("expireBatch skipped due to {} Delta GII on going", count);
+ if (logger.isDebugEnabled()) {
+ logger.debug("expireBatch skipped due to {} Delta GII on going", count);
}
return;
}
@@ -698,7 +691,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
//We need to do this so that we can persist the GC RVV before
//we start removing entries from the map.
for (Tombstone t: expired) {
- t.region.getVersionVector().recordGCVersion(t.getMemberID(), t.getRegionVersion());
+ t.region.getVersionVector().recordGCVersion(t.getMemberID(), t.getRegionVersion());
regionsAffected.add((DistributedRegion)t.region);
}
@@ -721,7 +714,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
for (Tombstone t: expired) {
// for PR buckets we have to keep track of the keys removed because clients have
// them all lumped in a single non-PR region
- if (t.region.getRegionMap().removeTombstone(t.entry, t, false, true) && t.region.isUsedForPartitionedRegionBucket()) {
+ if (t.region.getRegionMap().removeTombstone(t.entry, t, false, true) && t.region.isUsedForPartitionedRegionBucket()) {
Set<Object> keys = reapedKeys.get(t.region);
if (keys == null) {
keys = new HashSet<Object>();
@@ -769,8 +762,8 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
public void run() {
long minimumRetentionMs = this.expiryTime / 10; // forceExpiration will not work on something younger than this
long maximumSleepTime = 10000;
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "Destroyed entries sweeper starting with default sleep interval={}", this.expiryTime);
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "Destroyed entries sweeper starting with default sleep interval={}", this.expiryTime);
}
currentTombstone = null;
// millis we need to run a scan of queue and batch set for resurrected tombstones
@@ -807,8 +800,8 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
forceBatchExpiration = !this.batchExpirationInProgress &&
this.expiredTombstones.size() > (EXPIRED_TOMBSTONE_LIMIT / 4);
if (forceBatchExpiration) {
- if (logger.isDebugEnabled()) {
- logger.debug("forcing batch expiration due to low memory conditions");
+ if (logger.isDebugEnabled()) {
+ logger.debug("forcing batch expiration due to low memory conditions");
}
}
// forcing expiration of tombstones that have not timed out can cause inconsistencies
@@ -830,13 +823,13 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
} finally {
currentTombstoneLock.unlock();
}
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "current tombstone is {}", currentTombstone);
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "current tombstone is {}", currentTombstone);
}
} catch (NoSuchElementException e) {
// expected
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "queue is empty - will sleep");
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "queue is empty - will sleep");
}
forceExpirationCount = 0;
}
@@ -844,8 +837,8 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
long sleepTime;
if (currentTombstone == null) {
sleepTime = expiryTime;
- } else if (currentTombstone.getVersionTimeStamp()+expiryTime > now && (forceExpirationCount <= 0 || (currentTombstone.getVersionTimeStamp() + expiryTime - now) <= minimumRetentionMs)) {
- sleepTime = currentTombstone.getVersionTimeStamp()+expiryTime - now;
+ } else if (currentTombstone.getVersionTimeStamp()+expiryTime > now && (forceExpirationCount <= 0 || (currentTombstone.getVersionTimeStamp() + expiryTime - now) <= minimumRetentionMs)) {
+ sleepTime = currentTombstone.getVersionTimeStamp()+expiryTime - now;
} else {
if (forceExpirationCount > 0) {
forceExpirationCount--;
@@ -853,16 +846,16 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
sleepTime = 0;
try {
if (batchMode) {
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "expiring tombstone {}", currentTombstone);
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "expiring tombstone {}", currentTombstone);
}
expiredTombstones.add(currentTombstone);
} else {
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "removing expired tombstone {}", currentTombstone);
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "removing expired tombstone {}", currentTombstone);
}
queueSize.addAndGet(-currentTombstone.getSize());
- currentTombstone.region.getRegionMap().removeTombstone(currentTombstone.entry, currentTombstone, false, true);
+ currentTombstone.region.getRegionMap().removeTombstone(currentTombstone.entry, currentTombstone, false, true);
}
currentTombstoneLock.lock();
try {
@@ -893,7 +886,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
for (Iterator<Tombstone> it = tombstones.iterator(); it.hasNext(); ) {
Tombstone test = it.next();
if (it.hasNext()) {
- if (test.region.getRegionMap().isTombstoneNotNeeded(test.entry, test.getEntryVersion())) {
+ if (test.region.getRegionMap().isTombstoneNotNeeded(test.entry, test.getEntryVersion())) {
it.remove();
this.queueSize.addAndGet(-test.getSize());
if (test == currentTombstone) {
@@ -905,11 +898,11 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
}
sleepTime = 0;
}
- } else if (batchMode && test != currentTombstone && (test.getVersionTimeStamp()+expiryTime) <= now) {
+ } else if (batchMode && test != currentTombstone && (test.getVersionTimeStamp()+expiryTime) <= now) {
it.remove();
this.queueSize.addAndGet(-test.getSize());
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "expiring tombstone {}", currentTombstone);
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "expiring tombstone {}", currentTombstone);
}
expiredTombstones.add(test);
sleepTime = 0;
@@ -920,9 +913,9 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
if (batchMode) {
for (Iterator<Tombstone> it = expiredTombstones.iterator(); it.hasNext(); ) {
Tombstone test = it.next();
- if (test.region.getRegionMap().isTombstoneNotNeeded(test.entry, test.getEntryVersion())) {
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "removing obsolete tombstone: {}", test);
+ if (test.region.getRegionMap().isTombstoneNotNeeded(test.entry, test.getEntryVersion())) {
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "removing obsolete tombstone: {}", test);
}
it.remove();
this.queueSize.addAndGet(-test.getSize());
@@ -957,8 +950,8 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
if (sleepTime > 0) {
try {
sleepTime = Math.min(sleepTime, maximumSleepTime);
- if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
- logger.trace(LogMarker.TOMBSTONE, "sleeping for {}", sleepTime);
+ if (logger.isTraceEnabled(LogMarker.TOMBSTONE)) {
+ logger.trace(LogMarker.TOMBSTONE, "sleeping for {}", sleepTime);
}
synchronized(this) {
if(isStopped) {
@@ -996,7 +989,7 @@ public class TombstoneService implements ResourceListener<MemoryEvent> {
@Override
public void onEvent(MemoryEvent event) {
if (event.isLocal()) {
- if (event.getState().isEviction() && !event.getPreviousState().isEviction()) {
+ if (event.getState().isEviction() && !event.getPreviousState().isEviction()) {
this.replicatedTombstoneSweeper.forceBatchExpiration();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
index 3de03e2..90a26cb 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/HeapMemoryMonitor.java
@@ -16,29 +16,11 @@
*/
package com.gemstone.gemfire.internal.cache.control;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryMXBean;
-import java.lang.management.MemoryPoolMXBean;
-import java.lang.management.MemoryType;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Executors;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-
-import javax.management.ListenerNotFoundException;
-import javax.management.Notification;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationListener;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.query.internal.QueryMonitor;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.GemFireStatSampler;
import com.gemstone.gemfire.internal.LocalStatListener;
@@ -52,6 +34,19 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import javax.management.ListenerNotFoundException;
+import javax.management.Notification;
+import javax.management.NotificationEmitter;
+import javax.management.NotificationListener;
+import java.lang.management.ManagementFactory;
+import java.lang.management.MemoryMXBean;
+import java.lang.management.MemoryPoolMXBean;
+import java.lang.management.MemoryType;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.*;
/**
* Allows for the setting of eviction and critical thresholds. These thresholds
@@ -67,10 +62,10 @@ public class HeapMemoryMonitor implements NotificationListener, ResourceMonitor
private static final Logger logger = LogService.getLogger();
// Allow for an unknown heap pool for VMs we may support in the future.
- private static final String HEAP_POOL = System.getProperty("gemfire.ResourceManager.HEAP_POOL");
+ private static final String HEAP_POOL = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "ResourceManager.HEAP_POOL");
// Property for setting the JVM polling interval (below)
- public static final String POLLER_INTERVAL_PROP = "gemfire.heapPollerInterval";
+ public static final String POLLER_INTERVAL_PROP = DistributionConfig.GEMFIRE_PREFIX + "heapPollerInterval";
// Internal for polling the JVM for changes in heap memory usage.
private static final int POLLER_INTERVAL = Integer.getInteger(POLLER_INTERVAL_PROP, 500).intValue();
@@ -82,29 +77,6 @@ public class HeapMemoryMonitor implements NotificationListener, ResourceMonitor
// Listener for heap memory usage as reported by the Cache stats.
private final LocalStatListener statListener = new LocalHeapStatListener();
-
- private volatile MemoryThresholds thresholds = new MemoryThresholds(tenuredPoolMaxMemory);
- private volatile MemoryEvent mostRecentEvent = new MemoryEvent(ResourceType.HEAP_MEMORY, MemoryState.DISABLED,
- MemoryState.DISABLED, null, 0L, true, this.thresholds);
- private volatile MemoryState currentState = MemoryState.DISABLED;
-
- //Set when startMonitoring() and stopMonitoring() are called
- private Boolean started = false;
-
- // Set to true when setEvictionThreshold(...) is called.
- private boolean hasEvictionThreshold = false;
-
- // Only change state when these counters exceed {@link HeapMemoryMonitor#memoryStateChangeTolerance}
- private int criticalToleranceCounter;
- private int evictionToleranceCounter;
-
- private final InternalResourceManager resourceManager;
- private final ResourceAdvisor resourceAdvisor;
- private final GemFireCacheImpl cache;
- private final ResourceManagerStats stats;
-
- private static boolean testDisableMemoryUpdates = false;
- private static long testBytesUsedForThresholdSet = -1;
/*
* Number of eviction or critical state changes that have to occur before the
@@ -115,9 +87,9 @@ public class HeapMemoryMonitor implements NotificationListener, ResourceMonitor
static {
String vendor = System.getProperty("java.vendor");
if (vendor.contains("Sun") || vendor.contains("Oracle")) {
- memoryStateChangeTolerance = Integer.getInteger("gemfire.memoryEventTolerance",1);
+ memoryStateChangeTolerance = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "memoryEventTolerance", 1);
} else {
- memoryStateChangeTolerance = Integer.getInteger("gemfire.memoryEventTolerance",5);
+ memoryStateChangeTolerance = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "memoryEventTolerance", 5);
}
}
@@ -131,36 +103,63 @@ public class HeapMemoryMonitor implements NotificationListener, ResourceMonitor
break;
}
}
-
+
tenuredMemoryPoolMXBean = matchingMemoryPoolMXBean;
if (tenuredMemoryPoolMXBean == null) {
logger.error(LocalizedMessage.create(LocalizedStrings.HeapMemoryMonitor_NO_POOL_FOUND_POOLS_0, getAllMemoryPoolNames()));
}
}
-
- // Calculated value for the amount of JVM tenured heap memory available.
- private static final long tenuredPoolMaxMemory;
+ // Calculated value for the amount of JVM tenured heap memory available.
+ private static final long tenuredPoolMaxMemory;
/*
* Calculates the max memory for the tenured pool. Works around JDK bug:
* http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7078465 by getting max
* memory from runtime and subtracting all other heap pools from it.
*/
- static {
- if (tenuredMemoryPoolMXBean != null && tenuredMemoryPoolMXBean.getUsage().getMax() != -1) {
- tenuredPoolMaxMemory = tenuredMemoryPoolMXBean.getUsage().getMax();
- } else {
- long calculatedMaxMemory = Runtime.getRuntime().maxMemory();
- List<MemoryPoolMXBean> pools = ManagementFactory.getMemoryPoolMXBeans();
- for (MemoryPoolMXBean p : pools) {
- if (p.getType() == MemoryType.HEAP && p.getUsage().getMax() != -1) {
- calculatedMaxMemory -= p.getUsage().getMax();
- }
- }
- tenuredPoolMaxMemory = calculatedMaxMemory;
- }
- }
+ static {
+ if (tenuredMemoryPoolMXBean != null && tenuredMemoryPoolMXBean.getUsage().getMax() != -1) {
+ tenuredPoolMaxMemory = tenuredMemoryPoolMXBean.getUsage().getMax();
+ } else {
+ long calculatedMaxMemory = Runtime.getRuntime().maxMemory();
+ List<MemoryPoolMXBean> pools = ManagementFactory.getMemoryPoolMXBeans();
+ for (MemoryPoolMXBean p : pools) {
+ if (p.getType() == MemoryType.HEAP && p.getUsage().getMax() != -1) {
+ calculatedMaxMemory -= p.getUsage().getMax();
+ }
+ }
+ tenuredPoolMaxMemory = calculatedMaxMemory;
+ }
+ }
+
+ private volatile MemoryThresholds thresholds = new MemoryThresholds(tenuredPoolMaxMemory);
+ private volatile MemoryEvent mostRecentEvent = new MemoryEvent(ResourceType.HEAP_MEMORY, MemoryState.DISABLED,
+ MemoryState.DISABLED, null, 0L, true, this.thresholds);
+ private volatile MemoryState currentState = MemoryState.DISABLED;
+
+ //Set when startMonitoring() and stopMonitoring() are called
+ private Boolean started = false;
+
+ // Set to true when setEvictionThreshold(...) is called.
+ private boolean hasEvictionThreshold = false;
+
+ // Only change state when these counters exceed {@link HeapMemoryMonitor#memoryStateChangeTolerance}
+ private int criticalToleranceCounter;
+ private int evictionToleranceCounter;
+
+ private final InternalResourceManager resourceManager;
+ private final ResourceAdvisor resourceAdvisor;
+ private final GemFireCacheImpl cache;
+ private final ResourceManagerStats stats;
+
+ private static boolean testDisableMemoryUpdates = false;
+ private static long testBytesUsedForThresholdSet = -1;
+
+
+
+
+
/**
* Determines if the name of the memory pool MXBean provided matches a list of
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
index 9d242aa..4547d4a 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
@@ -16,23 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.control;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.CopyOnWriteArraySet;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ScheduledThreadPoolExecutor;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.cache.Cache;
@@ -42,6 +25,7 @@ import com.gemstone.gemfire.cache.control.RebalanceOperation;
import com.gemstone.gemfire.cache.control.ResourceManager;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.OverflowQueueWithDMStats;
import com.gemstone.gemfire.distributed.internal.SerialQueuedExecutorWithDMStats;
import com.gemstone.gemfire.internal.ClassPathLoader;
@@ -54,6 +38,11 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Implementation of ResourceManager with additional internal-only methods.
@@ -63,7 +52,7 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
public class InternalResourceManager implements ResourceManager {
private static final Logger logger = LogService.getLogger();
- final int MAX_RESOURCE_MANAGER_EXE_THREADS = Integer.getInteger("gemfire.resource.manager.threads", 1);
+ final int MAX_RESOURCE_MANAGER_EXE_THREADS = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "resource.manager.threads", 1);
public enum ResourceType {
HEAP_MEMORY(0x1), OFFHEAP_MEMORY(0x2), MEMORY(0x3), ALL(0xFFFFFFFF);
@@ -96,7 +85,7 @@ public class InternalResourceManager implements ResourceManager {
private static ResourceObserver observer = new ResourceObserverAdapter();
private static String PR_LOAD_PROBE_CLASS = System.getProperty(
- "gemfire.ResourceManager.PR_LOAD_PROBE_CLASS", SizedBasedLoadProbe.class
+ DistributionConfig.GEMFIRE_PREFIX + "ResourceManager.PR_LOAD_PROBE_CLASS", SizedBasedLoadProbe.class
.getName());
public static InternalResourceManager getInternalResourceManager(Cache cache) {
@@ -350,7 +339,7 @@ public class InternalResourceManager implements ResourceManager {
return;
}
executor.shutdown();
- final int secToWait = Integer.getInteger("gemfire.prrecovery-close-timeout", 120).intValue();
+ final int secToWait = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "prrecovery-close-timeout", 120).intValue();
try {
executor.awaitTermination(secToWait, TimeUnit.SECONDS);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholds.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholds.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholds.java
index 75ce637..3da07f7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholds.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/MemoryThresholds.java
@@ -16,15 +16,16 @@
*/
package com.gemstone.gemfire.internal.cache.control;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.LowMemoryException;
import com.gemstone.gemfire.cache.control.ResourceManager;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
/**
* Stores eviction and critical thresholds for memory as well as the logic for
* determining how memory transitions between states.
@@ -77,7 +78,7 @@ public class MemoryThresholds {
* When this property is set to true, a {@link LowMemoryException} is not
* thrown, even when usage crosses the critical threshold.
*/
- private static final boolean DISABLE_LOW_MEM_EXCEPTION = Boolean.getBoolean("gemfire.disableLowMemoryException");
+ private static final boolean DISABLE_LOW_MEM_EXCEPTION = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "disableLowMemoryException");
/**
* The default percent of memory at which the VM is considered in a
@@ -98,7 +99,7 @@ public class MemoryThresholds {
* Memory usage must fall below THRESHOLD-THRESHOLD_THICKNESS before we deliver
* a down event
*/
- private static final double THRESHOLD_THICKNESS = Double.parseDouble(System.getProperty("gemfire.thresholdThickness",
+ private static final double THRESHOLD_THICKNESS = Double.parseDouble(System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "thresholdThickness",
"2.00"));
/**
@@ -106,7 +107,7 @@ public class MemoryThresholds {
* deliver an eviction down event
*/
private static final double THRESHOLD_THICKNESS_EVICT = Double.parseDouble(System.getProperty(
- "gemfire.eviction-thresholdThickness", Double.toString(THRESHOLD_THICKNESS)));
+ DistributionConfig.GEMFIRE_PREFIX + "eviction-thresholdThickness", Double.toString(THRESHOLD_THICKNESS)));
private final long maxMemoryBytes;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationImpl.java
index 789c07b..9ff95fc 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationImpl.java
@@ -17,22 +17,6 @@
package com.gemstone.gemfire.internal.cache.control;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.CancellationException;
-import java.util.concurrent.ExecutionException;
-import java.util.concurrent.Future;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.TimeoutException;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.GemFireException;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.SystemFailure;
@@ -40,11 +24,19 @@ import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.control.RebalanceOperation;
import com.gemstone.gemfire.cache.control.RebalanceResults;
import com.gemstone.gemfire.cache.partition.PartitionRebalanceInfo;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionRebalanceOp;
import com.gemstone.gemfire.internal.cache.partitioned.rebalance.CompositeDirector;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.*;
+import java.util.concurrent.atomic.AtomicBoolean;
/**
* Implements <code>RebalanceOperation</code> for rebalancing Cache resources.
@@ -92,7 +84,7 @@ public class RebalanceOperationImpl implements RebalanceOperation {
if (region.getColocatedWith() == null && filter.include(region)) {
if (region.isFixedPartitionedRegion()) {
- if (Boolean.getBoolean("gemfire.DISABLE_MOVE_PRIMARIES_ON_STARTUP")) {
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_MOVE_PRIMARIES_ON_STARTUP")) {
PartitionedRegionRebalanceOp prOp = new PartitionedRegionRebalanceOp(
region, simulation, new CompositeDirector(false, false, false, true), true, true, cancelled,
stats);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java
index a5689f1..756cfdd 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/FunctionStats.java
@@ -16,11 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
@@ -518,7 +515,7 @@ public class FunctionStats {
public static FunctionStats getFunctionStats(String functionID,
InternalDistributedSystem ds) {
- boolean statsDisabled = Boolean.getBoolean("gemfire.statsDisabled");
+ boolean statsDisabled = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "statsDisabled");
if (statsDisabled) {
if(disabledStats == null){
disabledStats = new FunctionStats();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/FindRestEnabledServersFunction.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/FindRestEnabledServersFunction.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/FindRestEnabledServersFunction.java
index 0836331..99a1d6c 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/FindRestEnabledServersFunction.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/cache/execute/util/FindRestEnabledServersFunction.java
@@ -16,7 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.execute.util;
-
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.execute.FunctionAdapter;
[20/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
index 10cafe3..8b87539 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherRemoteIntegrationTest.java
@@ -16,29 +16,10 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.PrintStream;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
import com.gemstone.gemfire.distributed.LocatorLauncher.LocatorState;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.DistributionLocator;
import com.gemstone.gemfire.internal.GemFireVersion;
@@ -51,9 +32,28 @@ import com.gemstone.gemfire.internal.process.ProcessType;
import com.gemstone.gemfire.internal.process.ProcessUtils;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import com.gemstone.gemfire.test.junit.runners.CategoryWithParameterizedRunnerFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.*;
+
/**
* Integration tests for launching a Locator in a forked process.
*
@@ -67,7 +67,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
protected volatile Process process;
protected volatile ProcessStreamReader processOutReader;
protected volatile ProcessStreamReader processErrReader;
-
+
@Before
public final void setUpLocatorLauncherRemoteTest() throws Exception {
}
@@ -91,7 +91,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
final ProcessControllerFactory factory = new ProcessControllerFactory();
assertTrue(factory.isAttachAPIFound());
}
-
+
@Test
@Ignore("TRAC bug #52304: test is broken and needs to be reworked")
public void testRunningLocatorOutlivesForkingProcess() throws Exception {
@@ -153,7 +153,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
public void testStartCreatesPidFile() throws Throwable {
// build and start the locator
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -177,7 +177,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
.build();
try {
waitForLocatorToStart(this.launcher);
-
+
// validate the pid file and its contents
this.pidFile = new File(this.temporaryFolder.getRoot(), ProcessType.LOCATOR.getPidFileName());
assertTrue(this.pidFile.exists());
@@ -185,9 +185,9 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertTrue(pid > 0);
assertTrue(ProcessUtils.isProcessAlive(pid));
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
-
+
// check the status
final LocatorState locatorState = this.launcher.status();
assertNotNull(locatorState);
@@ -195,7 +195,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
} catch (Throwable e) {
this.errorCollector.addError(e);
}
-
+
// stop the locator
try {
assertEquals(Status.STOPPED, this.launcher.stop().getStatus());
@@ -220,10 +220,10 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
this.statusFile = new File(this.temporaryFolder.getRoot(), ProcessType.LOCATOR.getStatusFileName());
this.statusFile.createNewFile();
assertTrue(this.statusFile.exists());
-
+
// build and start the locator
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -260,9 +260,9 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
waitForFileToDelete(this.stopRequestFile);
waitForFileToDelete(this.statusRequestFile);
waitForFileToDelete(this.statusFile);
-
+
// validate log file was created
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
} catch (Throwable e) {
this.errorCollector.addError(e);
@@ -286,7 +286,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
// build and start the locator
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -318,7 +318,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertTrue(ProcessUtils.isProcessAlive(pid));
assertFalse(pid == Integer.MAX_VALUE);
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
} catch (Throwable e) {
this.errorCollector.addError(e);
@@ -344,7 +344,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
// build and start the locator
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -379,7 +379,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertTrue(pid != otherPid);
// validate log file was created
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
} catch (Throwable e) {
this.errorCollector.addError(e);
@@ -398,9 +398,9 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
public void testStartUsingPortInUseFails() throws Throwable {
this.socket = SocketCreator.getDefaultInstance().createServerSocket(this.locatorPort, 50, null, -1);
this.locatorPort = this.socket.getLocalPort();
-
+
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -416,10 +416,12 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
String expectedString = "java.net.BindException";
AtomicBoolean outputContainedExpectedString = new AtomicBoolean();
-
+
this.process = new ProcessBuilder(command).directory(this.temporaryFolder.getRoot()).start();
- this.processOutReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getInputStream()).inputListener(createExpectedListener("sysout", getUniqueName() + "#sysout", expectedString, outputContainedExpectedString)).build().start();
- this.processErrReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getErrorStream()).inputListener(createExpectedListener("syserr", getUniqueName() + "#syserr", expectedString, outputContainedExpectedString)).build().start();
+ this.processOutReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getInputStream())
+ .inputListener(createExpectedListener("sysout", getUniqueName() + "#sysout", expectedString, outputContainedExpectedString)).build().start();
+ this.processErrReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getErrorStream())
+ .inputListener(createExpectedListener("syserr", getUniqueName() + "#syserr", expectedString, outputContainedExpectedString)).build().start();
// wait for locator to start and fail
final LocatorLauncher dirLauncher = new LocatorLauncher.Builder()
@@ -431,22 +433,22 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
} catch (Throwable e) {
this.errorCollector.addError(e);
}
-
+
try {
// check the status
final LocatorState locatorState = dirLauncher.status();
assertNotNull(locatorState);
assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
-
- final String logFileName = getUniqueName()+".log";
+
+ final String logFileName = getUniqueName() + ".log";
assertFalse("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
} catch (Throwable e) {
this.errorCollector.addError(e);
}
-
+
// if the following fails, then the SHORTER_TIMEOUT is too short for slow machines
// or this test needs to use MainLauncher in ProcessWrapper
-
+
// validate that output contained BindException
this.errorCollector.checkThat(outputContainedExpectedString.get(), is(equalTo(true)));
@@ -454,10 +456,10 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
LocatorState status = null;
try {
status = dirLauncher.stop();
- } catch (Throwable t) {
+ } catch (Throwable t) {
// ignore
}
-
+
this.errorCollector.checkThat(status.getStatus(), is(equalTo(getExpectedStopStatusForNotRunning())));
}
@@ -468,15 +470,15 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
this.socket = SocketCreator.getDefaultInstance().createServerSocket(this.locatorPort, 50, null, -1);
this.locatorPort = this.socket.getLocalPort();
-
+
assertFalse(AvailablePort.isPortAvailable(this.locatorPort, AvailablePort.SOCKET));
assertTrue(this.socket.isBound());
assertFalse(this.socket.isClosed());
-
+
// launch locator
final List<String> jvmArguments = getJvmArguments();
jvmArguments.add("-D" + DistributionLocator.TEST_OVERRIDE_DEFAULT_PORT_PROPERTY + "=" + this.locatorPort);
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -488,11 +490,13 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
command.add(LocatorLauncher.Command.START.getName());
command.add(getUniqueName());
command.add("--redirect-output");
-
+
this.process = new ProcessBuilder(command).directory(this.temporaryFolder.getRoot()).start();
- this.processOutReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getInputStream()).inputListener(createExpectedListener("sysout", getUniqueName() + "#sysout", expectedString, outputContainedExpectedString)).build().start();
- this.processErrReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getErrorStream()).inputListener(createExpectedListener("syserr", getUniqueName() + "#syserr", expectedString, outputContainedExpectedString)).build().start();
-
+ this.processOutReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getInputStream())
+ .inputListener(createExpectedListener("sysout", getUniqueName() + "#sysout", expectedString, outputContainedExpectedString)).build().start();
+ this.processErrReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getErrorStream())
+ .inputListener(createExpectedListener("syserr", getUniqueName() + "#syserr", expectedString, outputContainedExpectedString)).build().start();
+
// wait for locator to start up
final LocatorLauncher dirLauncher = new LocatorLauncher.Builder()
.setWorkingDirectory(this.temporaryFolder.getRoot().getCanonicalPath())
@@ -503,23 +507,23 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
} catch (Throwable e) {
this.errorCollector.addError(e);
}
-
+
try {
// check the status
final LocatorState locatorState = dirLauncher.status();
assertNotNull(locatorState);
assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
-
+
// creation of log file seems to be random -- look into why sometime
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertFalse("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
} catch (Throwable e) {
this.errorCollector.addError(e);
}
-
+
// if the following fails, then the SHORTER_TIMEOUT might be too short for slow machines
// or this test needs to use MainLauncher in ProcessWrapper
-
+
// validate that output contained BindException
this.errorCollector.checkThat(outputContainedExpectedString.get(), is(equalTo(true)));
@@ -527,10 +531,10 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
LocatorState status = null;
try {
status = dirLauncher.stop();
- } catch (Throwable t) {
+ } catch (Throwable t) {
// ignore
}
-
+
this.errorCollector.checkThat(status.getStatus(), is(equalTo(getExpectedStopStatusForNotRunning())));
}
@@ -621,7 +625,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
@Test
public void testStatusUsingPid() throws Throwable {
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -641,7 +645,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
// wait for locator to start
int pid = 0;
- LocatorLauncher pidLauncher = null;
+ LocatorLauncher pidLauncher = null;
final LocatorLauncher dirLauncher = new LocatorLauncher.Builder()
.setWorkingDirectory(this.temporaryFolder.getRoot().getCanonicalPath())
.build();
@@ -656,7 +660,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertTrue(ProcessUtils.isProcessAlive(pid));
// validate log file was created
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
// use launcher with pid
@@ -677,7 +681,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertEquals(jvmArguments, actualStatus.getJvmArguments());
assertEquals(ManagementFactory.getRuntimeMXBean().getClassPath(), actualStatus.getClasspath());
assertEquals(GemFireVersion.getGemFireVersion(), actualStatus.getGemFireVersion());
- assertEquals(System.getProperty("java.version"), actualStatus.getJavaVersion());
+ assertEquals(System.getProperty("java.version"), actualStatus.getJavaVersion());
assertEquals(this.temporaryFolder.getRoot().getCanonicalPath() + File.separator + getUniqueName() + ".log", actualStatus.getLogFile());
assertEquals(InetAddress.getLocalHost().getCanonicalHostName(), actualStatus.getHost());
assertEquals(getUniqueName(), actualStatus.getMemberName());
@@ -691,10 +695,10 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertEquals(Status.STOPPED, dirLauncher.stop().getStatus());
} else {
assertEquals(Status.STOPPED, pidLauncher.stop().getStatus());
- }
+ }
waitForPidToStop(pid);
waitForFileToDelete(this.pidFile);
-
+
} catch (Throwable e) {
this.errorCollector.addError(e);
}
@@ -704,7 +708,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
@Test
public void testStatusUsingWorkingDirectory() throws Throwable {
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -738,7 +742,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertTrue(ProcessUtils.isProcessAlive(pid));
// validate log file was created
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
assertNotNull(dirLauncher);
@@ -754,7 +758,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertEquals(jvmArguments, actualStatus.getJvmArguments());
assertEquals(ManagementFactory.getRuntimeMXBean().getClassPath(), actualStatus.getClasspath());
assertEquals(GemFireVersion.getGemFireVersion(), actualStatus.getGemFireVersion());
- assertEquals(System.getProperty("java.version"), actualStatus.getJavaVersion());
+ assertEquals(System.getProperty("java.version"), actualStatus.getJavaVersion());
assertEquals(this.temporaryFolder.getRoot().getCanonicalPath() + File.separator + getUniqueName() + ".log", actualStatus.getLogFile());
assertEquals(InetAddress.getLocalHost().getCanonicalHostName(), actualStatus.getHost());
assertEquals(getUniqueName(), actualStatus.getMemberName());
@@ -770,12 +774,12 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
this.errorCollector.addError(e);
}
}
-
+
@Test
public void testStatusWithEmptyPidFile() throws Exception {
this.pidFile = new File(this.temporaryFolder.getRoot(), ProcessType.LOCATOR.getPidFileName());
assertTrue(this.pidFile + " already exists", this.pidFile.createNewFile());
-
+
final LocatorLauncher dirLauncher = new LocatorLauncher.Builder()
.setWorkingDirectory(this.temporaryFolder.getRoot().getCanonicalPath())
.build();
@@ -792,7 +796,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertThat(actualStatus.getHost(), is(nullValue()));
assertThat(actualStatus.getMemberName(), is(nullValue()));
}
-
+
@Test
public void testStatusWithNoPidFile() throws Exception {
final LocatorLauncher dirLauncher = new LocatorLauncher.Builder()
@@ -801,14 +805,14 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
LocatorState locatorState = dirLauncher.status();
assertEquals(Status.NOT_RESPONDING, locatorState.getStatus());
}
-
+
@Test
public void testStatusWithStalePidFile() throws Exception {
this.pidFile = new File(this.temporaryFolder.getRoot(), ProcessType.LOCATOR.getPidFileName());
final int pid = 0;
assertFalse(ProcessUtils.isProcessAlive(pid));
writePid(this.pidFile, pid);
-
+
final LocatorLauncher dirLauncher = new LocatorLauncher.Builder()
.setWorkingDirectory(this.temporaryFolder.getRoot().getCanonicalPath())
.build();
@@ -825,11 +829,11 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertThat(actualStatus.getHost(), is(nullValue()));
assertThat(actualStatus.getMemberName(), is(nullValue()));
}
-
+
@Test
public void testStopUsingPid() throws Throwable {
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -844,12 +848,14 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
command.add("--redirect-output");
this.process = new ProcessBuilder(command).directory(this.temporaryFolder.getRoot()).start();
- this.processOutReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getInputStream()).inputListener(createLoggingListener("sysout", getUniqueName() + "#sysout")).build().start();
- this.processErrReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getErrorStream()).inputListener(createLoggingListener("syserr", getUniqueName() + "#syserr")).build().start();
+ this.processOutReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getInputStream())
+ .inputListener(createLoggingListener("sysout", getUniqueName() + "#sysout")).build().start();
+ this.processErrReader = new ProcessStreamReader.Builder(this.process).inputStream(this.process.getErrorStream())
+ .inputListener(createLoggingListener("syserr", getUniqueName() + "#syserr")).build().start();
// wait for locator to start
int pid = 0;
- LocatorLauncher pidLauncher = null;
+ LocatorLauncher pidLauncher = null;
final LocatorLauncher dirLauncher = new LocatorLauncher.Builder()
.setWorkingDirectory(this.temporaryFolder.getRoot().getCanonicalPath())
.build();
@@ -864,7 +870,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertTrue(ProcessUtils.isProcessAlive(pid));
// validate log file was created
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
// use launcher with pid
@@ -891,10 +897,10 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertEquals(Status.STOPPED, dirLauncher.stop().getStatus());
} else {
assertEquals(Status.STOPPED, pidLauncher.stop().getStatus());
- }
+ }
waitForPidToStop(pid);
waitForFileToDelete(pidFile);
-
+
} catch (Throwable e) {
this.errorCollector.addError(e);
}
@@ -904,7 +910,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
@Test
public void testStopUsingWorkingDirectory() throws Throwable {
final List<String> jvmArguments = getJvmArguments();
-
+
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
for (String jvmArgument : jvmArguments) {
@@ -938,7 +944,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertTrue(ProcessUtils.isProcessAlive(pid));
// validate log file was created
- final String logFileName = getUniqueName()+".log";
+ final String logFileName = getUniqueName() + ".log";
assertTrue("Log file should exist: " + logFileName, new File(this.temporaryFolder.getRoot(), logFileName).exists());
} catch (Throwable e) {
@@ -950,7 +956,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
assertEquals(Status.STOPPED, dirLauncher.stop().getStatus());
waitForPidToStop(pid);
assertFalse("PID file still exists!", this.pidFile.exists());
-
+
} catch (Throwable e) {
this.errorCollector.addError(e);
}
@@ -974,16 +980,16 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getAbsolutePath());
command.add("-cp");
command.add(System.getProperty("java.class.path"));
- command.add("-Dgemfire.mcast-port=0");
+ command.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "mcast-port=0");
command.add(LocatorLauncher.class.getName());
command.add(LocatorLauncher.Command.START.getName());
command.add(LocatorLauncherForkingProcess.class.getSimpleName() + "_Locator");
command.add("--port=" + port);
command.add("--redirect-output");
-
+
logWriter.info(LocatorLauncherForkingProcess.class.getSimpleName() + "#main command: " + command);
logWriter.info(LocatorLauncherForkingProcess.class.getSimpleName() + "#main starting...");
-
+
Process forkedProcess = new ProcessBuilder(command).start();
@SuppressWarnings("unused")
@@ -998,8 +1004,7 @@ public class LocatorLauncherRemoteIntegrationTest extends AbstractLocatorLaunche
logWriter.info(LocatorLauncherForkingProcess.class.getSimpleName() + "#main exiting...");
System.exit(0);
- }
- catch (Throwable t) {
+ } catch (Throwable t) {
logWriter.info(LocatorLauncherForkingProcess.class.getSimpleName() + "#main error: " + t, t);
System.exit(-1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
index c54a238..29d9b4c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherTest.java
@@ -16,11 +16,11 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
-
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-
+import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
+import com.gemstone.gemfire.distributed.LocatorLauncher.Command;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
import joptsimple.OptionException;
import org.junit.Rule;
import org.junit.Test;
@@ -28,11 +28,10 @@ import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.distributed.LocatorLauncher.Builder;
-import com.gemstone.gemfire.distributed.LocatorLauncher.Command;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+
+import static org.junit.Assert.*;
/**
* The LocatorLauncherTest class is a test suite of test cases for testing the contract and functionality of
@@ -315,18 +314,18 @@ public class LocatorLauncherTest {
LocatorLauncher launcher = new Builder()
.setCommand(LocatorLauncher.Command.START)
.setMemberName(null)
- .set(DistributionConfig.NAME_NAME, "locatorABC")
+ .set(SystemConfigurationProperties.NAME, "locatorABC")
.build();
assertNotNull(launcher);
assertEquals(LocatorLauncher.Command.START, launcher.getCommand());
assertNull(launcher.getMemberName());
- assertEquals("locatorABC", launcher.getProperties().getProperty(DistributionConfig.NAME_NAME));
+ assertEquals("locatorABC", launcher.getProperties().getProperty(SystemConfigurationProperties.NAME));
}
@Test
public void testBuildWithMemberNameSetInSystemPropertiesOnStart() {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.NAME_NAME, "locatorXYZ");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME, "locatorXYZ");
LocatorLauncher launcher = new Builder()
.setCommand(LocatorLauncher.Command.START)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
index 25428b2..466b818 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/RoleDUnitTest.java
@@ -16,10 +16,6 @@
*/
package com.gemstone.gemfire.distributed;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.distributed.internal.DM;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -29,6 +25,13 @@ import com.gemstone.gemfire.test.dunit.DistributedTestCase;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Tests the setting of Roles in a DistributedSystem
*
@@ -57,8 +60,8 @@ public class RoleDUnitTest extends DistributedTestCase {
// final List rolesList = Arrays.asList(rolesArray);
distributionProperties = new Properties();
- distributionProperties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- distributionProperties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ distributionProperties.setProperty(MCAST_PORT, "0");
+ distributionProperties.setProperty(LOCATORS, "");
distributionProperties.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
InternalDistributedSystem system = getSystem(distributionProperties);
@@ -153,8 +156,8 @@ public class RoleDUnitTest extends DistributedTestCase {
final String rolesProp = "A,A";
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
config.setProperty(DistributionConfig.ROLES_NAME, rolesProp);
distributionProperties = config;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
index 34d613d..49c6446 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherIntegrationTest.java
@@ -16,16 +16,11 @@
*/
package com.gemstone.gemfire.distributed;
-import static com.googlecode.catchexception.apis.BDDCatchException.*;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.BDDAssertions.then;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileWriter;
-import java.net.InetAddress;
-import java.util.Properties;
-
+import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
+import com.gemstone.gemfire.distributed.ServerLauncher.Command;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Rule;
import org.junit.Test;
import org.junit.contrib.java.lang.system.RestoreSystemProperties;
@@ -33,11 +28,16 @@ import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
-import com.gemstone.gemfire.distributed.ServerLauncher.Command;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.net.InetAddress;
+import java.util.Properties;
+
+import static com.googlecode.catchexception.apis.BDDCatchException.caughtException;
+import static com.googlecode.catchexception.apis.BDDCatchException.when;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.BDDAssertions.then;
/**
* Integration tests for ServerLauncher class. These tests may require file system and/or network I/O.
@@ -183,8 +183,8 @@ public class ServerLauncherIntegrationTest {
public void testBuildWithMemberNameSetInGemFirePropertiesOnStart() throws Exception {
// given: gemfire.properties with a name
Properties gemfireProperties = new Properties();
- gemfireProperties.setProperty(DistributionConfig.NAME_NAME, "server123");
- useGemFirePropertiesFileInTemporaryFolder("gemfire.properties", gemfireProperties);
+ gemfireProperties.setProperty(SystemConfigurationProperties.NAME, "server123");
+ useGemFirePropertiesFileInTemporaryFolder(DistributionConfig.GEMFIRE_PREFIX + "properties", gemfireProperties);
// when: starting with null MemberName
ServerLauncher launcher = new Builder()
@@ -201,7 +201,7 @@ public class ServerLauncherIntegrationTest {
@Test
public void testBuildWithNoMemberNameOnStart() throws Exception {
// given: gemfire.properties with no name
- useGemFirePropertiesFileInTemporaryFolder("gemfire.properties", new Properties());
+ useGemFirePropertiesFileInTemporaryFolder(DistributionConfig.GEMFIRE_PREFIX + "properties", new Properties());
// when: no MemberName is specified
when(new Builder()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
index 52deb38..e8c1afb 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherLocalIntegrationTest.java
@@ -16,22 +16,6 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.io.PrintWriter;
-import java.lang.management.ManagementFactory;
-import java.net.BindException;
-import java.net.InetAddress;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Scope;
@@ -51,6 +35,23 @@ import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
import com.gemstone.gemfire.internal.process.ProcessType;
import com.gemstone.gemfire.internal.process.ProcessUtils;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FileWriter;
+import java.io.PrintWriter;
+import java.lang.management.ManagementFactory;
+import java.net.BindException;
+import java.net.InetAddress;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.junit.Assert.*;
/**
* Integration tests for ServerLauncher as a local API in the local JVM.
@@ -91,7 +92,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true")
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0")
+ .set(MCAST_PORT, "0")
.build();
assertNotNull(this.launcher);
@@ -109,8 +110,8 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
assertNotNull(distributedSystem);
assertEquals("true", distributedSystem.getProperties().getProperty(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME));
assertEquals("config", distributedSystem.getProperties().getProperty(DistributionConfig.LOG_LEVEL_NAME));
- assertEquals("0", distributedSystem.getProperties().getProperty(DistributionConfig.MCAST_PORT_NAME));
- assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(DistributionConfig.NAME_NAME));
+ assertEquals("0", distributedSystem.getProperties().getProperty(MCAST_PORT));
+ assertEquals(getUniqueName(), distributedSystem.getProperties().getProperty(SystemConfigurationProperties.NAME));
} catch (Throwable e) {
this.errorCollector.addError(e);
@@ -141,7 +142,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
this.launcher = builder.build();
assertNotNull(this.launcher);
@@ -197,7 +198,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -252,7 +253,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -301,7 +302,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -357,7 +358,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -414,7 +415,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
assertTrue(builder.getForce());
this.launcher = builder.build();
@@ -497,7 +498,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setServerPort(freeTCPPorts[1])
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
this.launcher = builder.build();
this.launcher.start();
@@ -566,7 +567,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setServerPort(this.serverPort)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
this.launcher = builder.build();
this.launcher.start();
@@ -616,7 +617,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -695,7 +696,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setMemberName(getUniqueName())
.setRedirectOutput(true)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "0");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -777,7 +778,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setServerPort(freeTCPPort)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
this.launcher = builder.build();
@@ -837,7 +838,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -903,7 +904,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -969,7 +970,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
assertFalse(builder.getForce());
this.launcher = builder.build();
@@ -1026,7 +1027,7 @@ public class ServerLauncherLocalIntegrationTest extends AbstractServerLauncherIn
.setRedirectOutput(true)
.setWorkingDirectory(rootFolder)
.set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.MCAST_PORT_NAME, "0");
+ .set(MCAST_PORT, "0");
assertFalse(builder.getForce());
this.launcher = builder.build();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
index ace30d7..c2ccf2f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherRemoteIntegrationTest.java
@@ -16,28 +16,6 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.hamcrest.CoreMatchers.*;
-import static org.junit.Assert.*;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileWriter;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.io.PrintWriter;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.Callable;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
@@ -54,14 +32,23 @@ import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
import com.gemstone.gemfire.internal.cache.xmlcache.RegionAttributesCreation;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LocalLogWriter;
-import com.gemstone.gemfire.internal.process.PidUnavailableException;
-import com.gemstone.gemfire.internal.process.ProcessControllerFactory;
-import com.gemstone.gemfire.internal.process.ProcessStreamReader;
-import com.gemstone.gemfire.internal.process.ProcessType;
-import com.gemstone.gemfire.internal.process.ProcessUtils;
+import com.gemstone.gemfire.internal.process.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.test.process.ProcessWrapper;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.hamcrest.CoreMatchers.*;
+import static org.junit.Assert.*;
/**
* Integration tests for launching a Server in a forked process.
@@ -656,7 +643,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
// launch server and specify a different port
final List<String> jvmArguments = getJvmArguments();
- jvmArguments.add("-Dgemfire."+DistributionConfig.CACHE_XML_FILE_NAME+"="+cacheXmlFile.getCanonicalPath());
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + DistributionConfig.CACHE_XML_FILE_NAME + "=" + cacheXmlFile.getCanonicalPath());
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
@@ -741,7 +728,7 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
// launch server and specify a different port
final List<String> jvmArguments = getJvmArguments();
- jvmArguments.add("-Dgemfire."+DistributionConfig.CACHE_XML_FILE_NAME+"="+cacheXmlFile.getCanonicalPath());
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "" + DistributionConfig.CACHE_XML_FILE_NAME + "=" + cacheXmlFile.getCanonicalPath());
final List<String> command = new ArrayList<String>();
command.add(new File(new File(System.getProperty("java.home"), "bin"), "java").getCanonicalPath());
@@ -1311,8 +1298,8 @@ public class ServerLauncherRemoteIntegrationTest extends AbstractServerLauncherR
@Override
protected List<String> getJvmArguments() {
final List<String> jvmArguments = new ArrayList<String>();
- jvmArguments.add("-Dgemfire.log-level=config");
- jvmArguments.add("-Dgemfire.mcast-port=0");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "log-level=config");
+ jvmArguments.add("-D" + DistributionConfig.GEMFIRE_PREFIX + "mcast-port=0");
return jvmArguments;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
index b8f4a0c..864d8f9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherTest.java
@@ -16,14 +16,14 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
-
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Collections;
-import java.util.concurrent.atomic.AtomicBoolean;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
+import com.gemstone.gemfire.distributed.ServerLauncher.Command;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.support.DistributedSystemAdapter;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
import edu.umd.cs.mtc.MultithreadedTestCase;
import edu.umd.cs.mtc.TestFramework;
import org.jmock.Expectations;
@@ -38,14 +38,13 @@ import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
-import com.gemstone.gemfire.distributed.ServerLauncher.Command;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.support.DistributedSystemAdapter;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Collections;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static org.junit.Assert.*;
/**
* The ServerLauncherTest class is a test suite of unit tests testing the contract, functionality and invariants
@@ -501,18 +500,18 @@ public class ServerLauncherTest {
ServerLauncher launcher = new Builder()
.setCommand(ServerLauncher.Command.START)
.setMemberName(null)
- .set(DistributionConfig.NAME_NAME, "serverABC")
+ .set(SystemConfigurationProperties.NAME, "serverABC")
.build();
assertNotNull(launcher);
assertEquals(ServerLauncher.Command.START, launcher.getCommand());
assertNull(launcher.getMemberName());
- assertEquals("serverABC", launcher.getProperties().getProperty(DistributionConfig.NAME_NAME));
+ assertEquals("serverABC", launcher.getProperties().getProperty(SystemConfigurationProperties.NAME));
}
@Test
public void testBuildWithMemberNameSetInSystemPropertiesOnStart() {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.NAME_NAME, "serverXYZ");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + SystemConfigurationProperties.NAME, "serverXYZ");
ServerLauncher launcher = new Builder()
.setCommand(ServerLauncher.Command.START)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherWithProviderIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherWithProviderIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherWithProviderIntegrationTest.java
index f04c7cf..e40d287 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherWithProviderIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/ServerLauncherWithProviderIntegrationTest.java
@@ -16,20 +16,19 @@
*/
package com.gemstone.gemfire.distributed;
-import static org.junit.Assert.*;
-
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
+import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
+import com.gemstone.gemfire.internal.process.ProcessType;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.mockito.Mockito;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.distributed.AbstractLauncher.Status;
-import com.gemstone.gemfire.distributed.ServerLauncher.Builder;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.process.ProcessType;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Extracted from ServerLauncherLocalIntegrationTest.
@@ -60,7 +59,7 @@ public class ServerLauncherWithProviderIntegrationTest extends AbstractServerLau
.setForce(true)
.setMemberName(getUniqueName())
.setSpringXmlLocation("spring/spring-gemfire-context.xml")
- .set(DistributionConfig.MCAST_PORT_NAME, "0")
+ .set(MCAST_PORT, "0")
.build();
assertNotNull(this.launcher);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
index d906c09..7eaa5e2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/Bug40751DUnitTest.java
@@ -15,32 +15,18 @@
* limitations under the License.
*/
package com.gemstone.gemfire.distributed.internal;
-
+
+import com.gemstone.gemfire.DataSerializable;
+import com.gemstone.gemfire.ToDataException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.test.dunit.*;
+
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
import java.util.Properties;
-import com.gemstone.gemfire.*;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
-import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.internal.cache.lru.Sizeable;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-
public class Bug40751DUnitTest extends CacheTestCase {
public Bug40751DUnitTest(String name) {
@@ -111,8 +97,8 @@ public class Bug40751DUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
Properties props = new Properties();
System.setProperty("p2p.oldIO", "true");
- props.setProperty("conserve-sockets", "true");
- // props.setProperty("mcast-port", "12333");
+ props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "true");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "12333");
// props.setProperty(DistributionConfig.DISABLE_TCP_NAME, "true");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
index 2aa9d27..99fd245 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/ConsoleDistributionManagerDUnitTest.java
@@ -16,39 +16,19 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedLockService;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Config;
-import com.gemstone.gemfire.internal.admin.Alert;
-import com.gemstone.gemfire.internal.admin.AlertListener;
-import com.gemstone.gemfire.internal.admin.ApplicationVM;
-import com.gemstone.gemfire.internal.admin.DLockInfo;
-import com.gemstone.gemfire.internal.admin.EntryValueNode;
-import com.gemstone.gemfire.internal.admin.GemFireVM;
-import com.gemstone.gemfire.internal.admin.GfManagerAgent;
-import com.gemstone.gemfire.internal.admin.GfManagerAgentConfig;
-import com.gemstone.gemfire.internal.admin.GfManagerAgentFactory;
-import com.gemstone.gemfire.internal.admin.StatResource;
+import com.gemstone.gemfire.internal.admin.*;
import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Set;
/**
* This class tests the functionality of the {@linkplain com.gemstone.gemfire.internal.admin internal
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
index 8e1031f..6a23679 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionConfigJUnitTest.java
@@ -16,28 +16,23 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import static org.junit.Assert.*;
-import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.*;
-
-import java.io.File;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.InternalGemFireException;
import com.gemstone.gemfire.UnmodifiableException;
import com.gemstone.gemfire.internal.ConfigSource;
import com.gemstone.gemfire.management.internal.security.JSONAuthorization;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.util.*;
+
+import static org.junit.Assert.*;
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
@Category(UnitTest.class)
public class DistributionConfigJUnitTest {
@@ -54,7 +49,7 @@ public class DistributionConfigJUnitTest {
@Before
public void before() {
- classMap = new HashMap<Class<?>, Class<?>>();
+ classMap = new HashMap<>();
classMap.put(boolean.class, Boolean.class);
classMap.put(byte.class, Byte.class);
classMap.put(short.class, Short.class);
@@ -126,7 +121,6 @@ public class DistributionConfigJUnitTest {
if(!attList.contains(attName)){
System.out.println("Has unused description for "+attName.toString());
}
- //assertTrue("Has unused description for "+attName.toString(), attList.contains(attName));
}
}
@@ -239,8 +233,8 @@ public class DistributionConfigJUnitTest {
}
}
assertEquals(modifiables.size(), 2);
- assertEquals(modifiables.get(0), "http-service-port");
- assertEquals(modifiables.get(1), "jmx-manager-http-port");
+ assertEquals(modifiables.get(0), DistributionConfig.HTTP_SERVICE_PORT_NAME);
+ assertEquals(modifiables.get(1), DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME);
}
@Test
@@ -256,16 +250,16 @@ public class DistributionConfigJUnitTest {
}
assertEquals(modifiables.size(), 10);
- assertEquals(modifiables.get(0), "archive-disk-space-limit");
- assertEquals(modifiables.get(1), "archive-file-size-limit");
- assertEquals(modifiables.get(2), "http-service-port");
- assertEquals(modifiables.get(3), "jmx-manager-http-port");
- assertEquals(modifiables.get(4), "log-disk-space-limit");
- assertEquals(modifiables.get(5), "log-file-size-limit");
- assertEquals(modifiables.get(6), "log-level");
- assertEquals(modifiables.get(7), "statistic-archive-file");
- assertEquals(modifiables.get(8), "statistic-sample-rate");
- assertEquals(modifiables.get(9), "statistic-sampling-enabled");
+ assertEquals(modifiables.get(0), DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME);
+ assertEquals(modifiables.get(1), DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME);
+ assertEquals(modifiables.get(2), DistributionConfig.HTTP_SERVICE_PORT_NAME);
+ assertEquals(modifiables.get(3), DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME);
+ assertEquals(modifiables.get(4), DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME);
+ assertEquals(modifiables.get(5), DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME);
+ assertEquals(modifiables.get(6), DistributionConfig.LOG_LEVEL_NAME);
+ assertEquals(modifiables.get(7), DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
+ assertEquals(modifiables.get(8), DistributionConfig.STATISTIC_SAMPLE_RATE_NAME);
+ assertEquals(modifiables.get(9), DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME);
}
@Test(expected = IllegalArgumentException.class)
@@ -275,18 +269,18 @@ public class DistributionConfigJUnitTest {
@Test(expected = UnmodifiableException.class)
public void testSetUnmodifiableAttributeObject() {
- config.setAttributeObject("archive-disk-space-limit", 0, ConfigSource.api());
+ config.setAttributeObject(DistributionConfig.ARCHIVE_DISK_SPACE_LIMIT_NAME, 0, ConfigSource.api());
}
@Test
public void testValidAttributeObject() {
- config.setAttributeObject("http-service-port", 8080, ConfigSource.api());
+ config.setAttributeObject(DistributionConfig.HTTP_SERVICE_PORT_NAME, 8080, ConfigSource.api());
assertEquals(config.getHttpServicePort(), 8080);
}
@Test(expected = IllegalArgumentException.class)
public void testOutOfRangeAttributeObject() {
- config.setAttributeObject("http-service-port", -1, ConfigSource.api());
+ config.setAttributeObject(DistributionConfig.HTTP_SERVICE_PORT_NAME, -1, ConfigSource.api());
}
@Test
@@ -318,11 +312,11 @@ public class DistributionConfigJUnitTest {
public void testAttributesAlwaysModifiable() {
config.modifiable = false;
assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME));
- assertTrue(config.isAttributeModifiable("jmx-manager-http-port"));
+ assertTrue(config.isAttributeModifiable(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME));
config.modifiable = true;
assertTrue(config.isAttributeModifiable(DistributionConfig.HTTP_SERVICE_PORT_NAME));
- assertTrue(config.isAttributeModifiable("jmx-manager-http-port"));
+ assertTrue(config.isAttributeModifiable(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
index d1487ee..325b3a2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/DistributionManagerDUnitTest.java
@@ -16,29 +16,12 @@
*/
package com.gemstone.gemfire.distributed.internal;
-import java.net.InetAddress;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-import org.junit.Assert;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminDistributedSystemFactory;
-import com.gemstone.gemfire.admin.Alert;
-import com.gemstone.gemfire.admin.AlertLevel;
-import com.gemstone.gemfire.admin.AlertListener;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.admin.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
import com.gemstone.gemfire.distributed.internal.membership.NetView;
@@ -46,15 +29,15 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.MembershipManage
import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Manager;
import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.test.dunit.internal.JUnit3DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import org.apache.logging.log4j.Logger;
+import org.junit.Assert;
+
+import java.net.InetAddress;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.BIND_ADDRESS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This class tests the functionality of the {@link
@@ -144,7 +127,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
MembershipManager mgr = MembershipManagerHelper.getMembershipManager(sys);
InternalDistributedMember idm = mgr.getLocalMember();
// TODO GMS needs to have a system property allowing the bind-port to be set
- System.setProperty("gemfire.jg-bind-port", ""+idm.getPort());
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "jg-bind-port", "" + idm.getPort());
try {
sys.disconnect();
sys = getSystem();
@@ -156,7 +139,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
assertTrue("should not have used a different udp port",
idm.getPort() == idm2.getPort());
} finally {
- System.getProperties().remove("gemfire.jg-bind-port");
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "jg-bind-port");
}
}
@@ -265,14 +248,14 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
// in order to set a small ack-wait-threshold, we have to remove the
// system property established by the dunit harness
String oldAckWait = (String)System.getProperties()
- .remove("gemfire." + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
+ .remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
try {
final Properties props = getDistributedSystemProperties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "3");
props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "3");
- props.setProperty(DistributionConfig.NAME_NAME, "putter");
+ props.setProperty(SystemConfigurationProperties.NAME, "putter");
getSystem(props);
Region rgn = (new RegionFactory())
@@ -283,7 +266,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
vm1.invoke(new SerializableRunnable("Connect to distributed system") {
public void run() {
- props.setProperty(DistributionConfig.NAME_NAME, "sleeper");
+ props.setProperty(SystemConfigurationProperties.NAME, "sleeper");
getSystem(props);
IgnoredException.addIgnoredException("elapsed while waiting for replies");
RegionFactory rf = new RegionFactory();
@@ -330,7 +313,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
}
finally {
if (oldAckWait != null) {
- System.setProperty("gemfire." + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
}
}
}
@@ -407,14 +390,14 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
// in order to set a small ack-wait-threshold, we have to remove the
// system property established by the dunit harness
String oldAckWait = (String)System.getProperties()
- .remove("gemfire." + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
+ .remove(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME);
try {
final Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); // loner
+ props.setProperty(MCAST_PORT, "0"); // loner
props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "5");
- props.setProperty(DistributionConfig.NAME_NAME, "putter");
+ props.setProperty(SystemConfigurationProperties.NAME, "putter");
getSystem(props);
Region rgn = (new RegionFactory())
@@ -425,7 +408,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
vm1.invoke(new SerializableRunnable("Connect to distributed system") {
public void run() {
- props.setProperty(DistributionConfig.NAME_NAME, "sleeper");
+ props.setProperty(SystemConfigurationProperties.NAME, "sleeper");
getSystem(props);
LogWriter log = basicGetSystem().getLogWriter();
log.info("<ExpectedException action=add>service failure</ExpectedException>");
@@ -502,7 +485,7 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
}
finally {
if (oldAckWait != null) {
- System.setProperty("gemfire." + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.ACK_WAIT_THRESHOLD_NAME, oldAckWait);
}
}
}
@@ -515,9 +498,9 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
disconnectAllFromDS();
final Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0"); // loner
+ props.setProperty(MCAST_PORT, "0"); // loner
// use a valid address that's not proper for this machine
- props.setProperty(DistributionConfig.BIND_ADDRESS_NAME, "www.yahoo.com");
+ props.setProperty(BIND_ADDRESS, "www.yahoo.com");
props.setProperty(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
props.setProperty(DistributionConfig.ACK_SEVERE_ALERT_THRESHOLD_NAME, "5");
try {
@@ -526,14 +509,14 @@ public class DistributionManagerDUnitTest extends DistributedTestCase {
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("caught expected exception (1)", e);
}
// use an invalid address
- props.setProperty(DistributionConfig.BIND_ADDRESS_NAME, "bruce.schuchardt");
+ props.setProperty(BIND_ADDRESS, "bruce.schuchardt");
try {
getSystem(props);
} catch (IllegalArgumentException e) {
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("caught expected exception (2_", e);
}
// use a valid bind address
- props.setProperty(DistributionConfig.BIND_ADDRESS_NAME, InetAddress.getLocalHost().getCanonicalHostName());
+ props.setProperty(BIND_ADDRESS, InetAddress.getLocalHost().getCanonicalHostName());
getSystem().disconnect();
}
[61/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index 042df6f..d675b14 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -71,7 +71,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testGCForGroup() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
String command = "gc --group=Group1";
@@ -441,7 +441,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testChangeLogLevelForGrps() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group0");
final VM vm1 = Host.getHost(0).getVM(1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
index 6595ca0..6bdf917 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsExportLogsPart3DUnitTest.java
@@ -86,7 +86,7 @@ public class MiscellaneousCommandsExportLogsPart3DUnitTest extends CliCommandTes
@Test
public void testExportLogsForGroup() throws IOException {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Manager");
+ localProps.setProperty(NAME, "Manager");
localProps.setProperty(GROUPS, "Group1");
setUpJmxManagerOnVm0ThenConnect(localProps);
String dir = getCurrentTimeString();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
index e1c906d..e53e6ea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -94,7 +94,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
diskStoreDir.mkdirs();
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
getCache();
@@ -106,7 +106,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
vm2.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm2Name);
+ localProps.setProperty(NAME, vm2Name);
localProps.setProperty(GROUPS, "Group2");
getSystem(localProps);
getCache();
@@ -261,7 +261,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "fine");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
index a77aeee..3b1f75e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/SharedConfigurationCommandsDUnitTest.java
@@ -178,7 +178,7 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locator1Port);
localProps.setProperty(GROUPS, groupName);
- localProps.setProperty(SystemConfigurationProperties.NAME, "DataMember");
+ localProps.setProperty(NAME, "DataMember");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
@@ -286,7 +286,7 @@ public class SharedConfigurationCommandsDUnitTest extends CliCommandTestBase {
public void run() {
final File locatorLogFile = new File(locator2LogFilePath);
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, locator2Name);
+ locatorProps.setProperty(NAME, locator2Name);
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "fine");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
index cc7017a..b439e20 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowMetricsDUnitTest.java
@@ -53,7 +53,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
private void createLocalSetUp() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, "Controller");
+ localProps.setProperty(NAME, "Controller");
getSystem(localProps);
Cache cache = getCache();
RegionFactory<Integer, Integer> dataRegionFactory = cache.createRegionFactory(RegionShortcut.REPLICATE);
@@ -74,7 +74,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
@@ -117,7 +117,7 @@ public class ShowMetricsDUnitTest extends CliCommandTestBase {
vm1.invoke(new SerializableRunnable() {
public void run() {
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, vm1Name);
+ localProps.setProperty(NAME, vm1Name);
getSystem(localProps);
Cache cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
index 2e4e2e4..44600f6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowStackTraceDUnitTest.java
@@ -59,7 +59,7 @@ public class ShowStackTraceDUnitTest extends CliCommandTestBase {
props.setProperty(LOG_LEVEL, "info");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
props.setProperty(ENABLE_TIME_STATISTICS, "true");
- props.setProperty(SystemConfigurationProperties.NAME, name);
+ props.setProperty(NAME, name);
props.setProperty(GROUPS, groups);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
index e6ee71b..06e5fbb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationDUnitTest.java
@@ -94,7 +94,7 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator1Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, locator1Name);
+ locatorProps.setProperty(NAME, locator1Name);
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "fine");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
@@ -143,7 +143,7 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator2Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, locator2Name);
+ locatorProps.setProperty(NAME, locator2Name);
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "fine");
locatorProps.setProperty(LOCATORS, "localhost:" + locator1Port);
@@ -229,7 +229,7 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator1Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator1");
+ locatorProps.setProperty(NAME, "Locator1");
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "info");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
@@ -321,7 +321,7 @@ public class SharedConfigurationDUnitTest extends JUnit4CacheTestCase {
final File locatorLogFile = new File(testName + "-locator-" + locator2Port + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator2");
+ locatorProps.setProperty(NAME, "Locator2");
locatorProps.setProperty(MCAST_PORT, "0");
locatorProps.setProperty(LOG_LEVEL, "info");
locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
index 3e21a7a..97b56d3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/configuration/SharedConfigurationUsingDirDUnitTest.java
@@ -306,7 +306,7 @@ public class SharedConfigurationUsingDirDUnitTest extends JUnit4CacheTestCase {
disconnectFromDS();
final Properties props = new Properties();
- props.setProperty(SystemConfigurationProperties.NAME, "member" + i);
+ props.setProperty(NAME, "member" + i);
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, getLocatorStr(locatorPorts));
props.setProperty(LOG_FILE, "server-" + i + ".log");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
index ffb5d79..e2e951f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/JsonAuthorizationCacheStartRule.java
@@ -54,7 +54,7 @@ public class JsonAuthorizationCacheStartRule extends ExternalResource {
protected void before() throws Throwable {
Properties properties = new Properties();
- properties.put(SystemConfigurationProperties.NAME, JsonAuthorizationCacheStartRule.class.getSimpleName());
+ properties.put(NAME, JsonAuthorizationCacheStartRule.class.getSimpleName());
properties.put(LOCATORS, "");
properties.put(MCAST_PORT, "0");
properties.put(JMX_MANAGER, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ff81dbfc/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
index b17edd0..2887195 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/security/ShiroCacheStartRule.java
@@ -38,7 +38,7 @@ public class ShiroCacheStartRule extends ExternalResource {
protected void before() throws Throwable {
Properties properties = new Properties();
- properties.put(SystemConfigurationProperties.NAME, ShiroCacheStartRule.class.getSimpleName());
+ properties.put(NAME, ShiroCacheStartRule.class.getSimpleName());
properties.put(LOCATORS, "");
properties.put(MCAST_PORT, "0");
properties.put(JMX_MANAGER, "true");
[12/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
index 853dee3..9723b53 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
@@ -19,16 +19,7 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
@@ -41,11 +32,9 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueueStats;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
/**
* The test creates two datastores with a partitioned region, and also running a
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
index 1a0bfa3..2df292d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
@@ -19,8 +19,6 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
@@ -35,12 +33,11 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxyStats;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
*
@@ -93,9 +90,9 @@ public class Bug51400DUnitTest extends DistributedTestCase {
public static Integer createServerCache(Integer mcastPort,
Integer maxMessageCount) throws Exception {
Properties props = new Properties();
- props.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
// props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
-// props.setProperty("log-level", "fine");
+ // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
// props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
// + ".gfs");
// props.setProperty("statistic-sampling-enabled", "true");
@@ -127,7 +124,7 @@ public class Bug51400DUnitTest extends DistributedTestCase {
// "my-durable-client-" + ports.length);
// props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
// props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
-// props.setProperty("log-level", "fine");
+ // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
// props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
// + ".gfs");
// props.setProperty("statistic-sampling-enabled", "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
index b8c5ba1..a1a6ad2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/PersistentPartitionedRegionDUnitTest.java
@@ -16,44 +16,9 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned;
-import static org.assertj.core.api.Assertions.assertThat;
-import static com.jayway.awaitility.Awaitility.await;
-import static java.util.concurrent.TimeUnit.SECONDS;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.File;
-import java.io.IOException;
-import java.io.Serializable;
-import java.util.Collections;
-import java.util.ConcurrentModificationException;
-import java.util.HashSet;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializable;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CustomExpiry;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.ExpirationAction;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.PartitionedRegionStorageException;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerOperationException;
@@ -76,20 +41,20 @@ import com.gemstone.gemfire.internal.cache.InitialImageOperation.RequestImageMes
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
import com.gemstone.gemfire.internal.cache.partitioned.ManageBucketMessage.ManageBucketReplyMessage;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.RMIException;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.jayway.awaitility.Awaitility.await;
+import static java.util.concurrent.TimeUnit.SECONDS;
+import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests the basic use cases for PR persistence.
@@ -1384,8 +1349,8 @@ public class PersistentPartitionedRegionDUnitTest extends PersistentPartitionedR
public void run () {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
getSystem(props );
try {
Cache cache = getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
index 42428b8..cbef135 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/fixed/FixedPartitioningTestBase.java
@@ -16,67 +16,31 @@
*/
package com.gemstone.gemfire.internal.cache.partitioned.fixed;
-import java.io.File;
-import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.control.RebalanceOperation;
import com.gemstone.gemfire.cache.control.RebalanceResults;
import com.gemstone.gemfire.cache.control.ResourceManager;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
-import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.internal.cache.ClientServerObserver;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
-import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.internal.cache.FixedPartitionAttributesImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.HARegion;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.Node;
-import com.gemstone.gemfire.internal.cache.PRHARedundancyProvider;
-import com.gemstone.gemfire.internal.cache.PartitionRegionConfig;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
-import com.gemstone.gemfire.internal.cache.execute.data.CustId;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.execute.data.*;
import com.gemstone.gemfire.internal.cache.execute.data.Customer;
import com.gemstone.gemfire.internal.cache.execute.data.Order;
-import com.gemstone.gemfire.internal.cache.execute.data.OrderId;
import com.gemstone.gemfire.internal.cache.execute.data.Shipment;
-import com.gemstone.gemfire.internal.cache.execute.data.ShipmentId;
import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserver;
import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverAdapter;
import com.gemstone.gemfire.internal.cache.partitioned.PartitionedRegionObserverHolder;
-import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientProxy;
-import com.gemstone.gemfire.internal.cache.tier.sockets.Message;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
+import java.util.*;
/**
* This is the base class to do operations
@@ -140,7 +104,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
}
public static void createCacheOnMember_DisableMovePrimary() {
- System.setProperty("gemfire.DISABLE_MOVE_PRIMARIES_ON_STARTUP", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_MOVE_PRIMARIES_ON_STARTUP", "true");
new FixedPartitioningTestBase("Temp").createCache();
}
@@ -1395,7 +1359,7 @@ public class FixedPartitioningTestBase extends DistributedTestCase {
}
public static void closeCache() {
- System.clearProperty("gemfire.DISABLE_MOVE_PRIMARIES_ON_STARTUP");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_MOVE_PRIMARIES_ON_STARTUP");
//System.setProperty("gemfire.DISABLE_MOVE_PRIMARIES_ON_STARTUP", "false");
if (cache != null && !cache.isClosed()) {
cache.close();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
index 4f0fcca..0978878 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
@@ -16,37 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache.persistence;
-import static com.gemstone.gemfire.internal.lang.ThrowableUtils.*;
-
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicBoolean;
-
-import org.junit.Ignore;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.admin.AdminDistributedSystem;
import com.gemstone.gemfire.admin.AdminDistributedSystemFactory;
import com.gemstone.gemfire.admin.AdminException;
import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.persistence.ConflictingPersistentDataException;
import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.cache.persistence.PersistentReplicatesOfflineException;
@@ -62,26 +37,22 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.AbstractUpdateOperation.AbstractUpdateMessage;
import com.gemstone.gemfire.internal.cache.DestroyRegionOperation.DestroyRegionMessage;
-import com.gemstone.gemfire.internal.cache.DiskRegion;
-import com.gemstone.gemfire.internal.cache.DiskRegionStats;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.InitialImageOperation.RequestImageMessage;
-import com.gemstone.gemfire.internal.cache.InternalRegionArguments;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.TXManagerImpl;
import com.gemstone.gemfire.internal.cache.versions.RegionVersionHolder;
import com.gemstone.gemfire.internal.cache.versions.RegionVersionVector;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+import org.junit.Ignore;
+
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import static com.gemstone.gemfire.internal.lang.ThrowableUtils.getRootCause;
/**
* This is a test of how persistent distributed
@@ -98,7 +69,7 @@ public class PersistentRecoveryOrderDUnitTest extends PersistentReplicatedTestBa
public static void resetAckWaitThreshold() {
if (SAVED_ACK_WAIT_THRESHOLD != null) {
- System.setProperty("gemfire.ack_wait_threshold", SAVED_ACK_WAIT_THRESHOLD);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "ack_wait_threshold", SAVED_ACK_WAIT_THRESHOLD);
}
}
@@ -1782,11 +1753,11 @@ public class PersistentRecoveryOrderDUnitTest extends PersistentReplicatedTestBa
@Override
public Properties getDistributedSystemProperties() {
LogWriterUtils.getLogWriter().info("Looking for ack-wait-threshold");
- String s = System.getProperty("gemfire.ack-wait-threshold");
+ String s = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "ack-wait-threshold");
if (s != null) {
SAVED_ACK_WAIT_THRESHOLD = s;
LogWriterUtils.getLogWriter().info("removing system property gemfire.ack-wait-threshold");
- System.getProperties().remove("gemfire.ack-wait-threshold");
+ System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "ack-wait-threshold");
}
Properties props = super.getDistributedSystemProperties();
props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
index 0ac9357..29de762 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImplJUnitTest.java
@@ -16,30 +16,27 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.net.BindException;
-import java.util.Collections;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.InternalCache;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.net.BindException;
+import java.util.Collections;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class AcceptorImplJUnitTest
@@ -52,7 +49,7 @@ public class AcceptorImplJUnitTest
public void setUp() throws Exception
{
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME ,"0");
+ p.setProperty(MCAST_PORT, "0");
this.system = DistributedSystem.connect(p);
this.cache = (InternalCache) CacheFactory.create(system);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/BackwardCompatibilityHigherVersionClientDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/BackwardCompatibilityHigherVersionClientDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/BackwardCompatibilityHigherVersionClientDUnitTest.java
index d876986..1517def 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/BackwardCompatibilityHigherVersionClientDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/BackwardCompatibilityHigherVersionClientDUnitTest.java
@@ -16,28 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.ConnectionFactoryImpl;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.tier.ConnectionProxy;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.internal.ConnectionFactoryImpl;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -94,8 +86,8 @@ public class BackwardCompatibilityHigherVersionClientDUnitTest extends
throws Exception {
new BackwardCompatibilityHigherVersionClientDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new BackwardCompatibilityHigherVersionClientDUnitTest("temp")
.createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory().addServer(host,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36269DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36269DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36269DUnitTest.java
index 80d238e..7023a9b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36269DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36269DUnitTest.java
@@ -16,31 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.MirrorType;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* The Region Destroy Operation from Cache Client does not pass the Client side
@@ -133,8 +124,8 @@ public class Bug36269DUnitTest extends DistributedTestCase
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new Bug36269DUnitTest("temp").createCache(props);
CacheServerTestUtil.disableShufflingOfEndpoints();
PoolImpl p;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36457DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36457DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36457DUnitTest.java
index 545b2a8..6b3dcaa 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36457DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36457DUnitTest.java
@@ -16,33 +16,24 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Bug Test for bug#36457
@@ -96,8 +87,8 @@ public class Bug36457DUnitTest extends DistributedTestCase
throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new Bug36457DUnitTest("temp").createCache(props);
Pool p = PoolManager.createFactory()
.addServer(host, port1.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36805DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36805DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36805DUnitTest.java
index 6ce5520..9bdb1e1 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36805DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36805DUnitTest.java
@@ -16,30 +16,21 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* bug test for bug 36805
@@ -100,8 +91,8 @@ public class Bug36805DUnitTest extends DistributedTestCase
throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new Bug36805DUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, port1.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
index 8eeec93..91b661e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
@@ -16,22 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.InterestResultPolicy;
import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class Bug36829DUnitTest extends DistributedTestCase {
private VM serverVM;
@@ -154,8 +154,8 @@ public class Bug36829DUnitTest extends DistributedTestCase {
private Properties getClientDistributedSystemProperties(
String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36995DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36995DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36995DUnitTest.java
index 094635c..d841c22 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36995DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36995DUnitTest.java
@@ -16,26 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class Bug36995DUnitTest extends DistributedTestCase
{
@@ -78,8 +75,8 @@ public class Bug36995DUnitTest extends DistributedTestCase
{
try {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new Bug36995DUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, port1)
@@ -107,8 +104,8 @@ public class Bug36995DUnitTest extends DistributedTestCase
{
try {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new Bug36995DUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, port1)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
index 77d1f8c..53d1aba 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37210DUnitTest.java
@@ -16,30 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This tests the fix for bug 73210. Reason for the bug was that HARegionQueue's
@@ -201,8 +193,8 @@ public class Bug37210DUnitTest extends DistributedTestCase
{
Bug37210DUnitTest test = new Bug37210DUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
cache = test.createCache(props);
Pool p = PoolManager.createFactory()
.addServer(host, port.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
index 3b0157f..f84c3ed 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
@@ -16,16 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.HARegion;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -33,6 +30,13 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
*
*
@@ -127,8 +131,8 @@ public class Bug37805DUnitTest extends DistributedTestCase{
private Properties getDurableClientDistributedSystemProperties(
String durableClientId, int durableClientTimeout) {
Properties properties = new Properties();
- properties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- properties.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
durableClientId);
properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java
index f86c2bf..398cee4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerMaxConnectionsJUnitTest.java
@@ -16,32 +16,30 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import static org.junit.Assert.*;
-import junit.framework.TestCase;
-
import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.NoAvailableServersException;
+import com.gemstone.gemfire.cache.client.PoolFactory;
+import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
* Make sure max-connections on cache server is enforced
@@ -125,8 +123,8 @@ public class CacheServerMaxConnectionsJUnitTest
try {
Properties p = new Properties();
// make it a loner
- p.put("mcast-port", "0");
- p.put("locators", "");
+ p.put(MCAST_PORT, "0");
+ p.put(LOCATORS, "");
this.system = DistributedSystem.connect(p);
this.cache = CacheFactory.create(system);
server = this.cache.addCacheServer();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
index c48482c..fc40aed 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
@@ -16,28 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.io.File;
-import java.net.InetSocketAddress;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Declarable;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.client.Pool;
-import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.query.CqEvent;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -49,12 +29,19 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl.PoolAttributes;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.net.InetSocketAddress;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
*
@@ -129,8 +116,8 @@ public class CacheServerTestUtil extends DistributedTestCase
public static void createPool(PoolAttributes poolAttr) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = new CacheServerTestUtil("tmp").getSystem(props);;
@@ -215,17 +202,17 @@ public class CacheServerTestUtil extends DistributedTestCase
ClientCacheFactory ccf = new ClientCacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set("cache-xml-file", cacheXmlFile.toURI().getPath());
+ ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
}
catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
}
- ccf.set("mcast-port", "0");
+ ccf.set(MCAST_PORT, "0");
ccf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
ccf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(timeout));
- ccf.set("log-file", "abs_client_system.log");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.LOG_FILE_NAME, "abs_client_system.log");
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
cache = (Cache)ccf.create();
expected = IgnoredException.addIgnoredException("java.net.ConnectionException||java.net.SocketException");
pool = (PoolImpl)PoolManager.find(poolName);
@@ -236,13 +223,13 @@ public class CacheServerTestUtil extends DistributedTestCase
ClientCacheFactory ccf = new ClientCacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set("cache-xml-file", cacheXmlFile.toURI().getPath());
+ ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
}
catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
}
- ccf.set("mcast-port", "0");
+ ccf.set(MCAST_PORT, "0");
ccf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
ccf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(timeout));
cache = (Cache)ccf.create();
@@ -255,11 +242,11 @@ public class CacheServerTestUtil extends DistributedTestCase
CacheFactory ccf = new CacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set("cache-xml-file", cacheXmlFile.toURI().getPath());
- ccf.set("mcast-port", "0");
- ccf.set("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
- ccf.set("log-file", "abs_server_system.log");
- ccf.set("log-level", LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
+ ccf.set(MCAST_PORT, "0");
+ ccf.set(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+ ccf.set(DistributionConfig.LOG_FILE_NAME, "abs_server_system.log");
+ ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
}
catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
@@ -272,9 +259,9 @@ public class CacheServerTestUtil extends DistributedTestCase
CacheFactory ccf = new CacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set("cache-xml-file", cacheXmlFile.toURI().getPath());
- ccf.set("mcast-port", "0");
- ccf.set("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
+ ccf.set(MCAST_PORT, "0");
+ ccf.set(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
}
catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
@@ -311,16 +298,16 @@ public class CacheServerTestUtil extends DistributedTestCase
private static Properties getClientProperties()
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
return props;
}
private static Properties getClientProperties(boolean durable)
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
return props;
}
@@ -328,8 +315,8 @@ public class CacheServerTestUtil extends DistributedTestCase
Boolean notifyBySubscription) throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
new CacheServerTestUtil("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
@@ -350,8 +337,8 @@ public class CacheServerTestUtil extends DistributedTestCase
{
Properties props = new Properties();
// int mcastPort = AvailablePort.getRandomAvailablePort(AvailablePort.JGROUPS);
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
new CacheServerTestUtil("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
@@ -371,8 +358,8 @@ public class CacheServerTestUtil extends DistributedTestCase
Boolean notifyBySubscription, Integer serverPort)
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
new CacheServerTestUtil("temp").createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
@@ -515,8 +502,8 @@ public class CacheServerTestUtil extends DistributedTestCase
public static void disableShufflingOfEndpoints()
{
// TODO DISABLE_RANDOM doesn't seem to be used anywhere
- System.setProperty("gemfire.PoolImpl.DISABLE_RANDOM", "true");
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.DISABLE_RANDOM", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "true");
}
/**
* Enables the shuffling of endpoints for a client
@@ -525,8 +512,8 @@ public class CacheServerTestUtil extends DistributedTestCase
public static void enableShufflingOfEndpoints()
{
// TODO DISABLE_RANDOM doesn't seem to be used anywhere
- System.setProperty("gemfire.PoolImpl.DISABLE_RANDOM", "false");
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.DISABLE_RANDOM", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "false");
}
/**
@@ -535,7 +522,7 @@ public class CacheServerTestUtil extends DistributedTestCase
*/
public static void resetDisableShufflingOfEndpointsFlag()
{
- System.setProperty("gemfire.bridge.disableShufflingOfEndpoints", "false");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints", "false");
}
public static class EventWrapper {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
index f03f5fa..e80a115 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTransactionsDUnitTest.java
@@ -16,19 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CommitConflictException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -36,14 +24,14 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests behaviour of transactions in client server model
@@ -645,8 +633,8 @@ public class CacheServerTransactionsDUnitTest extends DistributedTestCase
public static void createClientCache(String host, Integer port) throws Exception
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new CacheServerTransactionsDUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, port.intValue())
@@ -680,8 +668,8 @@ public class CacheServerTransactionsDUnitTest extends DistributedTestCase
throws Exception
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new CacheServerTransactionsDUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(host, port1.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClearPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClearPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClearPropagationDUnitTest.java
index 63e1874..59fe5f9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClearPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClearPropagationDUnitTest.java
@@ -16,17 +16,12 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.*;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.Pool;
+import com.gemstone.gemfire.cache.client.PoolManager;
+import com.gemstone.gemfire.cache.client.internal.Connection;
+import com.gemstone.gemfire.cache.client.internal.PoolImpl;
+import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
@@ -36,16 +31,14 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheObserverAdapter;
import com.gemstone.gemfire.internal.cache.CacheObserverHolder;
import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.cache.client.*;
-import com.gemstone.gemfire.cache.client.internal.PoolImpl;
-import com.gemstone.gemfire.cache.client.internal.ServerRegionProxy;
-import com.gemstone.gemfire.cache.client.internal.Connection;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This is the DUnit Test to verify clear and DestroyRegion operation in
@@ -351,8 +344,8 @@ public class ClearPropagationDUnitTest extends DistributedTestCase
PORT1 = port1.intValue();
PORT2 = port2.intValue();
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new ClearPropagationDUnitTest("temp").createCache(props);
CacheServerTestUtil.disableShufflingOfEndpoints();
Pool p;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
index 1eb2700..8f185f5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
@@ -16,17 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
@@ -35,19 +25,17 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.AvailablePort;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* This test verifies the per-client queue conflation override functionality
@@ -154,8 +142,8 @@ public class ClientConflationDUnitTest extends DistributedTestCase
private static Properties createProperties1(String conflation){
Properties props = new Properties();
props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
props.setProperty(DistributionConfig.CLIENT_CONFLATION_PROP_NAME, conflation);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
index 5953b8a..1014063 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientHealthMonitorJUnitTest.java
@@ -16,15 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.StatisticsType;
import com.gemstone.gemfire.cache.AttributesFactory;
@@ -44,6 +35,16 @@ import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
* This is a functional-test for <code>ClientHealthMonitor</code>.
@@ -123,8 +124,8 @@ public class ClientHealthMonitorJUnitTest
try {
Properties p = new Properties();
// make it a loner
- p.put("mcast-port", "0");
- p.put("locators", "");
+ p.put(MCAST_PORT, "0");
+ p.put(LOCATORS, "");
this.system = DistributedSystem.connect(p);
this.cache = CacheFactory.create(system);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
index a4ab3c1..0f2c519 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
@@ -16,20 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.concurrent.TimeUnit;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
@@ -40,16 +27,16 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.jayway.awaitility.Awaitility;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* This test verifies the per-client notify-by-subscription (NBS) override
* functionality along with register interest new receiveValues flag.
@@ -167,8 +154,8 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
ds.disconnect();
ds = getSystem(props);
*/
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
if (cache == null) {
@@ -319,8 +306,8 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
*/
private static Properties createProperties1(/*String nbs*/){
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
//props.setProperty(DistributionConfig.NOTIFY_BY_SUBSCRIPTION_OVERRIDE_PROP_NAME, nbs);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerForceInvalidateDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerForceInvalidateDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerForceInvalidateDUnitTest.java
index ce411d8..23a4e2a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerForceInvalidateDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerForceInvalidateDUnitTest.java
@@ -16,24 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import static com.jayway.awaitility.Awaitility.with;
-
-import java.util.Properties;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.NoAvailableServersException;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.Connection;
@@ -51,6 +34,15 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.NetworkUtils;
import com.gemstone.gemfire.test.dunit.VM;
+import org.apache.logging.log4j.Logger;
+
+import java.util.Properties;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.jayway.awaitility.Awaitility.with;
/**
* Tests client server FORCE_INVALIDATE
@@ -289,8 +281,8 @@ public class ClientServerForceInvalidateDUnitTest extends CacheTestCase
throws Exception {
AbstractRegionMap.FORCE_INVALIDATE_EVENT = true;
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
Cache cache = new ClientServerForceInvalidateDUnitTest("temp").createCacheV(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory()
.addServer(h, port1)
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
index d5111bc..0fd1bb4 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientServerMiscDUnitTest.java
@@ -16,19 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheWriterException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.NoAvailableServersException;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
@@ -41,19 +30,18 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests client server corner cases between Region and Pool
@@ -578,8 +566,8 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
// start server first
PORT1 = initServerCache(false);
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new ClientServerMiscDUnitTest("temp").createCache(props);
String host = NetworkUtils.getServerHostName(server1.getHost());
PoolImpl p = (PoolImpl)PoolManager.createFactory()
@@ -677,8 +665,8 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
public void testProxyCreationBeforeCacheCreation() throws Exception
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = getSystem(props);
assertNotNull(ds);
ds.disconnect();
@@ -729,8 +717,8 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
//work around GEODE-477
IgnoredException.addIgnoredException("Connection reset");
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
DistributedSystem ds = getSystem(props);
assertNotNull(ds);
@@ -759,8 +747,8 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
ds.disconnect();
Properties prop = new Properties();
- prop.setProperty("mcast-port", "0");
- prop.setProperty("locators", "");
+ prop.setProperty(MCAST_PORT, "0");
+ prop.setProperty(LOCATORS, "");
ds = getSystem(prop);
cache = getCache();
@@ -815,8 +803,8 @@ public class ClientServerMiscDUnitTest extends CacheTestCase
public static Pool _createClientCache(String h, int port, boolean empty)
throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
Cache cache = new ClientServerMiscDUnitTest("temp").createCacheV(props);
ClientServerMiscDUnitTest.static_cache = cache;
PoolImpl p = (PoolImpl)PoolManager.createFactory()
[28/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index ac4c24f..ed570c1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@ -16,42 +16,12 @@
*/
package com.gemstone.gemfire.internal.tcp;
-import java.io.IOException;
-import java.net.Inet6Address;
-import java.net.InetAddress;
-import java.net.InetSocketAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.SocketException;
-import java.nio.channels.ClosedByInterruptException;
-import java.nio.channels.ClosedChannelException;
-import java.nio.channels.ServerSocketChannel;
-import java.nio.channels.SocketChannel;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.RejectedExecutionException;
-import java.util.concurrent.RejectedExecutionHandler;
-import java.util.concurrent.SynchronousQueue;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.ThreadPoolExecutor;
-import java.util.concurrent.TimeUnit;
-
-import javax.net.ssl.SSLException;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DMStats;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionMessage;
-import com.gemstone.gemfire.distributed.internal.LonerDistributionManager;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.direct.DirectChannel;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
@@ -62,6 +32,18 @@ import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import org.apache.logging.log4j.Logger;
+
+import javax.net.ssl.SSLException;
+import java.io.IOException;
+import java.net.*;
+import java.nio.channels.ClosedByInterruptException;
+import java.nio.channels.ClosedChannelException;
+import java.nio.channels.ServerSocketChannel;
+import java.nio.channels.SocketChannel;
+import java.util.Map;
+import java.util.Properties;
+import java.util.concurrent.*;
/** <p>TCPConduit manages a server socket and a collection of connections to
other systems. Connections are identified by DistributedMember IDs.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/util/Breadcrumbs.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/Breadcrumbs.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/Breadcrumbs.java
index 19128aa..d2371d6 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/Breadcrumbs.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/Breadcrumbs.java
@@ -16,8 +16,8 @@
*/
package com.gemstone.gemfire.internal.util;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.i18n.StringId;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
import com.gemstone.gemfire.internal.cache.EventID;
/**
@@ -29,9 +29,9 @@ import com.gemstone.gemfire.internal.cache.EventID;
*/
public class Breadcrumbs {
- private static ThreadLocal<EventID> EventIDs = new ThreadLocal<EventID>();
-
- public static boolean ENABLED = Boolean.getBoolean("gemfire.enable-breadcrumbs");
+ private static ThreadLocal<EventID> EventIDs = new ThreadLocal<EventID>();
+
+ public static boolean ENABLED = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "enable-breadcrumbs");
/** delimiter for crumb numbers */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/util/JavaCommandBuilder.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/JavaCommandBuilder.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/JavaCommandBuilder.java
index 233ab83..d6ff609 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/JavaCommandBuilder.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/JavaCommandBuilder.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.util;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
import java.io.File;
import java.util.ArrayList;
import java.util.List;
@@ -81,7 +83,7 @@ public class JavaCommandBuilder {
private static String getDashServerArg(final File javaBinDir) {
// the gemfire.vmarg.dashserver property allows customers to add a custom argument in place of -server
- final String altDashServerArg = System.getProperty("gemfire.vmarg.dashserver", null);
+ final String altDashServerArg = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "vmarg.dashserver", null);
return (altDashServerArg != null ? altDashServerArg : (omitDashServerArg(javaBinDir) ? null : "-server"));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/StoppableCountDownLatch.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/StoppableCountDownLatch.java b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/StoppableCountDownLatch.java
index 36506fb..35376c0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/StoppableCountDownLatch.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/StoppableCountDownLatch.java
@@ -16,12 +16,13 @@
*/
package com.gemstone.gemfire.internal.util.concurrent;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
import com.gemstone.gemfire.CancelCriterion;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
/**
* This class is a "stoppable" cover for {@link CountDownLatch}.
*/
@@ -30,7 +31,7 @@ public class StoppableCountDownLatch {
/**
* This is how often waiters will wake up to check for cancellation
*/
- static final long RETRY_TIME = Long.getLong("gemfire.stoppable-retry-interval", 2000).longValue();
+ static final long RETRY_TIME = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "stoppable-retry-interval", 2000).longValue();
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/JMXNotificationType.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/JMXNotificationType.java b/geode-core/src/main/java/com/gemstone/gemfire/management/JMXNotificationType.java
index 28984e0..4726583 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/JMXNotificationType.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/JMXNotificationType.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+
/**
* Enumerated type for JMX notification types emitted by GemFire management
* system. This types can be matched with
@@ -33,7 +35,7 @@ public interface JMXNotificationType {
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.region.created</CODE>.
*/
- public static final String REGION_CREATED = "gemfire.distributedsystem.cache.region.created";
+ public static final String REGION_CREATED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.region.created";
/**
* Notification type which indicates that a region has been closed/destroyed
@@ -41,35 +43,35 @@ public interface JMXNotificationType {
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.region.closed</CODE>.
*/
- public static final String REGION_CLOSED = "gemfire.distributedsystem.cache.region.closed";
+ public static final String REGION_CLOSED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.region.closed";
/**
* Notification type which indicates that a disk store has been created <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.disk.created</CODE>.
*/
- public static final String DISK_STORE_CREATED = "gemfire.distributedsystem.cache.disk.created";
+ public static final String DISK_STORE_CREATED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.disk.created";
/**
* Notification type which indicates that a disk store has been closed. <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.disk.closed</CODE>.
*/
- public static final String DISK_STORE_CLOSED = "gemfire.distributedsystem.cache.disk.closed";
+ public static final String DISK_STORE_CLOSED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.disk.closed";
/**
* Notification type which indicates that a lock service has been created. <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.lockservice.created</CODE>.
*/
- public static final String LOCK_SERVICE_CREATED = "gemfire.distributedsystem.cache.lockservice.created";
+ public static final String LOCK_SERVICE_CREATED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.lockservice.created";
/**
* Notification type which indicates that a lock service has been closed. <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.lockservice.closed</CODE>.
*/
- public static final String LOCK_SERVICE_CLOSED = "gemfire.distributedsystem.cache.lockservice.closed";
+ public static final String LOCK_SERVICE_CLOSED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.lockservice.closed";
/**
* Notification type which indicates that a member has been added to the
@@ -77,7 +79,7 @@ public interface JMXNotificationType {
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.created</CODE>.
*/
- public static final String CACHE_MEMBER_JOINED = "gemfire.distributedsystem.cache.member.joined";
+ public static final String CACHE_MEMBER_JOINED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.member.joined";
/**
* Notification type which indicates that a member has departed from the
@@ -85,84 +87,84 @@ public interface JMXNotificationType {
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.created</CODE>.
*/
- public static final String CACHE_MEMBER_DEPARTED = "gemfire.distributedsystem.cache.member.departed";
+ public static final String CACHE_MEMBER_DEPARTED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.member.departed";
/**
* Notification type which indicates that a member is suspected. <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.created</CODE>.
*/
- public static final String CACHE_MEMBER_SUSPECT = "gemfire.distributedsystem.cache.member.suspect";
+ public static final String CACHE_MEMBER_SUSPECT = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.member.suspect";
/**
* Notification type which indicates that a client has joined <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cacheserver.client.joined</CODE>.
*/
- public static final String CLIENT_JOINED = "gemfire.distributedsystem.cacheserver.client.joined";
+ public static final String CLIENT_JOINED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cacheserver.client.joined";
/**
* Notification type which indicates that a client has left <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cacheserver.client.left</CODE>.
*/
- public static final String CLIENT_LEFT = "gemfire.distributedsystem.cacheserver.client.left";
+ public static final String CLIENT_LEFT = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cacheserver.client.left";
/**
* Notification type which indicates that a client has crashed <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cacheserver.client.crashed</CODE>.
*/
- public static final String CLIENT_CRASHED = "gemfire.distributedsystem.cacheserver.client.crashed";
+ public static final String CLIENT_CRASHED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cacheserver.client.crashed";
/**
* Notification type which indicates that a gateway receiver is created <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.receiver.created</CODE>.
*/
- public static final String GATEWAY_RECEIVER_CREATED = "gemfire.distributedsystem.gateway.receiver.created";
+ public static final String GATEWAY_RECEIVER_CREATED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.receiver.created";
/**
* Notification type which indicates that a gateway sender is created <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.sender.created</CODE>.
*/
- public static final String GATEWAY_SENDER_CREATED = "gemfire.distributedsystem.gateway.sender.created";
+ public static final String GATEWAY_SENDER_CREATED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.sender.created";
/**
* Notification type which indicates that a gateway sender is started <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.sender.started</CODE>.
*/
- public static final String GATEWAY_SENDER_STARTED = "gemfire.distributedsystem.gateway.sender.started";
+ public static final String GATEWAY_SENDER_STARTED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.sender.started";
/**
* Notification type which indicates that a gateway sender is stopped <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.sender.stopped</CODE>.
*/
- public static final String GATEWAY_SENDER_STOPPED = "gemfire.distributedsystem.gateway.sender.stopped";
+ public static final String GATEWAY_SENDER_STOPPED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.sender.stopped";
/**
* Notification type which indicates that a gateway sender is paused <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.sender.paused</CODE>.
*/
- public static final String GATEWAY_SENDER_PAUSED = "gemfire.distributedsystem.gateway.sender.paused";
+ public static final String GATEWAY_SENDER_PAUSED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.sender.paused";
/**
* Notification type which indicates that a gateway sender is resumed <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.sender.resumed</CODE>.
*/
- public static final String GATEWAY_SENDER_RESUMED = "gemfire.distributedsystem.gateway.sender.resumed";
+ public static final String GATEWAY_SENDER_RESUMED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.sender.resumed";
/**
* Notification type which indicates that an async queue is created <BR>
* The value of this type string is
* <CODE>ggemfire.distributedsystem.asycn.event.queue.created</CODE>.
*/
- public static final String ASYNC_EVENT_QUEUE_CREATED = "gemfire.distributedsystem.asycn.event.queue.created";
+ public static final String ASYNC_EVENT_QUEUE_CREATED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.asycn.event.queue.created";
/**
* Notification type which indicates a GemFire system generated alert <BR>
@@ -175,33 +177,33 @@ public interface JMXNotificationType {
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.server.started</CODE>.
*/
- public static final String CACHE_SERVER_STARTED = "gemfire.distributedsystem.cache.server.started";
+ public static final String CACHE_SERVER_STARTED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.server.started";
/**
* Notification type which indicates that cache server is stopped <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.cache.server.stopped</CODE>.
*/
- public static final String CACHE_SERVER_STOPPED = "gemfire.distributedsystem.cache.server.stopped";
+ public static final String CACHE_SERVER_STOPPED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.server.stopped";
/**
* Notification type which indicates that a gateway receiver is started <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.receiver.started</CODE>.
*/
- public static final String GATEWAY_RECEIVER_STARTED = "gemfire.distributedsystem.gateway.receiver.started";
+ public static final String GATEWAY_RECEIVER_STARTED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.receiver.started";
/**
* Notification type which indicates that a gateway receiver is stopped <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.gateway.receiver.stopped</CODE>.
*/
- public static final String GATEWAY_RECEIVER_STOPPED = "gemfire.distributedsystem.gateway.receiver.stopped";
+ public static final String GATEWAY_RECEIVER_STOPPED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.gateway.receiver.stopped";
/**
* Notification type which indicates that locator is started <BR>
* The value of this type string is
* <CODE>gemfire.distributedsystem.locator.started</CODE>.
*/
- public static final String LOCATOR_STARTED = "gemfire.distributedsystem.locator.started";
+ public static final String LOCATOR_STARTED = DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.locator.started";
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
index 8ce84ad..59c398e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
@@ -17,13 +17,13 @@
package com.gemstone.gemfire.management.internal;
-import java.io.File;
-import java.net.URL;
-
-import org.apache.logging.log4j.Logger;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.net.URL;
/**
* Hosts common utility methods needed by the management package
@@ -116,7 +116,7 @@ public class AgentUtil {
// Check for empty variable. if empty, then log message and exit HTTP server
// startup
if (StringUtils.isBlank(gemFireHome)) {
- gemFireHome = System.getProperty("gemfire.home");
+ gemFireHome = System.getProperty(DistributionConfig.GEMFIRE_PREFIX + "home");
logger.info("Reading gemfire.home System Property -> {}", gemFireHome);
if (StringUtils.isBlank(gemFireHome)) {
logger.info("GEMFIRE environment variable not set; HTTP service will not start.");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisee.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisee.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisee.java
index c82ce06..3af34e1 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisee.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/JmxManagerAdvisee.java
@@ -16,20 +16,16 @@
*/
package com.gemstone.gemfire.management.internal;
-import java.net.UnknownHostException;
-
import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisee;
-import com.gemstone.gemfire.distributed.internal.DistributionAdvisor;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.Profile;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.internal.JmxManagerAdvisor.JmxManagerProfile;
+import java.net.UnknownHostException;
+
/**
*
* @since GemFire 7.0
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
index 2d95993..9807456 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
@@ -16,34 +16,6 @@
*/
package com.gemstone.gemfire.management.internal;
-import java.io.IOException;
-import java.io.Serializable;
-import java.lang.management.ManagementFactory;
-import java.net.InetAddress;
-import java.net.ServerSocket;
-import java.net.Socket;
-import java.net.UnknownHostException;
-import java.rmi.AlreadyBoundException;
-import java.rmi.registry.LocateRegistry;
-import java.rmi.registry.Registry;
-import java.rmi.server.RMIClientSocketFactory;
-import java.rmi.server.RMIServerSocketFactory;
-import java.rmi.server.UnicastRemoteObject;
-import java.util.HashMap;
-import java.util.Set;
-import javax.management.InstanceAlreadyExistsException;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.NotCompliantMBeanException;
-import javax.management.ObjectName;
-import javax.management.remote.JMXConnectorServer;
-import javax.management.remote.JMXServiceURL;
-import javax.management.remote.rmi.RMIConnectorServer;
-import javax.management.remote.rmi.RMIJRMPServerImpl;
-import javax.management.remote.rmi.RMIServerImpl;
-import javax.rmi.ssl.SslRMIClientSocketFactory;
-
import com.gemstone.gemfire.GemFireConfigException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -53,6 +25,7 @@ import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.lang.StringUtils;
import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
import com.gemstone.gemfire.internal.tcp.TCPConduit;
import com.gemstone.gemfire.management.ManagementException;
import com.gemstone.gemfire.management.ManagementService;
@@ -61,12 +34,33 @@ import com.gemstone.gemfire.management.internal.security.AccessControlMBean;
import com.gemstone.gemfire.management.internal.security.MBeanServerWrapper;
import com.gemstone.gemfire.management.internal.security.ResourceConstants;
import com.gemstone.gemfire.management.internal.unsafe.ReadOpFileAccessController;
-import com.gemstone.gemfire.internal.security.shiro.JMXShiroAuthenticator;
-
import org.apache.logging.log4j.Logger;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
+import javax.management.*;
+import javax.management.remote.JMXConnectorServer;
+import javax.management.remote.JMXServiceURL;
+import javax.management.remote.rmi.RMIConnectorServer;
+import javax.management.remote.rmi.RMIJRMPServerImpl;
+import javax.management.remote.rmi.RMIServerImpl;
+import javax.rmi.ssl.SslRMIClientSocketFactory;
+import java.io.IOException;
+import java.io.Serializable;
+import java.lang.management.ManagementFactory;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.rmi.AlreadyBoundException;
+import java.rmi.registry.LocateRegistry;
+import java.rmi.registry.Registry;
+import java.rmi.server.RMIClientSocketFactory;
+import java.rmi.server.RMIServerSocketFactory;
+import java.rmi.server.UnicastRemoteObject;
+import java.util.HashMap;
+import java.util.Set;
+
/**
* Agent implementation that controls the JMX server end points for JMX clients
* to connect, such as an RMI server.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementConstants.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementConstants.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementConstants.java
index 925d9bd..8598104 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementConstants.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementConstants.java
@@ -16,13 +16,12 @@
*/
package com.gemstone.gemfire.management.internal;
-import java.util.concurrent.TimeUnit;
-
-import javax.management.ObjectName;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.internal.beans.QueryDataFunction;
+import javax.management.ObjectName;
+import java.util.concurrent.TimeUnit;
+
/**
* Management Related Constants are defined here
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
index 5556c4d..b802648 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/BeanUtilFuncs.java
@@ -16,17 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.beans;
-import java.io.BufferedReader;
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.RandomAccessFile;
-import java.util.Set;
-import java.util.zip.GZIPInputStream;
-import java.util.zip.GZIPOutputStream;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedMember;
@@ -34,6 +23,11 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.GemFireProperties;
import com.gemstone.gemfire.management.internal.cli.CliUtil;
+import java.io.*;
+import java.util.Set;
+import java.util.zip.GZIPInputStream;
+import java.util.zip.GZIPOutputStream;
+
/**
* Various Utility Functions to be used by MBeans
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
index 98258e8..89cc4f0 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/beans/MemberMBeanBridge.java
@@ -16,29 +16,6 @@
*/
package com.gemstone.gemfire.management.internal.beans;
-import java.io.File;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.lang.management.MemoryMXBean;
-import java.lang.management.MemoryUsage;
-import java.lang.management.OperatingSystemMXBean;
-import java.lang.management.RuntimeMXBean;
-import java.lang.management.ThreadInfo;
-import java.lang.management.ThreadMXBean;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.concurrent.TimeUnit;
-import javax.management.JMRuntimeException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-
import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.StatisticsType;
import com.gemstone.gemfire.cache.CacheClosedException;
@@ -51,36 +28,11 @@ import com.gemstone.gemfire.cache.wan.GatewaySender;
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.LocatorLauncher;
import com.gemstone.gemfire.distributed.ServerLauncher;
-import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionStats;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.distributed.internal.*;
import com.gemstone.gemfire.distributed.internal.locks.DLockService;
import com.gemstone.gemfire.distributed.internal.locks.DLockStats;
-import com.gemstone.gemfire.internal.Assert;
-import com.gemstone.gemfire.internal.GemFireStatSampler;
-import com.gemstone.gemfire.internal.GemFireVersion;
-import com.gemstone.gemfire.internal.HostStatHelper;
-import com.gemstone.gemfire.internal.LinuxSystemStats;
-import com.gemstone.gemfire.internal.ProcessStats;
-import com.gemstone.gemfire.internal.PureJavaMode;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.internal.SolarisSystemStats;
-import com.gemstone.gemfire.internal.StatSamplerStats;
-import com.gemstone.gemfire.internal.VMStatsContract;
-import com.gemstone.gemfire.internal.WindowsSystemStats;
-import com.gemstone.gemfire.internal.cache.CachePerfStats;
-import com.gemstone.gemfire.internal.cache.CacheServerLauncher;
-import com.gemstone.gemfire.internal.cache.DirectoryHolder;
-import com.gemstone.gemfire.internal.cache.DiskDirectoryStats;
-import com.gemstone.gemfire.internal.cache.DiskRegion;
-import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
-import com.gemstone.gemfire.internal.cache.DiskStoreStats;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionStats;
+import com.gemstone.gemfire.internal.*;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.control.ResourceManagerStats;
import com.gemstone.gemfire.internal.cache.execute.FunctionServiceStats;
import com.gemstone.gemfire.internal.cache.lru.LRUStatistics;
@@ -97,37 +49,34 @@ import com.gemstone.gemfire.internal.process.PidUnavailableException;
import com.gemstone.gemfire.internal.process.ProcessUtils;
import com.gemstone.gemfire.internal.stats50.VMStats50;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
-import com.gemstone.gemfire.management.DependenciesNotFoundException;
-import com.gemstone.gemfire.management.DiskBackupResult;
-import com.gemstone.gemfire.management.GemFireProperties;
-import com.gemstone.gemfire.management.JVMMetrics;
-import com.gemstone.gemfire.management.ManagementException;
-import com.gemstone.gemfire.management.OSMetrics;
+import com.gemstone.gemfire.management.*;
import com.gemstone.gemfire.management.cli.CommandService;
import com.gemstone.gemfire.management.cli.CommandServiceException;
import com.gemstone.gemfire.management.cli.Result;
import com.gemstone.gemfire.management.internal.ManagementConstants;
import com.gemstone.gemfire.management.internal.ManagementStrings;
import com.gemstone.gemfire.management.internal.SystemManagementService;
-import com.gemstone.gemfire.management.internal.beans.stats.AggregateRegionStatsMonitor;
-import com.gemstone.gemfire.management.internal.beans.stats.GCStatsMonitor;
-import com.gemstone.gemfire.management.internal.beans.stats.MBeanStatsMonitor;
-import com.gemstone.gemfire.management.internal.beans.stats.MemberLevelDiskMonitor;
-import com.gemstone.gemfire.management.internal.beans.stats.StatType;
-import com.gemstone.gemfire.management.internal.beans.stats.StatsAverageLatency;
-import com.gemstone.gemfire.management.internal.beans.stats.StatsKey;
-import com.gemstone.gemfire.management.internal.beans.stats.StatsLatency;
-import com.gemstone.gemfire.management.internal.beans.stats.StatsRate;
-import com.gemstone.gemfire.management.internal.beans.stats.VMStatsMonitor;
+import com.gemstone.gemfire.management.internal.beans.stats.*;
import com.gemstone.gemfire.management.internal.cli.CommandResponseBuilder;
import com.gemstone.gemfire.management.internal.cli.remote.CommandExecutionContext;
import com.gemstone.gemfire.management.internal.cli.remote.MemberCommandService;
import com.gemstone.gemfire.management.internal.cli.result.CommandResult;
import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
-
import org.apache.logging.log4j.Logger;
+import javax.management.JMRuntimeException;
+import javax.management.MBeanServer;
+import javax.management.MalformedObjectNameException;
+import javax.management.ObjectName;
+import java.io.File;
+import java.io.IOException;
+import java.lang.management.*;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
/**
* This class acts as an Bridge between MemberMBean and GemFire Cache and
* Distributed System
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
index 1b5c1d3..690280b 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/CommandManager.java
@@ -16,44 +16,25 @@
*/
package com.gemstone.gemfire.management.internal.cli;
-import java.io.IOException;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.ServiceConfigurationError;
-import java.util.ServiceLoader;
-import java.util.Set;
-import java.util.StringTokenizer;
-import java.util.TreeMap;
-
-import org.springframework.shell.core.CommandMarker;
-import org.springframework.shell.core.Converter;
-import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
-import org.springframework.shell.core.annotation.CliCommand;
-import org.springframework.shell.core.annotation.CliOption;
-
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.management.cli.CliMetaData;
import com.gemstone.gemfire.management.internal.cli.annotation.CliArgument;
import com.gemstone.gemfire.management.internal.cli.help.CliTopic;
-import com.gemstone.gemfire.management.internal.cli.parser.Argument;
-import com.gemstone.gemfire.management.internal.cli.parser.AvailabilityTarget;
-import com.gemstone.gemfire.management.internal.cli.parser.CommandTarget;
-import com.gemstone.gemfire.management.internal.cli.parser.GfshMethodTarget;
-import com.gemstone.gemfire.management.internal.cli.parser.GfshOptionParser;
-import com.gemstone.gemfire.management.internal.cli.parser.Option;
+import com.gemstone.gemfire.management.internal.cli.parser.*;
import com.gemstone.gemfire.management.internal.cli.parser.jopt.JoptOptionParser;
import com.gemstone.gemfire.management.internal.cli.util.ClasspathScanLoadHelper;
+import org.springframework.shell.core.CommandMarker;
+import org.springframework.shell.core.Converter;
+import org.springframework.shell.core.annotation.CliAvailabilityIndicator;
+import org.springframework.shell.core.annotation.CliCommand;
+import org.springframework.shell.core.annotation.CliOption;
+
+import java.io.IOException;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.*;
+import java.util.Map.Entry;
/**
*
@@ -66,7 +47,7 @@ public class CommandManager {
private static final Object INSTANCE_LOCK = new Object();
private static CommandManager INSTANCE = null;
- public static final String USER_CMD_PACKAGES_PROPERTY = "gemfire." + DistributionConfig.USER_COMMAND_PACKAGES;
+ public static final String USER_CMD_PACKAGES_PROPERTY = DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.USER_COMMAND_PACKAGES;
public static final String USER_CMD_PACKAGES_ENV_VARIABLE = "GEMFIRE_USER_COMMAND_PACKAGES";
private Properties cacheProperties;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
index 8c89838..4ba8c36 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
@@ -35,13 +35,8 @@ import com.gemstone.gemfire.management.internal.cli.functions.CliFunctionResult;
import com.gemstone.gemfire.management.internal.cli.functions.ExportConfigFunction;
import com.gemstone.gemfire.management.internal.cli.functions.GetMemberConfigInformationFunction;
import com.gemstone.gemfire.management.internal.cli.i18n.CliStrings;
-import com.gemstone.gemfire.management.internal.cli.result.CommandResultException;
-import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData;
+import com.gemstone.gemfire.management.internal.cli.result.*;
import com.gemstone.gemfire.management.internal.cli.result.CompositeResultData.SectionResultData;
-import com.gemstone.gemfire.management.internal.cli.result.ErrorResultData;
-import com.gemstone.gemfire.management.internal.cli.result.InfoResultData;
-import com.gemstone.gemfire.management.internal.cli.result.ResultBuilder;
-import com.gemstone.gemfire.management.internal.cli.result.TabularResultData;
import com.gemstone.gemfire.management.internal.cli.shell.Gfsh;
import com.gemstone.gemfire.management.internal.configuration.SharedConfigurationWriter;
import com.gemstone.gemfire.management.internal.configuration.domain.XmlEntity;
@@ -53,15 +48,7 @@ import org.springframework.shell.core.annotation.CliOption;
import java.io.File;
import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.*;
import static com.gemstone.gemfire.cache.operations.OperationContext.OperationCode;
import static com.gemstone.gemfire.cache.operations.OperationContext.Resource;
[36/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index f35ce8c..8033a41 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -17,18 +17,8 @@
package com.gemstone.gemfire.distributed.internal;
-import java.io.File;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.Config;
import com.gemstone.gemfire.internal.ConfigSource;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
@@ -36,6 +26,12 @@ import com.gemstone.gemfire.internal.logging.LogConfig;
import com.gemstone.gemfire.internal.tcp.Connection;
import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
+import java.io.File;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.net.InetAddress;
+import java.util.*;
+
/**
* Provides accessor (and in some cases mutator) methods for the
* various GemFire distribution configuration properties. The
@@ -52,7 +48,7 @@ import com.gemstone.gemfire.memcached.GemFireMemcachedServer;
*
* @since GemFire 2.1
*/
-public interface DistributionConfig extends Config, LogConfig {
+public interface DistributionConfig extends Config, LogConfig, SystemConfigurationProperties {
//////////////////// Instance Methods ////////////////////
@@ -67,7 +63,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @return the system's name.
*/
@ConfigAttributeGetter(name=NAME_NAME)
- public String getName();
+ String getName();
/**
* Sets the member's name.
@@ -78,19 +74,17 @@ public interface DistributionConfig extends Config, LogConfig {
* when writing to the system's configuration file.
*/
@ConfigAttributeSetter(name=NAME_NAME)
- public void setName(String value);
+ void setName(String value);
/** The name of the "name" property */
@ConfigAttribute(type=String.class)
- public static final String NAME_NAME = "name";
-
-
+ String NAME_NAME = NAME;
/**
* The default system name.
* <p> Actual value of this constant is <code>""</code>.
*/
- public static final String DEFAULT_NAME = "";
+ String DEFAULT_NAME = "";
/**
* Returns the value of the <a
@@ -98,175 +92,187 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=MCAST_PORT_NAME)
- public int getMcastPort();
+ int getMcastPort();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#mcast-port">"mcast-port"</a>
* property
*/
@ConfigAttributeSetter(name=MCAST_PORT_NAME)
- public void setMcastPort(int value);
-
+ void setMcastPort(int value);
/** The default value of the "mcastPort" property */
- public static final int DEFAULT_MCAST_PORT = 0;
+ int DEFAULT_MCAST_PORT = 0;
+
/**
* The minimum mcastPort.
* <p> Actual value of this constant is <code>0</code>.
*/
- public static final int MIN_MCAST_PORT = 0;
+ int MIN_MCAST_PORT = 0;
+
/**
* The maximum mcastPort.
* <p> Actual value of this constant is <code>65535</code>.
*/
- public static final int MAX_MCAST_PORT = 65535;
+ int MAX_MCAST_PORT = 65535;
/** The name of the "mcastPort" property */
@ConfigAttribute(type=Integer.class, min=MIN_MCAST_PORT, max=MAX_MCAST_PORT)
- public static final String MCAST_PORT_NAME = "mcast-port";
+ String MCAST_PORT_NAME = MCAST_PORT;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#tcp-port">"tcp-port"</a>
* property
*/
- @ConfigAttributeGetter(name=TCP_PORT_NAME)
- public int getTcpPort();
+ @ConfigAttributeGetter(name = TCP_PORT)
+ int getTcpPort();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#tcp-port">"tcp-port"</a>
* property
*/
- @ConfigAttributeSetter(name=TCP_PORT_NAME)
- public void setTcpPort(int value);
+ @ConfigAttributeSetter(name = TCP_PORT)
+ void setTcpPort(int value);
/** The default value of the "tcpPort" property */
- public static final int DEFAULT_TCP_PORT = 0;
+ int DEFAULT_TCP_PORT = 0;
+
/**
* The minimum tcpPort.
* <p> Actual value of this constant is <code>0</code>.
*/
- public static final int MIN_TCP_PORT = 0;
+ int MIN_TCP_PORT = 0;
+
/**
* The maximum tcpPort.
* <p> Actual value of this constant is <code>65535</code>.
*/
- public static final int MAX_TCP_PORT = 65535;
+ int MAX_TCP_PORT = 65535;
+
/** The name of the "tcpPort" property */
@ConfigAttribute(type=Integer.class, min=MIN_TCP_PORT, max=MAX_TCP_PORT)
- public static final String TCP_PORT_NAME = "tcp-port";
+ String TCP_PORT_NAME = TCP_PORT;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#mcast-address">"mcast-address"</a>
* property
*/
- @ConfigAttributeGetter(name=MCAST_ADDRESS_NAME)
- public InetAddress getMcastAddress();
+ @ConfigAttributeGetter(name = MCAST_ADDRESS)
+ InetAddress getMcastAddress();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#mcast-address">"mcast-address"</a>
* property
*/
- @ConfigAttributeSetter(name=MCAST_ADDRESS_NAME)
- public void setMcastAddress(InetAddress value);
-
+ @ConfigAttributeSetter(name = MCAST_ADDRESS)
+ void setMcastAddress(InetAddress value);
/** The name of the "mcastAddress" property */
@ConfigAttribute(type=InetAddress.class)
- public static final String MCAST_ADDRESS_NAME = "mcast-address";
+ String MCAST_ADDRESS_NAME = MCAST_ADDRESS;
/** The default value of the "mcastAddress" property.
* Current value is <code>239.192.81.1</code>
*/
- public static final InetAddress DEFAULT_MCAST_ADDRESS = AbstractDistributionConfig._getDefaultMcastAddress();
+ InetAddress DEFAULT_MCAST_ADDRESS = AbstractDistributionConfig._getDefaultMcastAddress();
/**
* Returns the value of the <a
* href="../DistributedSystem.html#mcast-ttl">"mcast-ttl"</a>
* property
*/
- @ConfigAttributeGetter(name=MCAST_TTL_NAME)
- public int getMcastTtl();
+ @ConfigAttributeGetter(name = MCAST_TTL)
+ int getMcastTtl();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#mcast-ttl">"mcast-ttl"</a>
* property
*/
- @ConfigAttributeSetter(name=MCAST_TTL_NAME)
- public void setMcastTtl(int value);
+ @ConfigAttributeSetter(name = MCAST_TTL)
+ void setMcastTtl(int value);
/** The default value of the "mcastTtl" property */
- public static final int DEFAULT_MCAST_TTL = 32;
+ int DEFAULT_MCAST_TTL = 32;
+
/**
* The minimum mcastTtl.
* <p> Actual value of this constant is <code>0</code>.
*/
- public static final int MIN_MCAST_TTL = 0;
+ int MIN_MCAST_TTL = 0;
+
/**
* The maximum mcastTtl.
* <p> Actual value of this constant is <code>255</code>.
*/
- public static final int MAX_MCAST_TTL = 255;
+ int MAX_MCAST_TTL = 255;
/** The name of the "mcastTtl" property */
@ConfigAttribute(type=Integer.class, min=MIN_MCAST_TTL, max=MAX_MCAST_TTL)
- public static final String MCAST_TTL_NAME = "mcast-ttl";
+ String MCAST_TTL_NAME = MCAST_TTL;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#bind-address">"bind-address"</a>
* property
*/
- @ConfigAttributeGetter(name=BIND_ADDRESS_NAME)
- public String getBindAddress();
+ @ConfigAttributeGetter(name = BIND_ADDRESS)
+ String getBindAddress();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#bind-address">"bind-address"</a>
* property
*/
- @ConfigAttributeSetter(name=BIND_ADDRESS_NAME)
- public void setBindAddress(String value);
+ @ConfigAttributeSetter(name = BIND_ADDRESS)
+ void setBindAddress(String value);
/** The name of the "bindAddress" property */
@ConfigAttribute(type=String.class)
- public static final String BIND_ADDRESS_NAME = "bind-address";
+ String BIND_ADDRESS_NAME = BIND_ADDRESS;
/** The default value of the "bindAddress" property.
* Current value is an empty string <code>""</code>
*/
- public static final String DEFAULT_BIND_ADDRESS = "";
+ String DEFAULT_BIND_ADDRESS = "";
/**
* Returns the value of the <a
* href="../DistributedSystem.html#server-bind-address">"server-bind-address"</a>
* property
*/
- @ConfigAttributeGetter(name=SERVER_BIND_ADDRESS_NAME)
- public String getServerBindAddress();
+ @ConfigAttributeGetter(name = SERVER_BIND_ADDRESS)
+ String getServerBindAddress();
+
/**
* Sets the value of the <a
* href="../DistributedSystem.html#server-bind-address">"server-bind-address"</a>
* property
*/
- @ConfigAttributeSetter(name=SERVER_BIND_ADDRESS_NAME)
- public void setServerBindAddress(String value);
+ @ConfigAttributeSetter(name = SERVER_BIND_ADDRESS)
+ void setServerBindAddress(String value);
/** The name of the "serverBindAddress" property */
@ConfigAttribute(type=String.class)
- public static final String SERVER_BIND_ADDRESS_NAME = "server-bind-address";
+ String SERVER_BIND_ADDRESS_NAME = SERVER_BIND_ADDRESS;
/** The default value of the "serverBindAddress" property.
* Current value is an empty string <code>""</code>
*/
- public static final String DEFAULT_SERVER_BIND_ADDRESS = "";
+ String DEFAULT_SERVER_BIND_ADDRESS = "";
/**
* Returns the value of the <a
* href="../DistributedSystem.html#locators">"locators"</a> property
*/
- @ConfigAttributeGetter(name=LOCATORS_NAME)
- public String getLocators();
+ @ConfigAttributeGetter(name = LOCATORS)
+ String getLocators();
+
/**
* Sets the system's locator list.
* A locator list is optional and by default empty.
@@ -279,60 +285,63 @@ public interface DistributionConfig extends Config, LogConfig {
* @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
* when writing to the system's configuration file.
*/
- @ConfigAttributeSetter(name=LOCATORS_NAME)
- public void setLocators(String value);
+ @ConfigAttributeSetter(name = LOCATORS)
+ void setLocators(String value);
/** The name of the "locators" property */
@ConfigAttribute(type=String.class)
- public static final String LOCATORS_NAME = "locators";
+ String LOCATORS_NAME = LOCATORS;
/** The default value of the "locators" property */
- public static final String DEFAULT_LOCATORS = "";
+ String DEFAULT_LOCATORS = "";
/**
* Locator wait time - how long to wait for a locator to start before giving up &
* throwing a GemFireConfigException
*/
@ConfigAttribute(type=Integer.class)
- public static final String LOCATOR_WAIT_TIME_NAME = "locator-wait-time";
- public static final int DEFAULT_LOCATOR_WAIT_TIME = 0;
- @ConfigAttributeGetter(name=LOCATOR_WAIT_TIME_NAME)
- public int getLocatorWaitTime();
- @ConfigAttributeSetter(name=LOCATOR_WAIT_TIME_NAME)
- public void setLocatorWaitTime(int seconds);
+ String LOCATOR_WAIT_TIME_NAME = LOCATOR_WAIT_TIME;
+
+ int DEFAULT_LOCATOR_WAIT_TIME = 0;
+
+ @ConfigAttributeGetter(name = LOCATOR_WAIT_TIME)
+ int getLocatorWaitTime();
+
+ @ConfigAttributeSetter(name = LOCATOR_WAIT_TIME)
+ void setLocatorWaitTime(int seconds);
/**
* returns the value of the <a href="../DistribytedSystem.html#start-locator">"start-locator"
* </a> property
*/
- @ConfigAttributeGetter(name=START_LOCATOR_NAME)
- public String getStartLocator();
+ @ConfigAttributeGetter(name = START_LOCATOR)
+ String getStartLocator();
/**
* Sets the start-locator property. This is a string in the form
* bindAddress[port] and, if set, tells the distributed system to start
* a locator prior to connecting
* @param value must be of the form <code>hostName[portNum]</code>
*/
- @ConfigAttributeSetter(name=START_LOCATOR_NAME)
- public void setStartLocator(String value);
+ @ConfigAttributeSetter(name = START_LOCATOR)
+ void setStartLocator(String value);
/**
* The name of the "start-locator" property
*/
@ConfigAttribute(type=String.class)
- public static final String START_LOCATOR_NAME = "start-locator";
+ String START_LOCATOR_NAME = START_LOCATOR;
/**
* The default value of the "start-locator" property
*/
- public static final String DEFAULT_START_LOCATOR = "";
+ String DEFAULT_START_LOCATOR = "";
/**
* Returns the value of the <a
* href="../DistributedSystem.html#deploy-working-dir">"deploy-working-dir"</a> property
*/
@ConfigAttributeGetter(name=DEPLOY_WORKING_DIR)
- public File getDeployWorkingDir();
+ File getDeployWorkingDir();
/**
* Sets the system's deploy working directory.
@@ -342,26 +351,26 @@ public interface DistributionConfig extends Config, LogConfig {
* when writing to the system's configuration file.
*/
@ConfigAttributeSetter(name=DEPLOY_WORKING_DIR)
- public void setDeployWorkingDir(File value);
+ void setDeployWorkingDir(File value);
/**
* The name of the "deploy-working-dir" property.
*/
@ConfigAttribute(type=File.class)
- public static final String DEPLOY_WORKING_DIR = "deploy-working-dir";
+ String DEPLOY_WORKING_DIR = SystemConfigurationProperties.DEPLOY_WORKING_DIR;
/**
* Default will be the current working directory as determined by
* <code>System.getProperty("user.dir")</code>.
*/
- public static final File DEFAULT_DEPLOY_WORKING_DIR = new File(".");
+ File DEFAULT_DEPLOY_WORKING_DIR = new File(".");
/**
* Returns the value of the <a
* href="../DistributedSystem.html#user-command-packages">"user-command-packages"</a> property
*/
@ConfigAttributeGetter(name=USER_COMMAND_PACKAGES)
- public String getUserCommandPackages();
+ String getUserCommandPackages();
/**
* Sets the system's user command path.
@@ -371,18 +380,18 @@ public interface DistributionConfig extends Config, LogConfig {
* when writing to the system's configuration file.
*/
@ConfigAttributeSetter(name=USER_COMMAND_PACKAGES)
- public void setUserCommandPackages(String value);
+ void setUserCommandPackages(String value);
/**
* The name of the "user-command-packages" property.
*/
@ConfigAttribute(type=String.class)
- public static final String USER_COMMAND_PACKAGES = "user-command-packages";
+ String USER_COMMAND_PACKAGES = SystemConfigurationProperties.USER_COMMAND_PACKAGES;
/**
* The default value of the "user-command-packages" property
*/
- public static final String DEFAULT_USER_COMMAND_PACKAGES = "";
+ String DEFAULT_USER_COMMAND_PACKAGES = "";
/**
* Returns the value of the <a
@@ -392,7 +401,7 @@ public interface DistributionConfig extends Config, LogConfig {
* out
*/
@ConfigAttributeGetter(name=LOG_FILE_NAME)
- public File getLogFile();
+ File getLogFile();
/**
* Sets the system's log file.
* <p> Non-absolute log files are relative to the system directory.
@@ -402,19 +411,20 @@ public interface DistributionConfig extends Config, LogConfig {
* @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an error
* when writing to the system's configuration file.
*/
+
@ConfigAttributeSetter(name=LOG_FILE_NAME)
- public void setLogFile(File value);
+ void setLogFile(File value);
/** The name of the "logFile" property */
@ConfigAttribute(type=File.class)
- public static final String LOG_FILE_NAME = "log-file";
+ String LOG_FILE_NAME = LOG_FILE;
/**
* The default log file.
* <p> Actual value of this constant is <code>""</code> which directs
* log message to standard output.
*/
- public static final File DEFAULT_LOG_FILE = new File("");
+ File DEFAULT_LOG_FILE = new File("");
/**
* Returns the value of the <a
@@ -423,7 +433,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @see com.gemstone.gemfire.internal.logging.LogWriterImpl
*/
@ConfigAttributeGetter(name=LOG_LEVEL_NAME)
- public int getLogLevel();
+ int getLogLevel();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#log-level">"log-level"</a> property
@@ -431,28 +441,28 @@ public interface DistributionConfig extends Config, LogConfig {
* @see com.gemstone.gemfire.internal.logging.LogWriterImpl
*/
@ConfigAttributeSetter(name=LOG_LEVEL_NAME)
- public void setLogLevel(int value);
+ void setLogLevel(int value);
/**
* The default log level.
* <p> Actual value of this constant is {@link InternalLogWriter#CONFIG_LEVEL}.
*/
- public static final int DEFAULT_LOG_LEVEL = InternalLogWriter.CONFIG_LEVEL;
+ int DEFAULT_LOG_LEVEL = InternalLogWriter.CONFIG_LEVEL;
/**
* The minimum log level.
* <p> Actual value of this constant is {@link InternalLogWriter#ALL_LEVEL}.
*/
- public static final int MIN_LOG_LEVEL = InternalLogWriter.ALL_LEVEL;
+ int MIN_LOG_LEVEL = InternalLogWriter.ALL_LEVEL;
/**
* The maximum log level.
* <p> Actual value of this constant is {@link InternalLogWriter#NONE_LEVEL}.
*/
- public static final int MAX_LOG_LEVEL = InternalLogWriter.NONE_LEVEL;
+ int MAX_LOG_LEVEL = InternalLogWriter.NONE_LEVEL;
/** The name of the "logLevel" property */
// type is String because the config file contains "config", "debug", "fine" etc, not a code, but the setter/getter accepts int
@ConfigAttribute(type=String.class)
- public static final String LOG_LEVEL_NAME = "log-level";
+ String LOG_LEVEL_NAME = LOG_LEVEL;
/**
* Returns the value of the <a
@@ -460,20 +470,19 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=STATISTIC_SAMPLING_ENABLED_NAME)
- public boolean getStatisticSamplingEnabled();
+ boolean getStatisticSamplingEnabled();
/**
* Sets StatisticSamplingEnabled
*/
@ConfigAttributeSetter(name=STATISTIC_SAMPLING_ENABLED_NAME)
- public void setStatisticSamplingEnabled(boolean newValue);
+ void setStatisticSamplingEnabled(boolean newValue);
/** The name of the "statisticSamplingEnabled" property */
@ConfigAttribute(type=Boolean.class)
- public static final String STATISTIC_SAMPLING_ENABLED_NAME =
- "statistic-sampling-enabled";
+ String STATISTIC_SAMPLING_ENABLED_NAME = STATISTIC_SAMPLING_ENABLED;
/** The default value of the "statisticSamplingEnabled" property */
- public static final boolean DEFAULT_STATISTIC_SAMPLING_ENABLED = true;
+ boolean DEFAULT_STATISTIC_SAMPLING_ENABLED = true;
/**
* Returns the value of the <a
@@ -481,35 +490,34 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=STATISTIC_SAMPLE_RATE_NAME)
- public int getStatisticSampleRate();
+ int getStatisticSampleRate();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#statistic-sample-rate">"statistic-sample-rate"</a>
* property
*/
@ConfigAttributeSetter(name=STATISTIC_SAMPLE_RATE_NAME)
- public void setStatisticSampleRate(int value);
+ void setStatisticSampleRate(int value);
/**
* The default statistic sample rate.
* <p> Actual value of this constant is <code>1000</code> milliseconds.
*/
- public static final int DEFAULT_STATISTIC_SAMPLE_RATE = 1000;
+ int DEFAULT_STATISTIC_SAMPLE_RATE = 1000;
/**
* The minimum statistic sample rate.
* <p> Actual value of this constant is <code>100</code> milliseconds.
*/
- public static final int MIN_STATISTIC_SAMPLE_RATE = 100;
+ int MIN_STATISTIC_SAMPLE_RATE = 100;
/**
* The maximum statistic sample rate.
* <p> Actual value of this constant is <code>60000</code> milliseconds.
*/
- public static final int MAX_STATISTIC_SAMPLE_RATE = 60000;
+ int MAX_STATISTIC_SAMPLE_RATE = 60000;
/** The name of the "statisticSampleRate" property */
@ConfigAttribute(type=Integer.class, min=MIN_STATISTIC_SAMPLE_RATE, max=MAX_STATISTIC_SAMPLE_RATE)
- public static final String STATISTIC_SAMPLE_RATE_NAME =
- "statistic-sample-rate";
+ String STATISTIC_SAMPLE_RATE_NAME = STATISTIC_SAMPLE_RATE;
/**
* Returns the value of the <a href="../DistributedSystem.html#statistic-archive-file">"statistic-archive-file"</a> property.
@@ -517,24 +525,23 @@ public interface DistributionConfig extends Config, LogConfig {
* @return <code>null</code> if no file was specified
*/
@ConfigAttributeGetter(name=STATISTIC_ARCHIVE_FILE_NAME)
- public File getStatisticArchiveFile();
+ File getStatisticArchiveFile();
/**
* Sets the value of the <a href="../DistributedSystem.html#statistic-archive-file">"statistic-archive-file"</a> property.
*/
@ConfigAttributeSetter(name=STATISTIC_ARCHIVE_FILE_NAME)
- public void setStatisticArchiveFile(File value);
+ void setStatisticArchiveFile(File value);
/** The name of the "statisticArchiveFile" property */
@ConfigAttribute(type=File.class)
- public static final String STATISTIC_ARCHIVE_FILE_NAME =
- "statistic-archive-file";
+ String STATISTIC_ARCHIVE_FILE_NAME = STATISTIC_ARCHIVE_FILE;
/**
* The default statistic archive file.
* <p> Actual value of this constant is <code>""</code> which
* causes no archive file to be created.
*/
- public static final File DEFAULT_STATISTIC_ARCHIVE_FILE = new File(""); // fix for bug 29786
+ File DEFAULT_STATISTIC_ARCHIVE_FILE = new File(""); // fix for bug 29786
/**
@@ -543,21 +550,21 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=CACHE_XML_FILE_NAME)
- public File getCacheXmlFile();
+ File getCacheXmlFile();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#cache-xml-file">"cache-xml-file"</a>
* property
*/
@ConfigAttributeSetter(name=CACHE_XML_FILE_NAME)
- public void setCacheXmlFile(File value);
+ void setCacheXmlFile(File value);
/** The name of the "cacheXmlFile" property */
@ConfigAttribute(type=File.class)
- public static final String CACHE_XML_FILE_NAME = "cache-xml-file";
+ String CACHE_XML_FILE_NAME = CACHE_XML_FILE;
/** The default value of the "cacheXmlFile" property */
- public static final File DEFAULT_CACHE_XML_FILE = new File("cache.xml");
+ File DEFAULT_CACHE_XML_FILE = new File("cache.xml");
/**
* Returns the value of the <a
@@ -565,7 +572,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=ACK_WAIT_THRESHOLD_NAME)
- public int getAckWaitThreshold();
+ int getAckWaitThreshold();
/**
* Sets the value of the <a
@@ -574,26 +581,26 @@ public interface DistributionConfig extends Config, LogConfig {
* Setting this value too low will cause spurious alerts.
*/
@ConfigAttributeSetter(name=ACK_WAIT_THRESHOLD_NAME)
- public void setAckWaitThreshold(int newThreshold);
+ void setAckWaitThreshold(int newThreshold);
/**
* The default AckWaitThreshold.
* <p> Actual value of this constant is <code>15</code> seconds.
*/
- public static final int DEFAULT_ACK_WAIT_THRESHOLD = 15;
+ int DEFAULT_ACK_WAIT_THRESHOLD = 15;
/**
* The minimum AckWaitThreshold.
* <p> Actual value of this constant is <code>1</code> second.
*/
- public static final int MIN_ACK_WAIT_THRESHOLD = 1;
+ int MIN_ACK_WAIT_THRESHOLD = 1;
/**
* The maximum AckWaitThreshold.
* <p> Actual value of this constant is <code>MAX_INT</code> seconds.
*/
- public static final int MAX_ACK_WAIT_THRESHOLD = Integer.MAX_VALUE;
+ int MAX_ACK_WAIT_THRESHOLD = Integer.MAX_VALUE;
/** The name of the "ackWaitThreshold" property */
@ConfigAttribute(type=Integer.class, min=MIN_ACK_WAIT_THRESHOLD)
- public static final String ACK_WAIT_THRESHOLD_NAME = "ack-wait-threshold";
+ String ACK_WAIT_THRESHOLD_NAME = ACK_WAIT_THRESHOLD;
/**
@@ -602,7 +609,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=ACK_SEVERE_ALERT_THRESHOLD_NAME)
- public int getAckSevereAlertThreshold();
+ int getAckSevereAlertThreshold();
/**
* Sets the value of the <a
@@ -611,28 +618,28 @@ public interface DistributionConfig extends Config, LogConfig {
* Setting this value too low will cause spurious forced disconnects.
*/
@ConfigAttributeSetter(name=ACK_SEVERE_ALERT_THRESHOLD_NAME)
- public void setAckSevereAlertThreshold(int newThreshold);
+ void setAckSevereAlertThreshold(int newThreshold);
/**
* The default ackSevereAlertThreshold.
* <p> Actual value of this constant is <code>0</code> seconds, which
* turns off shunning.
*/
- public static final int DEFAULT_ACK_SEVERE_ALERT_THRESHOLD = 0;
+ int DEFAULT_ACK_SEVERE_ALERT_THRESHOLD = 0;
/**
* The minimum ackSevereAlertThreshold.
* <p> Actual value of this constant is <code>0</code> second,
* which turns off shunning.
*/
- public static final int MIN_ACK_SEVERE_ALERT_THRESHOLD = 0;
+ int MIN_ACK_SEVERE_ALERT_THRESHOLD = 0;
/**
* The maximum ackSevereAlertThreshold.
* <p> Actual value of this constant is <code>MAX_INT</code> seconds.
*/
- public static final int MAX_ACK_SEVERE_ALERT_THRESHOLD = Integer.MAX_VALUE;
+ int MAX_ACK_SEVERE_ALERT_THRESHOLD = Integer.MAX_VALUE;
/** The name of the "ackSevereAlertThreshold" property */
@ConfigAttribute(type=Integer.class, min=MIN_ACK_SEVERE_ALERT_THRESHOLD)
- public static final String ACK_SEVERE_ALERT_THRESHOLD_NAME = "ack-severe-alert-threshold";
+ String ACK_SEVERE_ALERT_THRESHOLD_NAME = ACK_SEVERE_ALERT_THRESHOLD;
/**
* Returns the value of the <a
@@ -640,105 +647,102 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=ARCHIVE_FILE_SIZE_LIMIT_NAME)
- public int getArchiveFileSizeLimit();
+ int getArchiveFileSizeLimit();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#archive-file-size-limit">"archive-file-size-limit"</a>
* property
*/
@ConfigAttributeSetter(name=ARCHIVE_FILE_SIZE_LIMIT_NAME)
- public void setArchiveFileSizeLimit(int value);
+ void setArchiveFileSizeLimit(int value);
/**
* The default statistic archive file size limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int DEFAULT_ARCHIVE_FILE_SIZE_LIMIT = 0;
+ int DEFAULT_ARCHIVE_FILE_SIZE_LIMIT = 0;
/**
* The minimum statistic archive file size limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int MIN_ARCHIVE_FILE_SIZE_LIMIT = 0;
+ int MIN_ARCHIVE_FILE_SIZE_LIMIT = 0;
/**
* The maximum statistic archive file size limit.
* <p> Actual value of this constant is <code>1000000</code> megabytes.
*/
- public static final int MAX_ARCHIVE_FILE_SIZE_LIMIT = 1000000;
+ int MAX_ARCHIVE_FILE_SIZE_LIMIT = 1000000;
/** The name of the "ArchiveFileSizeLimit" property */
@ConfigAttribute(type=Integer.class, min=MIN_ARCHIVE_FILE_SIZE_LIMIT, max=MAX_ARCHIVE_FILE_SIZE_LIMIT)
- public static final String ARCHIVE_FILE_SIZE_LIMIT_NAME =
- "archive-file-size-limit";
+ String ARCHIVE_FILE_SIZE_LIMIT_NAME = ARCHIVE_FILE_SIZE_LIMIT;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#archive-disk-space-limit">"archive-disk-space-limit"</a>
* property
*/
@ConfigAttributeGetter(name=ARCHIVE_DISK_SPACE_LIMIT_NAME)
- public int getArchiveDiskSpaceLimit();
+ int getArchiveDiskSpaceLimit();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#archive-disk-space-limit">"archive-disk-space-limit"</a>
* property
*/
@ConfigAttributeSetter(name=ARCHIVE_DISK_SPACE_LIMIT_NAME)
- public void setArchiveDiskSpaceLimit(int value);
+ void setArchiveDiskSpaceLimit(int value);
/**
* The default archive disk space limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int DEFAULT_ARCHIVE_DISK_SPACE_LIMIT = 0;
+ int DEFAULT_ARCHIVE_DISK_SPACE_LIMIT = 0;
/**
* The minimum archive disk space limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int MIN_ARCHIVE_DISK_SPACE_LIMIT = 0;
+ int MIN_ARCHIVE_DISK_SPACE_LIMIT = 0;
/**
* The maximum archive disk space limit.
* <p> Actual value of this constant is <code>1000000</code> megabytes.
*/
- public static final int MAX_ARCHIVE_DISK_SPACE_LIMIT = 1000000;
+ int MAX_ARCHIVE_DISK_SPACE_LIMIT = 1000000;
/** The name of the "ArchiveDiskSpaceLimit" property */
@ConfigAttribute(type=Integer.class, min=MIN_ARCHIVE_DISK_SPACE_LIMIT, max=MAX_ARCHIVE_DISK_SPACE_LIMIT)
- public static final String ARCHIVE_DISK_SPACE_LIMIT_NAME =
- "archive-disk-space-limit";
+ String ARCHIVE_DISK_SPACE_LIMIT_NAME = ARCHIVE_DISK_SPACE_LIMIT;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#log-file-size-limit">"log-file-size-limit"</a>
* property
*/
@ConfigAttributeGetter(name=LOG_FILE_SIZE_LIMIT_NAME)
- public int getLogFileSizeLimit();
+ int getLogFileSizeLimit();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#log-file-size-limit">"log-file-size-limit"</a>
* property
*/
@ConfigAttributeSetter(name=LOG_FILE_SIZE_LIMIT_NAME)
- public void setLogFileSizeLimit(int value);
+ void setLogFileSizeLimit(int value);
/**
* The default log file size limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int DEFAULT_LOG_FILE_SIZE_LIMIT = 0;
+ int DEFAULT_LOG_FILE_SIZE_LIMIT = 0;
/**
* The minimum log file size limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int MIN_LOG_FILE_SIZE_LIMIT = 0;
+ int MIN_LOG_FILE_SIZE_LIMIT = 0;
/**
* The maximum log file size limit.
* <p> Actual value of this constant is <code>1000000</code> megabytes.
*/
- public static final int MAX_LOG_FILE_SIZE_LIMIT = 1000000;
+ int MAX_LOG_FILE_SIZE_LIMIT = 1000000;
/** The name of the "LogFileSizeLimit" property */
@ConfigAttribute(type=Integer.class, min=MIN_LOG_FILE_SIZE_LIMIT, max=MAX_LOG_FILE_SIZE_LIMIT)
- public static final String LOG_FILE_SIZE_LIMIT_NAME =
- "log-file-size-limit";
+ String LOG_FILE_SIZE_LIMIT_NAME = LOG_FILE_SIZE_LIMIT;
/**
* Returns the value of the <a
@@ -746,35 +750,34 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=LOG_DISK_SPACE_LIMIT_NAME)
- public int getLogDiskSpaceLimit();
+ int getLogDiskSpaceLimit();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#log-disk-space-limit">"log-disk-space-limit"</a>
* property
*/
@ConfigAttributeSetter(name=LOG_DISK_SPACE_LIMIT_NAME)
- public void setLogDiskSpaceLimit(int value);
+ void setLogDiskSpaceLimit(int value);
/**
* The default log disk space limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int DEFAULT_LOG_DISK_SPACE_LIMIT = 0;
+ int DEFAULT_LOG_DISK_SPACE_LIMIT = 0;
/**
* The minimum log disk space limit.
* <p> Actual value of this constant is <code>0</code> megabytes.
*/
- public static final int MIN_LOG_DISK_SPACE_LIMIT = 0;
+ int MIN_LOG_DISK_SPACE_LIMIT = 0;
/**
* The maximum log disk space limit.
* <p> Actual value of this constant is <code>1000000</code> megabytes.
*/
- public static final int MAX_LOG_DISK_SPACE_LIMIT = 1000000;
+ int MAX_LOG_DISK_SPACE_LIMIT = 1000000;
/** The name of the "LogDiskSpaceLimit" property */
@ConfigAttribute(type=Integer.class, min=MIN_LOG_DISK_SPACE_LIMIT, max=MAX_LOG_DISK_SPACE_LIMIT)
- public static final String LOG_DISK_SPACE_LIMIT_NAME =
- "log-disk-space-limit";
+ String LOG_DISK_SPACE_LIMIT_NAME = LOG_DISK_SPACE_LIMIT;
/**
* Returns the value of the <a
@@ -783,21 +786,20 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #getClusterSSLEnabled} instead.
*/
@ConfigAttributeGetter(name=SSL_ENABLED_NAME)
- public boolean getSSLEnabled();
+ boolean getSSLEnabled();
/**
* The default ssl-enabled state.
* <p> Actual value of this constant is <code>false</code>.
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_ENABLED} instead.
*/
- public static final boolean DEFAULT_SSL_ENABLED = false;
+ boolean DEFAULT_SSL_ENABLED = false;
/** The name of the "SSLEnabled" property
* @deprecated as of 8.0 use {@link #CLUSTER_SSL_ENABLED_NAME} instead.
*/
@ConfigAttribute(type=Boolean.class)
- public static final String SSL_ENABLED_NAME =
- "ssl-enabled";
+ String SSL_ENABLED_NAME = SSL_ENABLED;
/**
* Sets the value of the <a
@@ -806,7 +808,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #setClusterSSLEnabled} instead.
*/
@ConfigAttributeSetter(name=SSL_ENABLED_NAME)
- public void setSSLEnabled( boolean enabled );
+ void setSSLEnabled(boolean enabled);
/**
* Returns the value of the <a
@@ -815,7 +817,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #getClusterSSLProtocols} instead.
*/
@ConfigAttributeGetter(name=SSL_PROTOCOLS_NAME)
- public String getSSLProtocols( );
+ String getSSLProtocols();
/**
* Sets the value of the <a
@@ -824,20 +826,19 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #setClusterSSLProtocols} instead.
*/
@ConfigAttributeSetter(name=SSL_PROTOCOLS_NAME)
- public void setSSLProtocols( String protocols );
+ void setSSLProtocols(String protocols);
/**
* The default ssl-protocols value.
* <p> Actual value of this constant is <code>any</code>.
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_PROTOCOLS} instead.
*/
- public static final String DEFAULT_SSL_PROTOCOLS = "any";
+ String DEFAULT_SSL_PROTOCOLS = "any";
/** The name of the "SSLProtocols" property
* @deprecated as of 8.0 use {@link #CLUSTER_SSL_PROTOCOLS_NAME} instead.
*/
@ConfigAttribute(type=String.class)
- public static final String SSL_PROTOCOLS_NAME =
- "ssl-protocols";
+ String SSL_PROTOCOLS_NAME = SSL_PROTOCOLS;
/**
* Returns the value of the <a
@@ -846,7 +847,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #getClusterSSLCiphers} instead.
*/
@ConfigAttributeGetter(name=SSL_CIPHERS_NAME)
- public String getSSLCiphers( );
+ String getSSLCiphers();
/**
* Sets the value of the <a
@@ -855,20 +856,19 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #setClusterSSLCiphers} instead.
*/
@ConfigAttributeSetter(name=SSL_CIPHERS_NAME)
- public void setSSLCiphers( String ciphers );
+ void setSSLCiphers(String ciphers);
/**
* The default ssl-ciphers value.
* <p> Actual value of this constant is <code>any</code>.
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_CIPHERS} instead.
*/
- public static final String DEFAULT_SSL_CIPHERS = "any";
+ String DEFAULT_SSL_CIPHERS = "any";
/** The name of the "SSLCiphers" property
* @deprecated as of 8.0 use {@link #CLUSTER_SSL_CIPHERS_NAME} instead.
*/
@ConfigAttribute(type=String.class)
- public static final String SSL_CIPHERS_NAME =
- "ssl-ciphers";
+ String SSL_CIPHERS_NAME = SSL_CIPHERS;
/**
* Returns the value of the <a
@@ -877,7 +877,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #getClusterSSLRequireAuthentication} instead.
*/
@ConfigAttributeGetter(name=SSL_REQUIRE_AUTHENTICATION_NAME)
- public boolean getSSLRequireAuthentication( );
+ boolean getSSLRequireAuthentication();
/**
* Sets the value of the <a
@@ -886,20 +886,19 @@ public interface DistributionConfig extends Config, LogConfig {
* @deprecated as of 8.0 use {@link #setClusterSSLRequireAuthentication} instead.
*/
@ConfigAttributeSetter(name=SSL_REQUIRE_AUTHENTICATION_NAME)
- public void setSSLRequireAuthentication( boolean enabled );
+ void setSSLRequireAuthentication(boolean enabled);
/**
* The default ssl-require-authentication value.
* <p> Actual value of this constant is <code>true</code>.
* @deprecated as of 8.0 use {@link #DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION} instead.
*/
- public static final boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION = true;
+ boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION = true;
/** The name of the "SSLRequireAuthentication" property
* @deprecated as of 8.0 use {@link #CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME} instead.
*/
@ConfigAttribute(type=Boolean.class)
- public static final String SSL_REQUIRE_AUTHENTICATION_NAME =
- "ssl-require-authentication";
+ String SSL_REQUIRE_AUTHENTICATION_NAME = SSL_REQUIRE_AUTHENTICATION;
/**
* Returns the value of the <a
@@ -907,17 +906,16 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_ENABLED_NAME)
- public boolean getClusterSSLEnabled();
+ boolean getClusterSSLEnabled();
/**
* The default cluster-ssl-enabled state.
* <p> Actual value of this constant is <code>false</code>.
*/
- public static final boolean DEFAULT_CLUSTER_SSL_ENABLED = false;
+ boolean DEFAULT_CLUSTER_SSL_ENABLED = false;
/** The name of the "ClusterSSLEnabled" property */
@ConfigAttribute(type=Boolean.class)
- public static final String CLUSTER_SSL_ENABLED_NAME =
- "cluster-ssl-enabled";
+ String CLUSTER_SSL_ENABLED_NAME = CLUSTER_SSL_ENABLED;
/**
* Sets the value of the <a
@@ -925,7 +923,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_ENABLED_NAME)
- public void setClusterSSLEnabled( boolean enabled );
+ void setClusterSSLEnabled(boolean enabled);
/**
* Returns the value of the <a
@@ -933,7 +931,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_PROTOCOLS_NAME)
- public String getClusterSSLProtocols( );
+ String getClusterSSLProtocols();
/**
* Sets the value of the <a
@@ -941,17 +939,16 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_PROTOCOLS_NAME)
- public void setClusterSSLProtocols( String protocols );
+ void setClusterSSLProtocols(String protocols);
/**
* The default cluster-ssl-protocols value.
* <p> Actual value of this constant is <code>any</code>.
*/
- public static final String DEFAULT_CLUSTER_SSL_PROTOCOLS = "any";
+ String DEFAULT_CLUSTER_SSL_PROTOCOLS = "any";
/** The name of the "ClusterSSLProtocols" property */
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_SSL_PROTOCOLS_NAME =
- "cluster-ssl-protocols";
+ String CLUSTER_SSL_PROTOCOLS_NAME = CLUSTER_SSL_PROTOCOLS;
/**
* Returns the value of the <a
@@ -959,7 +956,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_CIPHERS_NAME)
- public String getClusterSSLCiphers( );
+ String getClusterSSLCiphers();
/**
* Sets the value of the <a
@@ -967,17 +964,16 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_CIPHERS_NAME)
- public void setClusterSSLCiphers( String ciphers );
+ void setClusterSSLCiphers(String ciphers);
/**
* The default cluster-ssl-ciphers value.
* <p> Actual value of this constant is <code>any</code>.
*/
- public static final String DEFAULT_CLUSTER_SSL_CIPHERS = "any";
+ String DEFAULT_CLUSTER_SSL_CIPHERS = "any";
/** The name of the "ClusterSSLCiphers" property */
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_SSL_CIPHERS_NAME =
- "cluster-ssl-ciphers";
+ String CLUSTER_SSL_CIPHERS_NAME = CLUSTER_SSL_CIPHERS;
/**
* Returns the value of the <a
@@ -985,7 +981,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)
- public boolean getClusterSSLRequireAuthentication( );
+ boolean getClusterSSLRequireAuthentication();
/**
* Sets the value of the <a
@@ -993,17 +989,16 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME)
- public void setClusterSSLRequireAuthentication( boolean enabled );
+ void setClusterSSLRequireAuthentication(boolean enabled);
/**
* The default cluster-ssl-require-authentication value.
* <p> Actual value of this constant is <code>true</code>.
*/
- public static final boolean DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION = true;
+ boolean DEFAULT_CLUSTER_SSL_REQUIRE_AUTHENTICATION = true;
/** The name of the "ClusterSSLRequireAuthentication" property */
@ConfigAttribute(type=Boolean.class)
- public static final String CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME =
- "cluster-ssl-require-authentication";
+ String CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME = CLUSTER_SSL_REQUIRE_AUTHENTICATION;
/**
@@ -1012,7 +1007,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_NAME)
- public String getClusterSSLKeyStore( );
+ String getClusterSSLKeyStore();
/**
* Sets the value of the <a
@@ -1020,17 +1015,17 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_NAME)
- public void setClusterSSLKeyStore( String keyStore);
+ void setClusterSSLKeyStore(String keyStore);
/**
* The default cluster-ssl-keystore value.
* <p> Actual value of this constant is "".
*/
- public static final String DEFAULT_CLUSTER_SSL_KEYSTORE = "";
+ String DEFAULT_CLUSTER_SSL_KEYSTORE = "";
/** The name of the "ClusterSSLKeyStore" property */
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_SSL_KEYSTORE_NAME = "cluster-ssl-keystore";
+ String CLUSTER_SSL_KEYSTORE_NAME = CLUSTER_SSL_KEYSTORE;
/**
* Returns the value of the <a
@@ -1038,7 +1033,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_TYPE_NAME)
- public String getClusterSSLKeyStoreType( );
+ String getClusterSSLKeyStoreType();
/**
* Sets the value of the <a
@@ -1046,17 +1041,17 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_TYPE_NAME)
- public void setClusterSSLKeyStoreType( String keyStoreType);
+ void setClusterSSLKeyStoreType(String keyStoreType);
/**
* The default cluster-ssl-keystore-type value.
* <p> Actual value of this constant is "".
*/
- public static final String DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE = "";
+ String DEFAULT_CLUSTER_SSL_KEYSTORE_TYPE = "";
/** The name of the "ClusterSSLKeyStoreType" property */
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_SSL_KEYSTORE_TYPE_NAME = "cluster-ssl-keystore-type";
+ String CLUSTER_SSL_KEYSTORE_TYPE_NAME = CLUSTER_SSL_KEYSTORE_TYPE;
/**
* Returns the value of the <a
@@ -1064,7 +1059,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)
- public String getClusterSSLKeyStorePassword( );
+ String getClusterSSLKeyStorePassword();
/**
* Sets the value of the <a
@@ -1072,17 +1067,17 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_KEYSTORE_PASSWORD_NAME)
- public void setClusterSSLKeyStorePassword( String keyStorePassword);
+ void setClusterSSLKeyStorePassword(String keyStorePassword);
/**
* The default cluster-ssl-keystore-password value.
* <p> Actual value of this constant is "".
*/
- public static final String DEFAULT_CLUSTER_SSL_KEYSTORE_PASSWORD = "";
+ String DEFAULT_CLUSTER_SSL_KEYSTORE_PASSWORD = "";
/** The name of the "ClusterSSLKeyStorePassword" property */
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_SSL_KEYSTORE_PASSWORD_NAME = "cluster-ssl-keystore-password";
+ String CLUSTER_SSL_KEYSTORE_PASSWORD_NAME = CLUSTER_SSL_KEYSTORE_PASSWORD;
/**
* Returns the value of the <a
@@ -1090,7 +1085,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_TRUSTSTORE_NAME)
- public String getClusterSSLTrustStore( );
+ String getClusterSSLTrustStore();
/**
* Sets the value of the <a
@@ -1098,17 +1093,17 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_TRUSTSTORE_NAME)
- public void setClusterSSLTrustStore( String trustStore);
+ void setClusterSSLTrustStore(String trustStore);
/**
* The default cluster-ssl-truststore value.
* <p> Actual value of this constant is "".
*/
- public static final String DEFAULT_CLUSTER_SSL_TRUSTSTORE = "";
+ String DEFAULT_CLUSTER_SSL_TRUSTSTORE = "";
/** The name of the "ClusterSSLTrustStore" property */
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_SSL_TRUSTSTORE_NAME = "cluster-ssl-truststore";
+ String CLUSTER_SSL_TRUSTSTORE_NAME = CLUSTER_SSL_TRUSTSTORE;
/**
* Returns the value of the <a
@@ -1116,7 +1111,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)
- public String getClusterSSLTrustStorePassword( );
+ String getClusterSSLTrustStorePassword();
/**
* Sets the value of the <a
@@ -1124,16 +1119,16 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME)
- public void setClusterSSLTrustStorePassword( String trusStorePassword);
+ void setClusterSSLTrustStorePassword(String trusStorePassword);
/**
* The default cluster-ssl-truststore-password value.
* <p> Actual value of this constant is "".
*/
- public static final String DEFAULT_CLUSTER_SSL_TRUSTSTORE_PASSWORD = "";
+ String DEFAULT_CLUSTER_SSL_TRUSTSTORE_PASSWORD = "";
/** The name of the "ClusterSSLKeyStorePassword" property */
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME = "cluster-ssl-truststore-password";
+ String CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME = CLUSTER_SSL_TRUSTSTORE_PASSWORD;
/** The name of an internal property that specifies a {@link
@@ -1157,7 +1152,7 @@ public interface DistributionConfig extends Config, LogConfig {
* disconnect.
* @since GemFire 8.1
*/
- public static final String DS_RECONNECTING_NAME = "ds-reconnecting";
+ String DS_RECONNECTING_NAME = "ds-reconnecting";
/**
* The name of an internal property that specifies the
@@ -1165,7 +1160,7 @@ public interface DistributionConfig extends Config, LogConfig {
* This should be used if the DS_RECONNECTING_NAME property
* is used.
*/
- public static final String DS_QUORUM_CHECKER_NAME = "ds-quorum-checker";
+ String DS_QUORUM_CHECKER_NAME = "ds-quorum-checker";
/**
* The name of an internal property that specifies a {@link
@@ -1174,7 +1169,7 @@ public interface DistributionConfig extends Config, LogConfig {
*
* @since GemFire 5.5
*/
- public static final String SECURITY_LOG_WRITER_NAME = "security-log-writer";
+ String SECURITY_LOG_WRITER_NAME = "security-log-writer";
/** The name of an internal property that specifies a
* FileOutputStream associated with the internal property
@@ -1184,7 +1179,7 @@ public interface DistributionConfig extends Config, LogConfig {
* with setProperty()
* @since GemFire 5.0
*/
- public static final String LOG_OUTPUTSTREAM_NAME = "log-output-stream";
+ String LOG_OUTPUTSTREAM_NAME = "log-output-stream";
/**
* The name of an internal property that specifies a FileOutputStream
@@ -1194,7 +1189,7 @@ public interface DistributionConfig extends Config, LogConfig {
*
* @since GemFire 5.5
*/
- public static final String SECURITY_LOG_OUTPUTSTREAM_NAME = "security-log-output-stream";
+ String SECURITY_LOG_OUTPUTSTREAM_NAME = "security-log-output-stream";
/**
* Returns the value of the <a
@@ -1202,33 +1197,33 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=SOCKET_LEASE_TIME_NAME)
- public int getSocketLeaseTime();
+ int getSocketLeaseTime();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#socket-lease-time">"socket-lease-time"</a>
* property
*/
@ConfigAttributeSetter(name=SOCKET_LEASE_TIME_NAME)
- public void setSocketLeaseTime(int value);
+ void setSocketLeaseTime(int value);
/** The default value of the "socketLeaseTime" property */
- public static final int DEFAULT_SOCKET_LEASE_TIME = 60000;
+ int DEFAULT_SOCKET_LEASE_TIME = 60000;
/**
* The minimum socketLeaseTime.
* <p> Actual value of this constant is <code>0</code>.
*/
- public static final int MIN_SOCKET_LEASE_TIME = 0;
+ int MIN_SOCKET_LEASE_TIME = 0;
/**
* The maximum socketLeaseTime.
* <p> Actual value of this constant is <code>600000</code>.
*/
- public static final int MAX_SOCKET_LEASE_TIME = 600000;
+ int MAX_SOCKET_LEASE_TIME = 600000;
/** The name of the "socketLeaseTime" property */
@ConfigAttribute(type=Integer.class, min=MIN_SOCKET_LEASE_TIME, max=MAX_SOCKET_LEASE_TIME)
- public static final String SOCKET_LEASE_TIME_NAME = "socket-lease-time";
+ String SOCKET_LEASE_TIME_NAME = SOCKET_LEASE_TIME;
/**
* Returns the value of the <a
@@ -1236,35 +1231,35 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=SOCKET_BUFFER_SIZE_NAME)
- public int getSocketBufferSize();
+ int getSocketBufferSize();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#socket-buffer-size">"socket-buffer-size"</a>
* property
*/
@ConfigAttributeSetter(name=SOCKET_BUFFER_SIZE_NAME)
- public void setSocketBufferSize(int value);
+ void setSocketBufferSize(int value);
/** The default value of the "socketBufferSize" property */
- public static final int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
+ int DEFAULT_SOCKET_BUFFER_SIZE = 32768;
/**
* The minimum socketBufferSize.
* <p> Actual value of this constant is <code>1024</code>.
*/
- public static final int MIN_SOCKET_BUFFER_SIZE = 1024;
+ int MIN_SOCKET_BUFFER_SIZE = 1024;
/**
* The maximum socketBufferSize.
* <p> Actual value of this constant is <code>20000000</code>.
*/
- public static final int MAX_SOCKET_BUFFER_SIZE = Connection.MAX_MSG_SIZE;
+ int MAX_SOCKET_BUFFER_SIZE = Connection.MAX_MSG_SIZE;
- public static final boolean VALIDATE = Boolean.getBoolean("gemfire.validateMessageSize");
- public static final int VALIDATE_CEILING = Integer.getInteger("gemfire.validateMessageSizeCeiling", 8 * 1024 * 1024).intValue();
+ boolean VALIDATE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "validateMessageSize");
+ int VALIDATE_CEILING = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "validateMessageSizeCeiling", 8 * 1024 * 1024).intValue();
/** The name of the "socketBufferSize" property */
@ConfigAttribute(type=Integer.class, min=MIN_SOCKET_BUFFER_SIZE, max=MAX_SOCKET_BUFFER_SIZE)
- public static final String SOCKET_BUFFER_SIZE_NAME = "socket-buffer-size";
+ String SOCKET_BUFFER_SIZE_NAME = SOCKET_BUFFER_SIZE;
/**
@@ -1273,7 +1268,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=MCAST_SEND_BUFFER_SIZE_NAME)
- public int getMcastSendBufferSize();
+ int getMcastSendBufferSize();
/**
* Set the value of the
@@ -1281,26 +1276,26 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=MCAST_SEND_BUFFER_SIZE_NAME)
- public void setMcastSendBufferSize(int value);
+ void setMcastSendBufferSize(int value);
/**
* The default value of the corresponding property
*/
- public static final int DEFAULT_MCAST_SEND_BUFFER_SIZE = 65535;
+ int DEFAULT_MCAST_SEND_BUFFER_SIZE = 65535;
/**
* The minimum size of the buffer, in bytes.
* <p> Actual value of this constant is <code>2048</code>.
*/
- public static final int MIN_MCAST_SEND_BUFFER_SIZE = 2048;
+ int MIN_MCAST_SEND_BUFFER_SIZE = 2048;
/**
* The name of the corresponding property
*/
@ConfigAttribute(type=Integer.class, min=MIN_MCAST_SEND_BUFFER_SIZE)
- public static final String MCAST_SEND_BUFFER_SIZE_NAME = "mcast-send-buffer-size";
+ String MCAST_SEND_BUFFER_SIZE_NAME = MCAST_SEND_BUFFER_SIZE;
/**
* Get the value of the
@@ -1308,7 +1303,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=MCAST_RECV_BUFFER_SIZE_NAME)
- public int getMcastRecvBufferSize();
+ int getMcastRecvBufferSize();
/**
* Set the value of the
@@ -1316,25 +1311,25 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=MCAST_RECV_BUFFER_SIZE_NAME)
- public void setMcastRecvBufferSize(int value);
+ void setMcastRecvBufferSize(int value);
/**
* The default value of the corresponding property
*/
- public static final int DEFAULT_MCAST_RECV_BUFFER_SIZE = 1048576;
+ int DEFAULT_MCAST_RECV_BUFFER_SIZE = 1048576;
/**
* The minimum size of the buffer, in bytes.
* <p> Actual value of this constant is <code>2048</code>.
*/
- public static final int MIN_MCAST_RECV_BUFFER_SIZE = 2048;
+ int MIN_MCAST_RECV_BUFFER_SIZE = 2048;
/**
* The name of the corresponding property
*/
@ConfigAttribute(type=Integer.class, min=MIN_MCAST_RECV_BUFFER_SIZE)
- public static final String MCAST_RECV_BUFFER_SIZE_NAME = "mcast-recv-buffer-size";
+ String MCAST_RECV_BUFFER_SIZE_NAME = MCAST_RECV_BUFFER_SIZE;
/**
@@ -1343,7 +1338,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=MCAST_FLOW_CONTROL_NAME)
- public FlowControlParams getMcastFlowControl();
+ FlowControlParams getMcastFlowControl();
/**
* Set the value of the
@@ -1351,49 +1346,49 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=MCAST_FLOW_CONTROL_NAME)
- public void setMcastFlowControl(FlowControlParams values);
+ void setMcastFlowControl(FlowControlParams values);
/**
* The name of the corresponding property
*/
@ConfigAttribute(type=FlowControlParams.class)
- public static final String MCAST_FLOW_CONTROL_NAME = "mcast-flow-control";
+ String MCAST_FLOW_CONTROL_NAME = MCAST_FLOW_CONTROL;
/**
* The default value of the corresponding property
*/
- public static final FlowControlParams DEFAULT_MCAST_FLOW_CONTROL
+ FlowControlParams DEFAULT_MCAST_FLOW_CONTROL
= new FlowControlParams(1048576, (float)0.25, 5000);
/**
* The minimum byteAllowance for the mcast-flow-control setting of
* <code>100000</code>.
*/
- public static final int MIN_FC_BYTE_ALLOWANCE = 10000;
+ int MIN_FC_BYTE_ALLOWANCE = 10000;
/**
* The minimum rechargeThreshold for the mcast-flow-control setting of
* <code>0.1</code>
*/
- public static final float MIN_FC_RECHARGE_THRESHOLD = (float)0.1;
+ float MIN_FC_RECHARGE_THRESHOLD = (float) 0.1;
/**
* The maximum rechargeThreshold for the mcast-flow-control setting of
* <code>0.5</code>
*/
- public static final float MAX_FC_RECHARGE_THRESHOLD = (float)0.5;
+ float MAX_FC_RECHARGE_THRESHOLD = (float) 0.5;
/**
* The minimum rechargeBlockMs for the mcast-flow-control setting of
* <code>500</code>
*/
- public static final int MIN_FC_RECHARGE_BLOCK_MS = 500;
+ int MIN_FC_RECHARGE_BLOCK_MS = 500;
/**
* The maximum rechargeBlockMs for the mcast-flow-control setting of
* <code>60000</code>
*/
- public static final int MAX_FC_RECHARGE_BLOCK_MS = 60000;
+ int MAX_FC_RECHARGE_BLOCK_MS = 60000;
/**
* Get the value of the
@@ -1401,7 +1396,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=UDP_FRAGMENT_SIZE_NAME)
- public int getUdpFragmentSize();
+ int getUdpFragmentSize();
/**
* Set the value of the
@@ -1409,26 +1404,26 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=UDP_FRAGMENT_SIZE_NAME)
- public void setUdpFragmentSize(int value);
+ void setUdpFragmentSize(int value);
/**
* The default value of the corresponding property
*/
- public static final int DEFAULT_UDP_FRAGMENT_SIZE = 60000;
+ int DEFAULT_UDP_FRAGMENT_SIZE = 60000;
/** The minimum allowed udp-fragment-size setting of 1000
*/
- public static final int MIN_UDP_FRAGMENT_SIZE = 1000;
+ int MIN_UDP_FRAGMENT_SIZE = 1000;
/** The maximum allowed udp-fragment-size setting of 60000
*/
- public static final int MAX_UDP_FRAGMENT_SIZE = 60000;
+ int MAX_UDP_FRAGMENT_SIZE = 60000;
/**
* The name of the corresponding property
*/
@ConfigAttribute(type=Integer.class, min=MIN_UDP_FRAGMENT_SIZE, max=MAX_UDP_FRAGMENT_SIZE)
- public static final String UDP_FRAGMENT_SIZE_NAME = "udp-fragment-size";
+ String UDP_FRAGMENT_SIZE_NAME = UDP_FRAGMENT_SIZE;
@@ -1439,7 +1434,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=UDP_SEND_BUFFER_SIZE_NAME)
- public int getUdpSendBufferSize();
+ int getUdpSendBufferSize();
/**
* Set the value of the
@@ -1447,24 +1442,24 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=UDP_SEND_BUFFER_SIZE_NAME)
- public void setUdpSendBufferSize(int value);
+ void setUdpSendBufferSize(int value);
/**
* The default value of the corresponding property
*/
- public static final int DEFAULT_UDP_SEND_BUFFER_SIZE = 65535;
+ int DEFAULT_UDP_SEND_BUFFER_SIZE = 65535;
/**
* The minimum size of the buffer, in bytes.
* <p> Actual value of this constant is <code>2048</code>.
*/
- public static final int MIN_UDP_SEND_BUFFER_SIZE = 2048;
+ int MIN_UDP_SEND_BUFFER_SIZE = 2048;
/**
* The name of the corresponding property
*/
@ConfigAttribute(type=Integer.class, min=MIN_UDP_SEND_BUFFER_SIZE)
- public static final String UDP_SEND_BUFFER_SIZE_NAME = "udp-send-buffer-size";
+ String UDP_SEND_BUFFER_SIZE_NAME = UDP_SEND_BUFFER_SIZE;
/**
* Get the value of the
@@ -1472,7 +1467,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=UDP_RECV_BUFFER_SIZE_NAME)
- public int getUdpRecvBufferSize();
+ int getUdpRecvBufferSize();
/**
* Set the value of the
@@ -1480,31 +1475,31 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=UDP_RECV_BUFFER_SIZE_NAME)
- public void setUdpRecvBufferSize(int value);
+ void setUdpRecvBufferSize(int value);
/**
* The default value of the unicast receive buffer size property
*/
- public static final int DEFAULT_UDP_RECV_BUFFER_SIZE = 1048576;
+ int DEFAULT_UDP_RECV_BUFFER_SIZE = 1048576;
/**
* The default size of the unicast receive buffer property if tcp/ip sockets are
* enabled and multicast is disabled
*/
- public static final int DEFAULT_UDP_RECV_BUFFER_SIZE_REDUCED = 65535;
+ int DEFAULT_UDP_RECV_BUFFER_SIZE_REDUCED = 65535;
/**
* The minimum size of the buffer, in bytes.
* <p> Actual value of this constant is <code>2048</code>.
*/
- public static final int MIN_UDP_RECV_BUFFER_SIZE = 2048;
+ int MIN_UDP_RECV_BUFFER_SIZE = 2048;
/**
* The name of the corresponding property
*/
@ConfigAttribute(type=Integer.class, min=MIN_UDP_RECV_BUFFER_SIZE)
- public static final String UDP_RECV_BUFFER_SIZE_NAME = "udp-recv-buffer-size";
+ String UDP_RECV_BUFFER_SIZE_NAME = UDP_RECV_BUFFER_SIZE;
/**
* Returns the value of the <a
@@ -1512,28 +1507,28 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=DISABLE_TCP_NAME)
- public boolean getDisableTcp();
+ boolean getDisableTcp();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#disable-tcp">"disable-tcp"</a>
* property.
*/
@ConfigAttributeSetter(name=DISABLE_TCP_NAME)
- public void setDisableTcp(boolean newValue);
+ void setDisableTcp(boolean newValue);
/** The name of the corresponding property */
@ConfigAttribute(type=Boolean.class)
- public static final String DISABLE_TCP_NAME = "disable-tcp";
+ String DISABLE_TCP_NAME = DISABLE_TCP;
/** The default value of the corresponding property */
- public static final boolean DEFAULT_DISABLE_TCP = false;
+ boolean DEFAULT_DISABLE_TCP = false;
/**
* Turns on timing statistics for the distributed system
*/
@ConfigAttributeSetter(name=ENABLE_TIME_STATISTICS_NAME)
- public void setEnableTimeStatistics(boolean newValue);
+ void setEnableTimeStatistics(boolean newValue);
/**
* Returns the value of <a
@@ -1541,14 +1536,14 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=ENABLE_TIME_STATISTICS_NAME)
- public boolean getEnableTimeStatistics();
+ boolean getEnableTimeStatistics();
/** the name of the corresponding property */
@ConfigAttribute(type=Boolean.class)
- public static final String ENABLE_TIME_STATISTICS_NAME = "enable-time-statistics";
+ String ENABLE_TIME_STATISTICS_NAME = ENABLE_TIME_STATISTICS;
/** The default value of the corresponding property */
- public static final boolean DEFAULT_ENABLE_TIME_STATISTICS = false;
+ boolean DEFAULT_ENABLE_TIME_STATISTICS = false;
/**
@@ -1556,7 +1551,7 @@ public interface DistributionConfig extends Config, LogConfig {
<a href="../DistributedSystem.html#use-cluster-configuration">use-shared-configuration</a>
*/
@ConfigAttributeSetter(name=USE_CLUSTER_CONFIGURATION_NAME)
- public void setUseSharedConfiguration(boolean newValue);
+ void setUseSharedConfiguration(boolean newValue);
/**
* Returns the value of <a
@@ -1564,21 +1559,21 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=USE_CLUSTER_CONFIGURATION_NAME)
- public boolean getUseSharedConfiguration();
+ boolean getUseSharedConfiguration();
/** the name of the corresponding property */
@ConfigAttribute(type=Boolean.class)
- public static final String USE_CLUSTER_CONFIGURATION_NAME = "use-cluster-configuration";
+ String USE_CLUSTER_CONFIGURATION_NAME = USE_CLUSTER_CONFIGURATION;
/** The default value of the corresponding property */
- public static final boolean DEFAULT_USE_CLUSTER_CONFIGURATION = true;
+ boolean DEFAULT_USE_CLUSTER_CONFIGURATION = true;
/**
* Sets the value for
<a href="../DistributedSystem.html#enable-cluster-configuration">enable-cluster-configuration</a>
*/
@ConfigAttributeSetter(name=ENABLE_CLUSTER_CONFIGURATION_NAME)
- public void setEnableClusterConfiguration(boolean newValue);
+ void setEnableClusterConfiguration(boolean newValue);
/**
* Returns the value of <a
@@ -1586,17 +1581,18 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=ENABLE_CLUSTER_CONFIGURATION_NAME)
- public boolean getEnableClusterConfiguration();
+ boolean getEnableClusterConfiguration();
/** the name of the corresponding property */
@ConfigAttribute(type=Boolean.class)
- public static final String ENABLE_CLUSTER_CONFIGURATION_NAME = "enable-cluster-configuration";
+ String ENABLE_CLUSTER_CONFIGURATION_NAME = ENABLE_CLUSTER_CONFIGURATION;
+
/** The default value of the corresponding property */
- public static final boolean DEFAULT_ENABLE_CLUSTER_CONFIGURATION = true;
+ boolean DEFAULT_ENABLE_CLUSTER_CONFIGURATION = true;
@ConfigAttribute(type=Boolean.class)
- public static final String LOAD_CLUSTER_CONFIG_FROM_DIR_NAME = "load-cluster-configuration-from-dir";
- public static final boolean DEFAULT_LOAD_CLUSTER_CONFIG_FROM_DIR = false;
+ String LOAD_CLUSTER_CONFIG_FROM_DIR_NAME = LOAD_CLUSTER_CONFIGURATION_FROM_DIR;
+ boolean DEFAULT_LOAD_CLUSTER_CONFIG_FROM_DIR = false;
/**
* Returns the value of
@@ -1604,7 +1600,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=LOAD_CLUSTER_CONFIG_FROM_DIR_NAME)
- public boolean getLoadClusterConfigFromDir();
+ boolean getLoadClusterConfigFromDir();
/**
* Sets the value of
@@ -1612,30 +1608,30 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=LOAD_CLUSTER_CONFIG_FROM_DIR_NAME)
- public void setLoadClusterConfigFromDir(boolean newValue);
+ void setLoadClusterConfigFromDir(boolean newValue);
@ConfigAttribute(type=String.class)
- public static final String CLUSTER_CONFIGURATION_DIR = "cluster-configuration-dir";
- public static final String DEFAULT_CLUSTER_CONFIGURATION_DIR = System.getProperty("user.dir");
+ String CLUSTER_CONFIGURATION_DIR = SystemConfigurationProperties.CLUSTER_CONFIGURATION_DIR;
+ String DEFAULT_CLUSTER_CONFIGURATION_DIR = System.getProperty("user.dir");
@ConfigAttributeGetter(name=CLUSTER_CONFIGURATION_DIR)
- public String getClusterConfigDir();
+ String getClusterConfigDir();
@ConfigAttributeSetter(name=CLUSTER_CONFIGURATION_DIR)
- public void setClusterConfigDir(final String clusterConfigDir);
+ void setClusterConfigDir(String clusterConfigDir);
/** Turns on network partition detection */
@ConfigAttributeSetter(name=ENABLE_NETWORK_PARTITION_DETECTION_NAME)
- public void setEnableNetworkPartitionDetection(boolean newValue);
+ void setEnableNetworkPartitionDetection(boolean newValue);
/**
* Returns the value of the enable-network-partition-detection property
*/
@ConfigAttributeGetter(name=ENABLE_NETWORK_PARTITION_DETECTION_NAME)
- public boolean getEnableNetworkPartitionDetection();
+ boolean getEnableNetworkPartitionDetection();
+
/** the name of the corresponding property */
@ConfigAttribute(type=Boolean.class)
- public static final String ENABLE_NETWORK_PARTITION_DETECTION_NAME =
- "enable-network-partition-detection";
- public static final boolean DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION = false;
+ String ENABLE_NETWORK_PARTITION_DETECTION_NAME = ENABLE_NETWORK_PARTITION_DETECTION;
+ boolean DEFAULT_ENABLE_NETWORK_PARTITION_DETECTION = false;
/**
* Get the value of the
@@ -1643,7 +1639,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=MEMBER_TIMEOUT_NAME)
- public int getMemberTimeout();
+ int getMemberTimeout();
/**
* Set the value of the
@@ -1651,34 +1647,34 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeSetter(name=MEMBER_TIMEOUT_NAME)
- public void setMemberTimeout(int value);
+ void setMemberTimeout(int value);
/**
* The default value of the corresponding property
*/
- public static final int DEFAULT_MEMBER_TIMEOUT = 5000;
+ int DEFAULT_MEMBER_TIMEOUT = 5000;
/** The minimum member-timeout setting of 1000 milliseconds */
- public static final int MIN_MEMBER_TIMEOUT = 10;
+ int MIN_MEMBER_TIMEOUT = 10;
/**The maximum member-timeout setting of 600000 millieseconds */
- public static final int MAX_MEMBER_TIMEOUT = 600000;
+ int MAX_MEMBER_TIMEOUT = 600000;
/**
* The name of the corresponding property
*/
@ConfigAttribute(type=Integer.class, min=MIN_MEMBER_TIMEOUT, max=MAX_MEMBER_TIMEOUT)
- public static final String MEMBER_TIMEOUT_NAME = "member-timeout";
+ String MEMBER_TIMEOUT_NAME = MEMBER_TIMEOUT;
@ConfigAttribute(type=int[].class)
- public static final String MEMBERSHIP_PORT_RANGE_NAME = "membership-port-range";
-
- public static final int[] DEFAULT_MEMBERSHIP_PORT_RANGE = new int[]{1024,65535};
+ String MEMBERSHIP_PORT_RANGE_NAME = MEMBERSHIP_PORT_RANGE;
+
+ int[] DEFAULT_MEMBERSHIP_PORT_RANGE = new int[] { 1024, 65535 };
@ConfigAttributeGetter(name=MEMBERSHIP_PORT_RANGE_NAME)
- public int[] getMembershipPortRange();
+ int[] getMembershipPortRange();
@ConfigAttributeSetter(name=MEMBERSHIP_PORT_RANGE_NAME)
- public void setMembershipPortRange(int[] range);
+ void setMembershipPortRange(int[] range);
/**
* Returns the value of the <a
@@ -1686,21 +1682,21 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=CONSERVE_SOCKETS_NAME)
- public boolean getConserveSockets();
+ boolean getConserveSockets();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#conserve-sockets">"conserve-sockets"</a>
* property.
*/
@ConfigAttributeSetter(name=CONSERVE_SOCKETS_NAME)
- public void setConserveSockets(boolean newValue);
+ void setConserveSockets(boolean newValue);
/** The name of the "conserveSockets" property */
@ConfigAttribute(type=Boolean.class)
- public static final String CONSERVE_SOCKETS_NAME = "conserve-sockets";
+ String CONSERVE_SOCKETS_NAME = CONSERVE_SOCKETS;
/** The default value of the "conserveSockets" property */
- public static final boolean DEFAULT_CONSERVE_SOCKETS = true;
+ boolean DEFAULT_CONSERVE_SOCKETS = true;
/**
* Returns the value of the <a
@@ -1708,65 +1704,66 @@ public interface DistributionConfig extends Config, LogConfig {
* property
*/
@ConfigAttributeGetter(name=ROLES_NAME)
- public String getRoles();
+ String getRoles();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#roles">"roles"</a>
* property.
*/
@ConfigAttributeSetter(name=ROLES_NAME)
- public void setRoles(String roles);
+ void setRoles(String roles);
/** The name of the "roles" property */
@ConfigAttribute(type=String.class)
- public static final String ROLES_NAME = "roles";
+ String ROLES_NAME = ROLES;
+
/** The default value of the "roles" property */
- public static final String DEFAULT_ROLES = "";
+ String DEFAULT_ROLES = "";
/**
* The name of the "max wait time for reconnect" property */
@ConfigAttribute(type=Integer.class)
- public static final String MAX_WAIT_TIME_FOR_RECONNECT_NAME = "max-wait-time-reconnect";
+ String MAX_WAIT_TIME_FOR_RECONNECT_NAME = MAX_WAIT_TIME_RECONNECT;
/**
* Default value for MAX_WAIT_TIME_FOR_RECONNECT, 60,000 milliseconds.
*/
- public static final int DEFAULT_MAX_WAIT_TIME_FOR_RECONNECT = 60000;
+ int DEFAULT_MAX_WAIT_TIME_FOR_RECONNECT = 60000;
/**
* Sets the max wait timeout, in milliseconds, for reconnect.
* */
@ConfigAttributeSetter(name=MAX_WAIT_TIME_FOR_RECONNECT_NAME)
- public void setMaxWaitTimeForReconnect( int timeOut);
+ void setMaxWaitTimeForReconnect(int timeOut);
/**
* Returns the max wait timeout, in milliseconds, for reconnect.
* */
@ConfigAttributeGetter(name=MAX_WAIT_TIME_FOR_RECONNECT_NAME)
- public int getMaxWaitTimeForReconnect();
+ int getMaxWaitTimeForReconnect();
/**
* The name of the "max number of tries for reconnect" property.
* */
@ConfigAttribute(type=Integer.class)
- public static final String MAX_NUM_RECONNECT_TRIES = "max-num-reconnect-tries";
+ String MAX_NUM_RECONNECT_TRIES = SystemConfigurationProperties.MAX_NUM_RECONNECT_TRIES;
/**
* Default value for MAX_NUM_RECONNECT_TRIES.
*/
- public static final int DEFAULT_MAX_NUM_RECONNECT_TRIES = 3;
+ int DEFAULT_MAX_NUM_RECONNECT_TRIES = 3;
/**
* Sets the max number of tries for reconnect.
* */
@ConfigAttributeSetter(name=MAX_NUM_RECONNECT_TRIES)
- public void setMaxNumReconnectTries(int tries);
+ void setMaxNumReconnectTries(int tries);
/**
* Returns the value for max number of tries for reconnect.
* */
@ConfigAttributeGetter(name=MAX_NUM_RECONNECT_TRIES)
- public int getMaxNumReconnectTries();
+ int getMaxNumReconnectTries();
// ------------------- Asynchronous Messaging Properties -------------------
@@ -1776,70 +1773,70 @@ public interface DistributionConfig extends Config, LogConfig {
* "async-distribution-timeout"</a> property.
*/
@ConfigAttributeGetter(name=ASYNC_DISTRIBUTION_TIMEOUT_NAME)
- public int getAsyncDistributionTimeout();
+ int getAsyncDistributionTimeout();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#async-distribution-timeout">
* "async-distribution-timeout"</a> property.
*/
@ConfigAttributeSetter(name=ASYNC_DISTRIBUTION_TIMEOUT_NAME)
- public void setAsyncDistributionTimeout(int newValue);
+ void setAsyncDistributionTimeout(int newValue);
/** The default value of "asyncDistributionTimeout" is <code>0</code>. */
- public static final int DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT = 0;
+ int DEFAULT_ASYNC_DISTRIBUTION_TIMEOUT = 0;
/** The minimum value of "asyncDistributionTimeout" is <code>0</code>. */
- public static final int MIN_ASYNC_DISTRIBUTION_TIMEOUT = 0;
+ int MIN_ASYNC_DISTRIBUTION_TIMEOUT = 0;
/** The maximum value of "asyncDistributionTimeout" is <code>60000</code>. */
- public static final int MAX_ASYNC_DISTRIBUTION_TIMEOUT = 60000;
+ int MAX_ASYNC_DISTRIBUTION_TIMEOUT = 60000;
/** The name of the "asyncDistributionTimeout" property */
@ConfigAttribute(type=Integer.class, min=MIN_ASYNC_DISTRIBUTION_TIMEOUT, max=MAX_ASYNC_DISTRIBUTION_TIMEOUT)
- public static final String ASYNC_DISTRIBUTION_TIMEOUT_NAME = "async-distribution-timeout";
+ String ASYNC_DISTRIBUTION_TIMEOUT_NAME = ASYNC_DISTRIBUTION_TIMEOUT;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#async-queue-timeout">
* "async-queue-timeout"</a> property.
*/
@ConfigAttributeGetter(name=ASYNC_QUEUE_TIMEOUT_NAME)
- public int getAsyncQueueTimeout();
+ int getAsyncQueueTimeout();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#async-queue-timeout">
* "async-queue-timeout"</a> property.
*/
@ConfigAttributeSetter(name=ASYNC_QUEUE_TIMEOUT_NAME)
- public void setAsyncQueueTimeout(int newValue);
+ void setAsyncQueueTimeout(int newValue);
/** The default value of "asyncQueueTimeout" is <code>60000</code>. */
- public static final int DEFAULT_ASYNC_QUEUE_TIMEOUT = 60000;
+ int DEFAULT_ASYNC_QUEUE_TIMEOUT = 60000;
/** The minimum value of "asyncQueueTimeout" is <code>0</code>. */
- public static final int MIN_ASYNC_QUEUE_TIMEOUT = 0;
+ int MIN_ASYNC_QUEUE_TIMEOUT = 0;
/** The maximum value of "asyncQueueTimeout" is <code>86400000</code>. */
- public static final int MAX_ASYNC_QUEUE_TIMEOUT = 86400000;
+ int MAX_ASYNC_QUEUE_TIMEOUT = 86400000;
/** The name of the "asyncQueueTimeout" property */
@ConfigAttribute(type=Integer.class, min=MIN_ASYNC_QUEUE_TIMEOUT, max=MAX_ASYNC_QUEUE_TIMEOUT)
- public static final String ASYNC_QUEUE_TIMEOUT_NAME = "async-queue-timeout";
+ String ASYNC_QUEUE_TIMEOUT_NAME = ASYNC_QUEUE_TIMEOUT;
/**
* Returns the value of the <a
* href="../DistributedSystem.html#async-max-queue-size">
* "async-max-queue-size"</a> property.
*/
@ConfigAttributeGetter(name=ASYNC_MAX_QUEUE_SIZE_NAME)
- public int getAsyncMaxQueueSize();
+ int getAsyncMaxQueueSize();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#async-max-queue-size">
* "async-max-queue-size"</a> property.
*/
@ConfigAttributeSetter(name=ASYNC_MAX_QUEUE_SIZE_NAME)
- public void setAsyncMaxQueueSize(int newValue);
+ void setAsyncMaxQueueSize(int newValue);
/** The default value of "asyncMaxQueueSize" is <code>8</code>. */
- public static final int DEFAULT_ASYNC_MAX_QUEUE_SIZE = 8;
+ int DEFAULT_ASYNC_MAX_QUEUE_SIZE = 8;
/** The minimum value of "asyncMaxQueueSize" is <code>0</code>. */
- public static final int MIN_ASYNC_MAX_QUEUE_SIZE = 0;
+ int MIN_ASYNC_MAX_QUEUE_SIZE = 0;
/** The maximum value of "asyncMaxQueueSize" is <code>1024</code>. */
- public static final int MAX_ASYNC_MAX_QUEUE_SIZE = 1024;
+ int MAX_ASYNC_MAX_QUEUE_SIZE = 1024;
/** The name of the "asyncMaxQueueSize" property */
@ConfigAttribute(type=Integer.class, min=MIN_ASYNC_MAX_QUEUE_SIZE, max=MAX_ASYNC_MAX_QUEUE_SIZE)
@@ -1857,14 +1854,14 @@ public interface DistributionConfig extends Config, LogConfig {
/** @since Geode 1.0 */
@ConfigAttribute(type=Boolean.class)
- public static final String DISTRIBUTED_TRANSACTIONS_NAME = "distributed-transactions";
- public static final boolean DEFAULT_DISTRIBUTED_TRANSACTIONS = false;
+ String DISTRIBUTED_TRANSACTIONS_NAME = DISTRIBUTED_TRANSACTIONS;
+ boolean DEFAULT_DISTRIBUTED_TRANSACTIONS = false;
@ConfigAttributeGetter(name=DISTRIBUTED_TRANSACTIONS_NAME)
- public boolean getDistributedTransactions();
+ boolean getDistributedTransactions();
@ConfigAttributeSetter(name=DISTRIBUTED_TRANSACTIONS_NAME)
- public void setDistributedTransactions(boolean value);
+ void setDistributedTransactions(boolean value);
/**
* Returns the value of the <a
@@ -1873,7 +1870,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @since GemFire 5.7
*/
@ConfigAttributeGetter(name=CLIENT_CONFLATION_PROP_NAME)
- public String getClientConflation();
+ String getClientConflation();
/**
* Sets the value of the <a
* href="../DistributedSystem.html#conflate-events">"conflate-events"</a>
@@ -1881,7 +1878,7 @@ public interface DistributionConfig extends Config, LogConfig {
* @since GemFire 5.7
*/
@ConfigAttributeSetter(name=CLIENT_CONFLATION_PROP_NAME)
- public void setClientConflation(String clientConflation);
+ void setClientConflation(String clientConflation);
// -------------------------------------------------------------------------
/**
* Returns the value of the <a
@@ -1889,7 +1886,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=DURABLE_CLIENT_ID_NAME)
- public String getDurableClientId();
+ String getDurableClientId();
/**
* Sets the value of the <a
@@ -1897,17 +1894,17 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=DURABLE_CLIENT_ID_NAME)
- public void setDurableClientId(String durableClientId);
+ void setDurableClientId(String durableClientId);
/** The name of the "durableClientId" property */
@ConfigAttribute(type=String.class)
- public static final String DURABLE_CLIENT_ID_NAME = "durable-client-id";
+ String DURABLE_CLIENT_ID_NAME = DURABLE_CLIENT_ID;
/**
* The default durable client id.
* <p> Actual value of this constant is <code>""</code>.
*/
- public static final String DEFAULT_DURABLE_CLIENT_ID = "";
+ String DEFAULT_DURABLE_CLIENT_ID = "";
/**
* Returns the value of the <a
@@ -1915,7 +1912,7 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeGetter(name=DURABLE_CLIENT_TIMEOUT_NAME)
- public int getDurableClientTimeout();
+ int getDurableClientTimeout();
/**
* Sets the value of the <a
@@ -1923,24 +1920,24 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=DURABLE_CLIENT_TIMEOUT_NAME)
- public void setDurableClientTimeout(int durableClientTimeout);
+ void setDurableClientTimeout(int durableClientTimeout);
/** The name of the "durableClientTimeout" property */
@ConfigAttribute(type=Integer.class)
- public static final String DURABLE_CLIENT_TIMEOUT_NAME = "durable-client-timeout";
+ String DURABLE_CLIENT_TIMEOUT_NAME = DURABLE_CLIENT_TIMEOUT;
/**
* The default durable client timeout in seconds.
* <p> Actual value of this constant is <code>"300"</code>.
*/
- public static final int DEFAULT_DURABLE_CLIENT_TIMEOUT = 300;
+ int DEFAULT_DURABLE_CLIENT_TIMEOUT = 300;
/**
* Returns user module name for client authentication initializer in <a
* href="../DistributedSystem.html#security-client-auth-init">"security-client-auth-init"</a>
*/
@ConfigAttributeGetter(name=SECURITY_CLIENT_AUTH_INIT_NAME)
- public String getSecurityClientAuthInit();
+ String getSecurityClientAuthInit();
/**
* Sets the user module name in <a
@@ -1948,24 +1945,24 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=SECURITY_CLIENT_AUTH_INIT_NAME)
- public void setSecurityClientAuthInit(String attValue);
+ void setSecurityClientAuthInit(String attValue);
/** The name of user defined method name for "security-client-auth-init" property*/
@ConfigAttribute(type=String.class)
- public static final String SECURITY_CLIENT_AUTH_INIT_NAME = "security-client-auth-init";
+ String SECURITY_CLIENT_AUTH_INIT_NAME = SECURITY_CLIENT_AUTH_INIT;
/**
* The default client authentication initializer method name.
* <p> Actual value of this is in format <code>"jar file:module name"</code>.
*/
- public static final String DEFAULT_SECURITY_CLIENT_AUTH_INIT = "";
+ String DEFAULT_SECURITY_CLIENT_AUTH_INIT = "";
/**
* Returns user module name authenticating client credentials in <a
* href="../DistributedSystem.html#security-client-authenticator">"security-client-authenticator"</a>
*/
@ConfigAttributeGetter(name=SECURITY_CLIENT_AUTHENTICATOR_NAME)
- public String getSecurityClientAuthenticator();
+ String getSecurityClientAuthenticator();
/**
* Sets the user defined method name in <a
@@ -1973,24 +1970,24 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=SECURITY_CLIENT_AUTHENTICATOR_NAME)
- public void setSecurityClientAuthenticator(String attValue);
+ void setSecurityClientAuthenticator(String attValue);
/** The name of factory method for "security-client-authenticator" property */
@ConfigAttribute(type=String.class)
- public static final String SECURITY_CLIENT_AUTHENTICATOR_NAME = "security-client-authenticator";
+ String SECURITY_CLIENT_AUTHENTICATOR_NAME = SECURITY_CLIENT_AUTHENTICATOR;
/**
* The default client authentication method name.
* <p> Actual value of this is fully qualified <code>"method name"</code>.
*/
- public static final String DEFAULT_SECURITY_CLIENT_AUTHENTICATOR = "";
+ String DEFAULT_SECURITY_CLIENT_AUTHENTICATOR = "";
/**
* Returns name of algorithm to use for Diffie-Hellman key exchange <a
* href="../DistributedSystem.html#security-client-dhalgo">"security-client-dhalgo"</a>
*/
@ConfigAttributeGetter(name=SECURITY_CLIENT_DHALGO_NAME)
- public String getSecurityClientDHAlgo();
+ String getSecurityClientDHAlgo();
/**
* Set the name of algorithm to use for Diffie-Hellman key exchange <a
@@ -1998,14 +1995,14 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=SECURITY_CLIENT_DHALGO_NAME)
- public void setSecurityClientDHAlgo(String attValue);
+ void setSecurityClientDHAlgo(String attValue);
/**
* The name of the Diffie-Hellman symmetric algorithm "security-client-dhalgo"
* property.
*/
@ConfigAttribute(type=String.class)
- public static final String SECURITY_CLIENT_DHALGO_NAME = "security-client-dhalgo";
+ String SECURITY_CLIENT_DHALGO_NAME = SECURITY_CLIENT_DHALGO;
/**
* The default Diffie-Hellman symmetric algorithm name.
@@ -2013,14 +2010,14 @@ public interface DistributionConfig extends Config, LogConfig {
* Actual value of this is one of the available symmetric algorithm names in
* JDK like "DES", "DESede", "AES", "Blowfish".
*/
- public static final String DEFAULT_SECURITY_CLIENT_DHALGO = "";
+ String DEFAULT_SECURITY_CLIENT_DHALGO = "";
/**
* Returns user defined method name for peer authentication initializer in <a
* href="../DistributedSystem.html#security-peer-auth-init">"security-peer-auth-init"</a>
*/
@ConfigAttributeGetter(name=SECURITY_PEER_AUTH_INIT_NAME)
- public String getSecurityPeerAuthInit();
+ String getSecurityPeerAuthInit();
/**
* Sets the user module name in <a
@@ -2028,24 +2025,24 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=SECURITY_PEER_AUTH_INIT_NAME)
- public void setSecurityPeerAuthInit(String attValue);
+ void setSecurityPeerAuthInit(String attValue);
/** The name of user module for "security-peer-auth-init" property*/
@ConfigAttribute(type=String.class)
- public static final String SECURITY_PEER_AUTH_INIT_NAME = "security-peer-auth-init";
+ String SECURITY_PEER_AUTH_INIT_NAME = SECURITY_PEER_AUTH_INIT;
/**
* The default client authenticaiton method name.
* <p> Actual value of this is fully qualified <code>"method name"</code>.
*/
- public static final String DEFAULT_SECURITY_PEER_AUTH_INIT = "";
+ String DEFAULT_SECURITY_PEER_AUTH_INIT = "";
/**
* Returns user defined method name authenticating peer's credentials in <a
* href="../DistributedSystem.html#security-peer-authenticator">"security-peer-authenticator"</a>
*/
@ConfigAttributeGetter(name=SECURITY_PEER_AUTHENTICATOR_NAME)
- public String getSecurityPeerAuthenticator();
+ String getSecurityPeerAuthenticator();
/**
* Sets the user module name in <a
@@ -2053,24 +2050,24 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=SECURITY_PEER_AUTHENTICATOR_NAME)
- public void setSecurityPeerAuthenticator(String attValue);
+ void setSecurityPeerAuthenticator(String attValue);
/** The name of user defined method for "security-peer-authenticator" property*/
@ConfigAttribute(type=String.class)
- public static final String SECURITY_PEER_AUTHENTICATOR_NAME = "security-peer-authenticator";
+ String SECURITY_PEER_AUTHENTICATOR_NAME = SECURITY_PEER_AUTHENTICATOR;
/**
* The default client authenticaiton method.
* <p> Actual value of this is fully qualified <code>"method name"</code>.
*/
- public static final String DEFAULT_SECURITY_PEER_AUTHENTICATOR = "";
+ String DEFAULT_SECURITY_PEER_AUTHENTICATOR = "";
/**
* Returns user module name authorizing client credentials in <a
* href="../DistributedSystem.html#security-client-accessor">"security-client-accessor"</a>
*/
@ConfigAttributeGetter(name=SECURITY_CLIENT_ACCESSOR_NAME)
- public String getSecurityClientAccessor();
+ String getSecurityClientAccessor();
/**
* Sets the user defined method name in <a
@@ -2078,24 +2075,24 @@ public interface DistributionConfig extends Config, LogConfig {
* property.
*/
@ConfigAttributeSetter(name=SECURITY_CLIENT_ACCESSOR_NAME)
- public void setSecurityClientAccessor(String attValue);
+ void setSecurityCli
<TRUNCATED>
[17/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
index 543574a..59ec773 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigJUnitTest.java
@@ -16,21 +16,20 @@
*/
package com.gemstone.gemfire.internal;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.AssertionFailedError;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
-import junit.framework.AssertionFailedError;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
/**
* Test that DistributionConfigImpl handles SSL options correctly.
@@ -59,48 +58,48 @@ public class SSLConfigJUnitTest {
SSL_PROPS_MAP.put("javax.net.ssl.trustStorePassword", "gemfire-trust-password");
// SSL Properties for GemFire in-cluster connections
- CLUSTER_SSL_PROPS_MAP.put("cluster-ssl-keystore-type", "jks");
- CLUSTER_SSL_PROPS_MAP.put("cluster-ssl-keystore", "/export/gemfire-configs/gemfire.keystore");
- CLUSTER_SSL_PROPS_MAP.put("cluster-ssl-keystore-password", "gemfire-key-password");
- CLUSTER_SSL_PROPS_MAP.put("cluster-ssl-truststore", "/export/gemfire-configs/gemfire.truststore");
- CLUSTER_SSL_PROPS_MAP.put("cluster-ssl-truststore-password", "gemfire-trust-password");
+ CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME, "jks");
+ CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gemfire.keystore");
+ CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME, "gemfire-key-password");
+ CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gemfire.truststore");
+ CLUSTER_SSL_PROPS_MAP.put(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME, "gemfire-trust-password");
// Partially over-ridden SSL Properties for cluster
- CLUSTER_SSL_PROPS_SUBSET_MAP.put("cluster-ssl-keystore", "/export/gemfire-configs/gemfire.keystore");
- CLUSTER_SSL_PROPS_SUBSET_MAP.put("cluster-ssl-truststore", "/export/gemfire-configs/gemfire.truststore");
+ CLUSTER_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gemfire.keystore");
+ CLUSTER_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gemfire.truststore");
// SSL Properties for GemFire JMX Manager connections
- JMX_SSL_PROPS_MAP.put("jmx-manager-ssl-keystore-type", "jks");
- JMX_SSL_PROPS_MAP.put("jmx-manager-ssl-keystore", "/export/gemfire-configs/manager.keystore");
- JMX_SSL_PROPS_MAP.put("jmx-manager-ssl-keystore-password", "manager-key-password");
- JMX_SSL_PROPS_MAP.put("jmx-manager-ssl-truststore", "/export/gemfire-configs/manager.truststore");
- JMX_SSL_PROPS_MAP.put("jmx-manager-ssl-truststore-password", "manager-trust-password");
+ JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME, "jks");
+ JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/manager.keystore");
+ JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME, "manager-key-password");
+ JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/manager.truststore");
+ JMX_SSL_PROPS_MAP.put(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME, "manager-trust-password");
// SSL Properties for GemFire CacheServer connections
- SERVER_SSL_PROPS_MAP.put("server-ssl-keystore-type", "jks");
- SERVER_SSL_PROPS_MAP.put("server-ssl-keystore", "/export/gemfire-configs/cacheserver.keystore");
- SERVER_SSL_PROPS_MAP.put("server-ssl-keystore-password", "cacheserver-key-password");
- SERVER_SSL_PROPS_MAP.put("server-ssl-truststore", "/export/gemfire-configs/cacheserver.truststore");
- SERVER_SSL_PROPS_MAP.put("server-ssl-truststore-password", "cacheserver-trust-password");
+ SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME, "jks");
+ SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/cacheserver.keystore");
+ SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME, "cacheserver-key-password");
+ SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/cacheserver.truststore");
+ SERVER_SSL_PROPS_MAP.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME, "cacheserver-trust-password");
// SSL Properties for GemFire gateway connections
- GATEWAY_SSL_PROPS_MAP.put("gateway-ssl-keystore-type", "jks");
- GATEWAY_SSL_PROPS_MAP.put("gateway-ssl-keystore", "/export/gemfire-configs/gateway.keystore");
- GATEWAY_SSL_PROPS_MAP.put("gateway-ssl-keystore-password", "gateway-key-password");
- GATEWAY_SSL_PROPS_MAP.put("gateway-ssl-truststore", "/export/gemfire-configs/gateway.truststore");
- GATEWAY_SSL_PROPS_MAP.put("gateway-ssl-truststore-password", "gateway-trust-password");
+ GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_TYPE_NAME, "jks");
+ GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gateway.keystore");
+ GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_PASSWORD_NAME, "gateway-key-password");
+ GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gateway.truststore");
+ GATEWAY_SSL_PROPS_MAP.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME, "gateway-trust-password");
// Partially over-ridden SSL Properties for GemFire JMX Manager connections
- JMX_SSL_PROPS_SUBSET_MAP.put("jmx-manager-ssl-keystore", "/export/gemfire-configs/manager.keystore");
- JMX_SSL_PROPS_SUBSET_MAP.put("jmx-manager-ssl-truststore", "/export/gemfire-configs/manager.truststore");
+ JMX_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/manager.keystore");
+ JMX_SSL_PROPS_SUBSET_MAP.put(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/manager.truststore");
// Partially over-ridden SSL Properties for GemFire JMX Manager connections
- SERVER_PROPS_SUBSET_MAP.put("server-ssl-keystore", "/export/gemfire-configs/cacheserver.keystore");
- SERVER_PROPS_SUBSET_MAP.put("server-ssl-truststore", "/export/gemfire-configs/cacheserver.truststore");
+ SERVER_PROPS_SUBSET_MAP.put(DistributionConfig.SERVER_SSL_KEYSTORE_NAME, "/export/gemfire-configs/cacheserver.keystore");
+ SERVER_PROPS_SUBSET_MAP.put(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/cacheserver.truststore");
// Partially over-ridden SSL Properties for GemFire JMX Manager connections
- GATEWAY_PROPS_SUBSET_MAP.put("gateway-ssl-keystore", "/export/gemfire-configs/gateway.keystore");
- GATEWAY_PROPS_SUBSET_MAP.put("gateway-ssl-truststore", "/export/gemfire-configs/gateway.truststore");
+ GATEWAY_PROPS_SUBSET_MAP.put(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME, "/export/gemfire-configs/gateway.keystore");
+ GATEWAY_PROPS_SUBSET_MAP.put(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME, "/export/gemfire-configs/gateway.truststore");
}
@@ -110,7 +109,7 @@ public class SSLConfigJUnitTest {
public void testMCastPortWithSSL() throws Exception {
Properties props = new Properties( );
// default mcast-port is not 0.
- props.setProperty( "ssl-enabled", "true" );
+ props.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
try {
new DistributionConfigImpl( props );
@@ -119,8 +118,8 @@ public class SSLConfigJUnitTest {
throw new Exception( "did not get expected exception, got this instead...", e );
}
}
-
- props.setProperty( "mcast-port", "0" );
+
+ props.setProperty(MCAST_PORT, "0");
new DistributionConfigImpl( props );
}
@@ -128,7 +127,7 @@ public class SSLConfigJUnitTest {
public void testMCastPortWithClusterSSL() throws Exception {
Properties props = new Properties( );
// default mcast-port is not 0.
- props.setProperty( "cluster-ssl-enabled", "true" );
+ props.setProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
try {
new DistributionConfigImpl( props );
@@ -137,8 +136,8 @@ public class SSLConfigJUnitTest {
throw new Exception( "did not get expected exception, got this instead...", e );
}
}
-
- props.setProperty( "mcast-port", "0" );
+
+ props.setProperty(MCAST_PORT, "0");
new DistributionConfigImpl( props );
}
@@ -157,7 +156,7 @@ public class SSLConfigJUnitTest {
Properties props = new Properties();
sslciphers = "RSA_WITH_GARBAGE";
- props.setProperty("ssl-ciphers", sslciphers );
+ props.setProperty(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
config = new DistributionConfigImpl( props );
isEqual( config.getSSLEnabled(), sslenabled );
@@ -166,7 +165,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getSSLRequireAuthentication(), requireAuth );
sslprotocols = "SSLv7";
- props.setProperty("ssl-protocols", sslprotocols );
+ props.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, sslprotocols);
config = new DistributionConfigImpl( props );
isEqual( config.getSSLEnabled(), sslenabled );
@@ -175,7 +174,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getSSLRequireAuthentication(), requireAuth );
requireAuth = false;
- props.setProperty("ssl-require-authentication", String.valueOf( requireAuth ) );
+ props.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
config = new DistributionConfigImpl( props );
isEqual( config.getSSLEnabled(), sslenabled );
@@ -184,8 +183,8 @@ public class SSLConfigJUnitTest {
isEqual( config.getSSLRequireAuthentication(), requireAuth );
sslenabled = true;
- props.setProperty("ssl-enabled", String.valueOf( sslenabled ) );
- props.setProperty("mcast-port", "0" );
+ props.setProperty(DistributionConfig.SSL_ENABLED_NAME, String.valueOf(sslenabled));
+ props.setProperty(MCAST_PORT, "0");
config = new DistributionConfigImpl( props );
isEqual( config.getSSLEnabled(), sslenabled );
@@ -215,7 +214,7 @@ public class SSLConfigJUnitTest {
Properties props = new Properties();
sslciphers = "RSA_WITH_GARBAGE";
- props.setProperty("cluster-ssl-ciphers", sslciphers );
+ props.setProperty(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
config = new DistributionConfigImpl( props );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -224,7 +223,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getClusterSSLRequireAuthentication(), requireAuth );
sslprotocols = "SSLv7";
- props.setProperty("cluster-ssl-protocols", sslprotocols );
+ props.setProperty(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
config = new DistributionConfigImpl( props );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -233,7 +232,7 @@ public class SSLConfigJUnitTest {
isEqual( config.getClusterSSLRequireAuthentication(), requireAuth );
requireAuth = false;
- props.setProperty("cluster-ssl-require-authentication", String.valueOf( requireAuth ) );
+ props.setProperty(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
config = new DistributionConfigImpl( props );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -242,8 +241,8 @@ public class SSLConfigJUnitTest {
isEqual( config.getClusterSSLRequireAuthentication(), requireAuth );
sslenabled = true;
- props.setProperty("cluster-ssl-enabled", String.valueOf( sslenabled ) );
- props.setProperty("mcast-port", "0" );
+ props.setProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
+ props.setProperty(MCAST_PORT, "0");
config = new DistributionConfigImpl( props );
isEqual( config.getClusterSSLEnabled(), sslenabled );
@@ -469,7 +468,7 @@ public class SSLConfigJUnitTest {
//sslEnabled and clusterSSLEnabled set at the same time
Properties gemFireProps = new Properties();
- gemFireProps.setProperty( "mcast-port", "0" );
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "false");
DistributionConfigImpl config = null;
@@ -484,7 +483,7 @@ public class SSLConfigJUnitTest {
//ssl-protocol and cluster-ssl-protocol set at the same time
gemFireProps = new Properties();
- gemFireProps.setProperty( "mcast-port", "0" );
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
gemFireProps.put(DistributionConfig.SSL_PROTOCOLS_NAME, sslprotocols);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
@@ -500,7 +499,7 @@ public class SSLConfigJUnitTest {
//ssl-protocol and cluster-ssl-protocol set at the same time with same value
gemFireProps = new Properties();
- gemFireProps.setProperty( "mcast-port", "0" );
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
gemFireProps.put(DistributionConfig.SSL_PROTOCOLS_NAME, sslprotocols);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
@@ -513,7 +512,7 @@ public class SSLConfigJUnitTest {
//ssl-cipher and cluster-ssl-cipher set at the same time
gemFireProps = new Properties();
- gemFireProps.setProperty( "mcast-port", "0" );
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
gemFireProps.put(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
@@ -529,7 +528,7 @@ public class SSLConfigJUnitTest {
//ssl-cipher and cluster-ssl-cipher set at the same time with same value
gemFireProps = new Properties();
- gemFireProps.setProperty( "mcast-port", "0" );
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
gemFireProps.put(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
@@ -542,7 +541,7 @@ public class SSLConfigJUnitTest {
//ssl-require-authentication and cluster-ssl-require-authentication set at the same time
gemFireProps = new Properties();
- gemFireProps.setProperty( "mcast-port", "0" );
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
gemFireProps.put(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
@@ -558,7 +557,7 @@ public class SSLConfigJUnitTest {
//ssl-require-authentication and cluster-ssl-require-authentication set at the same time and have the same value
gemFireProps = new Properties();
- gemFireProps.setProperty( "mcast-port", "0" );
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, "true");
gemFireProps.put(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
@@ -571,7 +570,7 @@ public class SSLConfigJUnitTest {
// only ssl-* properties provided. same should reflect in cluster-ssl properties
gemFireProps = new Properties();
- gemFireProps.setProperty("mcast-port", "0");
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.SSL_ENABLED_NAME, String.valueOf(sslenabled));
gemFireProps.put(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(requireAuth));
gemFireProps.put(DistributionConfig.SSL_CIPHERS_NAME, sslciphers);
@@ -599,7 +598,7 @@ public class SSLConfigJUnitTest {
//only clutser-ssl-properties provided.
gemFireProps = new Properties();
- gemFireProps.setProperty("mcast-port", "0");
+ gemFireProps.setProperty(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(clusterSslenabled));
gemFireProps.put(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, String.valueOf(clusterSslRequireAuth));
gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, clusterSslciphers);
@@ -613,12 +612,12 @@ public class SSLConfigJUnitTest {
isEqual(clusterSslprotocols, config.getClusterSSLProtocols());
isEqual(clusterSslciphers, config.getClusterSSLCiphers());
isEqual(clusterSslRequireAuth, config.getClusterSSLRequireAuthentication());
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
clusterSSLProperties = config.getClusterSSLProperties();
isEqual( SSL_PROPS_MAP, clusterSSLProperties );
@@ -661,11 +660,11 @@ public class SSLConfigJUnitTest {
isEqual( config.getJmxManagerSSLCiphers(), jmxManagerSslciphers );
isEqual( config.getJmxManagerSSLRequireAuthentication(), jmxManagerSslRequireAuth );
- isEqual( JMX_SSL_PROPS_MAP.get("jmx-manager-ssl-keystore") , config.getJmxManagerSSLKeyStore());
- isEqual( JMX_SSL_PROPS_MAP.get("jmx-manager-ssl-keystore-type"), config.getJmxManagerSSLKeyStoreType());
- isEqual( JMX_SSL_PROPS_MAP.get("jmx-manager-ssl-keystore-password"), config.getJmxManagerSSLKeyStorePassword());
- isEqual( JMX_SSL_PROPS_MAP.get("jmx-manager-ssl-truststore"), config.getJmxManagerSSLTrustStore());
- isEqual( JMX_SSL_PROPS_MAP.get("jmx-manager-ssl-truststore-password"),config.getJmxManagerSSLTrustStorePassword());
+ isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME), config.getJmxManagerSSLKeyStore());
+ isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_TYPE_NAME), config.getJmxManagerSSLKeyStoreType());
+ isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_PASSWORD_NAME), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME), config.getJmxManagerSSLTrustStore());
+ isEqual(JMX_SSL_PROPS_MAP.get(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getJmxManagerSSLTrustStorePassword());
}
@Test
@@ -704,11 +703,11 @@ public class SSLConfigJUnitTest {
isEqual( config.getServerSSLCiphers(), cacheServerSslciphers );
isEqual( config.getServerSSLRequireAuthentication(), cacheServerSslRequireAuth );
- isEqual( SERVER_SSL_PROPS_MAP.get("server-ssl-keystore") , config.getServerSSLKeyStore());
- isEqual( SERVER_SSL_PROPS_MAP.get("server-ssl-keystore-type"), config.getServerSSLKeyStoreType());
- isEqual( SERVER_SSL_PROPS_MAP.get("server-ssl-keystore-password"), config.getServerSSLKeyStorePassword());
- isEqual( SERVER_SSL_PROPS_MAP.get("server-ssl-truststore"), config.getServerSSLTrustStore());
- isEqual( SERVER_SSL_PROPS_MAP.get("server-ssl-truststore-password"),config.getServerSSLTrustStorePassword());
+ isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
+ isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
+ isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
+ isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
+ isEqual(SERVER_SSL_PROPS_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
}
@Test
@@ -747,11 +746,11 @@ public class SSLConfigJUnitTest {
isEqual( config.getGatewaySSLCiphers(), gatewaySslciphers );
isEqual( config.getGatewaySSLRequireAuthentication(), gatewaySslRequireAuth );
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( GATEWAY_SSL_PROPS_MAP.get("gateway-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
+ isEqual(GATEWAY_SSL_PROPS_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
}
@@ -791,17 +790,17 @@ public class SSLConfigJUnitTest {
isEqual( config.getJmxManagerSSLCiphers(), jmxManagerSslciphers );
isEqual( config.getJmxManagerSSLRequireAuthentication(), jmxManagerSslRequireAuth );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( JMX_SSL_PROPS_SUBSET_MAP.get("jmx-manager-ssl-keystore") , config.getJmxManagerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getJmxManagerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getJmxManagerSSLKeyStorePassword());
- isEqual( JMX_SSL_PROPS_SUBSET_MAP.get("jmx-manager-ssl-truststore"), config.getJmxManagerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getJmxManagerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(DistributionConfig.JMX_MANAGER_SSL_KEYSTORE_NAME), config.getJmxManagerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getJmxManagerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(JMX_SSL_PROPS_SUBSET_MAP.get(DistributionConfig.JMX_MANAGER_SSL_TRUSTSTORE_NAME), config.getJmxManagerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getJmxManagerSSLTrustStorePassword());
}
@@ -841,17 +840,17 @@ public class SSLConfigJUnitTest {
isEqual( config.getServerSSLCiphers(), cacheServerSslciphers );
isEqual( config.getServerSSLRequireAuthentication(), cacheServerSslRequireAuth );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( SERVER_PROPS_SUBSET_MAP.get("server-ssl-keystore") , config.getServerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getServerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getServerSSLKeyStorePassword());
- isEqual( SERVER_PROPS_SUBSET_MAP.get("server-ssl-truststore"), config.getServerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getServerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
}
@Test
@@ -889,18 +888,18 @@ public class SSLConfigJUnitTest {
isEqual( config.getGatewaySSLProtocols(), gatewaySslprotocols );
isEqual( config.getGatewaySSLCiphers(), gatewaySslciphers );
isEqual( config.getGatewaySSLRequireAuthentication(), gatewaySslRequireAuth );
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
}
@@ -917,7 +916,7 @@ public class SSLConfigJUnitTest {
boolean cacheServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
+ gemFireProps.put(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
@@ -943,17 +942,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore") , config.getServerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getServerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getServerSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getServerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getServerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
}
@@ -970,7 +969,7 @@ public class SSLConfigJUnitTest {
boolean cacheServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
+ gemFireProps.put(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
@@ -1001,17 +1000,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( SERVER_PROPS_SUBSET_MAP.get("server-ssl-keystore") , config.getServerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getServerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getServerSSLKeyStorePassword());
- isEqual( SERVER_PROPS_SUBSET_MAP.get("server-ssl-truststore"), config.getServerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getServerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_KEYSTORE_NAME), config.getServerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getServerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getServerSSLKeyStorePassword());
+ isEqual(SERVER_PROPS_SUBSET_MAP.get(DistributionConfig.SERVER_SSL_TRUSTSTORE_NAME), config.getServerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getServerSSLTrustStorePassword());
}
@Test
@@ -1027,7 +1026,7 @@ public class SSLConfigJUnitTest {
boolean gatewayServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
+ gemFireProps.put(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
@@ -1053,17 +1052,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
}
@@ -1080,7 +1079,7 @@ public class SSLConfigJUnitTest {
boolean gatewayServerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
+ gemFireProps.put(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
@@ -1106,17 +1105,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-keystore") , config.getGatewaySSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getGatewaySSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getGatewaySSLKeyStorePassword());
- isEqual( GATEWAY_PROPS_SUBSET_MAP.get("gateway-ssl-truststore"), config.getGatewaySSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getGatewaySSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_KEYSTORE_NAME), config.getGatewaySSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getGatewaySSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getGatewaySSLKeyStorePassword());
+ isEqual(GATEWAY_PROPS_SUBSET_MAP.get(DistributionConfig.GATEWAY_SSL_TRUSTSTORE_NAME), config.getGatewaySSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getGatewaySSLTrustStorePassword());
}
@@ -1133,7 +1132,7 @@ public class SSLConfigJUnitTest {
boolean jmxManagerSslRequireAuth = false;
Properties gemFireProps = new Properties();
- gemFireProps.put(DistributionConfig.MCAST_PORT_NAME,"0");
+ gemFireProps.put(MCAST_PORT, "0");
gemFireProps.put(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, String.valueOf(sslenabled));
gemFireProps.put(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, sslprotocols);
gemFireProps.put(DistributionConfig.CLUSTER_SSL_CIPHERS_NAME, sslciphers);
@@ -1159,17 +1158,17 @@ public class SSLConfigJUnitTest {
System.out.println(config.toLoggerString());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore"), config.getClusterSSLKeyStore() );
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getClusterSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getClusterSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getClusterSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"), config.getClusterSSLTrustStorePassword());
-
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore") , config.getJmxManagerSSLKeyStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-type"), config.getJmxManagerSSLKeyStoreType());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-keystore-password"), config.getJmxManagerSSLKeyStorePassword());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore"), config.getJmxManagerSSLTrustStore());
- isEqual( CLUSTER_SSL_PROPS_MAP.get("cluster-ssl-truststore-password"),config.getJmxManagerSSLTrustStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getClusterSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getClusterSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getClusterSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getClusterSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getClusterSSLTrustStorePassword());
+
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME), config.getJmxManagerSSLKeyStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME), config.getJmxManagerSSLKeyStoreType());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME), config.getJmxManagerSSLKeyStorePassword());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME), config.getJmxManagerSSLTrustStore());
+ isEqual(CLUSTER_SSL_PROPS_MAP.get(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME), config.getJmxManagerSSLTrustStorePassword());
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
index a953155..197c28b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/BackupJUnitTest.java
@@ -16,43 +16,26 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.BufferedReader;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.InputStreamReader;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStore;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.DiskWriteAttributesFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.cache.persistence.BackupManager;
import com.gemstone.gemfire.internal.cache.persistence.RestoreScript;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.*;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -80,8 +63,8 @@ public class BackupJUnitTest {
@Before
public void setUp() throws Exception {
if (TMP_DIR == null) {
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
String tmpDirName = System.getProperty("java.io.tmpdir");
TMP_DIR = tmpDirName == null ? new File("") : new File(tmpDirName);
try {
@@ -90,8 +73,8 @@ public class BackupJUnitTest {
} catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
}
- props.setProperty("cache-xml-file", CACHE_XML_FILE.getAbsolutePath());
- props.setProperty("log-level", "config"); // to keep diskPerf logs smaller
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, CACHE_XML_FILE.getAbsolutePath());
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config"); // to keep diskPerf logs smaller
}
createCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726JUnitTest.java
index e088930..005d569 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug33726JUnitTest.java
@@ -16,23 +16,18 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
/**
* AFTER_REGION_CREATE was being sent before region
@@ -65,7 +60,7 @@ public class Bug33726JUnitTest{
@Test
public void testAfterRegionCreate() {
Properties props = new Properties();
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.put(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(props);
AttributesFactory factory = new AttributesFactory();
factory.setCacheListener(new TestCacheListener());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug34583JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug34583JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug34583JUnitTest.java
index 7f3081a..d00c87b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug34583JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug34583JUnitTest.java
@@ -16,22 +16,22 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertEquals;
-
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
* Confirm that bug 34583 is fixed. Cause of bug is recursion is
@@ -55,7 +55,7 @@ public class Bug34583JUnitTest {
@Test
public void testBunchOfInvalidEntries() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
DistributedSystem ds = DistributedSystem.connect(props);
try {
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
index d6b6e2e..ef4e6be 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug37244JUnitTest.java
@@ -16,32 +16,23 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.Properties;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskStoreFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.cache.lru.EnableLRU;
import com.gemstone.gemfire.internal.cache.lru.LRUClockNode;
import com.gemstone.gemfire.internal.cache.lru.NewLRUClockHand;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Test for simluating the deadLock condition as in bug#37244
@@ -64,9 +55,9 @@ public class Bug37244JUnitTest
private static void initializeVM() throws Exception
{
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("log-level", "info"); // to keep diskPerf logs smaller
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info"); // to keep diskPerf logs smaller
distributedSystem = DistributedSystem.connect(props);
cache = CacheFactory.create(distributedSystem);
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
index 74f31cd..ba105c4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug39079DUnitTest.java
@@ -19,35 +19,24 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.nio.channels.FileChannel;
-import java.util.List;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.DiskAccessException;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.persistence.UninterruptibleFileChannel;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests that if a node doing GII experiences DiskAccessException, it should
@@ -387,8 +376,8 @@ public class Bug39079DUnitTest extends CacheTestCase {
throws Exception {
new Bug39079DUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
new Bug39079DUnitTest("temp").createCache(props);
PoolImpl p = (PoolImpl)PoolManager.createFactory().addServer(host,
port1.intValue())
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
index 0e11829..8432b69 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41091DUnitTest.java
@@ -16,12 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.io.File;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.PartitionAttributesFactory;
@@ -34,12 +28,16 @@ import com.gemstone.gemfire.distributed.internal.DistributionMessage;
import com.gemstone.gemfire.distributed.internal.DistributionMessageObserver;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.InitialImageOperation.RequestImageMessage;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
*
@@ -97,7 +95,7 @@ public class Bug41091DUnitTest extends CacheTestCase {
Properties props = new Properties();
props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.setProperty(DistributionConfig.LOCATORS_NAME, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
+ props.setProperty(LOCATORS, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
getSystem(props);
@@ -117,7 +115,7 @@ public class Bug41091DUnitTest extends CacheTestCase {
public void run() {
Properties props = new Properties();
props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
- props.setProperty(DistributionConfig.LOCATORS_NAME, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
+ props.setProperty(LOCATORS, NetworkUtils.getServerHostName(host) + "[" + locatorPort + "]");
getSystem(props);
Cache cache = getCache();
AttributesFactory af = new AttributesFactory();
@@ -150,7 +148,7 @@ public class Bug41091DUnitTest extends CacheTestCase {
public void run() {
disconnectFromDS();
Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
+ props.setProperty(MCAST_PORT, String.valueOf(0));
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
props.setProperty(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41957DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41957DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41957DUnitTest.java
index 6f18c36..c701f7c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41957DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug41957DUnitTest.java
@@ -16,29 +16,18 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.InterestPolicy;
-import com.gemstone.gemfire.cache.InterestResultPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.SubscriptionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Test for bug 41957.
@@ -90,7 +79,7 @@ import com.gemstone.gemfire.test.dunit.VM;
public void run2() throws CacheException {
// Create DS
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
// Create Region
@@ -125,8 +114,8 @@ import com.gemstone.gemfire.test.dunit.VM;
public void run2() throws CacheException {
// Create DS
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
// Create Region
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
index ca1c1b1..451df52 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug45934DUnitTest.java
@@ -16,22 +16,19 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.HashMap;
-import java.util.Map;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.util.DelayedAction;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
+import java.util.HashMap;
+import java.util.Map;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
public class Bug45934DUnitTest extends CacheTestCase {
public Bug45934DUnitTest(String name) {
super(name);
@@ -48,8 +45,8 @@ public class Bug45934DUnitTest extends CacheTestCase {
// 1. create the local cache
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "45934");
- cf.set("conserve-sockets", "false");
+ cf.set(MCAST_PORT, "45934");
+ cf.set(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
Cache cache = getCache(cf);
// 2. create normal region locally
@@ -86,8 +83,8 @@ public class Bug45934DUnitTest extends CacheTestCase {
@Override
public Object call() throws Exception {
CacheFactory cf = new CacheFactory();
- cf.set("mcast-port", "45934");
- cf.set("conserve-sockets", "false");
+ cf.set(MCAST_PORT, "45934");
+ cf.set(DistributionConfig.CONSERVE_SOCKETS_NAME, "false");
getCache(cf).<Integer, Integer> createRegionFactory(RegionShortcut.REPLICATE_PERSISTENT)
.create(name);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug48182JUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug48182JUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug48182JUnitTest.java
index efac0bc..85ebf7d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug48182JUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/Bug48182JUnitTest.java
@@ -16,22 +16,20 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* TestCase that emulates the conditions that produce defect 48182 and ensures that the fix works under those conditions.
@@ -124,9 +122,9 @@ public class Bug48182JUnitTest {
*/
protected GemFireCacheImpl createCache() {
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
- props.setProperty("off-heap-memory-size", getOffHeapMemorySize());
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, getOffHeapMemorySize());
GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).create();
return result;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheLifecycleListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheLifecycleListenerJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheLifecycleListenerJUnitTest.java
index f2a4a8d..078197b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheLifecycleListenerJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheLifecycleListenerJUnitTest.java
@@ -16,23 +16,19 @@
*/
package com.gemstone.gemfire.internal.cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static org.junit.Assert.*;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import junit.framework.TestCase;
-
/**
* Tests notifications of CacheLifecycleListener from GemFireCacheImpl.
*
@@ -69,8 +65,8 @@ public class CacheLifecycleListenerJUnitTest {
assertTrue(cacheClosedCallbacks.isEmpty());
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
final GemFireCacheImpl cache = (GemFireCacheImpl) new CacheFactory(props).create();
try {
@@ -113,8 +109,8 @@ public class CacheLifecycleListenerJUnitTest {
assertTrue(cacheClosedCallbacks.isEmpty());
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
final GemFireCacheImpl cache = (GemFireCacheImpl) new CacheFactory(props).create();
try {
@@ -150,8 +146,8 @@ public class CacheLifecycleListenerJUnitTest {
assertTrue(cacheClosedCallbacks.isEmpty());
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
final GemFireCacheImpl cache = (GemFireCacheImpl) new CacheFactory(props).create();
try {
@@ -192,8 +188,8 @@ public class CacheLifecycleListenerJUnitTest {
assertTrue(cacheClosedCallbacks.isEmpty());
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
final GemFireCacheImpl cache1 = (GemFireCacheImpl) new CacheFactory(props).create();
try {
@@ -258,8 +254,8 @@ public class CacheLifecycleListenerJUnitTest {
assertTrue(cacheClosedCallbacks.isEmpty());
final Properties props = new Properties();
- props.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- props.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
final GemFireCacheImpl cache = (GemFireCacheImpl) new CacheFactory(props).create();
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheServiceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheServiceJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheServiceJUnitTest.java
index 5674141..7e8a23b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheServiceJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/CacheServiceJUnitTest.java
@@ -16,22 +16,15 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.*;
-
-import java.util.concurrent.atomic.AtomicBoolean;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
public class CacheServiceJUnitTest {
@@ -40,7 +33,7 @@ public class CacheServiceJUnitTest {
@Before
public void setUp() {
- cache = (GemFireCacheImpl) new CacheFactory().set("mcast-port", "0").create();
+ cache = (GemFireCacheImpl) new CacheFactory().set(MCAST_PORT, "0").create();
}
@After
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
index 95a4969..bb0e02d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClearDAckDUnitTest.java
@@ -21,27 +21,13 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.versions.VersionSource;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Properties;
/**
*
@@ -101,7 +87,7 @@ public class ClearDAckDUnitTest extends DistributedTestCase {
public static DistributedMember createCacheVM0() {
try{
- // props.setProperty("mcast-port", "1234");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
// ds = DistributedSystem.connect(props);
LogWriterUtils.getLogWriter().info("I am vm0");
ds = (new ClearDAckDUnitTest("temp")).getSystem(props);
@@ -126,7 +112,7 @@ public class ClearDAckDUnitTest extends DistributedTestCase {
} //end of create cache for VM0
public static DistributedMember createCacheVM1(){
try{
- // props.setProperty("mcast-port", "1234");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
// ds = DistributedSystem.connect(props);
LogWriterUtils.getLogWriter().info("I am vm1");
ds = (new ClearDAckDUnitTest("temp")).getSystem(props);
@@ -155,7 +141,7 @@ public class ClearDAckDUnitTest extends DistributedTestCase {
public static void createCacheVM2AndLocalClear(){
try{
- // props.setProperty("mcast-port", "1234");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "1234");
// ds = DistributedSystem.connect(props);
LogWriterUtils.getLogWriter().info("I am vm2");
ds = (new ClearDAckDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientMessagesRegionCreationAndDestroyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientMessagesRegionCreationAndDestroyJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientMessagesRegionCreationAndDestroyJUnitTest.java
index e0cde11..67fd72c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientMessagesRegionCreationAndDestroyJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientMessagesRegionCreationAndDestroyJUnitTest.java
@@ -16,20 +16,6 @@
*/
package com.gemstone.gemfire.internal.cache;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.IOException;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -39,6 +25,18 @@ import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ha.HAContainerWrapper;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueue;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Test to verify that each bridge sever creates its own client_messages_region
@@ -165,7 +163,7 @@ public class ClientMessagesRegionCreationAndDestroyJUnitTest {
private Cache createCache() throws CacheException
{
Properties p = new Properties();
- p.put("mcast-port", "0");
+ p.put(MCAST_PORT, "0");
return CacheFactory.create(DistributedSystem.connect(p));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
index e424011..8da507b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
@@ -16,21 +16,7 @@
*/
package com.gemstone.gemfire.internal.cache;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -40,13 +26,12 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Class <code>ClientServerGetAllDUnitTest</code> test client/server getAll.
@@ -668,7 +653,7 @@ import com.gemstone.gemfire.test.dunit.VM;
public void run2() throws CacheException {
// Create DS
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
if (offheap) {
config.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "350m");
}
@@ -732,7 +717,7 @@ import com.gemstone.gemfire.test.dunit.VM;
public void run2() throws CacheException {
// Create DS
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
// Create Region
@@ -767,8 +752,8 @@ import com.gemstone.gemfire.test.dunit.VM;
public void run2() throws CacheException {
// Create DS
Properties config = new Properties();
- config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ config.setProperty(MCAST_PORT, "0");
+ config.setProperty(LOCATORS, "");
getSystem(config);
// Create Region
[57/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
index 8e6221a..ee430f1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/auth/GMSAuthenticatorJUnitTest.java
@@ -39,6 +39,7 @@ import java.util.Properties;
import static org.junit.Assert.*;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category({ UnitTest.class, SecurityTest.class })
public class GMSAuthenticatorJUnitTest {
@@ -69,19 +70,19 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testGetSecurityProps() throws Exception {
- props.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sys.security-peer-auth-init", "dummy1");
- props.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sys.security-peer-authenticator", "dummy2");
+ props.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sys."+SECURITY_PEER_AUTH_INIT, "dummy1");
+ props.setProperty(DistributionConfig.GEMFIRE_PREFIX + "sys."+SECURITY_PEER_AUTHENTICATOR, "dummy2");
props.setProperty("security-auth-init", "dummy3");
System.setProperties(props);
Properties secProps = authenticator.getSecurityProps();
assertEquals("wrong size", 2, secProps.size());
- assertEquals("wrong value", "dummy1", secProps.getProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME));
- assertEquals("wrong value", "dummy2", secProps.getProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME));
+ assertEquals("wrong value", "dummy1", secProps.getProperty(SECURITY_PEER_AUTH_INIT));
+ assertEquals("wrong value", "dummy2", secProps.getProperty(SECURITY_PEER_AUTHENTICATOR));
}
@Test
public void testGetCredentialNormal() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit2.create");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, prefix + "TestAuthInit2.create");
TestAuthInit2 auth = new TestAuthInit2();
assertFalse(auth.isClosed());
TestAuthInit2.setAuthInitialize(auth);
@@ -99,32 +100,32 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testGetCredentialWithEmptyAuth() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, "");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, "");
Properties credential = authenticator.getCredentials(member, props);
assertNull(credential);
}
@Test
public void testGetCredentialWithNotExistAuth() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "NotExistAuth.create");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, prefix + "NotExistAuth.create");
verifyNegativeGetCredential(props, "Failed to acquire AuthInitialize method");
}
@Test
public void testGetCredentialWithNullAuth() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit1.create");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, prefix + "TestAuthInit1.create");
verifyNegativeGetCredential(props, "AuthInitialize instance could not be obtained");
}
@Test
public void testGetCredentialWithInitError() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit3.create");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, prefix + "TestAuthInit3.create");
verifyNegativeGetCredential(props, "expected init error");
}
@Test
public void testGetCredentialWithError() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTH_INIT_NAME, prefix + "TestAuthInit4.create");
+ props.setProperty(SECURITY_PEER_AUTH_INIT, prefix + "TestAuthInit4.create");
verifyNegativeGetCredential(props, "expected get credential error");
}
@@ -139,7 +140,7 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testAuthenticatorNormal() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator4.create");
+ props.setProperty(SECURITY_PEER_AUTHENTICATOR, prefix + "TestAuthenticator4.create");
TestAuthenticator4 auth = new TestAuthenticator4();
assertFalse(auth.isClosed());
TestAuthenticator4.setAuthenticator(auth);
@@ -157,38 +158,38 @@ public class GMSAuthenticatorJUnitTest {
@Test
public void testAuthenticatorWithEmptyAuth() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, "");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR, "");
String result = authenticator.authenticate(member, props, props, member);
assertNull(result);
}
@Test
public void testAuthenticatorWithNotExistAuth() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "NotExistAuth.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR, prefix + "NotExistAuth.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
@Test
public void testAuthenticatorWithNullAuth() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator1.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR, prefix + "TestAuthenticator1.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
@Test
public void testAuthenticatorWithNullCredential() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator1.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR, prefix + "TestAuthenticator1.create");
verifyNegativeAuthenticate(null, props, "Failed to find credentials from");
}
@Test
public void testAuthenticatorWithAuthInitFailure() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator2.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR, prefix + "TestAuthenticator2.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
@Test
public void testAuthenticatorWithAuthFailure() throws Exception {
- props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR_NAME, prefix + "TestAuthenticator3.create");
+ props.setProperty(DistributionConfig.SECURITY_PEER_AUTHENTICATOR, prefix + "TestAuthenticator3.create");
verifyNegativeAuthenticate(props, props, "Authentication failed. See coordinator");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
index a931fe8..6868acb 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/SSLConfigIntegrationJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.management.GemFireProperties;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.MemberMXBean;
@@ -26,7 +25,7 @@ import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertTrue;
/**
@@ -38,7 +37,7 @@ public class SSLConfigIntegrationJUnitTest {
@Test
public void testIsClusterSSLRequireAuthentication() {
- Cache mCache = new CacheFactory().set(MCAST_PORT, "0").set(DistributionConfig.JMX_MANAGER_NAME, "true").create();
+ Cache mCache = new CacheFactory().set(MCAST_PORT, "0").set(JMX_MANAGER, "true").create();
ManagementService mService = ManagementService.getManagementService(mCache);
MemberMXBean mMemberBean = mService.getMemberMXBean();
GemFireProperties mGemFireProperties = mMemberBean.listGemFireProperties();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
index 8da507b..bb8c119 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.offheap.MemoryAllocatorImpl;
@@ -30,8 +29,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Class <code>ClientServerGetAllDUnitTest</code> test client/server getAll.
@@ -655,7 +653,7 @@ import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCA
Properties config = new Properties();
config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
if (offheap) {
- config.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "350m");
+ config.setProperty(OFF_HEAP_MEMORY_SIZE, "350m");
}
getSystem(config);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
index 5469948..0475e37 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DeltaPropagationStatsDUnitTest.java
@@ -27,7 +27,6 @@ import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.tier.sockets.CacheClientNotifier;
@@ -37,8 +36,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -553,7 +551,7 @@ public class DeltaPropagationStatsDUnitTest extends DistributedTestCase {
Properties props = new Properties();
if (!flag) {
props
- .setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ .setProperty(DELTA_PROPAGATION, "false");
}
cache = test.createCache(props);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
index 5f4f4da..faad1d2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/DistrbutedRegionProfileOffHeapDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.Invoke;
@@ -27,6 +26,8 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
private static final long serialVersionUID = 1L;
@@ -64,7 +65,7 @@ public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
public void run2() throws CacheException {
disconnectFromDS();
Properties properties = new Properties();
- properties.put(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "2m");
+ properties.put(OFF_HEAP_MEMORY_SIZE, "2m");
getSystem(properties);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -121,7 +122,7 @@ public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
public void run2() throws CacheException {
disconnectFromDS();
Properties properties = new Properties();
- properties.put(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "2m");
+ properties.put(OFF_HEAP_MEMORY_SIZE, "2m");
getSystem(properties);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -158,7 +159,7 @@ public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
public void run2() throws CacheException {
disconnectFromDS();
Properties properties = new Properties();
- properties.put(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "2m");
+ properties.put(OFF_HEAP_MEMORY_SIZE, "2m");
getSystem(properties);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -179,7 +180,7 @@ public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
public void run2() throws CacheException {
disconnectFromDS();
Properties properties = new Properties();
- properties.put(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "2m");
+ properties.put(OFF_HEAP_MEMORY_SIZE, "2m");
getSystem(properties);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -211,7 +212,7 @@ public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
public void run2() throws CacheException {
disconnectFromDS();
Properties properties = new Properties();
- properties.put(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "2m");
+ properties.put(OFF_HEAP_MEMORY_SIZE, "2m");
getSystem(properties);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
@@ -232,7 +233,7 @@ public class DistrbutedRegionProfileOffHeapDUnitTest extends CacheTestCase {
public void run2() throws CacheException {
disconnectFromDS();
Properties properties = new Properties();
- properties.put(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "2m");
+ properties.put(OFF_HEAP_MEMORY_SIZE, "2m");
getSystem(properties);
GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
index f0bbb9b..55ae144 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/GridAdvisorDUnitTest.java
@@ -630,7 +630,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.GROUPS_NAME, "bs1Group1, bs1Group2");
+ props.setProperty(GROUPS, "bs1Group1, bs1Group2");
props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
@@ -640,7 +640,7 @@ public class GridAdvisorDUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, locators);
- props.setProperty(DistributionConfig.GROUPS_NAME, "bs2Group1, bs2Group2");
+ props.setProperty(GROUPS, "bs2Group1, bs2Group2");
props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
CacheFactory.create(DistributedSystem.connect(props));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
index e51a35c..f7bd838 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionDUnitTest.java
@@ -20,13 +20,14 @@ import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Performs eviction dunit tests for off-heap memory.
*/
@@ -53,7 +54,7 @@ public class OffHeapEvictionDUnitTest extends EvictionDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "200m");
+ properties.setProperty(OFF_HEAP_MEMORY_SIZE, "200m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
index 1fa1fca..0994ed5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapEvictionStatsDUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Assert;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.LogWriterUtils;
@@ -26,6 +25,8 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Performs eviction stat dunit tests for off-heap regions.
* @since Geode 1.0
@@ -55,7 +56,7 @@ public class OffHeapEvictionStatsDUnitTest extends EvictionStatsDUnitTest {
@Override
public Properties getDistributedSystemProperties() {
Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ properties.setProperty(OFF_HEAP_MEMORY_SIZE, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
index 78b0d61..47b29e1 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/P2PDeltaPropagationDUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.tcp.ConnectionTable;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -31,6 +30,8 @@ import com.gemstone.gemfire.test.dunit.VM;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*
* Tests the P2P delta propagation functionality.
@@ -438,7 +439,7 @@ public class P2PDeltaPropagationDUnitTest extends DistributedTestCase
P2PDeltaPropagationDUnitTest test = new P2PDeltaPropagationDUnitTest("temp");
Properties props = new Properties();
if (!flag) {
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
}
cache = test.createCache(props);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
index 597b7e8..a6e2e5f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PRDataStoreMemoryOffHeapJUnitTest.java
@@ -17,12 +17,13 @@
package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.experimental.categories.Category;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests PartitionedRegion DataStore currentAllocatedMemory operation.
*
@@ -34,7 +35,7 @@ public class PRDataStoreMemoryOffHeapJUnitTest extends PRDataStoreMemoryJUnitTes
@Override
protected Properties getDistributedSystemProperties() {
Properties dsProps = super.getDistributedSystemProperties();
- dsProps.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ dsProps.setProperty(OFF_HEAP_MEMORY_SIZE, "1m");
return dsProps;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
index d2309cd..7fadf5e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionBucketCreationDistributionDUnitTest.java
@@ -25,8 +25,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -509,8 +508,8 @@ public class PartitionedRegionBucketCreationDistributionDUnitTest extends
Properties props = getDistributedSystemProperties();
props.put(MCAST_PORT, "0");
props.put(LOCATORS, "");
- props.put(DistributionConfig.ENFORCE_UNIQUE_HOST_NAME, "true");
- props.put(DistributionConfig.REDUNDANCY_ZONE_NAME, "zone1");
+ props.put(ENFORCE_UNIQUE_HOST, "true");
+ props.put(REDUNDANCY_ZONE, "zone1");
return getSystem(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
index 246a862..4484fa9 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionLocalMaxMemoryOffHeapDUnitTest.java
@@ -19,12 +19,13 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.EvictionAttributes;
import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests PartitionedRegion localMaxMemory with Off-Heap memory.
*
@@ -56,7 +57,7 @@ public class PartitionedRegionLocalMaxMemoryOffHeapDUnitTest extends Partitioned
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
// test creates a bit more than 1m of off heap so we need to total off heap size to be >1m
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "2m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "2m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
index e1ae38a..6652120 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionOffHeapEvictionDUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
import com.gemstone.gemfire.internal.cache.control.OffHeapMemoryMonitor;
import com.gemstone.gemfire.internal.cache.lru.HeapEvictor;
@@ -26,6 +25,8 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class PartitionedRegionOffHeapEvictionDUnitTest extends
PartitionedRegionEvictionDUnitTest {
@@ -51,7 +52,7 @@ public class PartitionedRegionOffHeapEvictionDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ properties.setProperty(OFF_HEAP_MEMORY_SIZE, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
index b661b3e..b61e71e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionRedundancyZoneDUnitTest.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
@@ -28,6 +27,8 @@ import com.gemstone.gemfire.test.dunit.VM;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class PartitionedRegionRedundancyZoneDUnitTest extends CacheTestCase {
@Override
@@ -128,7 +129,7 @@ public class PartitionedRegionRedundancyZoneDUnitTest extends CacheTestCase {
return (DistributedMember) vm.invoke(new SerializableCallable("set redundancy zone") {
public Object call() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.REDUNDANCY_ZONE_NAME, zone);
+ props.setProperty(REDUNDANCY_ZONE, zone);
DistributedSystem system = getSystem(props);
return system.getDistributedMember();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
index e8f9864..fd161d7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/MemoryMonitorOffHeapJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache.control;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.EvictionAttributesImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
@@ -33,7 +32,7 @@ import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -50,7 +49,7 @@ public class MemoryMonitorOffHeapJUnitTest {
public void setUp() throws Exception {
Properties p = new Properties();
p.setProperty(MCAST_PORT, "0");
- p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ p.setProperty(OFF_HEAP_MEMORY_SIZE, "1m");
this.ds = DistributedSystem.connect(p);
this.cache = (GemFireCacheImpl) CacheFactory.create(this.ds);
logger.info(addExpectedAbove);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
index 7e355f3..6463e46 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
@@ -46,6 +46,7 @@ import java.util.concurrent.TimeoutException;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.spy;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -295,7 +296,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
Invoke.invokeInEveryVM(new SerializableRunnable() {
public void run() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.ENFORCE_UNIQUE_HOST_NAME, "true");
+ props.setProperty(ENFORCE_UNIQUE_HOST, "true");
getSystem(props);
}
});
@@ -754,7 +755,7 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
public Object call() {
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "resource.manager.threads", "2");
Properties props = new Properties();
- props.setProperty(DistributionConfig.REDUNDANCY_ZONE_NAME, zone);
+ props.setProperty(REDUNDANCY_ZONE, zone);
DistributedSystem system = getSystem(props);
return system.getDistributedMember();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
index 991bf5d..43775c8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
@@ -889,7 +889,7 @@ public class DistributedRegionFunctionExecutionDUnitTest extends DistributedTest
public static void createCacheInVm_41367() {
Properties props = new Properties();
props.put(SystemConfigurationProperties.NAME, "SecurityServer");
- props.put(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, DummyAuthenticator.class.getName() + ".create");
+ props.put(SECURITY_CLIENT_AUTHENTICATOR, DummyAuthenticator.class.getName() + ".create");
new DistributedRegionFunctionExecutionDUnitTest("temp").createCache(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
index ea6b8f9..6d36e83 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
@@ -96,7 +96,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
@Override
public Object call() throws Exception {
Properties props = new Properties();
- props.put(DistributionConfig.GROUPS_NAME, groups);
+ props.put(GROUPS, groups);
if (regionName != null) {
Cache c = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
index f641199..ec90d80 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HASlowReceiverDUnitTest.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
@@ -33,8 +32,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.net.SocketException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class HASlowReceiverDUnitTest extends DistributedTestCase {
protected static Cache cache = null;
@@ -107,7 +105,7 @@ public class HASlowReceiverDUnitTest extends DistributedTestCase {
throws Exception {
Properties prop = new Properties();
- prop.setProperty(DistributionConfig.REMOVE_UNRESPONSIVE_CLIENT_PROP_NAME,
+ prop.setProperty(REMOVE_UNRESPONSIVE_CLIENT,
"true");
new HASlowReceiverDUnitTest("temp").createCache(prop);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
index e58627a..a7cbe97 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
@@ -140,7 +140,7 @@ public class ClientConflationDUnitTest extends DistributedTestCase
*/
private static Properties createProperties1(String conflation){
Properties props = new Properties();
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
props.setProperty(CONFLATE_EVENTS, conflation);
@@ -390,7 +390,7 @@ public class ClientConflationDUnitTest extends DistributedTestCase
public static Integer createServerCache() throws Exception
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
ClientConflationDUnitTest test = new ClientConflationDUnitTest("temp");
cacheServer = test.createCache(props);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
index 0f2c519..ee10b2e 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientInterestNotifyDUnitTest.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
@@ -34,8 +33,7 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This test verifies the per-client notify-by-subscription (NBS) override
@@ -148,12 +146,6 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
private Cache createCache(Properties props) throws Exception
{
- /*
- DistributedSystem ds = getSystem(props);
- assertNotNull(ds);
- ds.disconnect();
- ds = getSystem(props);
- */
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
DistributedSystem ds = DistributedSystem.connect(props);
@@ -187,13 +179,7 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
// Client 3 uses the default NBS which is false on the server.
vm1.invoke(() -> ClientInterestNotifyDUnitTest.createClientCache( NetworkUtils.getServerHostName(host), new Integer(PORT), "ClientOn"));
- /*
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.createClientCache( getServerHostName(Host.getHost(0)), new Integer(PORT),
- DistributionConfig.NOTIFY_BY_SUBSCRIPTION_OVERRIDE_PROP_VALUE_OFF, "ClientOff"));
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.createClientCache( getServerHostName(Host.getHost(0)), new Integer(PORT),
- DistributionConfig.NOTIFY_BY_SUBSCRIPTION_OVERRIDE_PROP_VALUE_DEFAULT, "ClientDefault"));
- */
-
+
// Feeder doFeed does one put on one key for each of the 3 regions so
// that the following client RI with ALL_KEYS and KEYS_VALUE result works.
@@ -202,21 +188,13 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
// RI on ALL_KEYS with InterestResultPolicy KEYS_VALUES.
vm1.invoke(() -> ClientInterestNotifyDUnitTest.registerInterest());
- /*
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.registerInterest());
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.registerInterest());
- */
// Get key for region 3 for all clients to check no unwanted notifications
// arrive on client 1 region 3 since we do not register interest on any
// client but notifications should arrive for client 2 and client 3.
vm1.invoke(() -> ClientInterestNotifyDUnitTest.getEntries());
- /*
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.getEntries());
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.getEntries());
- */
-
+
// Feeder doEntryOps does 2 puts, 1 invalidate and 1 destroy on a
// single key for each of the 3 regions.
@@ -227,11 +205,7 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
// Unregister interest to check it works and no extra notifications received.
vm1.invoke(() -> ClientInterestNotifyDUnitTest.unregisterInterest());
- /*
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.unregisterInterest());
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.unregisterInterest());
- */
-
+
// Feeder doEntryOps again does 2 puts, 1 invalidate and 1 destroy on a
// single key for each of the 3 regions while no interest on the clients.
@@ -242,11 +216,7 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
// Re-register interest on all clients except for region 3 again.
vm1.invoke(() -> ClientInterestNotifyDUnitTest.registerInterest());
- /*
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.registerInterest());
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.registerInterest());
- */
-
+
// Feeder doEntryOps again does 2 puts, 1 invalidate and 1 destroy on a
// single key for each of the 3 regions after clients re-register interest.
@@ -254,11 +224,6 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
waitForQueuesToDrain();
- /*
- Thread.sleep(30000);
- assertAllQueuesEmpty();
- */
-
// doValidation on all listeners:
// Client invokes listeners as follows:
@@ -290,15 +255,6 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
vm1.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME2, 0, 0, 1, 1));
vm1.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME3, 1, 0, 0, 0));
- /*
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME1, 0, 0, 1, 1));
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME2, 0, 0, 1, 1));
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME3, 1, 0, 1, 1));
-
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME1, 0, 0, 1, 1));
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME2, 0, 0, 1, 1));
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.doValidation(REGION_NAME3, 1, 0, 1, 1));
- */
}
/**
@@ -308,7 +264,6 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- //props.setProperty(DistributionConfig.NOTIFY_BY_SUBSCRIPTION_OVERRIDE_PROP_NAME, nbs);
return props;
}
@@ -459,7 +414,7 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
{
ClientInterestNotifyDUnitTest test = new ClientInterestNotifyDUnitTest("temp");
Properties props = new Properties();
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
cacheServer = test.createCache(props);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.DISTRIBUTED_ACK);
@@ -623,10 +578,6 @@ public class ClientInterestNotifyDUnitTest extends DistributedTestCase
public final void preTearDown() throws Exception {
vm0.invoke(() -> ClientInterestNotifyDUnitTest.closeCache());
vm1.invoke(() -> ClientInterestNotifyDUnitTest.closeCache());
- /*
- vm2.invoke(() -> ClientInterestNotifyDUnitTest.closeCache());
- vm3.invoke(() -> ClientInterestNotifyDUnitTest.closeCache());
- */
closeCacheServer();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
index 9271285..fcbaf83 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ForceInvalidateOffHeapEvictionDUnitTest.java
@@ -16,13 +16,14 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Runs force invalidate eviction tests with off-heap regions.
* @since Geode 1.0
@@ -52,7 +53,7 @@ public class ForceInvalidateOffHeapEvictionDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties properties = super.getDistributedSystemProperties();
- properties.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "100m");
+ properties.setProperty(OFF_HEAP_MEMORY_SIZE, "100m");
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
index 7014582..38b3f48 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestListDUnitTest.java
@@ -24,7 +24,6 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.test.dunit.*;
@@ -36,8 +35,7 @@ import java.util.Properties;
import java.util.Set;
import java.util.concurrent.atomic.AtomicInteger;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Test Scenario :
@@ -501,7 +499,7 @@ public class InterestListDUnitTest extends DistributedTestCase
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
new InterestListDUnitTest("temp").createCache(props);
PoolFactory pfactory = PoolManager.createFactory()
@@ -534,7 +532,7 @@ public class InterestListDUnitTest extends DistributedTestCase
private static void createCache(boolean addReplicatedRegion) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
+ props.setProperty(DELTA_PROPAGATION, "false");
new InterestListDUnitTest("temp").createCache(props);
if (addReplicatedRegion) {
addReplicatedRegion();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
index 2da8391..bc558ef 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/wan/AsyncEventQueueTestBase.java
@@ -123,7 +123,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- //props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + dsId);
+ //props.setProperty(DISTRIBUTED_SYSTEM_ID, "" + dsId);
props.setProperty(LOCATORS, "localhost[" + port
+ "]");
props.setProperty(START_LOCATOR, "localhost["
@@ -137,13 +137,12 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
int port = AvailablePortHelper.getRandomAvailablePortForDUnitSite();
Properties props = test.getDistributedSystemProperties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.DISTRIBUTED_SYSTEM_ID_NAME, "" + dsId);
+ props.setProperty(DISTRIBUTED_SYSTEM_ID, "" + dsId);
props.setProperty(LOCATORS, "localhost[" + port
+ "]");
props.setProperty(START_LOCATOR, "localhost["
+ port + "],server=true,peer=true,hostname-for-clients=localhost");
- props.setProperty(DistributionConfig.REMOTE_LOCATORS_NAME, "localhost["
- + remoteLocPort + "]");
+ props.setProperty(REMOTE_LOCATORS, "localhost[" + remoteLocPort + "]");
test.getSystem(props);
return port;
}
@@ -1546,7 +1545,7 @@ public class AsyncEventQueueTestBase extends DistributedTestCase {
// of WANTestBase (instead of instances of the subclass). So we can't override
// this method so that only the off-heap subclasses allocate off heap memory.
Properties props = new Properties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "300m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "300m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
index 6f64bd1..9d48c16 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheListenerOffHeapDUnitTest.java
@@ -24,6 +24,8 @@ import com.gemstone.gemfire.test.dunit.SerializableRunnable;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
@SuppressWarnings("serial")
public class CompressionCacheListenerOffHeapDUnitTest extends
CompressionCacheListenerDUnitTest {
@@ -57,7 +59,7 @@ public class CompressionCacheListenerOffHeapDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "1m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
index efd8e57..854cf27 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionRegionOperationsOffHeapDUnitTest.java
@@ -18,11 +18,11 @@ package com.gemstone.gemfire.internal.compression;
import com.gemstone.gemfire.compression.Compressor;
import com.gemstone.gemfire.compression.SnappyCompressor;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.OffHeapTestUtil;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import java.util.Properties;
public class CompressionRegionOperationsOffHeapDUnitTest extends
@@ -50,7 +50,7 @@ public class CompressionRegionOperationsOffHeapDUnitTest extends
@Override
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "1m");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
index 7c186cd..1bf75b8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
@@ -85,7 +85,7 @@ public class DistributedSystemLogFileJUnitTest {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -473,7 +473,7 @@ public class DistributedSystemLogFileJUnitTest {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -689,7 +689,7 @@ public class DistributedSystemLogFileJUnitTest {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -903,11 +903,11 @@ public class DistributedSystemLogFileJUnitTest {
final Properties properties = new Properties();
properties.put(LOG_FILE, logFileName);
properties.put(LOG_LEVEL, "fine");
- properties.put(DistributionConfig.SECURITY_LOG_FILE_NAME, securityLogFileName);
+ properties.put(SECURITY_LOG_FILE, securityLogFileName);
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -1021,12 +1021,12 @@ public class DistributedSystemLogFileJUnitTest {
final Properties properties = new Properties();
properties.put(LOG_FILE, logFileName);
properties.put(LOG_LEVEL, "fine");
- properties.put(DistributionConfig.SECURITY_LOG_FILE_NAME, securityLogFileName);
- properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "fine");
+ properties.put(SECURITY_LOG_FILE, securityLogFileName);
+ properties.put(SECURITY_LOG_LEVEL, "fine");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -1200,11 +1200,11 @@ public class DistributedSystemLogFileJUnitTest {
final Properties properties = new Properties();
properties.put(LOG_FILE, logFileName);
properties.put(LOG_LEVEL, "fine");
- properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "info");
+ properties.put(SECURITY_LOG_LEVEL, "info");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
@@ -1349,11 +1349,11 @@ public class DistributedSystemLogFileJUnitTest {
final Properties properties = new Properties();
properties.put(LOG_FILE, logFileName);
properties.put(LOG_LEVEL, "info");
- properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "fine");
+ properties.put(SECURITY_LOG_LEVEL, "fine");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
index f6bf465..8f2a6f9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
@@ -76,7 +76,7 @@ public class LocatorLogFileJUnitTest {
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
- properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DISABLE_AUTO_RECONNECT, "true");
properties.put(MEMBER_TIMEOUT, "2000");
properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
index 861209d..f8c3d1a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
@@ -118,9 +118,9 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
props.put(MCAST_PORT, "0");
props.put(STATISTIC_SAMPLING_ENABLED, "true");
if (isSmallerVM.get()) {
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, getSmallerOffHeapMemorySize());
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, getSmallerOffHeapMemorySize());
} else {
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, getOffHeapMemorySize());
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, getOffHeapMemorySize());
}
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
index 30a4255..59c36f5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
@@ -35,6 +35,8 @@ import static com.jayway.awaitility.Awaitility.to;
import static com.jayway.awaitility.Awaitility.waitAtMost;
import static org.hamcrest.Matchers.equalTo;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This class checks and verifies various data and operations exposed through
* MemberMXBean interface.
@@ -756,7 +758,7 @@ public class CacheManagementDUnitTest extends ManagementTestBase {
VM node2 = managedNodeList.get(1);
VM node3 = managedNodeList.get(2);
Properties props = new Properties();
- props.setProperty(DistributionConfig.REDUNDANCY_ZONE_NAME, "ARMY_ZONE");
+ props.setProperty(REDUNDANCY_ZONE, "ARMY_ZONE");
createCache(node1,props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
index a4c0d84..15c1b50 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
@@ -95,10 +95,10 @@ public class DataBrowserJSONValidationJUnitTest {
props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
props.setProperty(STATISTIC_SAMPLE_RATE, "60000");
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "true");
+ props.setProperty(JMX_MANAGER_HTTP_PORT, "0");
+ props.setProperty(JMX_MANAGER_PORT, "0");
this.system = (InternalDistributedSystem) DistributedSystem.connect(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
index 4335af3..6e45705 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
@@ -88,10 +88,10 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
- props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "false");
+ props.setProperty(JMX_MANAGER_PORT, "0");
+ props.setProperty(JMX_MANAGER_HTTP_PORT, "0");
createCache(managingNode, props);
startManagingNode(managingNode);
DistributedMember locatorMember = getMember(locator);
@@ -110,10 +110,10 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
- props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "false");
+ props.setProperty(JMX_MANAGER_PORT, "0");
+ props.setProperty(JMX_MANAGER_HTTP_PORT, "0");
createCache(managingNode, props);
startManagingNode(managingNode);
DistributedMember locatorMember = getMember(locator);
@@ -165,7 +165,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
+ props.setProperty(JMX_MANAGER, "true");
createCache(managedNode2, props);
createCache(managedNode3, props);
@@ -183,7 +183,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, host0 + "[" + locPort
+ "]");
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
+ props.setProperty(JMX_MANAGER, "true");
createCache(managedNode2, props);
createCache(managedNode3, props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
index ffa9e72..a4a2ed2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
@@ -221,10 +221,10 @@ public class ManagementTestBase extends DistributedTestCase {
public Cache createCache(boolean management) {
System.setProperty("dunitLogPerTest", "true");
if (management) {
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
- props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "false");
+ props.setProperty(JMX_MANAGER_PORT, "0");
+ props.setProperty(JMX_MANAGER_HTTP_PORT, "0");
}
props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
index 522a142..1bcdb36 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/OffHeapManagementDUnitTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.DataPolicy;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.offheap.OffHeapMemoryStats;
@@ -37,6 +36,8 @@ import java.util.Collections;
import java.util.List;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests the off-heap additions to the RegionMXBean and MemberMXBean JMX interfaces.
*/
@@ -628,10 +629,10 @@ public class OffHeapManagementDUnitTest extends CacheTestCase {
protected Properties getSystemProperties() {
Properties props = getDistributedSystemProperties();
- props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
+ props.setProperty(OFF_HEAP_MEMORY_SIZE, "1m");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "true");
+ props.setProperty(JMX_MANAGER_PORT, "0");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
index 8525c90..0b65874 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
@@ -62,12 +62,12 @@ public class DistributedSystemStatsJUnitTest {
props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
props.setProperty(STATISTIC_SAMPLE_RATE, "60000");
- props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
+ props.setProperty(JMX_MANAGER, "true");
+ props.setProperty(JMX_MANAGER_START, "true");
// set JMX_MANAGER_UPDATE_RATE to practically an infinite value, so that
// LocalManager wont try to run ManagementTask
- props.setProperty(DistributionConfig.JMX_MANAGER_UPDATE_RATE_NAME, "60000");
- props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
+ props.setProperty(JMX_MANAGER_UPDATE_RATE, "60000");
+ props.setProperty(JMX_MANAGER_PORT, "0");
this.system = (InternalDistributedSystem) DistributedSystem.connect(props);
assertNotNull(this.system.getStatSampler());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
index 55d937e..f7fc8ea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CliUtilDUnitTest.java
@@ -20,8 +20,6 @@ import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.management.DistributedRegionMXBean;
import com.gemstone.gemfire.management.ManagementService;
@@ -32,6 +30,8 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
import java.util.Set;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*
*
@@ -203,12 +203,12 @@ public class CliUtilDUnitTest extends CacheTestCase {
public void createCacheWithMemberIdAndGroup(String memberName, String groupName){
Properties localProps = new Properties();
- localProps.setProperty(SystemConfigurationProperties.NAME, memberName);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "false");
+ localProps.setProperty(NAME, memberName);
+ localProps.setProperty(GROUPS, groupName);
+ localProps.setProperty(JMX_MANAGER, "true");
+ localProps.setProperty(JMX_MANAGER_START, "false");
int jmxPort = AvailablePortHelper.getRandomAvailableTCPPort();
- localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, ""+jmxPort);
+ localProps.setProperty(JMX_MANAGER_PORT, ""+jmxPort);
LogWriterUtils.getLogWriter().info("Set jmx-port="+ jmxPort);
getSystem(localProps);
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
index 5b058b8..e82768f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CliCommandTestBase.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.management.internal.cli.commands;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.management.ManagementService;
import com.gemstone.gemfire.management.internal.cli.CommandManager;
@@ -45,6 +44,7 @@ import java.util.regex.Pattern;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Base class for all the CLI/gfsh command dunit tests.
@@ -143,11 +143,11 @@ public abstract class CliCommandTestBase extends JUnit4CacheTestCase {
jmxPort = ports[0];
httpPort = ports[1];
- localProps.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
- localProps.setProperty(DistributionConfig.JMX_MANAGER_BIND_ADDRESS_NAME, String.valueOf(jmxHost));
- localProps.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, String.valueOf(jmxPort));
- localProps.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
+ localProps.setProperty(JMX_MANAGER, "true");
+ localProps.setProperty(JMX_MANAGER_START, "true");
+ localProps.setProperty(JMX_MANAGER_BIND_ADDRESS, String.valueOf(jmxHost));
+ localProps.setProperty(JMX_MANAGER_PORT, String.valueOf(jmxPort));
+ localProps.setProperty(HTTP_SERVICE_PORT, String.valueOf(httpPort));
getSystem(localProps);
verifyManagementServiceStarted(getCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8975cbdf/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index e0ce006..d3f8b11 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -402,7 +402,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
this.alterVm1.invoke(() -> {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, alterVm1Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1");
+ localProps.setProperty(GROUPS, "Group1");
getSystem(localProps);
Cache cache = getCache();
@@ -435,7 +435,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
this.alterVm2.invoke(() -> {
Properties localProps = new Properties();
localProps.setProperty(SystemConfigurationProperties.NAME, alterVm2Name);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, "Group1,Group2");
+ localProps.setProperty(GROUPS, "Group1,Group2");
getSystem(localProps);
Cache cache = getCache();
@@ -796,7 +796,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
getSystem(localProps);
assertNotNull(getCache());
});
@@ -834,7 +834,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
@@ -876,7 +876,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
@@ -930,7 +930,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
getSystem(localProps);
assertNotNull(getCache());
});
@@ -986,7 +986,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
- localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
+ localProps.setProperty(GROUPS, groupName);
localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
[24/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
index e5eeba3..5ddf457 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsDUnitTest.java
@@ -16,51 +16,17 @@
*/
package com.gemstone.gemfire.cache.management;
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.experimental.categories.Category;
-import util.TestException;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.LowMemoryException;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache.control.ResourceManager;
-import com.gemstone.gemfire.cache.execute.Execution;
-import com.gemstone.gemfire.cache.execute.FunctionAdapter;
-import com.gemstone.gemfire.cache.execute.FunctionContext;
-import com.gemstone.gemfire.cache.execute.FunctionException;
-import com.gemstone.gemfire.cache.execute.FunctionService;
-import com.gemstone.gemfire.cache.execute.RegionFunctionContext;
+import com.gemstone.gemfire.cache.execute.*;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.AvailablePortHelper;
@@ -71,30 +37,23 @@ import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
-import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
-import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
+import com.gemstone.gemfire.internal.cache.control.*;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
-import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
import com.gemstone.gemfire.internal.cache.control.MemoryThresholds.MemoryState;
-import com.gemstone.gemfire.internal.cache.control.ResourceAdvisor;
-import com.gemstone.gemfire.internal.cache.control.ResourceListener;
-import com.gemstone.gemfire.internal.cache.control.TestMemoryThresholdListener;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+import util.TestException;
+
+import java.io.Serializable;
+import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests the Heap Memory thresholds of {@link ResourceManager}
@@ -1572,14 +1531,14 @@ public class MemoryThresholdsDUnitTest extends ClientServerTestCase {
protected Properties getClientProps() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
return p;
}
protected Properties getServerProperties() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ p.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
index f9c8e8a..824192d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/management/MemoryThresholdsOffHeapDUnitTest.java
@@ -16,75 +16,35 @@
*/
package com.gemstone.gemfire.cache.management;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.AttributesMutator;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheLoader;
-import com.gemstone.gemfire.cache.CacheLoaderException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.LoaderHelper;
-import com.gemstone.gemfire.cache.LowMemoryException;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache.control.ResourceManager;
import com.gemstone.gemfire.cache.management.MemoryThresholdsDUnitTest.Range;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.AvailablePortHelper;
-import com.gemstone.gemfire.internal.cache.DistributedRegion;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
-import com.gemstone.gemfire.internal.cache.ProxyBucketRegion;
-import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
+import com.gemstone.gemfire.internal.cache.*;
+import com.gemstone.gemfire.internal.cache.control.*;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
-import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
import com.gemstone.gemfire.internal.cache.control.MemoryThresholds.MemoryState;
-import com.gemstone.gemfire.internal.cache.control.OffHeapMemoryMonitor;
import com.gemstone.gemfire.internal.cache.control.OffHeapMemoryMonitor.OffHeapMemoryMonitorObserver;
-import com.gemstone.gemfire.internal.cache.control.ResourceAdvisor;
-import com.gemstone.gemfire.internal.cache.control.ResourceListener;
-import com.gemstone.gemfire.internal.cache.control.TestMemoryThresholdListener;
import com.gemstone.gemfire.internal.cache.partitioned.RegionAdvisor;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
+import org.junit.experimental.categories.Category;
+
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Tests the Off-Heap Memory thresholds of {@link ResourceManager}
@@ -1800,15 +1760,15 @@ public class MemoryThresholdsOffHeapDUnitTest extends ClientServerTestCase {
private Properties getOffHeapProperties() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ p.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
p.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, "1m");
return p;
}
protected Properties getClientProps() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
return p;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/ExceptionHandlingJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/ExceptionHandlingJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/ExceptionHandlingJUnitTest.java
index fc3c35c..6544bab 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/ExceptionHandlingJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/ExceptionHandlingJUnitTest.java
@@ -16,26 +16,18 @@
*/
package com.gemstone.gemfire.cache.mapInterface;
-import static org.junit.Assert.fail;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.*;
+import org.junit.experimental.categories.Category;
import java.util.HashMap;
import java.util.Properties;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class ExceptionHandlingJUnitTest {
@@ -48,8 +40,8 @@ public class ExceptionHandlingJUnitTest {
@BeforeClass
public static void caseSetUp() throws Exception {
Properties properties = new Properties();
- properties.setProperty("mcast-port", "0");
- properties.setProperty("locators", "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
distributedSystem = DistributedSystem.connect(properties);
Cache cache = CacheFactory.create(distributedSystem);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/MapFunctionalJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/MapFunctionalJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/MapFunctionalJUnitTest.java
index 8adc027..97ec027 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/MapFunctionalJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/MapFunctionalJUnitTest.java
@@ -16,26 +16,18 @@
*/
package com.gemstone.gemfire.cache.mapInterface;
-import static org.junit.Assert.fail;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.*;
+import org.junit.experimental.categories.Category;
import java.util.HashMap;
import java.util.Properties;
-import org.junit.After;
-import org.junit.AfterClass;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class MapFunctionalJUnitTest {
@@ -48,8 +40,8 @@ public class MapFunctionalJUnitTest {
@BeforeClass
public static void caseSetUp() throws Exception {
Properties properties = new Properties();
- properties.setProperty("mcast-port", "0");
- properties.setProperty("locators", "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
distributedSystem = DistributedSystem.connect(properties);
Cache cache = CacheFactory.create(distributedSystem);
AttributesFactory factory = new AttributesFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/PutAllGlobalLockJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/PutAllGlobalLockJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/PutAllGlobalLockJUnitTest.java
index 2f9be54..50bb9f9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/PutAllGlobalLockJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/mapInterface/PutAllGlobalLockJUnitTest.java
@@ -16,28 +16,22 @@
*/
package com.gemstone.gemfire.cache.mapInterface;
-import static org.junit.Assert.*;
-
-import java.util.Properties;
-import java.util.TreeMap;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.dunit.ThreadUtils;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import junit.framework.TestCase;
+import java.util.Properties;
+import java.util.TreeMap;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
@Category(IntegrationTest.class)
public class PutAllGlobalLockJUnitTest {
@@ -54,8 +48,8 @@ public class PutAllGlobalLockJUnitTest {
public void setUp() throws Exception {
try {
Properties properties = new Properties();
- properties.setProperty("mcast-port", "0");
- properties.setProperty("locators", "");
+ properties.setProperty(MCAST_PORT, "0");
+ properties.setProperty(LOCATORS, "");
DistributedSystem distributedSystem = DistributedSystem
.connect(properties);
Cache cache = CacheFactory.create(distributedSystem);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
index 8df44ea..71861d6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/PutOperationContextJUnitTest.java
@@ -16,14 +16,6 @@
*/
package com.gemstone.gemfire.cache.operations;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -32,6 +24,16 @@ import com.gemstone.gemfire.pdx.PdxReader;
import com.gemstone.gemfire.pdx.PdxSerializable;
import com.gemstone.gemfire.pdx.PdxWriter;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class PutOperationContextJUnitTest {
@@ -70,7 +72,8 @@ public class PutOperationContextJUnitTest {
{
// create a loner cache so that pdx serialization will work
- Cache c = (new CacheFactory()).set("locators", "").set("mcast-port", "0").setPdxReadSerialized(true).create();
+ Cache c = (new CacheFactory()).set(LOCATORS, "")
+ .set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
@@ -120,7 +123,7 @@ public class PutOperationContextJUnitTest {
{
// create a loner cache so that pdx serialization will work
- Cache c = (new CacheFactory()).set("locators", "").set("mcast-port", "0").setPdxReadSerialized(true).create();
+ Cache c = (new CacheFactory()).set(LOCATORS, "").set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
@@ -171,7 +174,7 @@ public class PutOperationContextJUnitTest {
{
// create a loner cache so that pdx serialization will work
- Cache c = (new CacheFactory()).set("locators", "").set("mcast-port", "0").setPdxReadSerialized(true).create();
+ Cache c = (new CacheFactory()).set(LOCATORS, "").set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
index 57b481f..86d2566 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImplJUnitTest.java
@@ -16,20 +16,22 @@
*/
package com.gemstone.gemfire.cache.operations.internal;
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.operations.PutOperationContextJUnitTest;
import com.gemstone.gemfire.pdx.PdxInstance;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@Category(IntegrationTest.class)
public class GetOperationContextImplJUnitTest {
@@ -72,7 +74,8 @@ public class GetOperationContextImplJUnitTest {
{
// create a loner cache so that pdx serialization will work
- Cache c = (new CacheFactory()).set("locators", "").set("mcast-port", "0").setPdxReadSerialized(true).create();
+ Cache c = (new CacheFactory()).set(LOCATORS, "")
+ .set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
@@ -127,7 +130,7 @@ public class GetOperationContextImplJUnitTest {
{
// create a loner cache so that pdx serialization will work
- Cache c = (new CacheFactory()).set("locators", "").set("mcast-port", "0").setPdxReadSerialized(true).create();
+ Cache c = (new CacheFactory()).set(LOCATORS, "").set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
@@ -183,7 +186,7 @@ public class GetOperationContextImplJUnitTest {
{
// create a loner cache so that pdx serialization will work
- Cache c = (new CacheFactory()).set("locators", "").set("mcast-port", "0").setPdxReadSerialized(true).create();
+ Cache c = (new CacheFactory()).set(LOCATORS, "").set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
@@ -238,7 +241,7 @@ public class GetOperationContextImplJUnitTest {
{
// create a loner cache so that pdx serialization will work
- Cache c = (new CacheFactory()).set("locators", "").set("mcast-port", "0").setPdxReadSerialized(true).create();
+ Cache c = (new CacheFactory()).set(LOCATORS, "").set(MCAST_PORT, "0").setPdxReadSerialized(true).create();
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/Bug32947ValueConstraintJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/Bug32947ValueConstraintJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/Bug32947ValueConstraintJUnitTest.java
index dbc45f0..bce7e3f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/Bug32947ValueConstraintJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/Bug32947ValueConstraintJUnitTest.java
@@ -16,31 +16,22 @@
*/
package com.gemstone.gemfire.cache.query;
-import static org.junit.Assert.*;
-
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.data.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.cache.query.data.Address;
-import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.cache.query.data.Data;
-import com.gemstone.gemfire.cache.query.data.Employee;
-import com.gemstone.gemfire.cache.query.data.Manager;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import java.util.HashSet;
-import java.util.Set;
-
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import java.util.HashSet;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.fail;
+
/**
* Junit test for checking the value constraint region attributes.
*/
@@ -53,7 +44,7 @@ public class Bug32947ValueConstraintJUnitTest {
@Before
public void setUp() throws java.lang.Exception {
Properties properties = new Properties();
- properties.setProperty("mcast-port", "0");
+ properties.setProperty(MCAST_PORT, "0");
distributedSystem = DistributedSystem.connect(properties);
cache = CacheFactory.create(distributedSystem);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
index 78ec8b6..63e4dbd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/CacheUtils.java
@@ -21,26 +21,21 @@
*/
package com.gemstone.gemfire.cache.query;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.types.CollectionType;
import com.gemstone.gemfire.cache.query.types.ObjectType;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
/**
*
*/
@@ -61,7 +56,7 @@ public class CacheUtils {
static void init() throws Exception {
if (GemFireCacheImpl.getInstance() == null) {
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
cache = new CacheFactory(props).create();
} else {
cache = GemFireCacheImpl.getInstance();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/PdxStringQueryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/PdxStringQueryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/PdxStringQueryJUnitTest.java
index f088170..2289061 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/PdxStringQueryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/PdxStringQueryJUnitTest.java
@@ -16,21 +16,6 @@
*/
package com.gemstone.gemfire.cache.query;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
@@ -49,6 +34,15 @@ import com.gemstone.gemfire.pdx.internal.PdxInstanceFactoryImpl;
import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
import com.gemstone.gemfire.pdx.internal.PdxString;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
*
@@ -69,7 +63,7 @@ public class PdxStringQueryJUnitTest {
@Before
public void setUp() {
- this.c = new CacheFactory().set("mcast-port", "0").create();
+ this.c = new CacheFactory().set(MCAST_PORT, "0").create();
r = c.createRegionFactory().create(regName);
qs = c.getQueryService();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/QueryTestUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/QueryTestUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/QueryTestUtils.java
index c50e3b5..75acbb4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/QueryTestUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/QueryTestUtils.java
@@ -16,37 +16,20 @@
*/
package com.gemstone.gemfire.cache.query;
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.test.dunit.SerializableRunnable;
+import com.gemstone.gemfire.test.dunit.VM;
+
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
-import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
-import java.util.Set;
-import junit.framework.Assert;
-
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.ExpirationAttributes;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.query.data.Numbers;
-import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.cache.query.types.CollectionType;
-import com.gemstone.gemfire.cache.query.types.ObjectType;
-import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Utility class for testing supported queries
@@ -1068,7 +1051,7 @@ public class QueryTestUtils implements Serializable {
cache = new CacheFactory(prop).create();
}
else{
- cache = new CacheFactory().set("mcast-port", "0").create();
+ cache = new CacheFactory().set(MCAST_PORT, "0").create();
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
index f4132da..a13b11d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/HelperTestCase.java
@@ -16,40 +16,24 @@
*/
package com.gemstone.gemfire.cache.query.dunit;
-import java.util.Iterator;
-import java.util.Properties;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCache;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.cache.query.CqAttributes;
-import com.gemstone.gemfire.cache.query.CqAttributesFactory;
-import com.gemstone.gemfire.cache.query.CqEvent;
-import com.gemstone.gemfire.cache.query.CqException;
-import com.gemstone.gemfire.cache.query.CqExistsException;
-import com.gemstone.gemfire.cache.query.CqListener;
-import com.gemstone.gemfire.cache.query.IndexExistsException;
-import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.QueryTestUtils;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.internal.index.CompactRangeIndex;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class HelperTestCase extends CacheTestCase {
@@ -252,15 +236,15 @@ public class HelperTestCase extends CacheTestCase {
protected Properties getClientProperties() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
return p;
}
protected Properties getServerProperties(int mcastPort) {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, mcastPort+"");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, mcastPort + "");
+ p.setProperty(LOCATORS, "");
return p;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
index 3e746e7..6edc675 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/PartitionedRegionCompactRangeIndexDUnitTest.java
@@ -16,30 +16,25 @@
*/
package com.gemstone.gemfire.cache.query.dunit;
-import java.io.File;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Properties;
-import java.util.stream.IntStream;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.QueryTestUtils;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.DistributedTest;
import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+import java.util.stream.IntStream;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
@Category(DistributedTest.class)
public class PartitionedRegionCompactRangeIndexDUnitTest extends DistributedTestCase {
@@ -50,8 +45,8 @@ public class PartitionedRegionCompactRangeIndexDUnitTest extends DistributedTest
private Properties getSystemProperties(String cacheXML) {
Properties props = new Properties();
- props.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
- props.setProperty("cache-xml-file", TestUtil.getResourcePath(getClass(), cacheXML));
+ props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(getClass(), cacheXML));
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
index 6e4ed11..16ff4cf 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryIndexUsingXMLDUnitTest.java
@@ -16,34 +16,13 @@
*/
package com.gemstone.gemfire.cache.query.dunit;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.AttributesFactory;
import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
import com.gemstone.gemfire.cache.CacheExistsException;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexExistsException;
-import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.IndexType;
import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryException;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.Portfolio;
@@ -54,27 +33,21 @@ import com.gemstone.gemfire.cache.query.internal.index.IndexManager;
import com.gemstone.gemfire.cache.query.internal.index.PartitionedIndex;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.cache30.CertifiableTestCacheListener;
-import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Map;
+import java.util.Properties;
+
public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
static private final String WAIT_PROPERTY = "QueryIndexBuckets.maxWaitTime";
@@ -950,7 +923,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
Cache cache = basicGetCache();
if (cache == null) {
try {
- System.setProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE", "true");
cache = CacheFactory.create(system);
} catch (CacheExistsException e) {
Assert.fail("the cache already exists", e);
@@ -961,7 +934,7 @@ public class QueryIndexUsingXMLDUnitTest extends CacheTestCase {
} catch (Exception ex) {
Assert.fail("Checked exception while initializing cache??", ex);
} finally {
- System.clearProperty("gemfire.DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "DISABLE_DISCONNECT_DS_ON_CACHE_CLOSE");
}
}
return cache;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
index cf55579..a35ef27 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryParamsAuthorizationDUnitTest.java
@@ -28,6 +28,7 @@ import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.security.templates.DummyAuthenticator;
import com.gemstone.gemfire.security.templates.UserPasswordAuthInit;
@@ -37,6 +38,8 @@ import com.gemstone.gemfire.test.dunit.SerializableCallable;
import com.gemstone.gemfire.test.dunit.VM;
import org.junit.Ignore;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Test for accessing query bind parameters from authorization callbacks
*
@@ -64,10 +67,10 @@ public class QueryParamsAuthorizationDUnitTest extends CacheTestCase {
@Override
public Object call() throws Exception {
CacheFactory cf = new CacheFactory()
- .set("mcast-port", "0")
- .set("security-client-accessor",
+ .set(MCAST_PORT, "0")
+ .set(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME,
"com.gemstone.gemfire.cache.query.dunit.QueryAuthorization.create")
- .set("security-client-authenticator", DummyAuthenticator.class.getName() + ".create");
+ .set(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, DummyAuthenticator.class.getName() + ".create");
Cache cache = getCache(cf);
cache.createRegionFactory(RegionShortcut.REPLICATE).create(regName);
CacheServer server = cache.addCacheServer();
@@ -84,7 +87,7 @@ public class QueryParamsAuthorizationDUnitTest extends CacheTestCase {
public Object call() throws Exception {
ClientCacheFactory ccf = new ClientCacheFactory()
.addPoolServer(NetworkUtils.getServerHostName(server1.getHost()), port)
- .set("security-client-auth-init", UserPasswordAuthInit.class.getName() + ".create")
+ .set(DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create")
.set("security-username", "root")
.set("security-password", "root");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
index b79d695..a1f4262 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/QueryUsingPoolDUnitTest.java
@@ -47,6 +47,8 @@ import java.util.Properties;
import java.util.Set;
import java.util.concurrent.TimeUnit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+
/**
* Tests remote (client/server) query execution.
*
@@ -526,7 +528,7 @@ public class QueryUsingPoolDUnitTest extends CacheTestCase {
private int createAndStartBridgeServer() {
Properties config = new Properties();
- config.setProperty("locators", "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
try {
return startBridgeServer(0, false);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
index 7f2dce7..4a8faa6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/RemoteQueryDUnitTest.java
@@ -16,19 +16,11 @@
*/
package com.gemstone.gemfire.cache.query.dunit;
-import java.io.DataInput;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Comparator;
-import java.util.Properties;
-
+import cacheRunner.Portfolio;
+import cacheRunner.Position;
import com.gemstone.gemfire.DataSerializable;
import com.gemstone.gemfire.DataSerializer;
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
import com.gemstone.gemfire.cache.query.SelectResults;
@@ -40,22 +32,20 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.cache30.ClientServerTestCase;
-import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.test.junit.categories.FlakyTest;
-
-import cacheRunner.Portfolio;
-import cacheRunner.Position;
import org.junit.experimental.categories.Category;
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+import java.util.Comparator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Tests remote (client/server) query execution.
*
@@ -97,7 +87,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
InternalDistributedSystem system = getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -127,7 +117,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
getCache();
AttributesFactory factory = new AttributesFactory();
@@ -240,7 +230,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -270,7 +260,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
getCache();
AttributesFactory factory = new AttributesFactory();
@@ -368,7 +358,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -398,7 +388,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
getCache();
AttributesFactory factory = new AttributesFactory();
@@ -494,7 +484,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -631,7 +621,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
getCache();
AttributesFactory factory = new AttributesFactory();
@@ -688,7 +678,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -718,7 +708,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
getCache();
AttributesFactory factory = new AttributesFactory();
@@ -853,7 +843,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -888,7 +878,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
getCache();
AttributesFactory factory = new AttributesFactory();
@@ -955,7 +945,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -985,7 +975,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
PoolManager.createFactory().addServer(host0, port).setSubscriptionEnabled(true).create("clientPool");
getCache();
@@ -1000,7 +990,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm2.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
PoolManager.createFactory().addServer(host0, port).setSubscriptionEnabled(true).create("clientPool");
getCache();
@@ -1114,7 +1104,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -1144,7 +1134,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
PoolManager.createFactory().addServer(host0, port).setSubscriptionEnabled(true).create("clientPool");
getCache();
@@ -1218,7 +1208,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm0.invoke(new CacheSerializableRunnable("Create Bridge Server") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("locators", "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ config.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
getSystem(config);
AttributesFactory factory = new AttributesFactory();
factory.setScope(Scope.LOCAL);
@@ -1255,7 +1245,7 @@ public class RemoteQueryDUnitTest extends CacheTestCase {
vm1.invoke(new CacheSerializableRunnable("Create region") {
public void run2() throws CacheException {
Properties config = new Properties();
- config.setProperty("mcast-port", "0");
+ config.setProperty(MCAST_PORT, "0");
getSystem(config);
PoolManager.createFactory().addServer(host0, port).setSubscriptionEnabled(true).create("clientPool");
getCache();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
index 8b392cb..b54e5d6 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/dunit/ResourceManagerWithQueryMonitorDUnitTest.java
@@ -16,64 +16,34 @@
*/
package com.gemstone.gemfire.cache.query.dunit;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
-import util.TestException;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.client.ClientCache;
-import com.gemstone.gemfire.cache.client.ClientCacheFactory;
-import com.gemstone.gemfire.cache.client.PoolFactory;
-import com.gemstone.gemfire.cache.client.PoolManager;
-import com.gemstone.gemfire.cache.client.ServerOperationException;
-import com.gemstone.gemfire.cache.query.FunctionDomainException;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexInvalidException;
-import com.gemstone.gemfire.cache.query.NameResolutionException;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryExecutionLowMemoryException;
-import com.gemstone.gemfire.cache.query.QueryExecutionTimeoutException;
-import com.gemstone.gemfire.cache.query.QueryInvocationTargetException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.TypeMismatchException;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.client.*;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
import com.gemstone.gemfire.cache.query.internal.QueryMonitor;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.internal.cache.DistributedRegion;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.PartitionedRegion;
-import com.gemstone.gemfire.internal.cache.control.HeapMemoryMonitor;
-import com.gemstone.gemfire.internal.cache.control.InternalResourceManager;
+import com.gemstone.gemfire.internal.cache.control.*;
import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceType;
-import com.gemstone.gemfire.internal.cache.control.MemoryEvent;
-import com.gemstone.gemfire.internal.cache.control.ResourceListener;
-import com.gemstone.gemfire.internal.cache.control.TestMemoryThresholdListener;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestUtils;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.IgnoredException;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.NetworkUtils;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
+import util.TestException;
+
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
public class ResourceManagerWithQueryMonitorDUnitTest extends ClientServerTestCase {
@@ -963,10 +933,10 @@ public class ResourceManagerWithQueryMonitorDUnitTest extends ClientServerTestCa
public Object call() throws Exception {
getSystem(getServerProperties(disableQueryMonitorForLowMemory, queryTimeout));
if (disableQueryMonitorForLowMemory == true) {
- System.setProperty("gemfire.Cache.DISABLE_QUERY_MONITOR_FOR_LOW_MEMORY", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Cache.DISABLE_QUERY_MONITOR_FOR_LOW_MEMORY", "true");
}
else {
- System.clearProperty("gemfire.Cache.DISABLE_QUERY_MONITOR_FOR_LOW_MEMORY");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "Cache.DISABLE_QUERY_MONITOR_FOR_LOW_MEMORY");
}
GemFireCacheImpl cache = (GemFireCacheImpl)getCache();
@@ -1052,14 +1022,14 @@ public class ResourceManagerWithQueryMonitorDUnitTest extends ClientServerTestCa
protected Properties getClientProps() {
Properties p = new Properties();
- p.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
- p.setProperty(DistributionConfig.LOCATORS_NAME, "");
+ p.setProperty(MCAST_PORT, "0");
+ p.setProperty(LOCATORS, "");
return p;
}
protected Properties getServerProperties(boolean disableQueryMonitorForMemory, int queryTimeout) {
Properties p = new Properties();
- p.setProperty(DistributionConfig.LOCATORS_NAME, "localhost["+DistributedTestUtils.getDUnitLocatorPort()+"]");
+ p.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
return p;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
index 7b28cae..f58d4bd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/CountStarJUnitTest.java
@@ -19,31 +19,20 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import java.util.ArrayList;
-import java.util.HashMap;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.data.Portfolio;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import static org.junit.Assert.*;
+import java.util.ArrayList;
+import java.util.HashMap;
-import junit.framework.TestCase;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.data.Portfolio;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static org.junit.Assert.*;
/**
* This test runs {Select COUNT(*) from /regionName [where clause]} queries
@@ -63,7 +52,7 @@ public class CountStarJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/DistinctResultsWithDupValuesInRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/DistinctResultsWithDupValuesInRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/DistinctResultsWithDupValuesInRegionJUnitTest.java
index 3137581..6770a74 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/DistinctResultsWithDupValuesInRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/DistinctResultsWithDupValuesInRegionJUnitTest.java
@@ -19,29 +19,22 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.DataPolicy;
-import com.gemstone.gemfire.cache.PartitionAttributesFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionAttributes;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.CacheUtils;
import com.gemstone.gemfire.cache.query.Query;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.cache.query.data.Portfolio;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.List;
+
+import static org.junit.Assert.*;
/**
*
@@ -57,7 +50,7 @@ public class DistinctResultsWithDupValuesInRegionJUnitTest {
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.Query.VERBOSE", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "Query.VERBOSE", "true");
CacheUtils.startCache();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRSingleRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRSingleRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRSingleRegionJUnitTest.java
index 03e90f2..12724ea 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRSingleRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IUMRSingleRegionJUnitTest.java
@@ -21,42 +21,24 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.Scope;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.data.City;
-import com.gemstone.gemfire.cache.query.data.Country;
-import com.gemstone.gemfire.cache.query.data.District;
-import com.gemstone.gemfire.cache.query.data.State;
-import com.gemstone.gemfire.cache.query.data.Village;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.cache.query.data.*;
import com.gemstone.gemfire.cache.query.internal.QueryObserverAdapter;
import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
import com.gemstone.gemfire.cache.query.types.StructType;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
*/
@@ -128,7 +110,7 @@ public class IUMRSingleRegionJUnitTest {
@Before
public void setUp() throws Exception {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
ds = DistributedSystem.connect(props);
cache = CacheFactory.create(ds);
/* create region containing Country objects */
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
index 654a6c9..ca2fe2f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/query/functional/IndexCreationJUnitTest.java
@@ -26,41 +26,8 @@
*/
package com.gemstone.gemfire.cache.query.functional;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.File;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-
-import junit.framework.Assert;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.cache.AttributesFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.EvictionAction;
-import com.gemstone.gemfire.cache.EvictionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.query.CacheUtils;
-import com.gemstone.gemfire.cache.query.Index;
-import com.gemstone.gemfire.cache.query.IndexStatistics;
-import com.gemstone.gemfire.cache.query.IndexType;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryInvalidException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Utils;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.cache.query.*;
import com.gemstone.gemfire.cache.query.data.ComparableWrapper;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.internal.DefaultQueryService;
@@ -75,12 +42,23 @@ import com.gemstone.gemfire.cache.query.internal.types.StructTypeImpl;
import com.gemstone.gemfire.cache.query.types.ObjectType;
import com.gemstone.gemfire.cache.query.types.StructType;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.Assert;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
@Category(IntegrationTest.class)
public class IndexCreationJUnitTest{
@@ -869,9 +847,9 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "test");
- props.setProperty("mcast-port", "0");
- props.setProperty("cache-xml-file", IndexCreationJUnitTest.class.getResource("index-creation-with-eviction.xml").toURI().getPath());
+ props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-creation-with-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
// Create the cache which causes the cache-xml-file to be parsed
@@ -893,11 +871,12 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "test");
- props.setProperty("mcast-port", "0");
+ props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(MCAST_PORT, "0");
//Using a different cache.xml that changes some region properties
//That will force the disk code to copy the region entries.
- props.setProperty("cache-xml-file", IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME,
+ IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
QueryService qs = cache.getQueryService();
@@ -918,9 +897,10 @@ public class IndexCreationJUnitTest{
file.mkdir();
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "test");
- props.setProperty("mcast-port", "0");
- props.setProperty("cache-xml-file", IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
+ props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(MCAST_PORT, "0");
+ props
+ .setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
Region localRegion = cache.getRegion("localRegion");
@@ -945,9 +925,10 @@ public class IndexCreationJUnitTest{
file.mkdir();
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "test");
- props.setProperty("mcast-port", "0");
- props.setProperty("cache-xml-file", IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
+ props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(MCAST_PORT, "0");
+ props
+ .setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-creation-without-eviction.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
Region localDiskRegion = cache.getRegion("localDiskRegion");
@@ -973,11 +954,11 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "test");
- props.setProperty("mcast-port", "0");
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("cache-xml-file", IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
+ props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
// Create the cache which causes the cache-xml-file to be parsed
@@ -1007,11 +988,11 @@ public class IndexCreationJUnitTest{
{
Properties props = new Properties();
- props.setProperty(DistributionConfig.NAME_NAME, "test");
- props.setProperty("mcast-port", "0");
- props.setProperty("statistic-sampling-enabled", "true");
- props.setProperty("enable-time-statistics", "true");
- props.setProperty("cache-xml-file", IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
+ props.setProperty(SystemConfigurationProperties.NAME, "test");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, IndexCreationJUnitTest.class.getResource("index-recovery-overflow.xml").toURI().getPath());
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = CacheFactory.create(ds);
QueryService qs = cache.getQueryService();
[54/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/cb291539
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/cb291539
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/cb291539
Branch: refs/heads/develop
Commit: cb2915390ee5afb8a9d8aff50442986c81321f1f
Parents: 7061201
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Mon May 30 19:26:52 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../internal/RegionFactoryDelegate.java | 6 +-
.../gemstone/gemfire/modules/SecondVMTest.java | 5 +-
.../session/bootstrap/AbstractCache.java | 20 +-
.../modules/session/TestSessionsBase.java | 5 +-
.../LocatorLauncherAssemblyIntegrationTest.java | 22 +-
.../LauncherLifecycleCommandsDUnitTest.java | 4 +-
.../LauncherLifecycleCommandsJUnitTest.java | 7 +-
.../internal/web/RestInterfaceJUnitTest.java | 4 +-
.../controllers/RestAPIsWithSSLDUnitTest.java | 41 +-
.../gemfire/admin/DistributedSystemConfig.java | 26 +-
.../internal/AdminDistributedSystemImpl.java | 2 +-
.../admin/internal/CacheServerConfigImpl.java | 5 +-
.../gemfire/admin/internal/CacheServerImpl.java | 5 +-
.../internal/DistributedSystemConfigImpl.java | 4 +-
.../EnabledManagedEntityController.java | 10 +-
.../admin/jmx/internal/AgentConfigImpl.java | 8 +-
.../jmx/internal/MemberInfoWithStatsMBean.java | 6 +-
.../client/internal/AuthenticateUserOp.java | 8 +-
.../gemfire/distributed/DistributedSystem.java | 4 +-
.../gemfire/distributed/LocatorLauncher.java | 4 +-
.../gemfire/distributed/ServerLauncher.java | 4 +-
.../internal/AbstractDistributionConfig.java | 346 +--
.../internal/DistributionConfig.java | 2191 ++++++++++--------
.../internal/DistributionConfigImpl.java | 406 ++--
.../distributed/internal/InternalLocator.java | 5 +-
.../internal/RuntimeDistributionConfigImpl.java | 36 +-
.../gemfire/internal/AbstractConfig.java | 11 +-
.../gemfire/internal/MigrationClient.java | 6 +-
.../gemfire/internal/MigrationServer.java | 6 +-
.../gemstone/gemfire/internal/SystemAdmin.java | 4 +-
.../gemfire/internal/admin/SSLConfig.java | 10 +-
.../admin/remote/RemoteTransportConfig.java | 4 +-
.../internal/cache/CacheServerLauncher.java | 15 +-
.../gemfire/internal/cache/DiskStoreImpl.java | 5 +-
.../tier/sockets/ClientProxyMembershipID.java | 4 +-
.../internal/cache/tier/sockets/HandShake.java | 14 +-
.../internal/cache/xmlcache/CacheXml.java | 3 +-
.../internal/logging/LogWriterFactory.java | 4 +-
.../management/internal/cli/CommandManager.java | 5 +-
.../internal/cli/commands/ConfigCommands.java | 5 +-
.../internal/cli/commands/ShellCommands.java | 7 +-
.../cli/functions/ChangeLogLevelFunction.java | 4 +-
.../GetMemberConfigInformationFunction.java | 6 +-
.../internal/cli/i18n/CliStrings.java | 2 +-
.../gemfire/redis/GemFireRedisServer.java | 5 +-
.../gemfire/DiskInstantiatorsJUnitTest.java | 7 +-
.../gemfire/LocalStatisticsJUnitTest.java | 8 +-
.../com/gemstone/gemfire/LonerDMJUnitTest.java | 11 +-
.../internal/DistributedSystemTestCase.java | 6 +-
.../admin/internal/HealthEvaluatorTestCase.java | 6 +-
.../cache/ConnectionPoolFactoryJUnitTest.java | 5 +-
.../gemfire/cache/RegionFactoryJUnitTest.java | 6 +-
.../client/ClientCacheFactoryJUnitTest.java | 11 +-
.../ClientServerRegisterInterestsDUnitTest.java | 8 +-
.../cache/client/internal/LocatorTestBase.java | 4 +-
...itionedRegionCompactRangeIndexDUnitTest.java | 5 +-
.../QueryParamsAuthorizationDUnitTest.java | 8 +-
.../functional/IndexCreationJUnitTest.java | 22 +-
.../DeclarativeIndexCreationJUnitTest.java | 5 +-
.../NewDeclarativeIndexCreationJUnitTest.java | 7 +-
...gRegionCreationIndexUpdateTypeJUnitTest.java | 5 +-
.../cache/snapshot/RegionSnapshotJUnitTest.java | 6 +-
.../cache/snapshot/SnapshotTestCase.java | 5 +-
.../gemfire/cache30/Bug40255JUnitTest.java | 8 +-
.../gemfire/cache30/Bug40662JUnitTest.java | 6 +-
.../gemfire/cache30/CacheLogRollDUnitTest.java | 36 +-
...cheRegionsReliablityStatsCheckDUnitTest.java | 186 +-
.../gemfire/cache30/CacheXml45DUnitTest.java | 5 +-
.../gemfire/cache30/CacheXmlTestCase.java | 6 +-
.../cache30/ClientServerCCEDUnitTest.java | 10 +-
.../DistributedAckRegionCCEDUnitTest.java | 4 +-
.../cache30/DistributedAckRegionDUnitTest.java | 7 +-
.../DistributedMulticastRegionDUnitTest.java | 8 +-
.../DistributedNoAckRegionCCEDUnitTest.java | 9 +-
.../cache30/GlobalRegionCCEDUnitTest.java | 4 +-
.../gemfire/cache30/QueueMsgDUnitTest.java | 9 +-
.../gemfire/cache30/ReconnectDUnitTest.java | 75 +-
.../RegionReliabilityListenerDUnitTest.java | 6 +-
.../cache30/RegionReliabilityTestCase.java | 29 +-
.../gemfire/cache30/RequiredRolesDUnitTest.java | 13 +-
.../cache30/RolePerformanceDUnitTest.java | 5 +-
.../gemfire/cache30/SlowRecDUnitTest.java | 36 +-
.../gemfire/cache30/TXDistributedDUnitTest.java | 5 +-
.../distributed/DistributedMemberDUnitTest.java | 9 +-
.../DistributedSystemConnectPerf.java | 7 +-
.../distributed/DistributedSystemDUnitTest.java | 16 +-
.../gemfire/distributed/LocatorDUnitTest.java | 100 +-
.../LocatorLauncherLocalIntegrationTest.java | 30 +-
.../LocatorLauncherRemoteIntegrationTest.java | 3 +-
.../gemfire/distributed/RoleDUnitTest.java | 11 +-
.../ServerLauncherLocalIntegrationTest.java | 40 +-
.../ServerLauncherRemoteIntegrationTest.java | 9 +-
.../distributed/internal/Bug40751DUnitTest.java | 4 +-
.../ConsoleDistributionManagerDUnitTest.java | 4 +-
.../internal/DistributionConfigJUnitTest.java | 34 +-
.../internal/DistributionManagerDUnitTest.java | 23 +-
.../InternalDistributedSystemJUnitTest.java | 56 +-
.../internal/ProductUseLogDUnitTest.java | 6 +-
.../membership/MembershipJUnitTest.java | 19 +-
.../gms/fd/GMSHealthMonitorJUnitTest.java | 12 +-
.../locator/GMSLocatorRecoveryJUnitTest.java | 6 +-
.../messenger/JGroupsMessengerJUnitTest.java | 8 +-
.../gms/mgr/GMSMembershipManagerJUnitTest.java | 12 +-
.../TcpServerBackwardCompatDUnitTest.java | 7 +-
.../gemfire/disttx/CacheMapDistTXDUnitTest.java | 7 +-
.../gemfire/disttx/DistTXJUnitTest.java | 2 +-
.../gemfire/disttx/DistTXOrderDUnitTest.java | 6 +-
.../disttx/DistTXRestrictionsDUnitTest.java | 7 +-
.../disttx/DistTXWithDeltaDUnitTest.java | 7 +-
.../disttx/DistributedTransactionDUnitTest.java | 2 +-
.../gemfire/disttx/PRDistTXDUnitTest.java | 7 +-
.../gemfire/disttx/PRDistTXJUnitTest.java | 2 +-
.../disttx/PRDistTXWithVersionsDUnitTest.java | 7 +-
...entPartitionedRegionWithDistTXDUnitTest.java | 7 +-
.../internal/AbstractConfigJUnitTest.java | 99 +-
.../internal/GemFireStatSamplerJUnitTest.java | 29 +-
.../gemfire/internal/JSSESocketJUnitTest.java | 12 +-
.../gemfire/internal/JarDeployerDUnitTest.java | 3 +-
.../internal/PdxDeleteFieldDUnitTest.java | 2 +-
.../gemfire/internal/PdxRenameDUnitTest.java | 2 +-
.../gemfire/internal/SSLConfigJUnitTest.java | 571 +++--
.../gemfire/internal/cache/BackupJUnitTest.java | 14 +-
.../internal/cache/Bug37244JUnitTest.java | 6 +-
.../internal/cache/Bug41091DUnitTest.java | 13 +-
.../internal/cache/Bug45934DUnitTest.java | 7 +-
...ServerInvalidAndDestroyedEntryDUnitTest.java | 9 +-
.../cache/ClientServerTransactionDUnitTest.java | 38 +-
.../cache/ConcurrentMapOpsDUnitTest.java | 5 +-
.../cache/ConnectDisconnectDUnitTest.java | 7 +-
.../cache/DeltaPropagationDUnitTest.java | 13 +-
.../cache/DiskOfflineCompactionJUnitTest.java | 11 +-
.../internal/cache/DiskOldAPIsJUnitTest.java | 14 +-
.../cache/DiskRegCacheXmlJUnitTest.java | 5 +-
.../DiskRegCachexmlGeneratorJUnitTest.java | 306 +--
.../DiskRegionIllegalArguementsJUnitTest.java | 10 +-
...iskRegionIllegalCacheXMLvaluesJUnitTest.java | 5 +-
.../internal/cache/DiskRegionTestingBase.java | 14 +-
.../cache/DiskStoreFactoryJUnitTest.java | 11 +-
.../cache/FixedPRSinglehopDUnitTest.java | 6 +-
.../internal/cache/GridAdvisorDUnitTest.java | 1308 +++++------
.../cache/IncrementalBackupDUnitTest.java | 5 +-
.../internal/cache/InterruptDiskJUnitTest.java | 11 +-
...InterruptsConserveSocketsFalseDUnitTest.java | 4 +-
.../LIFOEvictionAlgoEnabledRegionJUnitTest.java | 6 +-
...victionAlgoMemoryEnabledRegionJUnitTest.java | 6 +-
.../cache/OfflineSnapshotJUnitTest.java | 5 +-
...dRegionAPIConserveSocketsFalseDUnitTest.java | 4 +-
...rtitionedRegionCacheXMLExampleDUnitTest.java | 7 +-
.../PartitionedRegionSingleHopDUnitTest.java | 11 +-
...RegionSingleHopWithServerGroupDUnitTest.java | 9 +-
.../PersistentPartitionedRegionJUnitTest.java | 5 +-
.../cache/RemoteTransactionDUnitTest.java | 7 +-
.../internal/cache/RunCacheInOldGemfire.java | 5 +-
.../cache/TombstoneCreationJUnitTest.java | 10 +-
.../cache/TransactionsWithDeltaDUnitTest.java | 5 +-
...ltiThreadedOplogPerJUnitPerformanceTest.java | 6 +-
...ributedRegionFunctionExecutionDUnitTest.java | 7 +-
.../OnGroupsFunctionExecutionDUnitTest.java | 18 +-
...egionFunctionExecutionFailoverDUnitTest.java | 6 +-
.../internal/cache/ha/Bug48571DUnitTest.java | 22 +-
.../internal/cache/ha/Bug48879DUnitTest.java | 6 +-
.../cache/ha/HARegionQueueJUnitTest.java | 5 +-
.../cache/locks/TXLockServiceDUnitTest.java | 4 +-
.../cache/partitioned/Bug43684DUnitTest.java | 15 +-
.../cache/partitioned/Bug47388DUnitTest.java | 7 +-
.../cache/partitioned/Bug51400DUnitTest.java | 4 +-
.../PersistentRecoveryOrderDUnitTest.java | 3 +-
.../cache/tier/sockets/Bug36829DUnitTest.java | 8 +-
.../cache/tier/sockets/Bug37805DUnitTest.java | 8 +-
.../cache/tier/sockets/CacheServerTestUtil.java | 26 +-
.../tier/sockets/ClientConflationDUnitTest.java | 5 +-
.../sockets/DurableClientBug39997DUnitTest.java | 6 +-
.../DurableClientQueueSizeDUnitTest.java | 10 +-
.../DurableClientReconnectDUnitTest.java | 7 +-
.../sockets/DurableClientStatsDUnitTest.java | 8 +-
.../sockets/DurableRegistrationDUnitTest.java | 7 +-
.../sockets/DurableResponseMatrixDUnitTest.java | 8 +-
.../sockets/InterestRegrListenerDUnitTest.java | 7 +-
.../tier/sockets/RedundancyLevelJUnitTest.java | 6 +-
.../CompressionCacheConfigDUnitTest.java | 5 +-
.../datasource/AbstractPoolCacheJUnitTest.java | 6 +-
.../internal/datasource/CleanUpJUnitTest.java | 5 +-
.../ConnectionPoolCacheImplJUnitTest.java | 5 +-
.../datasource/ConnectionPoolingJUnitTest.java | 5 +-
.../datasource/DataSourceFactoryJUnitTest.java | 5 +-
.../internal/datasource/RestartJUnitTest.java | 5 +-
.../internal/jta/BlockingTimeOutJUnitTest.java | 6 +-
.../gemfire/internal/jta/CacheUtils.java | 9 +-
.../internal/jta/DataSourceJTAJUnitTest.java | 12 +-
.../jta/GlobalTransactionJUnitTest.java | 5 +-
.../jta/TransactionTimeOutJUnitTest.java | 7 +-
.../internal/jta/dunit/ExceptionsDUnitTest.java | 5 +-
.../jta/dunit/IdleTimeOutDUnitTest.java | 5 +-
.../jta/dunit/LoginTimeOutDUnitTest.java | 5 +-
.../jta/dunit/MaxPoolSizeDUnitTest.java | 5 +-
.../jta/dunit/TransactionTimeOutDUnitTest.java | 5 +-
.../dunit/TxnManagerMultiThreadDUnitTest.java | 5 +-
.../internal/jta/dunit/TxnTimeOutDUnitTest.java | 6 +-
.../DistributedSystemLogFileJUnitTest.java | 73 +-
.../logging/LocatorLogFileJUnitTest.java | 10 +-
.../logging/LogWriterPerformanceTest.java | 6 +-
.../CustomConfigWithCacheIntegrationTest.java | 6 +-
.../offheap/OutOfOffHeapMemoryDUnitTest.java | 4 +-
.../statistics/StatisticsDUnitTest.java | 15 +-
.../internal/stats50/AtomicStatsJUnitTest.java | 5 +-
.../management/ClientHealthStatsDUnitTest.java | 16 +-
.../DataBrowserJSONValidationJUnitTest.java | 8 +-
.../management/LocatorManagementDUnitTest.java | 5 +-
.../gemfire/management/ManagementTestBase.java | 10 +-
...ersalMembershipListenerAdapterDUnitTest.java | 19 +-
.../stats/DistributedSystemStatsJUnitTest.java | 8 +-
.../bean/stats/MBeanStatsTestCase.java | 10 +-
.../cli/commands/ConfigCommandsDUnitTest.java | 2 +-
...eateAlterDestroyRegionCommandsDUnitTest.java | 17 +-
.../cli/commands/DeployCommandsDUnitTest.java | 7 +-
.../commands/DiskStoreCommandsDUnitTest.java | 10 +-
.../HTTPServiceSSLSupportJUnitTest.java | 30 +-
.../cli/commands/IndexCommandsDUnitTest.java | 13 +-
.../ListAndDescribeRegionDUnitTest.java | 8 +-
.../cli/commands/ListIndexCommandDUnitTest.java | 5 +-
.../cli/commands/MemberCommandsDUnitTest.java | 17 +-
.../MiscellaneousCommandsDUnitTest.java | 8 +-
.../cli/commands/QueueCommandsDUnitTest.java | 8 +-
.../cli/commands/ShowDeadlockDUnitTest.java | 10 +-
.../cli/commands/ShowStackTraceDUnitTest.java | 8 +-
.../cli/commands/UserCommandsDUnitTest.java | 3 +-
.../security/ExampleJSONAuthorization.java | 7 +-
.../internal/security/JSONAuthorization.java | 11 +-
.../ClientsWithVersioningRetryDUnitTest.java | 4 +-
.../gemstone/gemfire/redis/AuthJUnitTest.java | 11 +-
.../gemstone/gemfire/redis/HashesJUnitTest.java | 6 +-
.../gemstone/gemfire/redis/ListsJUnitTest.java | 9 +-
.../gemfire/redis/RedisDistDUnitTest.java | 6 +-
.../gemstone/gemfire/redis/SetsJUnitTest.java | 6 +-
.../gemfire/redis/SortedSetsJUnitTest.java | 6 +-
.../gemfire/redis/StringsJunitTest.java | 6 +-
.../generator/SSLCredentialGenerator.java | 10 +-
.../gemfire/test/dunit/LogWriterUtils.java | 4 +-
.../internal/JUnit4DistributedTestCase.java | 10 +-
.../test/dunit/standalone/DUnitLauncher.java | 11 +-
.../gemfire/test/golden/GoldenTestCase.java | 4 +-
.../gemfire/test/process/ProcessWrapper.java | 5 +-
.../com/main/WANBootStrapping_Site1_Add.java | 2 +-
.../com/main/WANBootStrapping_Site1_Remove.java | 4 +-
.../com/main/WANBootStrapping_Site2_Add.java | 2 +-
.../com/main/WANBootStrapping_Site2_Remove.java | 4 +-
.../gemfire/cache/query/cq/CQJUnitTest.java | 5 +-
.../cq/dunit/CqDataUsingPoolDUnitTest.java | 8 +-
.../cache/query/cq/dunit/CqStateDUnitTest.java | 4 +-
.../PartitionedRegionCqQueryDUnitTest.java | 6 +-
.../cache/snapshot/ClientSnapshotDUnitTest.java | 5 +-
.../cache/RemoteCQTransactionDUnitTest.java | 5 +-
.../tier/sockets/DurableClientTestCase.java | 7 +-
.../CacheServerManagementDUnitTest.java | 7 +-
.../cli/commands/ClientCommandsDUnitTest.java | 20 +-
.../DurableClientCommandsDUnitTest.java | 8 +-
.../IndexRepositoryImplPerformanceTest.java | 1 -
...uceneIndexXmlParserIntegrationJUnitTest.java | 5 +-
.../spark/connector/JavaApiIntegrationTest.java | 2 +-
.../internal/cache/UpdateVersionDUnitTest.java | 14 +-
.../cache/wan/CacheClientNotifierDUnitTest.java | 8 +-
.../gemfire/internal/cache/wan/WANTestBase.java | 10 +-
.../cache/wan/disttx/DistTXWANDUnitTest.java | 4 +-
.../wan/misc/NewWanAuthenticationDUnitTest.java | 6 +-
264 files changed, 4095 insertions(+), 3815 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
index 65b0eb2..e217195 100644
--- a/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
+++ b/extensions/geode-modules-hibernate/src/main/java/com/gemstone/gemfire/modules/hibernate/internal/RegionFactoryDelegate.java
@@ -31,11 +31,9 @@ import org.slf4j.LoggerFactory;
import java.util.Iterator;
import java.util.Properties;
-public class RegionFactoryDelegate {
-
- private static final String LOG_FILE = DistributionConfig.LOG_FILE_NAME;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
- private static final String CACHE_XML_FILE = DistributionConfig.CACHE_XML_FILE_NAME;
+public class RegionFactoryDelegate {
private static final String DEFAULT_REGION_TYPE = RegionShortcut.REPLICATE_HEAP_LRU.name();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java b/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
index 386e22f..cde19c6 100644
--- a/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
+++ b/extensions/geode-modules-hibernate/src/test/java/com/gemstone/gemfire/modules/SecondVMTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.GemFireCache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.Region.Entry;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import junit.framework.TestCase;
@@ -36,7 +35,7 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.logging.Level;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Ignore("Can this test be deleted?")
@Category(IntegrationTest.class)
@@ -50,7 +49,7 @@ public class SecondVMTest extends TestCase {
public void _testStartEmptyVM() throws IOException {
Properties gemfireProperties = new Properties();
gemfireProperties.setProperty(MCAST_PORT, "5555");
- gemfireProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ gemfireProperties.setProperty(LOG_LEVEL, "fine");
Cache cache = new CacheFactory(gemfireProperties).create();
System.in.read();
Iterator it = cache.rootRegions().iterator();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
index 481ec09..c9b9da6 100644
--- a/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
+++ b/extensions/geode-modules/src/main/java/com/gemstone/gemfire/modules/session/bootstrap/AbstractCache.java
@@ -36,6 +36,8 @@ import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.atomic.AtomicBoolean;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public abstract class AbstractCache {
protected GemFireCache cache;
@@ -111,7 +113,7 @@ public abstract class AbstractCache {
}
public String getLogFileName() {
- String logFileName = getGemFireProperties().get(DistributionConfig.LOG_FILE_NAME);
+ String logFileName = getGemFireProperties().get(LOG_FILE);
if (logFileName == null) {
logFileName = DEFAULT_LOG_FILE_NAME;
}
@@ -119,7 +121,7 @@ public abstract class AbstractCache {
}
public String getStatisticArchiveFileName() {
- String statisticsArchiveFileName = getGemFireProperties().get(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
+ String statisticsArchiveFileName = getGemFireProperties().get(STATISTIC_ARCHIVE_FILE);
if (statisticsArchiveFileName == null) {
statisticsArchiveFileName = DEFAULT_STATISTIC_ARCHIVE_FILE_NAME;
}
@@ -127,7 +129,7 @@ public abstract class AbstractCache {
}
public String getCacheXmlFileName() {
- String cacheXmlFileName = getGemFireProperties().get(DistributionConfig.CACHE_XML_FILE_NAME);
+ String cacheXmlFileName = getGemFireProperties().get(CACHE_XML_FILE);
if (cacheXmlFileName == null) {
cacheXmlFileName = getDefaultCacheXmlFileName();
}
@@ -219,19 +221,19 @@ public abstract class AbstractCache {
if (getCacheXmlFileName().equals(getDefaultCacheXmlFileName()) && !cacheXmlFile.exists()) {
absoluteCacheXmlFileName = DistributionConfig.DEFAULT_CACHE_XML_FILE.getName();
}
- properties.put(DistributionConfig.CACHE_XML_FILE_NAME, absoluteCacheXmlFileName);
+ properties.put(CACHE_XML_FILE, absoluteCacheXmlFileName);
// Replace the log file in the properties
- properties.put(DistributionConfig.LOG_FILE_NAME, getLogFile().getAbsolutePath());
+ properties.put(LOG_FILE, getLogFile().getAbsolutePath());
// Replace the statistics archive file in the properties
File statisticArchiveFile = getStatisticArchiveFile();
if (statisticArchiveFile == null) {
// Remove the statistics archive file name since statistic sampling is disabled
- properties.remove(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME);
- properties.remove(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME);
+ properties.remove(STATISTIC_ARCHIVE_FILE);
+ properties.remove(STATISTIC_SAMPLING_ENABLED);
} else {
- properties.put(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, statisticArchiveFile.getAbsolutePath());
+ properties.put(STATISTIC_ARCHIVE_FILE, statisticArchiveFile.getAbsolutePath());
}
getLogger().info("Creating distributed system from: " + properties);
@@ -269,7 +271,7 @@ public abstract class AbstractCache {
protected File getStatisticArchiveFile() {
File statisticsArchiveFile = null;
- String statisticSamplingEnabled = getGemFireProperties().get(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME);
+ String statisticSamplingEnabled = getGemFireProperties().get(STATISTIC_SAMPLING_ENABLED);
if (statisticSamplingEnabled != null && statisticSamplingEnabled.equals("true")) {
String statisticsArchiveFileName = getStatisticArchiveFileName();
statisticsArchiveFile = new File(statisticsArchiveFileName);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
----------------------------------------------------------------------
diff --git a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
index 4f2d06d..fac2472 100644
--- a/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
+++ b/extensions/geode-modules/src/test/java/com/gemstone/gemfire/modules/session/TestSessionsBase.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.modules.session;
import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.modules.session.catalina.DeltaSessionManager;
import com.gemstone.gemfire.modules.session.catalina.PeerToPeerCacheLifecycleListener;
@@ -37,7 +36,7 @@ import java.beans.PropertyChangeEvent;
import java.io.IOException;
import java.io.PrintWriter;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static junit.framework.Assert.*;
public abstract class TestSessionsBase {
@@ -59,7 +58,7 @@ public abstract class TestSessionsBase {
PeerToPeerCacheLifecycleListener p2pListener = new PeerToPeerCacheLifecycleListener();
p2pListener.setProperty(MCAST_PORT, "0");
- p2pListener.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
+ p2pListener.setProperty(LOG_LEVEL, "config");
server.getEmbedded().addLifecycleListener(p2pListener);
sessionManager = manager;
sessionManager.setEnableCommitValve(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java
index 84d4aba..b8c9cca 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/distributed/LocatorLauncherAssemblyIntegrationTest.java
@@ -39,6 +39,8 @@ import java.io.File;
import static org.junit.Assert.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* These tests are part of assembly as they require the REST war file to be present.
*/
@@ -70,11 +72,11 @@ public class LocatorLauncherAssemblyIntegrationTest extends AbstractLocatorLaunc
.setPort(this.locatorPort)
.setRedirectOutput(false)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false")
- .set(DistributionConfig.JMX_MANAGER_NAME, "true")
- .set(DistributionConfig.JMX_MANAGER_START_NAME, "true")
- .set(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
+ .set(LOG_LEVEL, "config")
+ .set(ENABLE_CLUSTER_CONFIGURATION, "false")
+ .set(JMX_MANAGER, "true")
+ .set(JMX_MANAGER_START, "true")
+ .set(JMX_MANAGER_PORT, "0");
performTest(builder);
}
@@ -91,11 +93,11 @@ public class LocatorLauncherAssemblyIntegrationTest extends AbstractLocatorLaunc
.setPort(this.locatorPort)
.setRedirectOutput(false)
.setWorkingDirectory(rootFolder)
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
- .set(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false")
- .set(DistributionConfig.JMX_MANAGER_NAME, "true")
- .set(DistributionConfig.JMX_MANAGER_START_NAME, "true")
- .set(DistributionConfig.JMX_MANAGER_PORT_NAME, Integer.toString(jmxPort));
+ .set(LOG_LEVEL, "config")
+ .set(ENABLE_CLUSTER_CONFIGURATION, "false")
+ .set(JMX_MANAGER, "true")
+ .set(JMX_MANAGER_START, "true")
+ .set(JMX_MANAGER_PORT, Integer.toString(jmxPort));
performTest(builder);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
index e04e012..d468a4a 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsDUnitTest.java
@@ -64,7 +64,7 @@ import java.util.Set;
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.START_LOCATOR;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.Wait.waitForCriterion;
@@ -917,7 +917,7 @@ public class LauncherLifecycleCommandsDUnitTest extends CliCommandTestBase {
}
private ClientCache setupClientCache(final String durableClientId, final int serverPort) {
- ClientCache clientCache = new ClientCacheFactory().set(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId).create();
+ ClientCache clientCache = new ClientCacheFactory().set(DURABLE_CLIENT_ID, durableClientId).create();
PoolFactory poolFactory = PoolManager.createFactory();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
index 3fc1fcc..b97cef3 100755
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommandsJUnitTest.java
@@ -35,8 +35,7 @@ import org.junit.experimental.categories.Category;
import java.io.File;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -101,8 +100,8 @@ public class LauncherLifecycleCommandsJUnitTest {
final Properties gemfireProperties = new Properties();
gemfireProperties.setProperty(LOCATORS, "localhost[11235]");
- gemfireProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, "config");
- gemfireProperties.setProperty(DistributionConfig.LOG_FILE_NAME, StringUtils.EMPTY_STRING);
+ gemfireProperties.setProperty(LOG_LEVEL, "config");
+ gemfireProperties.setProperty(LOG_FILE, StringUtils.EMPTY_STRING);
gemfireProperties.setProperty(MCAST_PORT, "0");
gemfireProperties.setProperty(SystemConfigurationProperties.NAME, "tidepool");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
index 6861f64..62131fe 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/RestInterfaceJUnitTest.java
@@ -50,7 +50,7 @@ import java.io.InputStreamReader;
import java.text.SimpleDateFormat;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -110,7 +110,7 @@ public class RestInterfaceJUnitTest {
.setPdxIgnoreUnreadFields(false)
.set("name", getClass().getSimpleName())
.set(MCAST_PORT, "0")
- .set(DistributionConfig.LOG_LEVEL_NAME, "config")
+ .set(LOG_LEVEL, "config")
.set(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, "localhost")
.set(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(getHttpServicePort()))
//.set("http-service-ssl-enabled", "false")
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
index 604e3cf..4be3b0f 100644
--- a/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
+++ b/geode-assembly/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsWithSSLDUnitTest.java
@@ -53,8 +53,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -245,26 +244,26 @@ public class RestAPIsWithSSLDUnitTest extends LocatorTestBase {
private void configureSSL(Properties props, Properties sslProperties, boolean clusterLevel) {
if (clusterLevel) {
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, DistributionConfig.CLUSTER_SSL_ENABLED_NAME);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME,
- DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME,
- DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_TRUSTSTORE_NAME, DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME,
- DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_ENABLED, CLUSTER_SSL_ENABLED);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_KEYSTORE, CLUSTER_SSL_KEYSTORE);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_KEYSTORE_PASSWORD,
+ CLUSTER_SSL_KEYSTORE_PASSWORD);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_KEYSTORE_TYPE, CLUSTER_SSL_KEYSTORE_TYPE);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_PROTOCOLS, CLUSTER_SSL_PROTOCOLS);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION,
+ CLUSTER_SSL_REQUIRE_AUTHENTICATION);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_TRUSTSTORE, CLUSTER_SSL_TRUSTSTORE);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD,
+ CLUSTER_SSL_TRUSTSTORE_PASSWORD);
} else {
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_ENABLED_NAME, null);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_NAME, null);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_PASSWORD_NAME, null);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_KEYSTORE_TYPE_NAME, null);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_PROTOCOLS_NAME, null);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION_NAME, null);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_TRUSTSTORE_NAME, null);
- sslPropertyConverter(sslProperties, props, DistributionConfig.HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD_NAME, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_ENABLED, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_KEYSTORE, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_KEYSTORE_PASSWORD, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_KEYSTORE_TYPE, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_PROTOCOLS, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_REQUIRE_AUTHENTICATION, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_TRUSTSTORE, null);
+ sslPropertyConverter(sslProperties, props, HTTP_SERVICE_SSL_TRUSTSTORE_PASSWORD, null);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
index 726b228..e5e2d6e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/DistributedSystemConfig.java
@@ -24,8 +24,6 @@ import java.util.Properties;
import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
-//import com.gemstone.gemfire.admin.jmx.AgentConfig;
-//import java.net.InetAddress;
/**
* Configuration for defining a GemFire distributed system to
@@ -114,8 +112,7 @@ public interface DistributedSystemConfig extends Cloneable {
/** The name of the "membership-port-range" property
* @since GemFire 6.5
*/
- String MEMBERSHIP_PORT_RANGE_NAME =
- DistributionConfig.MEMBERSHIP_PORT_RANGE_NAME;
+ String MEMBERSHIP_PORT_RANGE_NAME = MEMBERSHIP_PORT_RANGE;
/**
* The default membership-port-range.
@@ -197,32 +194,28 @@ public interface DistributedSystemConfig extends Cloneable {
"rsh -n {HOST} {CMD}";
/** The name of the "SSLEnabled" property */
- String SSL_ENABLED_NAME =
- DistributionConfig.SSL_ENABLED_NAME;
+ String SSL_ENABLED_NAME = SSL_ENABLED;
/** The default ssl-enabled state (<code>false</code>) */
boolean DEFAULT_SSL_ENABLED =
DistributionConfig.DEFAULT_SSL_ENABLED;
/** The name of the "SSLProtocols" property */
- String SSL_PROTOCOLS_NAME =
- DistributionConfig.SSL_PROTOCOLS_NAME;
+ String SSL_PROTOCOLS_NAME = SSL_PROTOCOLS;
/** The default ssl-protocols value (<code>any</code>) */
String DEFAULT_SSL_PROTOCOLS =
DistributionConfig.DEFAULT_SSL_PROTOCOLS;
/** The name of the "SSLCiphers" property */
- String SSL_CIPHERS_NAME =
- DistributionConfig.SSL_CIPHERS_NAME;
+ String SSL_CIPHERS_NAME = SSL_CIPHERS;
/** The default ssl-ciphers value. (<code>any</code>) */
String DEFAULT_SSL_CIPHERS =
DistributionConfig.DEFAULT_SSL_CIPHERS;
/** The name of the "SSLRequireAuthentication" property */
- String SSL_REQUIRE_AUTHENTICATION_NAME =
- DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME;
+ String SSL_REQUIRE_AUTHENTICATION_NAME = SSL_REQUIRE_AUTHENTICATION;
/** The default ssl-require-authentication value (<code>true</code>) */
boolean DEFAULT_SSL_REQUIRE_AUTHENTICATION =
@@ -241,21 +234,21 @@ public interface DistributedSystemConfig extends Cloneable {
int DEFAULT_MEMBER_TIMEOUT = DistributionConfig.DEFAULT_MEMBER_TIMEOUT;
/** The name of the "logFile" property */
- String LOG_FILE_NAME = DistributionConfig.LOG_FILE_NAME;
+ String LOG_FILE_NAME = LOG_FILE;
/** The default log-file value ("" which directs logging to standard
* output) */
String DEFAULT_LOG_FILE = "";
/** The name of the "logLevel" property */
- String LOG_LEVEL_NAME = DistributionConfig.LOG_LEVEL_NAME;
+ String LOG_LEVEL_NAME = LOG_LEVEL;
/** The default log level ("config") */
String DEFAULT_LOG_LEVEL = "config";
/** The name of the "LogDiskSpaceLimit" property */
String LOG_DISK_SPACE_LIMIT_NAME =
- DistributionConfig.LOG_DISK_SPACE_LIMIT_NAME;
+ LOG_DISK_SPACE_LIMIT;
/** The default log disk space limit in megabytes (0) */
int DEFAULT_LOG_DISK_SPACE_LIMIT =
@@ -270,8 +263,7 @@ public interface DistributedSystemConfig extends Cloneable {
DistributionConfig.MAX_LOG_DISK_SPACE_LIMIT;
/** The name of the "LogFileSizeLimit" property */
- String LOG_FILE_SIZE_LIMIT_NAME =
- DistributionConfig.LOG_FILE_SIZE_LIMIT_NAME;
+ String LOG_FILE_SIZE_LIMIT_NAME = LOG_FILE_SIZE_LIMIT;
/** The default log file size limit in megabytes (0) */
int DEFAULT_LOG_FILE_SIZE_LIMIT =
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
index 9438d91..38b9218 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
@@ -573,7 +573,7 @@ implements com.gemstone.gemfire.admin.AdminDistributedSystem,
MCAST_ADDRESS,
InetAddressUtil.toInetAddress(this.config.getMcastAddress())),
new ConfigurationParameterImpl(
- DistributionConfig.DISABLE_TCP_NAME,
+ DISABLE_TCP,
Boolean.valueOf(this.config.getDisableTcp()) ),
};
member.setConfiguration(configParms);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerConfigImpl.java
index 225b4de..1994f05 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerConfigImpl.java
@@ -18,9 +18,10 @@ package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.admin.CacheServerConfig;
import com.gemstone.gemfire.admin.CacheVmConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.admin.GemFireVM;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* An implementation of <code>CacheVmConfig</code>
*
@@ -54,7 +55,7 @@ public class CacheServerConfigImpl extends ManagedEntityConfigImpl
public CacheServerConfigImpl(GemFireVM vm) {
super(vm);
- String name = DistributionConfig.CACHE_XML_FILE_NAME;
+ String name = CACHE_XML_FILE;
this.cacheXMLFile = vm.getConfig().getAttribute(name);
this.classpath = null;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
index 524578d..ee6f597 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/CacheServerImpl.java
@@ -18,11 +18,12 @@ package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.distributed.internal.DM;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.internal.admin.GemFireVM;
import com.gemstone.gemfire.internal.admin.remote.RemoteApplicationVM;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Implements the administrative interface to a cache server.
*
@@ -142,7 +143,7 @@ public class CacheServerImpl extends ManagedSystemMemberImpl
String file = this.getConfig().getCacheXMLFile();
if (file != null && file.length() > 0) {
sb.append(" ");
- sb.append(DistributionConfig.CACHE_XML_FILE_NAME);
+ sb.append(CACHE_XML_FILE);
sb.append("=");
sb.append(file);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
index 9f3c6c9..cad20d0 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
@@ -1088,7 +1088,7 @@ public class DistributedSystemConfigImpl
buf.append(lf);
buf.append(" " + TCP_PORT + "=" + this.tcpPort);
buf.append(lf);
- buf.append(" " + DistributionConfig.DISABLE_TCP_NAME + "=");
+ buf.append(" " + DISABLE_TCP + "=");
buf.append(String.valueOf(this.disableTcp));
buf.append(lf);
buf.append(" " + DistributionConfig.DISABLE_AUTO_RECONNECT_NAME + "=");
@@ -1097,7 +1097,7 @@ public class DistributedSystemConfigImpl
buf.append(" " + REMOTE_COMMAND_NAME + "=");
buf.append(String.valueOf(this.remoteCommand));
buf.append(lf);
- buf.append(" " + SSL_ENABLED_NAME + "=");
+ buf.append(" " + SSL_ENABLED + "=");
buf.append(String.valueOf(this.sslEnabled));
buf.append(lf);
buf.append(" " + SSL_CIPHERS_NAME + "=");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
index ab39935..0c1eab5 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
@@ -32,7 +32,7 @@ import java.io.File;
import java.util.Iterator;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Implements the actual administration (starting, stopping, etc.) of
@@ -318,16 +318,16 @@ class EnabledManagedEntityController implements ManagedEntityController {
MCAST_PORT,
"0");
sslProps.setProperty(prefix +
- DistributionConfig.SSL_ENABLED_NAME,
+ SSL_ENABLED,
String.valueOf(config.isSSLEnabled()));
sslProps.setProperty(prefix +
- DistributionConfig.SSL_CIPHERS_NAME,
+ SSL_CIPHERS,
config.getSSLCiphers());
sslProps.setProperty(prefix +
- DistributionConfig.SSL_PROTOCOLS_NAME,
+ SSL_PROTOCOLS,
config.getSSLProtocols());
sslProps.setProperty(prefix +
- DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME,
+ SSL_REQUIRE_AUTHENTICATION,
String.valueOf(config.isSSLAuthenticationRequired()));
return sslProps;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
index 5aaa184..0f56d0f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
@@ -287,7 +287,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
props.setProperty(STATE_SAVE_FILE_NAME,
String.valueOf(DEFAULT_STATE_SAVE_FILE));
- props.setProperty(SSL_ENABLED_NAME,
+ props.setProperty(SSL_ENABLED,
String.valueOf(DEFAULT_SSL_ENABLED));
props.setProperty(SSL_PROTOCOLS_NAME,
@@ -695,7 +695,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
props.setProperty(EMAIL_NOTIFICATIONS_FROM_NAME, toString(EMAIL_NOTIFICATIONS_FROM_NAME, getEmailNotificationFrom()));
props.setProperty(EMAIL_NOTIFICATIONS_TO_LIST_NAME, toString(EMAIL_NOTIFICATIONS_TO_LIST_NAME, getEmailNotificationToList()));
- props.setProperty(SSL_ENABLED_NAME, toString(SSL_ENABLED_NAME, isSSLEnabled()));
+ props.setProperty(SSL_ENABLED, toString(SSL_ENABLED, isSSLEnabled()));
props.setProperty(SSL_PROTOCOLS_NAME, toString(SSL_PROTOCOLS_NAME, getSSLProtocols()));
props.setProperty(SSL_CIPHERS_NAME, toString(SSL_CIPHERS_NAME, getSSLCiphers()));
props.setProperty(SSL_REQUIRE_AUTHENTICATION_NAME, toString(SSL_REQUIRE_AUTHENTICATION_NAME, isSSLAuthenticationRequired()));
@@ -1071,7 +1071,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
DEFAULT_HTTP_AUTHENTICATION_PASSWORD);
this.sslEnabled = validateBoolean(props.getProperty(
- SSL_ENABLED_NAME),
+ SSL_ENABLED),
DEFAULT_SSL_ENABLED);
this.sslProtocols = validateNonEmptyString(props.getProperty(
SSL_PROTOCOLS_NAME),
@@ -1280,7 +1280,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
return LocalizedStrings.AgentConfigImpl_REFRESH_INTERVAL_IN_SECONDS_FOR_AUTOREFRESH_OF_MEMBERS_AND_STATISTIC_RESOURCES.toLocalizedString();
} else if (prop.equals(REMOTE_COMMAND_NAME)) {
return LocalizedStrings.AgentConfigImpl_COMMAND_PREFIX_USED_FOR_LAUNCHING_MEMBERS_OF_THE_DISTRIBUTED_SYSTEM.toLocalizedString();
- } else if (prop.equals(SSL_ENABLED_NAME)) {
+ } else if (prop.equals(SSL_ENABLED)) {
return LocalizedStrings.AgentConfigImpl_DOES_THE_DISTRIBUTED_SYSTEM_COMMUNICATE_USING_SSL.toLocalizedString();
} else if (prop.equals(SSL_PROTOCOLS_NAME)) {
return LocalizedStrings.AgentConfigImpl_SSL_PROTOCOLS_USED_TO_COMMUNICATE_WITH_DISTRIBUTED_SYSTEM.toLocalizedString();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
index 2667ec7..9e80cf3 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.admin.jmx.internal;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.admin.jmx.Agent;
import com.gemstone.gemfire.cache.InterestPolicy;
@@ -658,10 +660,10 @@ public class MemberInfoWithStatsMBean extends AbstractDynamicMBean
//assuming will never return as per current implementation
ConfigurationParameter[] configParams = member.getConfiguration();
for (ConfigurationParameter configParam : configParams) {
- if (DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME.equals(configParam.getName())) {
+ if (STATISTIC_SAMPLING_ENABLED.equals(configParam.getName())) {
allDetails.put(MEMBER_STATSAMPLING_ENABLED, configParam.getValue());
statSamplingEnabled = Boolean.parseBoolean(""+configParam.getValue());
- } else if (DistributionConfig.ENABLE_TIME_STATISTICS_NAME.equals(configParam.getName())) {
+ } else if (ENABLE_TIME_STATISTICS.equals(configParam.getName())) {
allDetails.put(MEMBER_TIME_STATS_ENABLED, configParam.getValue());
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
index b85e17a..94c8ecf 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
@@ -45,6 +45,8 @@ import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Authenticates this client (or a user) on a server. This op ideally should get
* executed once-per-server.
@@ -111,8 +113,7 @@ public class AuthenticateUserOp {
DistributedMember server = new InternalDistributedMember(con.getSocket()
.getInetAddress(), con.getSocket().getPort(), false);
DistributedSystem sys = InternalDistributedSystem.getConnectedInstance();
- String authInitMethod = sys.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME);
+ String authInitMethod = sys.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT);
Properties tmpSecurityProperties = sys.getSecurityProperties();
// LOG: following passes the DS API LogWriters into the security API
@@ -158,8 +159,7 @@ public class AuthenticateUserOp {
.getSocket().getInetAddress(), cnx.getSocket().getPort(), false);
DistributedSystem sys = InternalDistributedSystem
.getConnectedInstance();
- String authInitMethod = sys.getProperties().getProperty(
- DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME);
+ String authInitMethod = sys.getProperties().getProperty(SECURITY_CLIENT_AUTH_INIT);
Properties credentials = HandShake.getCredentials(authInitMethod,
this.securityProperties, server, false, (InternalLogWriter)sys.getLogWriter(), (InternalLogWriter)sys
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
index 96ea8ea..80f1b82 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
@@ -43,6 +43,8 @@ import java.net.URL;
import java.util.*;
import java.util.concurrent.TimeUnit;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* A "connection" to a GemFire distributed system. A
* <code>DistributedSystem</code> is created by invoking the {@link
@@ -1742,7 +1744,7 @@ public abstract class DistributedSystem implements StatisticsFactory {
// String prop=(String)en.nextElement();
// logger.info(prop + "=" + props.getProperty(prop));
//}
- props.setProperty(DistributionConfig.CONSERVE_SOCKETS_NAME, "true");
+ props.setProperty(CONSERVE_SOCKETS, "true");
// LOG: no longer using the LogWriter that was passed in
return connect(props);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
index 52e9c34..1e350e7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/LocatorLauncher.java
@@ -17,6 +17,8 @@
package com.gemstone.gemfire.distributed;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.client.internal.locator.LocatorStatusResponse;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
@@ -1089,7 +1091,7 @@ public final class LocatorLauncher extends AbstractLauncher<String> {
private Properties getOverriddenDefaults() {
Properties overriddenDefaults = new Properties();
- overriddenDefaults.put(ProcessLauncherContext.OVERRIDDEN_DEFAULTS_PREFIX.concat(DistributionConfig.LOG_FILE_NAME),
+ overriddenDefaults.put(ProcessLauncherContext.OVERRIDDEN_DEFAULTS_PREFIX.concat(LOG_FILE),
getLogFileName());
for (String key : System.getProperties().stringPropertyNames()) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
index 252f701..fe441fd 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/ServerLauncher.java
@@ -17,6 +17,8 @@
package com.gemstone.gemfire.distributed;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.partition.PartitionRegionHelper;
@@ -1258,7 +1260,7 @@ public class ServerLauncher extends AbstractLauncher<String> {
final Properties overriddenDefaults = new Properties();
overriddenDefaults.put(
- ProcessLauncherContext.OVERRIDDEN_DEFAULTS_PREFIX.concat(DistributionConfig.LOG_FILE_NAME),
+ ProcessLauncherContext.OVERRIDDEN_DEFAULTS_PREFIX.concat(LOG_FILE),
getLogFileName());
for (String key : System.getProperties().stringPropertyNames()) {
[44/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
index f358be0..594e0f7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopDUnitTest.java
@@ -32,7 +32,6 @@ import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.BucketAdvisor.ServerBucketProfile;
@@ -55,8 +54,7 @@ import java.util.Map.Entry;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
@@ -134,7 +132,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
File logFile = new File("locator-" + locatorPort + ".log");
Properties props = new Properties();
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
locator = Locator.startLocatorAndDS(locatorPort, logFile, null, props);
@@ -160,8 +158,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
cache = CacheFactory.create(ds);
CacheServer server = cache.addCacheServer();
- int port = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
- server.setPort(port);
+ server.setPort(0);
server.setHostnameForClients("localhost");
try {
server.start();
@@ -223,7 +220,7 @@ public class PartitionedRegionSingleHopDUnitTest extends CacheTestCase {
LogWriterUtils.getLogWriter().info(
"Partitioned Region SHIPMENT created Successfully :"
+ shipmentRegion.toString());
- return port;
+ return server.getPort();
}
public static void clearMetadata() {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
index d2b319b..822100b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PartitionedRegionSingleHopWithServerGroupDUnitTest.java
@@ -43,8 +43,7 @@ import java.util.Map.Entry;
import java.util.Properties;
import java.util.StringTokenizer;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -1012,7 +1011,7 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "");
+ props.setProperty(LOG_FILE, "");
CacheTestCase test = new PartitionedRegionSingleHopWithServerGroupDUnitTest(
"PartitionedRegionSingleHopWithServerGroupDUnitTest");
DistributedSystem ds = test.getSystem(props);
@@ -1622,8 +1621,8 @@ public class PartitionedRegionSingleHopWithServerGroupDUnitTest extends CacheTes
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
+ props.setProperty(LOG_FILE, "");
try {
locator = Locator.startLocatorAndDS(locatorPort, null, null, props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
index a7f24b6..9ad571a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/PersistentPartitionedRegionJUnitTest.java
@@ -17,7 +17,6 @@
package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.FileUtil;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
@@ -28,7 +27,7 @@ import org.junit.experimental.categories.Category;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
@@ -196,7 +195,7 @@ public class PersistentPartitionedRegionJUnitTest {
private Region createRegion(int ttl) {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(LOG_LEVEL, "info");
// props.setProperty("log-file", "junit.log");
cache = new CacheFactory(props).create();
cache.createDiskStoreFactory()
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
index 0f78749..d7a57b4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RemoteTransactionDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.TXExpiryJUnitTest;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.Region.Entry;
@@ -32,7 +34,6 @@ import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.CacheWriterAdapter;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
@@ -3410,7 +3411,7 @@ public class RemoteTransactionDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
@@ -3622,7 +3623,7 @@ protected static class ClientListener extends CacheListenerAdapter {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(true);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
index 988721b..ee57682 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/RunCacheInOldGemfire.java
@@ -19,9 +19,10 @@
*/
package com.gemstone.gemfire.internal.cache;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.admin.remote.ShutdownAllRequest;
@@ -48,7 +49,7 @@ public class RunCacheInOldGemfire {
Properties config = new Properties();
config.setProperty(MCAST_PORT, mcastPort);
config.setProperty(LOCATORS, "");
- config.setProperty(DistributionConfig.LOG_FILE_NAME, "oldgemfire.log");
+ config.setProperty(LOG_FILE, "oldgemfire.log");
InternalDistributedSystem localsystem = (InternalDistributedSystem)DistributedSystem.connect(config);
Cache cache = CacheFactory.create(localsystem);
return cache;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
index 91b0153..e6080d8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TombstoneCreationJUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
@@ -33,8 +32,7 @@ import org.junit.rules.TestName;
import java.net.InetAddress;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(IntegrationTest.class)
public class TombstoneCreationJUnitTest {
@@ -55,7 +53,7 @@ public class TombstoneCreationJUnitTest {
Properties props = new Properties();
props.put(LOCATORS, "");
props.put(MCAST_PORT, "0");
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_LEVEL, "config");
GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(props));
RegionFactory f = cache.createRegionFactory(RegionShortcut.REPLICATE);
DistributedRegion region = (DistributedRegion)f.create(name);
@@ -92,7 +90,7 @@ public class TombstoneCreationJUnitTest {
Properties props = new Properties();
props.put(LOCATORS, "");
props.put(MCAST_PORT, "0");
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_LEVEL, "config");
final GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(props));
RegionFactory f = cache.createRegionFactory(RegionShortcut.REPLICATE);
final DistributedRegion region = (DistributedRegion)f.create(name);
@@ -167,7 +165,7 @@ public class TombstoneCreationJUnitTest {
Properties props = new Properties();
props.put(LOCATORS, "");
props.put(MCAST_PORT, "0");
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_LEVEL, "config");
final GemFireCacheImpl cache = (GemFireCacheImpl)CacheFactory.create(DistributedSystem.connect(props));
RegionFactory f = cache.createRegionFactory(RegionShortcut.REPLICATE);
final DistributedRegion region = (DistributedRegion)f.create(name);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
index 90ac6b8..379bdae 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/TransactionsWithDeltaDUnitTest.java
@@ -28,7 +28,6 @@ import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.execute.CustomerIDPartitionResolver;
import com.gemstone.gemfire.internal.cache.execute.data.CustId;
@@ -45,6 +44,8 @@ import java.io.IOException;
import java.io.Serializable;
import java.util.Iterator;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*
*/
@@ -105,7 +106,7 @@ public class TransactionsWithDeltaDUnitTest extends CacheTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolServer("localhost"/*getServerHostName(Host.getHost(0))*/, port);
ccf.setPoolSubscriptionEnabled(false);
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache cCache = getClientCache(ccf);
ClientRegionFactory<Integer, String> crf = cCache
.createClientRegionFactory(isEmpty ? ClientRegionShortcut.PROXY
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
index c4392ee..2bf9b51 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/diskPerf/MultiThreadedOplogPerJUnitPerformanceTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.cache.diskPerf;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.DiskStoreFactoryImpl;
import com.gemstone.gemfire.test.dunit.ThreadUtils;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -30,8 +29,7 @@ import org.junit.rules.TestName;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(IntegrationTest.class)
public class MultiThreadedOplogPerJUnitPerformanceTest
@@ -101,7 +99,7 @@ public class MultiThreadedOplogPerJUnitPerformanceTest
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(LOG_LEVEL, "info");
DistributedSystem ds = DistributedSystem.connect(props);
Cache cache = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
index fc1cd6f..991bf5d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/DistributedRegionFunctionExecutionDUnitTest.java
@@ -42,8 +42,7 @@ import java.io.IOException;
import java.io.Serializable;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class DistributedRegionFunctionExecutionDUnitTest extends DistributedTestCase {
@@ -906,8 +905,8 @@ public class DistributedRegionFunctionExecutionDUnitTest extends DistributedTest
Properties props = new Properties();
props.put(MCAST_PORT, "0");
props.put(LOCATORS, "");
- props.put(SystemConfigurationProperties.NAME, "SecurityClient");
- props.put(DistributionConfig.SECURITY_CLIENT_AUTH_INIT_NAME, UserPasswordAuthInit.class.getName() + ".create");
+ props.put(NAME, "SecurityClient");
+ props.put(SECURITY_CLIENT_AUTH_INIT, UserPasswordAuthInit.class.getName() + ".create");
props.put("security-username", "reader1");
props.put("security-password", "reader1");
new DistributedRegionFunctionExecutionDUnitTest("temp").createCache(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
index 4ad95fc..ea6b8f9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/OnGroupsFunctionExecutionDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.execute;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.CacheFactory;
@@ -670,7 +672,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
c.getLogger().info("SWAP:invoking function from client on g0");
@@ -768,7 +770,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
c.getLogger().info("SWAP:invoking function from client on g0");
@@ -845,7 +847,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
IgnoredException ex = IgnoredException.addIgnoredException("No member found");
@@ -925,7 +927,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
IgnoredException expected = IgnoredException.addIgnoredException("No member found");
@@ -1002,7 +1004,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1051,7 +1053,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1100,7 +1102,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
Execution e = InternalFunctionService.onServers(c, "g1");
@@ -1167,7 +1169,7 @@ public class OnGroupsFunctionExecutionDUnitTest extends DistributedTestCase {
ClientCacheFactory ccf = new ClientCacheFactory();
ccf.addPoolLocator(hostName, locatorPort);
ccf.setPoolServerGroup("mg");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
ClientCache c = ccf.create();
c.getLogger().info("SWAP:invoking function from client on g0");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
index cf22c97..bca0473 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/execute/PRClientServerRegionFunctionExecutionFailoverDUnitTest.java
@@ -27,7 +27,6 @@ import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.Locator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
@@ -41,8 +40,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
PRClientServerTestBase {
@@ -369,7 +367,7 @@ public class PRClientServerRegionFunctionExecutionFailoverDUnitTest extends
Properties props = new Properties();
props = DistributedTestUtils.getAllDistributedSystemProperties(props);
- props.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ props.setProperty(ENABLE_CLUSTER_CONFIGURATION, "false");
try {
locator = Locator.startLocatorAndDS(locatorPort, logFile, null, props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
index 1c17476..366bc72 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48571DUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
@@ -131,11 +133,11 @@ public class Bug48571DUnitTest extends DistributedTestCase {
public static int createServerCache() throws Exception {
Properties props = new Properties();
props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "server_" + OSProcess.getId() + ".log");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "server_" + OSProcess.getId()
+ props.setProperty(LOG_FILE, "server_" + OSProcess.getId() + ".log");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "server_" + OSProcess.getId()
+ ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
CacheFactory cf = new CacheFactory(props);
DistributedSystem ds = new Bug48571DUnitTest("Bug48571DUnitTest").getSystem(props);
@@ -162,14 +164,14 @@ public class Bug48571DUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, "durable-48571");
- props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
+ props.setProperty(DURABLE_CLIENT_ID, "durable-48571");
+ props.setProperty(DURABLE_CLIENT_TIMEOUT, "300000");
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "client_" + OSProcess.getId() + ".log");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId()
+ props.setProperty(LOG_FILE, "client_" + OSProcess.getId() + ".log");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "client_" + OSProcess.getId()
+ ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
ClientCacheFactory ccf = new ClientCacheFactory(props);
ccf.setPoolSubscriptionEnabled(true);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
index ca27715..c2dc270 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/Bug48879DUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionFactory;
@@ -107,9 +109,9 @@ public class Bug48879DUnitTest extends DistributedTestCase {
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId()
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "client_" + OSProcess.getId()
+ ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
DistributedSystem ds = new Bug48879DUnitTest("Bug48879DUnitTest").getSystem(props);
ds.disconnect();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
index b2dbc0b..390aa44 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueueJUnitTest.java
@@ -16,12 +16,13 @@
*/
package com.gemstone.gemfire.internal.cache.ha;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.SystemFailure;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.Conflatable;
import com.gemstone.gemfire.internal.cache.EventID;
import com.gemstone.gemfire.internal.cache.RegionQueue;
@@ -1964,7 +1965,7 @@ public class HARegionQueueJUnitTest
cache.close();
ds.disconnect();
Properties props = new Properties();
- props.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ props.put(LOG_LEVEL, "config");
//props.put("mcast-port","11111");
try {
cache= CacheFactory.create(DistributedSystem.connect(props));
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
index 806ff2b..e315db5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
@@ -28,6 +28,8 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.*;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This class tests distributed ownership via the DistributedLockService api.
*/
@@ -650,7 +652,7 @@ public class TXLockServiceDUnitTest extends DistributedTestCase {
public Properties getDistributedSystemProperties() {
Properties props = super.getDistributedSystemProperties();
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
index 5617ca2..b8eeccd 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug43684DUnitTest.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
@@ -34,7 +33,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* TODO This doesn't really test the optimised RI behaviour but only that RI
@@ -234,10 +233,10 @@ public class Bug43684DUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
// props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "server_" + OSProcess.getId()
+ // props.setProperty(LOG_LEVEL, "fine");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "server_" + OSProcess.getId()
+ ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
CacheFactory cf = new CacheFactory(props);
cache = (GemFireCacheImpl)cf.create();
@@ -262,10 +261,10 @@ public class Bug43684DUnitTest extends DistributedTestCase {
DistributedTestCase.disconnectFromDS();
Properties props = new Properties();
// props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, "client_" + OSProcess.getId()
+ // props.setProperty(LOG_LEVEL, "fine");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, "client_" + OSProcess.getId()
+ ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
ClientCacheFactory ccf = new ClientCacheFactory(props);
ccf.addPoolServer(host.getHostName(), port).setPoolSubscriptionEnabled(true);
cache = (GemFireCacheImpl)ccf.create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
index 9723b53..c20bbc1 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug47388DUnitTest.java
@@ -26,7 +26,6 @@ import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.ha.HARegionQueueStats;
@@ -36,6 +35,8 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* The test creates two datastores with a partitioned region, and also running a
* cache server each. A publisher client is connected to one server while a
@@ -138,9 +139,9 @@ public class Bug47388DUnitTest extends DistributedTestCase {
throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
+ props.setProperty(DURABLE_CLIENT_ID,
"my-durable-client-" + ports.length);
- props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
+ props.setProperty(DURABLE_CLIENT_TIMEOUT, "300000");
DistributedSystem ds = new Bug47388DUnitTest("Bug47388DUnitTest").getSystem(props);
ds.disconnect();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
index 2df292d..bd8a71d 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/partitioned/Bug51400DUnitTest.java
@@ -92,7 +92,7 @@ public class Bug51400DUnitTest extends DistributedTestCase {
Properties props = new Properties();
props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
// props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ // props.setProperty(LOG_LEVEL, "fine");
// props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
// + ".gfs");
// props.setProperty("statistic-sampling-enabled", "true");
@@ -124,7 +124,7 @@ public class Bug51400DUnitTest extends DistributedTestCase {
// "my-durable-client-" + ports.length);
// props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
// props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ // props.setProperty(LOG_LEVEL, "fine");
// props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
// + ".gfs");
// props.setProperty("statistic-sampling-enabled", "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
index 0978878..57f63e4 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java
@@ -53,6 +53,7 @@ import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import static com.gemstone.gemfire.internal.lang.ThrowableUtils.getRootCause;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This is a test of how persistent distributed
@@ -1760,7 +1761,7 @@ public class PersistentRecoveryOrderDUnitTest extends PersistentReplicatedTestBa
System.getProperties().remove(DistributionConfig.GEMFIRE_PREFIX + "ack-wait-threshold");
}
Properties props = super.getDistributedSystemProperties();
- props.put(DistributionConfig.ACK_WAIT_THRESHOLD_NAME, "5");
+ props.put(ACK_WAIT_THRESHOLD, "5");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
index 91b661e..f702d85 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug36829DUnitTest.java
@@ -24,14 +24,12 @@ import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.ServerOperationException;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class Bug36829DUnitTest extends DistributedTestCase {
private VM serverVM;
@@ -156,9 +154,9 @@ public class Bug36829DUnitTest extends DistributedTestCase {
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
+ properties.setProperty(DURABLE_CLIENT_ID,
durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT,
String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
index f84c3ed..32c27fe 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/Bug37805DUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.HARegion;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -34,8 +33,7 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -133,9 +131,9 @@ public class Bug37805DUnitTest extends DistributedTestCase{
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
+ properties.setProperty(DURABLE_CLIENT_ID,
durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT,
String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
index fc40aed..329bb0f 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/CacheServerTestUtil.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.cache.tier.sockets;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
@@ -202,17 +204,17 @@ public class CacheServerTestUtil extends DistributedTestCase
ClientCacheFactory ccf = new ClientCacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
+ ccf.set(CACHE_XML_FILE, cacheXmlFile.toURI().getPath());
}
catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
}
ccf.set(MCAST_PORT, "0");
- ccf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- ccf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(timeout));
- ccf.set(DistributionConfig.LOG_FILE_NAME, "abs_client_system.log");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(DURABLE_CLIENT_ID, durableClientId);
+ ccf.set(DURABLE_CLIENT_TIMEOUT, String.valueOf(timeout));
+ ccf.set(LOG_FILE, "abs_client_system.log");
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
cache = (Cache)ccf.create();
expected = IgnoredException.addIgnoredException("java.net.ConnectionException||java.net.SocketException");
pool = (PoolImpl)PoolManager.find(poolName);
@@ -223,15 +225,15 @@ public class CacheServerTestUtil extends DistributedTestCase
ClientCacheFactory ccf = new ClientCacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
+ ccf.set(CACHE_XML_FILE, cacheXmlFile.toURI().getPath());
}
catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
}
ccf.set(MCAST_PORT, "0");
- ccf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- ccf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(timeout));
+ ccf.set(DURABLE_CLIENT_ID, durableClientId);
+ ccf.set(DURABLE_CLIENT_TIMEOUT, String.valueOf(timeout));
cache = (Cache)ccf.create();
expected = IgnoredException.addIgnoredException("java.net.ConnectionException||java.net.SocketException");
pool = (PoolImpl)PoolManager.find(poolName);
@@ -242,11 +244,11 @@ public class CacheServerTestUtil extends DistributedTestCase
CacheFactory ccf = new CacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
+ ccf.set(CACHE_XML_FILE, cacheXmlFile.toURI().getPath());
ccf.set(MCAST_PORT, "0");
ccf.set(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
- ccf.set(DistributionConfig.LOG_FILE_NAME, "abs_server_system.log");
- ccf.set(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ ccf.set(LOG_FILE, "abs_server_system.log");
+ ccf.set(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
}
catch (URISyntaxException e) {
throw new ExceptionInInitializerError(e);
@@ -259,7 +261,7 @@ public class CacheServerTestUtil extends DistributedTestCase
CacheFactory ccf = new CacheFactory();
try {
File cacheXmlFile = new File(url.toURI().getPath());
- ccf.set(DistributionConfig.CACHE_XML_FILE_NAME, cacheXmlFile.toURI().getPath());
+ ccf.set(CACHE_XML_FILE, cacheXmlFile.toURI().getPath());
ccf.set(MCAST_PORT, "0");
ccf.set(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
index 8f185f5..e58627a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientConflationDUnitTest.java
@@ -34,8 +34,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Iterator;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This test verifies the per-client queue conflation override functionality
@@ -144,7 +143,7 @@ public class ClientConflationDUnitTest extends DistributedTestCase
props.setProperty(DistributionConfig.DELTA_PROPAGATION_PROP_NAME, "false");
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.CLIENT_CONFLATION_PROP_NAME, conflation);
+ props.setProperty(CONFLATE_EVENTS, conflation);
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
index 77f71fb..7af3004 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientBug39997DUnitTest.java
@@ -21,15 +21,13 @@ import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.cache30.CacheTestCase;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.dunit.*;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class DurableClientBug39997DUnitTest extends CacheTestCase {
@@ -118,7 +116,7 @@ public class DurableClientBug39997DUnitTest extends CacheTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, "my_id");
+ props.setProperty(DURABLE_CLIENT_ID, "my_id");
return props;
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
index 9e0ec93..3705336 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientQueueSizeDUnitTest.java
@@ -32,7 +32,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Iterator;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -253,7 +253,7 @@ public class DurableClientQueueSizeDUnitTest extends DistributedTestCase {
throws Exception {
Properties props = new Properties();
props.setProperty(LOCATORS, "localhost[" + DistributedTestUtils.getDUnitLocatorPort() + "]");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ // props.setProperty(LOG_LEVEL, "fine");
// props.setProperty("log-file", "server_" + OSProcess.getId() + ".log");
// props.setProperty("statistic-archive-file", "server_" + OSProcess.getId()
// + ".gfs");
@@ -305,13 +305,13 @@ public class DurableClientQueueSizeDUnitTest extends DistributedTestCase {
}
Properties props = new Properties();
if (durable) {
- props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
+ props.setProperty(DURABLE_CLIENT_ID,
"my-durable-client");
- props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
+ props.setProperty(DURABLE_CLIENT_TIMEOUT,
timeoutSeconds);
}
// props.setProperty("log-file", "client_" + OSProcess.getId() + ".log");
- // props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ // props.setProperty(LOG_LEVEL, "fine");
// props.setProperty("statistic-archive-file", "client_" + OSProcess.getId()
// + ".gfs");
// props.setProperty("statistic-sampling-enabled", "true");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
index 5f958d7..8568a57 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientReconnectDUnitTest.java
@@ -32,8 +32,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.net.SocketException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
@@ -705,8 +704,8 @@ public class DurableClientReconnectDUnitTest extends DistributedTestCase
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, String.valueOf(durableClientTimeout));
+ properties.setProperty(DURABLE_CLIENT_ID, durableClientId);
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT, String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
index 238bbc0..dc04cc5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableClientStatsDUnitTest.java
@@ -24,7 +24,6 @@ import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolFactory;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.CacheServerImpl;
import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
import com.gemstone.gemfire.test.dunit.*;
@@ -33,8 +32,7 @@ import java.util.ArrayList;
import java.util.Properties;
import java.util.concurrent.RejectedExecutionException;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -361,9 +359,9 @@ public class DurableClientStatsDUnitTest extends DistributedTestCase {
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
+ properties.setProperty(DURABLE_CLIENT_ID,
durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT,
String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
index aeaaeec..bc55b8e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableRegistrationDUnitTest.java
@@ -34,8 +34,7 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.Set;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -714,9 +713,9 @@ public class DurableRegistrationDUnitTest extends DistributedTestCase {
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
+ properties.setProperty(DURABLE_CLIENT_ID,
durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT,
String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
index ebc4dca..887e374 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/DurableResponseMatrixDUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.cache.client.internal.PoolImpl;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePort;
import com.gemstone.gemfire.internal.cache.ClientServerObserverAdapter;
import com.gemstone.gemfire.internal.cache.ClientServerObserverHolder;
@@ -30,8 +29,7 @@ import com.gemstone.gemfire.test.dunit.*;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -468,9 +466,9 @@ public class DurableResponseMatrixDUnitTest extends DistributedTestCase
Properties properties = new Properties();
properties.setProperty(MCAST_PORT, "0");
properties.setProperty(LOCATORS, "");
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME,
+ properties.setProperty(DURABLE_CLIENT_ID,
durableClientId);
- properties.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME,
+ properties.setProperty(DURABLE_CLIENT_TIMEOUT,
String.valueOf(durableClientTimeout));
return properties;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
index c0d132d..7f70ed9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/InterestRegrListenerDUnitTest.java
@@ -23,7 +23,6 @@ import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.test.dunit.*;
@@ -33,6 +32,8 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Written to test fix for Bug #47132
*
@@ -168,8 +169,8 @@ public class InterestRegrListenerDUnitTest extends DistributedTestCase {
public void setUpClientVM(String host, int port, boolean isDurable, String vmID) {
Properties gemFireProps = new Properties();
if (isDurable) {
- gemFireProps.put(DistributionConfig.DURABLE_CLIENT_ID_NAME, vmID);
- gemFireProps.put(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + DURABLE_CLIENT_TIMEOUT);
+ gemFireProps.put(DURABLE_CLIENT_ID, vmID);
+ gemFireProps.put(DURABLE_CLIENT_TIMEOUT, "" + DURABLE_CLIENT_TIMEOUT);
}
ClientCacheFactory clientCacheFactory = new ClientCacheFactory(gemFireProps);
clientCacheFactory.addPoolServer(host, port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
index f61cc2c..72850e2 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/cache/tier/sockets/RedundancyLevelJUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.PoolManager;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
@@ -31,8 +30,7 @@ import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
@@ -95,7 +93,7 @@ public class RedundancyLevelJUnitTest
Properties p = new Properties();
p.setProperty(MCAST_PORT, "0");
p.setProperty(LOCATORS, "");
- p.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ p.setProperty(CACHE_XML_FILE, path);
final String addExpected =
"<ExpectedException action=add>" + expected + "</ExpectedException>";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
index 11be69d..b0fd781 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/compression/CompressionCacheConfigDUnitTest.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.compression.Compressor;
import com.gemstone.gemfire.compression.SnappyCompressor;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.dunit.*;
@@ -29,6 +28,8 @@ import java.io.IOException;
import java.io.PrintStream;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests configured and badly configured cache.xml files with regards to compression.
*
@@ -123,7 +124,7 @@ public class CompressionCacheConfigDUnitTest extends CacheTestCase {
try {
disconnectFromDS();
Properties props = new Properties();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, cacheXml);
+ props.setProperty(CACHE_XML_FILE, cacheXml);
LogWriterUtils.getLogWriter().info("<ExpectedException action=add>ClassNotFoundException</ExpectedException>");
getSystem(props);
assertNotNull(getCache());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
index 582c5e3..d1a9fe5 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCacheJUnitTest.java
@@ -22,6 +22,8 @@
*/
package com.gemstone.gemfire.internal.datasource;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
@@ -57,11 +59,11 @@ public class AbstractPoolCacheJUnitTest {
@Before
public void setUp() throws Exception {
props = new Properties();
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(LOG_LEVEL, "info");
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
String path = TestUtil.getResourcePath(AbstractPoolCacheJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
index ece05b3..0f420ed 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/CleanUpJUnitTest.java
@@ -22,7 +22,6 @@ package com.gemstone.gemfire.internal.datasource;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
@@ -34,7 +33,7 @@ import javax.naming.Context;
import java.sql.Connection;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.fail;
//import javax.sql.PooledConnection;
@@ -56,7 +55,7 @@ public class CleanUpJUnitTest {
props = new Properties();
props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(CleanUpJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
index b961d8d..e7d2541 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolCacheImplJUnitTest.java
@@ -24,7 +24,6 @@ package com.gemstone.gemfire.internal.datasource;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
@@ -39,7 +38,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.fail;
/*
@@ -65,7 +64,7 @@ public class ConnectionPoolCacheImplJUnitTest {
props = new Properties();
props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(ConnectionPoolCacheImplJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
index d2a377a..2719b0b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/ConnectionPoolingJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.datasource;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
@@ -41,7 +40,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.fail;
@@ -69,7 +68,7 @@ public class ConnectionPoolingJUnitTest {
props = new Properties();
props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(ConnectionPoolingJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
index 9384d43..6cbde69 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/DataSourceFactoryJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.datasource;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
import org.junit.After;
@@ -31,7 +30,7 @@ import javax.naming.Context;
import java.sql.Connection;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.fail;
/*
@@ -49,7 +48,7 @@ public class DataSourceFactoryJUnitTest {
props = new Properties();
props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(DataSourceFactoryJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
index 7d5aba3..bdbfa29 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/datasource/RestartJUnitTest.java
@@ -22,7 +22,6 @@ package com.gemstone.gemfire.internal.datasource;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.jndi.JNDIInvoker;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
@@ -32,7 +31,7 @@ import org.junit.experimental.categories.Category;
import javax.transaction.TransactionManager;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.fail;
@@ -60,7 +59,7 @@ public class RestartJUnitTest {
props = new Properties();
props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(RestartJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
index 4ee947b..df10833 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/BlockingTimeOutJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -40,8 +39,7 @@ import java.sql.Statement;
import java.util.Properties;
import java.util.Random;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertNotNull;
@Category(IntegrationTest.class)
@@ -143,7 +141,7 @@ public class BlockingTimeOutJUnitTest {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
String tableName = "";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
index 121b9aa..c2bd884 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/CacheUtils.java
@@ -28,7 +28,6 @@ import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.query.QueryService;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.util.test.TestUtil;
import javax.naming.Context;
@@ -40,11 +39,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
-
-//import com.gemstone.gemfire.cache.AttributesFactory;
-//import com.gemstone.gemfire.cache.Region;
-//import com.gemstone.gemfire.cache.RegionAttributes;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
*
@@ -65,7 +60,7 @@ public class CacheUtils {
public static String init(String className) throws Exception{
Properties props = new Properties();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml"));
+ props.setProperty(CACHE_XML_FILE, TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml"));
String tableName = "";
props.setProperty(MCAST_PORT, "0");
[66/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
GEODE-1377: Initial move of system properties from private to public
Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/690ca40b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/690ca40b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/690ca40b
Branch: refs/heads/develop
Commit: 690ca40b9c6dfa41affb31d12c66449c963682f1
Parents: f84b1c0
Author: Udo Kohlmeyer <uk...@pivotal.io>
Authored: Wed Jun 1 17:34:07 2016 +1000
Committer: Udo Kohlmeyer <uk...@pivotal.io>
Committed: Thu Jun 2 10:01:42 2016 +1000
----------------------------------------------------------------------
.../cache/client/ClientCacheFactory.java | 465 ++++++++++---------
.../gemfire/cache/client/internal/PoolImpl.java | 2 +-
.../SystemConfigurationProperties.java | 3 -
.../internal/DistributionConfig.java | 4 +-
.../CacheServerSSLConnectionDUnitTest.java | 31 +-
5 files changed, 252 insertions(+), 253 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/690ca40b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
index 3cbfff8..738361d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
@@ -34,109 +34,112 @@ import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOC
import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
-Factory class used to create the singleton {@link ClientCache client cache} and connect to one or more GemFire Cache Servers. If the application wants to connect to GemFire as a peer it should use {@link com.gemstone.gemfire.cache.CacheFactory} instead.
-<p> Once the factory has been configured using its set* methods you produce a {@link ClientCache} by calling the {@link #create} method.
-The
-<a href="../distribution/DistributedSystem.html#cache-xml-file">"cache-xml-file"</a>
-property can be used to specify a cache.xml file to initialize the cache with.
-The contents of this file must comply with the
- <code>"doc-files/cache8_0.dtd"</code> file and the top level element must be a <code>client-cache</code> element.
-<p> Client connections are managed through connection {@link Pool pools}. ClientCacheFactory creates a single pool to use by default on the cache it creates. ClientCacheFactory can also be used to configure the default connection pool using its <code>setPool*</code> and <code>addPool*</code> methods. In most cases, the defaults used by this implementation will suffice. For the default pool attributes see {@link PoolFactory}.
-If no pool is configured and a pool was not declared in cache.xml or created using {@link PoolManager} then a default one will be created that connects to a server on the default cache server port and local host. If multiple pools are declared in cache.xml or created by the PoolFactory then no default pool will exist and <code>ClientRegionFactory.setPoolName</code> will need to be called on each region created.
-<p>
-To get the existing unclosed singleton client cache instance call {@link #getAnyInstance}.
-<p>
-The following examples illustrate bootstrapping the client cache using region shortcuts:
-<p>
-Example 1: Connect to a CacheServer on the default host and port and access a region "customers"
-<PRE>
- ClientCache c = new ClientCacheFactory().create();
- Region r = c.createClientRegionFactory(PROXY).create("customers");
- // The PROXY shortcut tells GemFire to route all requests to the servers
- //. i.e. there is no local caching
-</PRE>
-Example 2: Connect using the GemFire locator and create a local LRU cache
-<PRE>
- ClientCache c = new ClientCacheFactory()
- .addPoolLocator(host, port)
- .create();
- Region r = c.createClientRegionFactory(CACHING_PROXY_HEAP_LRU)
- .create("customers");
- // The local LRU "customers" data region will automatically start evicting, by default, at 80% heap utilization threshold
-</PRE>
-Example 3: Access the query service
-<PRE>
- QueryService qs = new ClientCacheFactory().create().getQueryService();
-</PRE>
-Example 4: Construct the client cache region declaratively in cache.xml
-<PRE>
- <!DOCTYPE client-cache PUBLIC
- "-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN"
- "http://www.gemstone.com/dtd/cache8_0.dtd">
- <client-cache>
- <pool name="myPool">
- <locator host="hostName" port="10334"/>
- </pool>
- <region name="myRegion" refid="PROXY"/>
- <!-- you can override or add to the PROXY attributes by adding
- a region-attributes sub element here -->
- </client-cache>
-</PRE>
-Now, create the cache telling it to read your cache.xml file:
-<PRE>
- ClientCache c = new ClientCacheFactory()
- .set("cache-xml-file", "myCache.xml")
- .create();
- Region r = c.getRegion("myRegion");
-</PRE>
-
-<p> For a complete list of all client region shortcuts see {@link ClientRegionShortcut}.
-Applications that need to explicitly control the individual region attributes can do this declaratively in XML or using API.
-<p>
-Example 5: Define custom region attributes for persistence in XML and create region using API.
- Define new region attributes with ID "MYAPP_CACHING_PROXY_MEM_LRU" that overrides the
- "CACHING_PROXY" shortcut
-<PRE>
- <!DOCTYPE client-cache PUBLIC
- "-//GemStone Systems, Inc.//GemFire Declarative Caching 8.0//EN"
- "http://www.gemstone.com/dtd/cache8_0.dtd">
- <client-cache>
- <!-- now create a named region attributes that uses the CACHING_PROXY shortcut
- and adds a memory LRU limited to 900 megabytes -->
- <region-attributes id="MYAPP_CACHING_PROXY_MEM_LRU" refid="CACHING_PROXY" >
- <lru-memory-size maximum="900"/>
- </region-attributes>
- </client-cache>
-</PRE>
-Now, create the data region in the client cache using this new attributes ID.
-<PRE>
- ClientCache c = new ClientCacheFactory()
- .set("cache-xml-file", "myCache.xml")
- .addPoolLocator(host, port)
- .create();
- Region r = c.createClientRegionFactory("MYAPP_CACHING_PROXY_MEM_LRU").create("customers");
-</PRE>
- * @since GemFire 6.5
+ * Factory class used to create the singleton {@link ClientCache client cache} and connect to one or more GemFire Cache Servers. If the application wants to connect to GemFire as a peer it should use {@link com.gemstone.gemfire.cache.CacheFactory} instead.
+ * <p> Once the factory has been configured using its set* methods you produce a {@link ClientCache} by calling the {@link #create} method.
+ * The
+ * <a href="../distribution/DistributedSystem.html#cache-xml-file">"cache-xml-file"</a>
+ * property can be used to specify a cache.xml file to initialize the cache with.
+ * The contents of this file must comply with the
+ * <code>"doc-files/cache8_0.dtd"</code> file and the top level element must be a <code>client-cache</code> element.
+ * <p> Client connections are managed through connection {@link Pool pools}. ClientCacheFactory creates a single pool to use by default on the cache it creates. ClientCacheFactory can also be used to configure the default connection pool using its <code>setPool*</code> and <code>addPool*</code> methods. In most cases, the defaults used by this implementation will suffice. For the default pool attributes see {@link PoolFactory}.
+ * If no pool is configured and a pool was not declared in cache.xml or created using {@link PoolManager} then a default one will be created that connects to a server on the default cache server port and local host. If multiple pools are declared in cache.xml or created by the PoolFactory then no default pool will exist and <code>ClientRegionFactory.setPoolName</code> will need to be called on each region created.
+ * <p>
+ * To get the existing unclosed singleton client cache instance call {@link #getAnyInstance}.
+ * <p>
+ * The following examples illustrate bootstrapping the client cache using region shortcuts:
+ * <p>
+ * Example 1: Connect to a CacheServer on the default host and port and access a region "customers"
+ * <PRE>
+ * ClientCache c = new ClientCacheFactory().create();
+ * Region r = c.createClientRegionFactory(PROXY).create("customers");
+ * // The PROXY shortcut tells GemFire to route all requests to the servers
+ * //. i.e. there is no local caching
+ * </PRE>
+ * Example 2: Connect using the GemFire locator and create a local LRU cache
+ * <PRE>
+ * ClientCache c = new ClientCacheFactory()
+ * .addPoolLocator(host, port)
+ * .create();
+ * Region r = c.createClientRegionFactory(CACHING_PROXY_HEAP_LRU)
+ * .create("customers");
+ * // The local LRU "customers" data region will automatically start evicting, by default, at 80% heap utilization threshold
+ * </PRE>
+ * Example 3: Access the query service
+ * <PRE>
+ * QueryService qs = new ClientCacheFactory().create().getQueryService();
+ * </PRE>
+ * Example 4: Construct the client cache region declaratively in cache.xml
+ * <PRE>
+ * <!DOCTYPE client-cache PUBLIC
+ * "-//GemStone Systems, Inc.//GemFire Declarative Caching 6.5//EN"
+ * "http://www.gemstone.com/dtd/cache8_0.dtd">
+ * <client-cache>
+ * <pool name="myPool">
+ * <locator host="hostName" port="10334"/>
+ * </pool>
+ * <region name="myRegion" refid="PROXY"/>
+ * <!-- you can override or add to the PROXY attributes by adding
+ * a region-attributes sub element here -->
+ * </client-cache>
+ * </PRE>
+ * Now, create the cache telling it to read your cache.xml file:
+ * <PRE>
+ * ClientCache c = new ClientCacheFactory()
+ * .set("cache-xml-file", "myCache.xml")
+ * .create();
+ * Region r = c.getRegion("myRegion");
+ * </PRE>
+ * <p>
+ * <p> For a complete list of all client region shortcuts see {@link ClientRegionShortcut}.
+ * Applications that need to explicitly control the individual region attributes can do this declaratively in XML or using API.
+ * <p>
+ * Example 5: Define custom region attributes for persistence in XML and create region using API.
+ * Define new region attributes with ID "MYAPP_CACHING_PROXY_MEM_LRU" that overrides the
+ * "CACHING_PROXY" shortcut
+ * <PRE>
+ * <!DOCTYPE client-cache PUBLIC
+ * "-//GemStone Systems, Inc.//GemFire Declarative Caching 8.0//EN"
+ * "http://www.gemstone.com/dtd/cache8_0.dtd">
+ * <client-cache>
+ * <!-- now create a named region attributes that uses the CACHING_PROXY shortcut
+ * and adds a memory LRU limited to 900 megabytes -->
+ * <region-attributes id="MYAPP_CACHING_PROXY_MEM_LRU" refid="CACHING_PROXY" >
+ * <lru-memory-size maximum="900"/>
+ * </region-attributes>
+ * </client-cache>
+ * </PRE>
+ * Now, create the data region in the client cache using this new attributes ID.
+ * <PRE>
+ * ClientCache c = new ClientCacheFactory()
+ * .set("cache-xml-file", "myCache.xml")
+ * .addPoolLocator(host, port)
+ * .create();
+ * Region r = c.createClientRegionFactory("MYAPP_CACHING_PROXY_MEM_LRU").create("customers");
+ * </PRE>
+ *
+ * @since 6.5
*/
public class ClientCacheFactory {
private PoolFactory pf;
-
+
private final Properties dsProps;
private final CacheConfig cacheConfig = new CacheConfig();
-
+
/**
* Creates a new client cache factory.
*/
public ClientCacheFactory() {
this.dsProps = new Properties();
}
+
/**
* Create a new client cache factory given the initial gemfire properties.
+ *
* @param props The initial gemfire properties to be used.
- * These properties can be overridden using the {@link #set} method
- * For a full list of valid gemfire properties see {@link com.gemstone.gemfire.distributed.DistributedSystem}.
+ * These properties can be overridden using the {@link #set} method
+ * For a full list of valid gemfire properties see {@link com.gemstone.gemfire.distributed.DistributedSystem}.
*/
public ClientCacheFactory(Properties props) {
if (props == null) {
@@ -148,7 +151,8 @@ public class ClientCacheFactory {
/**
* Sets a gemfire property that will be used when creating the ClientCache.
* For a full list of valid gemfire properties see {@link com.gemstone.gemfire.distributed.DistributedSystem}.
- * @param name the name of the gemfire property
+ *
+ * @param name the name of the gemfire property
* @param value the value of the gemfire property
* @return a reference to this ClientCacheFactory object
*/
@@ -161,31 +165,26 @@ public class ClientCacheFactory {
* Create a singleton client cache. If a client cache already exists in this
* vm that is not compatible with this factory's configuration then create
* will fail.
- * <p> While creating the cache instance any declarative cache configuration (cache.xml)
+ * <p> While creating the cache instance any declarative cache configuration (cache.xml)
* is processed and used to initialize the created cache.
* <P>Note that the cache that is produced is a singleton. Before a different instance
* can be produced the old one must be {@link ClientCache#close closed}.
- *
+ *
* @return the singleton client cache
- *
- * @throws CacheXmlException
- * If a problem occurs while parsing the declarative caching
- * XML file.
- * @throws TimeoutException
- * If a {@link Region#put(Object, Object)} times out while initializing the
- * cache.
- * @throws CacheWriterException
- * If a <code>CacheWriterException</code> is thrown while
- * initializing the cache.
- * @throws RegionExistsException
- * If the declarative caching XML file describes a region
- * that already exists (including the root region).
- * @throws IllegalStateException if a client cache already exists and it
- * is not compatible with this factory's configuration.
- * @throws IllegalStateException if mcast-port or locator is set on client cache.
- * @throws AuthenticationFailedException if authentication fails.
+ * @throws CacheXmlException If a problem occurs while parsing the declarative caching
+ * XML file.
+ * @throws TimeoutException If a {@link Region#put(Object, Object)} times out while initializing the
+ * cache.
+ * @throws CacheWriterException If a <code>CacheWriterException</code> is thrown while
+ * initializing the cache.
+ * @throws RegionExistsException If the declarative caching XML file describes a region
+ * that already exists (including the root region).
+ * @throws IllegalStateException if a client cache already exists and it
+ * is not compatible with this factory's configuration.
+ * @throws IllegalStateException if mcast-port or locator is set on client cache.
+ * @throws AuthenticationFailedException if authentication fails.
* @throws AuthenticationRequiredException if server is in secure mode and client cache
- * is not configured with security credentials.
+ * is not configured with security credentials.
*/
public ClientCache create() {
return basicCreate();
@@ -193,49 +192,50 @@ public class ClientCacheFactory {
private ClientCache basicCreate() {
synchronized (ClientCacheFactory.class) {
- GemFireCacheImpl instance = GemFireCacheImpl.getInstance();
-
- {
- String propValue = this.dsProps.getProperty(MCAST_PORT);
- if (propValue != null) {
- int mcastPort = Integer.parseInt(propValue);
- if (mcastPort != 0) {
- throw new IllegalStateException("On a client cache the mcast-port must be set to 0 or not set. It was set to " + mcastPort);
+ GemFireCacheImpl instance = GemFireCacheImpl.getInstance();
+
+ {
+ String propValue = this.dsProps.getProperty(MCAST_PORT);
+ if (propValue != null) {
+ int mcastPort = Integer.parseInt(propValue);
+ if (mcastPort != 0) {
+ throw new IllegalStateException("On a client cache the mcast-port must be set to 0 or not set. It was set to " + mcastPort);
+ }
}
}
- }
- {
- String propValue = this.dsProps.getProperty(LOCATORS);
- if (propValue != null && !propValue.equals("")) {
- throw new IllegalStateException("On a client cache the locators property must be set to an empty string or not set. It was set to \"" + propValue + "\".");
+ {
+ String propValue = this.dsProps.getProperty(LOCATORS);
+ if (propValue != null && !propValue.equals("")) {
+ throw new IllegalStateException(
+ "On a client cache the locators property must be set to an empty string or not set. It was set to \"" + propValue + "\".");
+ }
}
- }
this.dsProps.setProperty(MCAST_PORT, "0");
this.dsProps.setProperty(LOCATORS, "");
- DistributedSystem system = DistributedSystem.connect(this.dsProps);
+ DistributedSystem system = DistributedSystem.connect(this.dsProps);
- if (instance != null && !instance.isClosed()) {
- // this is ok; just make sure it is a client cache
- if (!instance.isClient()) {
- throw new IllegalStateException("A client cache can not be created because a non-client cache already exists.");
- }
+ if (instance != null && !instance.isClosed()) {
+ // this is ok; just make sure it is a client cache
+ if (!instance.isClient()) {
+ throw new IllegalStateException("A client cache can not be created because a non-client cache already exists.");
+ }
- // check if pool is compatible
- Pool pool = instance.determineDefaultPool(this.pf);
- if (pool == null) {
- if (instance.getDefaultPool() != null) {
- throw new IllegalStateException("Existing cache's default pool was not compatible");
+ // check if pool is compatible
+ Pool pool = instance.determineDefaultPool(this.pf);
+ if (pool == null) {
+ if (instance.getDefaultPool() != null) {
+ throw new IllegalStateException("Existing cache's default pool was not compatible");
+ }
}
+
+ // Check if cache configuration matches.
+ cacheConfig.validateCacheConfig(instance);
+
+ return instance;
+ } else {
+ GemFireCacheImpl gfc = GemFireCacheImpl.createClient(system, this.pf, cacheConfig);
+ return gfc;
}
-
- // Check if cache configuration matches.
- cacheConfig.validateCacheConfig(instance);
-
- return instance;
- } else {
- GemFireCacheImpl gfc = GemFireCacheImpl.createClient(system, this.pf, cacheConfig);
- return gfc;
- }
}
}
@@ -245,35 +245,38 @@ public class ClientCacheFactory {
}
return this.pf;
}
-
+
/**
* Sets the free connection timeout for this pool.
* If the pool has a max connections setting, operations will block
* if all of the connections are in use. The free connection timeout
* specifies how long those operations will block waiting for
* a free connection before receiving
- * an {@link AllConnectionsInUseException}. If max connections
+ * an {@link AllConnectionsInUseException}. If max connections
* is not set this setting has no effect.
- * @see #setPoolMaxConnections(int)
+ *
* @param connectionTimeout the connection timeout in milliseconds
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>connectionTimeout</code>
- * is less than or equal to <code>0</code>.
+ * is less than or equal to <code>0</code>.
+ * @see #setPoolMaxConnections(int)
*/
public ClientCacheFactory setPoolFreeConnectionTimeout(int connectionTimeout) {
getPoolFactory().setFreeConnectionTimeout(connectionTimeout);
return this;
}
+
/**
* Sets the load conditioning interval for this pool.
- * This interval controls how frequently the pool will check to see if
+ * This interval controls how frequently the pool will check to see if
* a connection to a given server should be moved to a different
- * server to improve the load balance.
+ * server to improve the load balance.
* <p>A value of <code>-1</code> disables load conditioning
+ *
* @param loadConditioningInterval the connection lifetime in milliseconds
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>connectionLifetime</code>
- * is less than <code>-1</code>.
+ * is less than <code>-1</code>.
*/
public ClientCacheFactory setPoolLoadConditioningInterval(int loadConditioningInterval) {
getPoolFactory().setLoadConditioningInterval(loadConditioningInterval);
@@ -285,11 +288,12 @@ public class ClientCacheFactory {
* Large messages can be received and sent faster when this buffer is larger.
* Larger buffers also optimize the rate at which servers can send events
* for client subscriptions.
+ *
* @param bufferSize the size of the socket buffers used for reading and
- * writing on each connection in this pool.
+ * writing on each connection in this pool.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>bufferSize</code>
- * is less than or equal to <code>0</code>.
+ * is less than or equal to <code>0</code>.
*/
public ClientCacheFactory setPoolSocketBufferSize(int bufferSize) {
getPoolFactory().setSocketBufferSize(bufferSize);
@@ -307,8 +311,9 @@ public class ClientCacheFactory {
* as the operation being done with the connection completes. This allows
* connections to be shared amonst multiple threads keeping the number of
* connections down.
+ *
* @param threadLocalConnections if <code>true</code> then enable thread local
- * connections.
+ * connections.
* @return a reference to <code>this</code>
*/
public ClientCacheFactory setPoolThreadLocalConnections(boolean threadLocalConnections) {
@@ -316,100 +321,100 @@ public class ClientCacheFactory {
return this;
}
-
/**
* Sets the number of milliseconds to wait for a response from a server before
* timing out the operation and trying another server (if any are available).
+ *
* @param timeout number of milliseconds to wait for a response from a server
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>timeout</code>
- * is less than <code>0</code>.
+ * is less than <code>0</code>.
*/
public ClientCacheFactory setPoolReadTimeout(int timeout) {
getPoolFactory().setReadTimeout(timeout);
return this;
}
-
/**
* Set the minimum number of connections to keep available at all times.
- * When the pool is created, it will create this many connections.
+ * When the pool is created, it will create this many connections.
* If <code>0</code> then connections will not be made until an actual operation
* is done that requires client-to-server communication.
+ *
* @param minConnections the initial number of connections
- * this pool will create.
+ * this pool will create.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>minConnections</code>
- * is less than <code>0</code>.
+ * is less than <code>0</code>.
*/
public ClientCacheFactory setPoolMinConnections(int minConnections) {
getPoolFactory().setMinConnections(minConnections);
return this;
}
-
/**
- * Set the max number of client to server connections that the pool will create. If all of
+ * Set the max number of client to server connections that the pool will create. If all of
* the connections are in use, an operation requiring a client to server connection
* will block until a connection is available.
- * @see #setPoolFreeConnectionTimeout(int)
+ *
* @param maxConnections the maximum number of connections in the pool.
- * this pool will create. -1 indicates that there is no maximum number of connections
+ * this pool will create. -1 indicates that there is no maximum number of connections
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>maxConnections</code>
- * is less than <code>minConnections</code>.
+ * is less than <code>minConnections</code>.
+ * @see #setPoolFreeConnectionTimeout(int)
*/
public ClientCacheFactory setPoolMaxConnections(int maxConnections) {
getPoolFactory().setMaxConnections(maxConnections);
return this;
}
-
/**
* Set the amount of time a connection can be idle before expiring the connection.
- * If the pool size is greater than the minimum specified by
+ * If the pool size is greater than the minimum specified by
* {@link #setPoolMinConnections(int)}, connections which have been idle
- * for longer than the idleTimeout will be closed.
+ * for longer than the idleTimeout will be closed.
+ *
* @param idleTimeout The amount of time in milliseconds that an idle connection
- * should live before expiring. -1 indicates that connections should never expire.
+ * should live before expiring. -1 indicates that connections should never expire.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>idleTimout</code>
- * is less than <code>-1</code>.
+ * is less than <code>-1</code>.
*/
public ClientCacheFactory setPoolIdleTimeout(long idleTimeout) {
getPoolFactory().setIdleTimeout(idleTimeout);
return this;
}
-
/**
* Set the number of times to retry a request after timeout/exception.
- * @param retryAttempts The number of times to retry a request
- * after timeout/exception. -1 indicates that a request should be
- * tried against every available server before failing
+ *
+ * @param retryAttempts The number of times to retry a request
+ * after timeout/exception. -1 indicates that a request should be
+ * tried against every available server before failing
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>idleTimout</code>
- * is less than <code>-1</code>.
+ * is less than <code>-1</code>.
*/
public ClientCacheFactory setPoolRetryAttempts(int retryAttempts) {
getPoolFactory().setRetryAttempts(retryAttempts);
return this;
}
-
/**
* How often to ping servers to verify that they are still alive. Each
* server will be sent a ping every pingInterval if there has not
* been any other communication with the server.
- *
+ * <p>
* These pings are used by the server to monitor the health of
- * the client. Make sure that the pingInterval is less than the
+ * the client. Make sure that the pingInterval is less than the
* maximum time between pings allowed by the cache server.
+ *
* @param pingInterval The amount of time in milliseconds between
- * pings.
+ * pings.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>pingInterval</code>
- * is less than or equal to <code>0</code>.
+ * is less than or equal to <code>0</code>.
* @see CacheServer#setMaximumTimeBetweenPings(int)
*/
public ClientCacheFactory setPoolPingInterval(long pingInterval) {
@@ -417,29 +422,28 @@ public class ClientCacheFactory {
return this;
}
-
/**
* How often to send client statistics to the server.
* Doing this allows <code>gfmon</code> to monitor clients.
* <p>A value of <code>-1</code> disables the sending of client statistics
* to the server.
- *
+ *
* @param statisticInterval The amount of time in milliseconds between
- * sends of client statistics to the server.
+ * sends of client statistics to the server.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>statisticInterval</code>
- * is less than <code>-1</code>.
+ * is less than <code>-1</code>.
*/
public ClientCacheFactory setPoolStatisticInterval(int statisticInterval) {
getPoolFactory().setStatisticInterval(statisticInterval);
return this;
}
-
/**
* Configures the group that all servers this pool connects to must belong to.
+ *
* @param group the server group that this pool will connect to.
- * If <code>null</code> or <code>""</code> then all servers will be connected to.
+ * If <code>null</code> or <code>""</code> then all servers will be connected to.
* @return a reference to <code>this</code>
*/
public ClientCacheFactory setPoolServerGroup(String group) {
@@ -447,7 +451,6 @@ public class ClientCacheFactory {
return this;
}
-
/**
* Add a locator, given its host and port, to this factory.
* The locator must be a server locator and will be used to discover other running
@@ -456,19 +459,19 @@ public class ClientCacheFactory {
* the locator will still be added. When the pool is used for
* an operation if the host is still unknown an exception will
* be thrown.
+ *
* @param host the host name or ip address that the locator is listening on.
* @param port the port that the locator is listening on
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if port is outside
- * the valid range of [0..65535] inclusive.
- * @throws IllegalStateException if a server has already been {@link #addPoolServer added} to this factory.
+ * the valid range of [0..65535] inclusive.
+ * @throws IllegalStateException if a server has already been {@link #addPoolServer added} to this factory.
*/
public ClientCacheFactory addPoolLocator(String host, int port) {
getPoolFactory().addLocator(host, port);
return this;
}
-
/**
* Add a server, given its host and port, to this factory.
* The server must be a cache server and this client will
@@ -477,24 +480,25 @@ public class ClientCacheFactory {
* the server will still be added. When the pool is used for
* an operation if the host is still unknown an exception will
* be thrown.
+ *
* @param host the host name or ip address that the server is listening on.
* @param port the port that the server is listening on
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if port is outside
- * the valid range of [0..65535] inclusive.
- * @throws IllegalStateException if a locator has already been {@link #addPoolLocator added} to this factory.
+ * the valid range of [0..65535] inclusive.
+ * @throws IllegalStateException if a locator has already been {@link #addPoolLocator added} to this factory.
*/
public ClientCacheFactory addPoolServer(String host, int port) {
getPoolFactory().addServer(host, port);
return this;
}
-
/**
* If set to <code>true</code> then the created pool will have server-to-client
* subscriptions enabled.
* If set to <code>false</code> then all <code>Subscription*</code> attributes
* are ignored at create time.
+ *
* @return a reference to <code>this</code>
*/
public ClientCacheFactory setPoolSubscriptionEnabled(boolean enabled) {
@@ -502,17 +506,17 @@ public class ClientCacheFactory {
return this;
}
-
/**
* Sets the redundancy level for this pools server-to-client subscriptions.
* If <code>0</code> then no redundant copies will be kept on the servers.
* Otherwise an effort will be made to maintain the requested number of
* copies of the server-to-client subscriptions. At most one copy per server will
* be made up to the requested level.
+ *
* @param redundancy the number of redundant servers for this client's subscriptions.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>redundancyLevel</code>
- * is less than <code>-1</code>.
+ * is less than <code>-1</code>.
*/
public ClientCacheFactory setPoolSubscriptionRedundancy(int redundancy) {
getPoolFactory().setSubscriptionRedundancy(redundancy);
@@ -525,34 +529,33 @@ public class ClientCacheFactory {
* to minimize duplicate events.
* Entries that have not been modified for this amount of time
* are expired from the list
+ *
* @param messageTrackingTimeout number of milliseconds to set the timeout to.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>messageTrackingTimeout</code>
- * is less than or equal to <code>0</code>.
+ * is less than or equal to <code>0</code>.
*/
public ClientCacheFactory setPoolSubscriptionMessageTrackingTimeout(int messageTrackingTimeout) {
getPoolFactory().setSubscriptionMessageTrackingTimeout(messageTrackingTimeout);
return this;
}
-
/**
* Sets the interval in milliseconds
* to wait before sending acknowledgements to the cache server for
* events received from the server subscriptions.
- *
+ *
* @param ackInterval number of milliseconds to wait before sending event
- * acknowledgements.
+ * acknowledgements.
* @return a reference to <code>this</code>
* @throws IllegalArgumentException if <code>ackInterval</code>
- * is less than or equal to <code>0</code>.
+ * is less than or equal to <code>0</code>.
*/
public ClientCacheFactory setPoolSubscriptionAckInterval(int ackInterval) {
getPoolFactory().setSubscriptionAckInterval(ackInterval);
return this;
}
-
/**
* By default setPRSingleHopEnabled is <code>true</code>
* in which case the client is aware of the location of partitions on servers hosting
@@ -561,7 +564,7 @@ public class ClientCacheFactory {
* Using this information, the client routes the client cache operations
* directly to the server which is hosting the required partition for the
* cache operation using a single network hop.
- * This mode works best
+ * This mode works best
* when {@link #setPoolMaxConnections(int)} is set
* to <code>-1</code> which is the default.
* This mode causes the client to have more connections to the servers.
@@ -571,11 +574,11 @@ public class ClientCacheFactory {
* The client will use fewer network connections to the servers.
* <p>
* Caution: for {@link com.gemstone.gemfire.cache.DataPolicy#PARTITION partition} regions
- * with
+ * with
* {@link com.gemstone.gemfire.cache.PartitionAttributesFactory#setLocalMaxMemory(int) local-max-memory}
* equal to zero, no cache operations mentioned above will be routed to those
* servers as they do not host any partitions.
- *
+ *
* @return the newly created pool.
*/
public ClientCacheFactory setPoolPRSingleHopEnabled(boolean enabled) {
@@ -583,14 +586,13 @@ public class ClientCacheFactory {
return this;
}
-
/**
* If set to <code>true</code> then the created pool can be used by multiple
* users. <br>
* <br>
* Note: If set to true, all the client side regions must be
* {@link ClientRegionShortcut#PROXY proxies}. No client side storage is allowed.
- *
+ *
* @return a reference to <code>this</code>
*/
public ClientCacheFactory setPoolMultiuserAuthentication(boolean enabled) {
@@ -598,20 +600,23 @@ public class ClientCacheFactory {
return this;
}
-
- /** Returns the version of the cache implementation.
+ /**
+ * Returns the version of the cache implementation.
+ *
* @return the version of the cache implementation as a <code>String</code>
*/
public static String getVersion() {
return GemFireVersion.getGemFireVersion();
}
+
/**
* Gets an arbitrary open instance of {@link ClientCache} produced by an
* earlier call to {@link #create}.
- * @throws CacheClosedException if a cache has not been created
- * or the only created one is {@link ClientCache#isClosed closed}
+ *
+ * @throws CacheClosedException if a cache has not been created
+ * or the only created one is {@link ClientCache#isClosed closed}
* @throws IllegalStateException if the cache was created by CacheFactory instead
- * of ClientCacheFactory
+ * of ClientCacheFactory
*/
public static synchronized ClientCache getAnyInstance() {
GemFireCacheImpl instance = GemFireCacheImpl.getInstance();
@@ -625,15 +630,16 @@ public class ClientCacheFactory {
return instance;
}
}
-
- /** Sets the object preference to PdxInstance type.
+
+ /**
+ * Sets the object preference to PdxInstance type.
* When a cached object that was serialized as a PDX is read
* from the cache a {@link PdxInstance} will be returned instead of the actual domain class.
- * The PdxInstance is an interface that provides run time access to
- * the fields of a PDX without deserializing the entire PDX.
- * The PdxInstance implementation is a light weight wrapper
- * that simply refers to the raw bytes of the PDX that are kept
- * in the cache. Using this method applications can choose to
+ * The PdxInstance is an interface that provides run time access to
+ * the fields of a PDX without deserializing the entire PDX.
+ * The PdxInstance implementation is a light weight wrapper
+ * that simply refers to the raw bytes of the PDX that are kept
+ * in the cache. Using this method applications can choose to
* access PdxInstance instead of Java object.
* <p>Note that a PdxInstance is only returned if a serialized PDX is found in the cache.
* If the cache contains a deserialized PDX, then a domain class instance is returned instead of a PdxInstance.
@@ -647,11 +653,12 @@ public class ClientCacheFactory {
this.cacheConfig.setPdxReadSerialized(pdxReadSerialized);
return this;
}
-
+
/**
* Set the PDX serializer for the cache. If this serializer is set,
- * it will be consulted to see if it can serialize any domain classes which are
- * added to the cache in portable data exchange format.
+ * it will be consulted to see if it can serialize any domain classes which are
+ * added to the cache in portable data exchange format.
+ *
* @param serializer the serializer to use
* @return this ClientCacheFactory
* @since GemFire 6.6
@@ -661,16 +668,17 @@ public class ClientCacheFactory {
this.cacheConfig.setPdxSerializer(serializer);
return this;
}
-
+
/**
* Set the disk store that is used for PDX meta data. When
* serializing objects in the PDX format, the type definitions
* are persisted to disk. This setting controls which disk store
* is used for that persistence.
- *
+ * <p>
* If not set, the metadata will go in the default disk store.
+ *
* @param diskStoreName the name of the disk store to use
- * for the PDX metadata.
+ * for the PDX metadata.
* @return this ClientCacheFactory
* @since GemFire 6.6
*/
@@ -681,10 +689,10 @@ public class ClientCacheFactory {
/**
* Control whether the type metadata for PDX objects is persisted to disk.
- * The default for this setting is false.
+ * The default for this setting is false.
* If you are using persistent regions with PDX then you must set this to true.
* If you are using a WAN gateway with PDX then you should set this to true.
- *
+ *
* @param isPersistent true if the metadata should be persistent
* @return this ClientCacheFactory
* @since GemFire 6.6
@@ -693,6 +701,7 @@ public class ClientCacheFactory {
this.cacheConfig.setPdxPersistent(isPersistent);
return this;
}
+
/**
* Control whether pdx ignores fields that were unread during deserialization.
* The default is to preserve unread fields be including their data during serialization.
@@ -700,10 +709,10 @@ public class ClientCacheFactory {
* during serialization.
* <P>You should only set this attribute to <code>true</code> if you know this member
* will only be reading cache data. In this use case you do not need to pay the cost
- * of preserving the unread fields since you will never be reserializing pdx data.
- *
+ * of preserving the unread fields since you will never be reserializing pdx data.
+ *
* @param ignore <code>true</code> if fields not read during pdx deserialization should be ignored;
- * <code>false</code>, the default, if they should be preserved.
+ * <code>false</code>, the default, if they should be preserved.
* @return this ClientCacheFactory
* @since GemFire 6.6
*/
@@ -711,5 +720,5 @@ public class ClientCacheFactory {
this.cacheConfig.setPdxIgnoreUnreadFields(ignore);
return this;
}
-
+
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/690ca40b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
index 44465d8..b9f25d7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
@@ -668,7 +668,7 @@ public class PoolImpl implements InternalPool {
}
if (!getLocators().equals(other.getLocators())) {
throw new RuntimeException(
- LocalizedStrings.PoolImpl_0_ARE_DIFFERENT.toLocalizedString(LOCATORS));
+ LocalizedStrings.PoolImpl_0_ARE_DIFFERENT.toLocalizedString("locators"));
}
if (!getServers().equals(other.getServers())) {
throw new RuntimeException(
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/690ca40b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
index df320b2..b4526fa 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/SystemConfigurationProperties.java
@@ -17,9 +17,6 @@
package com.gemstone.gemfire.distributed;
-/**
- * Created by ukohlmeyer on 26/05/2016.
- */
public interface SystemConfigurationProperties {
String ACK_SEVERE_ALERT_THRESHOLD = "ack-severe-alert-threshold";
String ACK_WAIT_THRESHOLD = "ack-wait-threshold";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/690ca40b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
index 1cce999..9a900ca 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
@@ -2457,8 +2457,8 @@ public interface DistributionConfig extends Config, LogConfig, SystemConfigurati
String KEY_STORE_TYPE_NAME = ".keyStoreType";
String KEY_STORE_NAME = ".keyStore";
String KEY_STORE_PASSWORD_NAME = ".keyStorePassword";
- String TRUST_STORE_NAME = "trustStore";
- String TRUST_STORE_PASSWORD_NAME = "trustStorePassword";
+ String TRUST_STORE_NAME = ".trustStore";
+ String TRUST_STORE_PASSWORD_NAME = ".trustStorePassword";
/**
* Suffix for ssl keystore and trust store properties for JMX
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/690ca40b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
index 615823c..bcbd035 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/cache/client/internal/CacheServerSSLConnectionDUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.client.ClientCacheFactory;
import com.gemstone.gemfire.cache.client.ClientRegionFactory;
import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.AvailablePortHelper;
import com.gemstone.gemfire.security.AuthenticationRequiredException;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -79,12 +78,13 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
return cache;
}
- private void createServer() throws IOException{
- cacheServerPort = AvailablePortHelper.getRandomAvailableTCPPort();
+ private int createServer() throws IOException{
cacheServer = cache.addCacheServer();
- cacheServer.setPort(cacheServerPort);
+ cacheServer.setPort(0);
cacheServer.start();
hostName = cacheServer.getHostnameForClients();
+ cacheServerPort = cacheServer.getPort();
+ return cacheServerPort;
}
public int getCacheServerPort(){
@@ -143,15 +143,10 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
String keyStorePath = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, keyStore);
String trustStorePath = TestUtil.getResourcePath(CacheServerSSLConnectionDUnitTest.class, trustStore);
//using new server-ssl-* properties
- gemFireProps.put(SERVER_SSL_ENABLED,
- String.valueOf(cacheServerSslenabled));
- gemFireProps.put(SERVER_SSL_PROTOCOLS,
- cacheServerSslprotocols);
- gemFireProps.put(SERVER_SSL_CIPHERS,
- cacheServerSslciphers);
- gemFireProps.put(
- SERVER_SSL_REQUIRE_AUTHENTICATION,
- String.valueOf(cacheServerSslRequireAuth));
+ gemFireProps.put(SERVER_SSL_ENABLED, String.valueOf(cacheServerSslenabled));
+ gemFireProps.put(SERVER_SSL_PROTOCOLS, cacheServerSslprotocols);
+ gemFireProps.put(SERVER_SSL_CIPHERS, cacheServerSslciphers);
+ gemFireProps.put(SERVER_SSL_REQUIRE_AUTHENTICATION, String.valueOf(cacheServerSslRequireAuth));
gemFireProps.put(SERVER_SSL_KEYSTORE_TYPE, "jks");
gemFireProps.put(SERVER_SSL_KEYSTORE, keyStorePath);
@@ -191,8 +186,8 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
instance.setUpServerVM(cacheServerSslenabled);
}
- public static void createServerTask() throws Exception {
- instance.createServer();
+ public static int createServerTask() throws Exception {
+ return instance.createServer();
}
public static void setUpClientVMTask(String host, int port,
@@ -245,11 +240,9 @@ public class CacheServerSSLConnectionDUnitTest extends DistributedTestCase {
boolean cacheClientSslRequireAuth = true;
serverVM.invoke(() -> setUpServerVMTask(cacheServerSslenabled));
- serverVM.invoke(() -> createServerTask());
+ int port = serverVM.invoke(() -> createServerTask());
- Object array[] = (Object[])serverVM.invoke(() -> getCacheServerEndPointTask());
- String hostName = (String)array[0];
- int port = (Integer) array[1];
+ String hostName = host.getHostName();
clientVM.invoke(() -> setUpClientVMTask(hostName, port, cacheClientSslenabled, cacheClientSslRequireAuth, CLIENT_KEY_STORE, CLIENT_TRUST_STORE));
clientVM.invoke(() -> doClientRegionTestTask());
[43/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
index 6b9b228..b7f2bcf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/DataSourceJTAJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
@@ -37,8 +36,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* This test case is to test the following test scenarios: 1) Get Simple DS
@@ -93,7 +91,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
// System.out.println ("Table name: " + tableName);
@@ -274,7 +272,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
System.out.println("Table name: " + tableName);
@@ -585,7 +583,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
// System.out.println ("Table name: " + tableName);
@@ -749,7 +747,7 @@ public class DataSourceJTAJUnitTest {
try {
Properties props = new Properties();
String path= TestUtil.getResourcePath(CacheUtils.class, "cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds = connect(props);
tableName = CacheUtils.init(ds, "JTATest");
// System.out.println ("Table name: " + tableName);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
index b78cdf7..58cde28 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/GlobalTransactionJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.datasource.GemFireBasicDataSource;
import com.gemstone.gemfire.internal.datasource.GemFireTransactionDataSource;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -33,7 +32,7 @@ import java.sql.Connection;
import java.sql.SQLException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
@Category(IntegrationTest.class)
public class GlobalTransactionJUnitTest extends TestCase {
@@ -49,7 +48,7 @@ public class GlobalTransactionJUnitTest extends TestCase {
props = new Properties();
props.setProperty(MCAST_PORT, "0");
String path = TestUtil.getResourcePath(GlobalTransactionJUnitTest.class, "/jta/cachejta.xml");
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
utx = new UserTransactionImpl();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
index 2bd6790..9ac3f39 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/TransactionTimeOutJUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.datasource.GemFireTransactionDataSource;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import com.gemstone.gemfire.util.test.TestUtil;
@@ -38,7 +37,7 @@ import java.sql.Statement;
import java.util.Properties;
import java.util.Random;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
//import java.sql.SQLException;
@@ -65,8 +64,8 @@ public class TransactionTimeOutJUnitTest extends TestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
- // props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME,"D:\\projects\\JTA\\cachejta.xml");
+ props.setProperty(CACHE_XML_FILE, path);
+ // props.setProperty(cacheXmlFile,"D:\\projects\\JTA\\cachejta.xml");
ds1 = DistributedSystem.connect(props);
cache = CacheFactory.create(ds1);
cache.getLogger().fine("SWAP:running test:"+getName());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
index 874a04d..f5cd573 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/ExceptionsDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta.dunit;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.test.dunit.DistributedTestCase;
@@ -35,6 +34,8 @@ import java.io.*;
import java.sql.SQLException;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class ExceptionsDUnitTest extends DistributedTestCase {
static DistributedSystem ds;
@@ -125,7 +126,7 @@ public class ExceptionsDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
// String tableName = "";
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
index 9dd4dbe..fc6d02a 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/IdleTimeOutDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta.dunit;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.test.dunit.*;
@@ -34,6 +33,8 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class IdleTimeOutDUnitTest extends DistributedTestCase {
static DistributedSystem ds;
@@ -128,7 +129,7 @@ public class IdleTimeOutDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
String tableName = "";
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
index 644809f..7d66a41 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/LoginTimeOutDUnitTest.java
@@ -18,7 +18,6 @@ package com.gemstone.gemfire.internal.jta.dunit;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
@@ -36,7 +35,7 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
public class LoginTimeOutDUnitTest extends DistributedTestCase {
private static final Logger logger = LogService.getLogger();
@@ -132,7 +131,7 @@ public class LoginTimeOutDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
props.setProperty(MCAST_PORT, "0");
String tableName = "";
cache = new CacheFactory(props).create();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
index ca5f6f7..a6ce3bd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta.dunit;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.test.dunit.*;
@@ -34,6 +33,8 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
public class MaxPoolSizeDUnitTest extends DistributedTestCase {
static DistributedSystem ds;
@@ -126,7 +127,7 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
String tableName = "";
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
index 710b7dc..1d3dde8 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.jta.dunit;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.datasource.GemFireTransactionDataSource;
import com.gemstone.gemfire.internal.jta.CacheUtils;
@@ -36,6 +35,8 @@ import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*This test tests TransactionTimeOut functionality
*/
@@ -61,7 +62,7 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase {
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10321");
try {
// ds = DistributedSystem.connect(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
index 109c316..3cd06e5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
@@ -20,7 +20,6 @@ import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.internal.jta.JTAUtils;
@@ -38,6 +37,8 @@ import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* This test case is to test the following test scenarios: 1) Behaviour of
* Transaction Manager in multy threaded thransactions. We will have around five
@@ -184,7 +185,7 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
wr.write(modified_file_str1);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
String tableName = "";
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
index fa835be..6cb3ce5 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
@@ -32,6 +32,8 @@ import java.io.*;
import java.sql.SQLException;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
*This test sees if the TransactionTimeOut works properly
*/
@@ -57,9 +59,9 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ props.setProperty(CACHE_XML_FILE, path);
// props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10321");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
try {
// ds = DistributedSystem.connect(props);
ds = (new TxnTimeOutDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
index d4ef01b..7c186cd 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
@@ -41,8 +41,7 @@ import java.io.FileNotFoundException;
import java.util.Properties;
import java.util.Scanner;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.*;
/**
@@ -81,14 +80,14 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-0.log";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ properties.put(LOG_FILE, logFileName);
+ properties.put(LOG_LEVEL, "config");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File logFile = new File(logFileName);
if (logFile.exists()) {
@@ -469,14 +468,14 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(LOG_FILE, logFileName);
+ properties.put(LOG_LEVEL, "fine");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File logFile = new File(logFileName);
if (logFile.exists()) {
@@ -685,14 +684,14 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "debug");
+ properties.put(LOG_FILE, logFileName);
+ properties.put(LOG_LEVEL, "debug");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File logFile = new File(logFileName);
if (logFile.exists()) {
@@ -902,15 +901,15 @@ public class DistributedSystemLogFileJUnitTest {
final String securityLogFileName = "security" + name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(LOG_FILE, logFileName);
+ properties.put(LOG_LEVEL, "fine");
properties.put(DistributionConfig.SECURITY_LOG_FILE_NAME, securityLogFileName);
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File securityLogFile = new File(securityLogFileName);
if (securityLogFile.exists()) {
@@ -1020,16 +1019,16 @@ public class DistributedSystemLogFileJUnitTest {
final String securityLogFileName = "security" + name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(LOG_FILE, logFileName);
+ properties.put(LOG_LEVEL, "fine");
properties.put(DistributionConfig.SECURITY_LOG_FILE_NAME, securityLogFileName);
properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "fine");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File securityLogFile = new File(securityLogFileName);
if (securityLogFile.exists()) {
@@ -1199,15 +1198,15 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(LOG_FILE, logFileName);
+ properties.put(LOG_LEVEL, "fine");
properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "info");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File logFile = new File(logFileName);
if (logFile.exists()) {
@@ -1348,15 +1347,15 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "info");
+ properties.put(LOG_FILE, logFileName);
+ properties.put(LOG_LEVEL, "info");
properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "fine");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, "");
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File logFile = new File(logFileName);
if (logFile.exists()) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
index f5baa9c..f6bf465 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.logging;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -70,13 +72,13 @@ public class LocatorLogFileJUnitTest {
final String locators = "localhost[" + port + "]";
final Properties properties = new Properties();
- properties.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ properties.put(LOG_LEVEL, "config");
properties.put(MCAST_PORT, "0");
properties.put(LOCATORS, locators);
- properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(ENABLE_NETWORK_PARTITION_DETECTION, "false");
properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
- properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
- properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
+ properties.put(MEMBER_TIMEOUT, "2000");
+ properties.put(ENABLE_CLUSTER_CONFIGURATION, "false");
final File logFile = new File(name.getMethodName() + "-locator-" + port + ".log");
if (logFile.exists()) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
index d767e98..ee43682 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
@@ -29,6 +29,8 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Tests performance of logging when level is OFF.
*
@@ -45,8 +47,8 @@ public class LogWriterPerformanceTest extends LoggingPerformanceTestCase {
final Properties props = new Properties();
this.logFile = new File(this.configDirectory, DistributionConfig.GEMFIRE_PREFIX + "log");
final String logFilePath = IOUtils.tryGetCanonicalPathElseGetAbsolutePath(logFile);
- props.setProperty(DistributionConfig.LOG_FILE_NAME, logFilePath);
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
+ props.setProperty(LOG_FILE, logFilePath);
+ props.setProperty(LOG_LEVEL, "info");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
index 2e86404..f9eed64 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
@@ -19,7 +19,6 @@ package com.gemstone.gemfire.internal.logging.log4j.custom;
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.Configurator;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
@@ -40,8 +39,7 @@ import org.junit.rules.TestName;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.internal.logging.log4j.custom.CustomConfiguration.*;
import static org.assertj.core.api.Assertions.assertThat;
@@ -84,7 +82,7 @@ public class CustomConfigWithCacheIntegrationTest {
Properties gemfireProperties = new Properties();
gemfireProperties.put(LOCATORS, "");
gemfireProperties.put(MCAST_PORT, "0");
- gemfireProperties.put(DistributionConfig.LOG_LEVEL_NAME, "info");
+ gemfireProperties.put(LOG_LEVEL, "info");
this.cache = new CacheFactory(gemfireProperties).create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
index 3b57d7c..861209d 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
@@ -43,7 +43,7 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicReference;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.jayway.awaitility.Awaitility.with;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -116,7 +116,7 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
public Properties getDistributedSystemProperties() {
final Properties props = new Properties();
props.put(MCAST_PORT, "0");
- props.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.put(STATISTIC_SAMPLING_ENABLED, "true");
if (isSmallerVM.get()) {
props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, getSmallerOffHeapMemorySize());
} else {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
index 8aa78af..3482f20 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.internal.statistics;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
@@ -23,7 +25,6 @@ import com.gemstone.gemfire.cache.util.RegionMembershipListenerAdapter;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
import com.gemstone.gemfire.cache30.CacheTestCase;
import com.gemstone.gemfire.distributed.DistributedMember;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.*;
@@ -125,9 +126,9 @@ public class StatisticsDUnitTest extends CacheTestCase {
public void run2() throws CacheException {
new File(dir).mkdir();
final Properties props = new Properties();
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "1000");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, pubArchives[pubVM]);
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(STATISTIC_SAMPLE_RATE, "1000");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, pubArchives[pubVM]);
final InternalDistributedSystem system = getSystem(props);
// assert that sampler is working as expected
@@ -179,9 +180,9 @@ public class StatisticsDUnitTest extends CacheTestCase {
public Object call() throws Exception {
new File(dir).mkdir();
final Properties props = new Properties();
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "1000");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, subArchive);
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(STATISTIC_SAMPLE_RATE, "1000");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, subArchive);
final InternalDistributedSystem system = getSystem(props);
final PubSubStats statistics = new PubSubStats(system, "sub-1", 1);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
index ee59e8a..eb2201f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
@@ -21,7 +21,6 @@ import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.StatisticsType;
import com.gemstone.gemfire.StatisticsTypeFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Test;
@@ -32,7 +31,7 @@ import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.atomic.AtomicReference;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
/**
@@ -52,7 +51,7 @@ public class AtomicStatsJUnitTest {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
// props.setProperty("statistic-sample-rate", "60000");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
DistributedSystem ds = DistributedSystem.connect(props);
String statName = "TestStats";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
index fcb9862..d0ffdd0 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ClientHealthStatsDUnitTest.java
@@ -34,6 +34,8 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Client health stats check
*
@@ -242,14 +244,14 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
public static void createClientCache(Host host, Integer port, int clientNum, boolean subscriptionEnabled, boolean durable) throws Exception {
Properties props = new Properties();
- props.setProperty(DistributionConfig.DURABLE_CLIENT_ID_NAME, "durable-"+clientNum);
- props.setProperty(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "300000");
+ props.setProperty(DURABLE_CLIENT_ID, "durable-"+clientNum);
+ props.setProperty(DURABLE_CLIENT_TIMEOUT, "300000");
// props.setProperty("log-file", getTestMethodName()+"_client_" + clientNum + ".log");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_ARCHIVE_FILE_NAME, getTestMethodName() + "_client_" + clientNum
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_ARCHIVE_FILE, getTestMethodName() + "_client_" + clientNum
+ ".gfs");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
ClientCacheFactory ccf = new ClientCacheFactory(props);
if(subscriptionEnabled){
@@ -259,8 +261,8 @@ public class ClientHealthStatsDUnitTest extends DistributedTestCase {
}
if(durable){
- ccf.set(DistributionConfig.DURABLE_CLIENT_ID_NAME, "DurableClientId_" + clientNum);
- ccf.set(DistributionConfig.DURABLE_CLIENT_TIMEOUT_NAME, "" + 300);
+ ccf.set(DURABLE_CLIENT_ID, "DurableClientId_" + clientNum);
+ ccf.set(DURABLE_CLIENT_TIMEOUT, "" + 300);
}
ccf.addPoolServer(host.getHostName(), port);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
index 5dda3da..a4c0d84 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/DataBrowserJSONValidationJUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.query.data.Portfolio;
import com.gemstone.gemfire.cache.query.data.Position;
@@ -90,9 +92,9 @@ public class DataBrowserJSONValidationJUnitTest {
final Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "60000");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
+ props.setProperty(STATISTIC_SAMPLE_RATE, "60000");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
index ca56c07..4335af3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/LocatorManagementDUnitTest.java
@@ -31,8 +31,7 @@ import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
@@ -211,7 +210,7 @@ public class LocatorManagementDUnitTest extends ManagementTestBase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, "");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(LOG_LEVEL, LogWriterUtils.getDUnitLogLevel());
InetAddress bindAddr = null;
try {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
index d699727..ffa9e72 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/ManagementTestBase.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedMember;
@@ -202,7 +204,7 @@ public class ManagementTestBase extends DistributedTestCase {
public Cache createCache(Properties props) {
System.setProperty("dunitLogPerTest", "true");
- props.setProperty(DistributionConfig.LOG_FILE_NAME, getTestMethodName() + "-.log");
+ props.setProperty(LOG_FILE, getTestMethodName() + "-.log");
ds = (new ManagementTestBase("temp")).getSystem(props);
cache = CacheFactory.create(ds);
managementService = ManagementService.getManagementService(cache);
@@ -224,9 +226,9 @@ public class ManagementTestBase extends DistributedTestCase {
props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
props.setProperty(DistributionConfig.JMX_MANAGER_HTTP_PORT_NAME, "0");
}
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.LOG_FILE_NAME, getTestMethodName() + "-.log");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(LOG_FILE, getTestMethodName() + "-.log");
ds = (new ManagementTestBase("temp")).getSystem(props);
cache = CacheFactory.create(ds);
managementService = ManagementService.getManagementService(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
index 7816cc3..583e48f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/UniversalMembershipListenerAdapterDUnitTest.java
@@ -42,8 +42,7 @@ import org.junit.experimental.categories.Category;
import java.io.IOException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* Tests the UniversalMembershipListenerAdapter.
@@ -832,10 +831,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
final Properties serverProperties = getSystem().getProperties();
//Below removed properties are already got copied as cluster SSL properties
- serverProperties.remove(DistributionConfig.SSL_ENABLED_NAME);
- serverProperties.remove(DistributionConfig.SSL_CIPHERS_NAME);
- serverProperties.remove(DistributionConfig.SSL_PROTOCOLS_NAME);
- serverProperties.remove(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME);
+ serverProperties.remove(SSL_ENABLED);
+ serverProperties.remove(SSL_CIPHERS);
+ serverProperties.remove(SSL_PROTOCOLS);
+ serverProperties.remove(SSL_REQUIRE_AUTHENTICATION);
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] ports[0]=" + ports[0]);
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[doTestSystemClientEventsInServer] serverMemberId=" + serverMemberId);
@@ -1524,10 +1523,10 @@ public class UniversalMembershipListenerAdapterDUnitTest extends ClientServerTes
final String serverMemberId = serverMember.toString();
final Properties serverProperties = getSystem().getProperties();
- serverProperties.remove(DistributionConfig.SSL_ENABLED_NAME);
- serverProperties.remove(DistributionConfig.SSL_CIPHERS_NAME);
- serverProperties.remove(DistributionConfig.SSL_PROTOCOLS_NAME);
- serverProperties.remove(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME);
+ serverProperties.remove(SSL_ENABLED);
+ serverProperties.remove(SSL_CIPHERS);
+ serverProperties.remove(SSL_PROTOCOLS);
+ serverProperties.remove(SSL_REQUIRE_AUTHENTICATION);
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] ports[0]=" + ports[0]);
com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter().info("[testServerEventsInPeerSystem] serverMemberId=" + serverMemberId);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
index c5b0e8f..8525c90 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/DistributedSystemStatsJUnitTest.java
@@ -35,7 +35,7 @@ import org.junit.experimental.categories.Category;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
@@ -59,9 +59,9 @@ public class DistributedSystemStatsJUnitTest {
final Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "60000");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
+ props.setProperty(STATISTIC_SAMPLE_RATE, "60000");
props.setProperty(DistributionConfig.JMX_MANAGER_NAME, "true");
props.setProperty(DistributionConfig.JMX_MANAGER_START_NAME, "true");
// set JMX_MANAGER_UPDATE_RATE to practically an infinite value, so that
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
index 8481bcd..3bba787 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/bean/stats/MBeanStatsTestCase.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management.bean.stats;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -48,11 +50,11 @@ public abstract class MBeanStatsTestCase {
//System.setProperty("gemfire.stats.debug.debugSampleCollector", "true");
final Properties props = new Properties();
- //props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "finest");
+ //props.setProperty(LOG_LEVEL, "finest");
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLE_RATE_NAME, "60000");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "false");
+ props.setProperty(STATISTIC_SAMPLE_RATE, "60000");
this.system = (InternalDistributedSystem) DistributedSystem.connect(props);
assertNotNull(this.system.getStatSampler());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
index 43c67e4..8a2aab7 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommandsDUnitTest.java
@@ -139,7 +139,7 @@ public class ConfigCommandsDUnitTest extends CliCommandTestBase {
assertEquals(true, cmdResult.getStatus().equals(Status.OK));
assertEquals(true, resultStr.contains("G1"));
assertEquals(true, resultStr.contains(controllerName));
- assertEquals(true, resultStr.contains(DistributionConfig.ARCHIVE_FILE_SIZE_LIMIT_NAME));
+ assertEquals(true, resultStr.contains(ARCHIVE_FILE_SIZE_LIMIT));
assertEquals(true, !resultStr.contains("copy-on-read"));
cmdResult = executeCommand(command + " --" + CliStrings.DESCRIBE_CONFIG__HIDE__DEFAULTS + "=false");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
index 11d4c49..e0ce006 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommandsDUnitTest.java
@@ -60,8 +60,7 @@ import java.util.concurrent.Callable;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.TimeUnit;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.jayway.awaitility.Awaitility.waitAtMost;
@@ -773,8 +772,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
final Properties locatorProps = new Properties();
locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
- locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
locatorProps);
@@ -836,7 +835,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
assertNotNull(cache);
@@ -878,7 +877,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
assertNotNull(cache);
@@ -907,8 +906,8 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
final Properties locatorProps = new Properties();
locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
- locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
locatorProps);
@@ -988,7 +987,7 @@ public class CreateAlterDestroyRegionCommandsDUnitTest extends CliCommandTestBas
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
index 4ed7821..804314b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommandsDUnitTest.java
@@ -41,8 +41,7 @@ import java.io.IOException;
import java.util.Properties;
import java.util.regex.Pattern;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
/**
@@ -340,8 +339,8 @@ public class DeployCommandsDUnitTest extends CliCommandTestBase {
final Properties locatorProps = new Properties();
locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
- locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null, locatorProps);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
index fcfd16e..60d80c9 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommandsDUnitTest.java
@@ -441,10 +441,10 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
- locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
locatorProps);
@@ -524,7 +524,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
@@ -576,7 +576,7 @@ public class DiskStoreCommandsDUnitTest extends CliCommandTestBase {
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
index 0be65d2..8683ef3 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/HTTPServiceSSLSupportJUnitTest.java
@@ -29,7 +29,7 @@ import org.junit.experimental.categories.Category;
import java.io.File;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static org.junit.Assert.assertEquals;
/**
@@ -74,14 +74,14 @@ public class HTTPServiceSSLSupportJUnitTest {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_ENABLED_NAME, "true");
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_KEYSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_KEYSTORE_PASSWORD_NAME, "password");
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_KEYSTORE_TYPE_NAME, "JKS");
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_PROTOCOLS_NAME, "SSL");
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_REQUIRE_AUTHENTICATION_NAME, "true");
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_NAME, jks.getCanonicalPath());
- localProps.setProperty(DistributionConfig.CLUSTER_SSL_TRUSTSTORE_PASSWORD_NAME, "password");
+ localProps.setProperty(CLUSTER_SSL_ENABLED, "true");
+ localProps.setProperty(CLUSTER_SSL_KEYSTORE, jks.getCanonicalPath());
+ localProps.setProperty(CLUSTER_SSL_KEYSTORE_PASSWORD, "password");
+ localProps.setProperty(CLUSTER_SSL_KEYSTORE_TYPE, "JKS");
+ localProps.setProperty(CLUSTER_SSL_PROTOCOLS, "SSL");
+ localProps.setProperty(CLUSTER_SSL_REQUIRE_AUTHENTICATION, "true");
+ localProps.setProperty(CLUSTER_SSL_TRUSTSTORE, jks.getCanonicalPath());
+ localProps.setProperty(CLUSTER_SSL_TRUSTSTORE_PASSWORD, "password");
DistributionConfigImpl config = new DistributionConfigImpl(localProps);
@@ -101,12 +101,12 @@ public class HTTPServiceSSLSupportJUnitTest {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
- localProps.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
+ localProps.setProperty(SSL_ENABLED, "true");
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStore", jks.getCanonicalPath());
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.keyStorePassword", "password");
- localProps.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, "SSL");
- localProps.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
+ localProps.setProperty(SSL_PROTOCOLS, "SSL");
+ localProps.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStore", jks.getCanonicalPath());
System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "javax.net.ssl.trustStorePassword", "password");
@@ -129,10 +129,10 @@ public class HTTPServiceSSLSupportJUnitTest {
Properties localProps = new Properties();
localProps.setProperty(MCAST_PORT, "0");
- localProps.setProperty(DistributionConfig.SSL_ENABLED_NAME, "true");
+ localProps.setProperty(SSL_ENABLED, "true");
- localProps.setProperty(DistributionConfig.SSL_PROTOCOLS_NAME, "SSL");
- localProps.setProperty(DistributionConfig.SSL_REQUIRE_AUTHENTICATION_NAME, "true");
+ localProps.setProperty(SSL_PROTOCOLS, "SSL");
+ localProps.setProperty(SSL_REQUIRE_AUTHENTICATION, "true");
Properties sslProps = new Properties();
sslProps.setProperty("javax.net.ssl.keyStore", jks.getCanonicalPath());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
index 456da75..88ba958 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommandsDUnitTest.java
@@ -40,8 +40,7 @@ import java.io.File;
import java.io.IOException;
import java.util.Properties;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.*;
@Category(DistributedTest.class)
@@ -600,10 +599,10 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
final File locatorLogFile = new File("locator-" + locatorPort + ".log");
final Properties locatorProps = new Properties();
- locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
+ locatorProps.setProperty(NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
- locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
locatorProps);
@@ -684,7 +683,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
@@ -729,7 +728,7 @@ public class IndexCommandsDUnitTest extends CliCommandTestBase {
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
Cache cache = getCache();
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
index e190dba..385d200 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListAndDescribeRegionDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.compression.SnappyCompressor;
@@ -62,9 +64,9 @@ public class ListAndDescribeRegionDUnitTest extends CliCommandTestBase {
private Properties createProperties(String name, String groups) {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(SystemConfigurationProperties.NAME, name);
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
return props;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
index fb50491..931cdbe 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ListIndexCommandDUnitTest.java
@@ -22,7 +22,6 @@ import com.gemstone.gemfire.cache.query.IndexStatistics;
import com.gemstone.gemfire.cache.query.IndexType;
import com.gemstone.gemfire.cache.query.SelectResults;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.lang.MutableIdentifiable;
import com.gemstone.gemfire.internal.lang.ObjectUtils;
import com.gemstone.gemfire.internal.lang.StringUtils;
@@ -45,6 +44,8 @@ import static com.gemstone.gemfire.test.dunit.Assert.*;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getDUnitLogLevel;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* The ListIndexCommandDUnitTest class is distributed test suite of test cases for testing the index-based GemFire shell
* (Gfsh) commands.
@@ -126,7 +127,7 @@ public class ListIndexCommandDUnitTest extends CliCommandTestBase {
private Properties createDistributedSystemProperties(final String gemfireName) {
final Properties distributedSystemProperties = new Properties();
- distributedSystemProperties.setProperty(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
+ distributedSystemProperties.setProperty(LOG_LEVEL, getDUnitLogLevel());
distributedSystemProperties.setProperty(SystemConfigurationProperties.NAME, gemfireName);
return distributedSystemProperties;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
index fb21bf3..28ae887 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommandsDUnitTest.java
@@ -41,8 +41,7 @@ import java.io.File;
import java.io.IOException;
import java.util.*;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
-import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
import static com.gemstone.gemfire.test.dunit.Assert.assertEquals;
import static com.gemstone.gemfire.test.dunit.LogWriterUtils.getLogWriter;
import static com.gemstone.gemfire.test.dunit.NetworkUtils.getServerHostName;
@@ -78,9 +77,9 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
private Properties createProperties(String name, String groups) {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
props.setProperty(SystemConfigurationProperties.NAME, name);
props.setProperty(DistributionConfig.GROUPS_NAME, groups);
return props;
@@ -171,10 +170,10 @@ public class MemberCommandsDUnitTest extends JUnit4CacheTestCase {
props.setProperty(MCAST_PORT, "0");
props.setProperty(LOCATORS, getServerHostName(host) + "[" + locatorPort + "]");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
return props;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
index a4d5496..689d33a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommandsDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -58,7 +60,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
invokeInEveryVM(new SerializableRunnable("reset log level") {
public void run() {
if (cachedLogLevel != null) {
- System.setProperty(DistributionConfig.GEMFIRE_PREFIX + DistributionConfig.LOG_LEVEL_NAME, cachedLogLevel);
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + LOG_LEVEL, cachedLogLevel);
cachedLogLevel = null;
}
}
@@ -124,7 +126,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
public void testShowLogDefault() throws IOException {
Properties props = new Properties();
try {
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "testShowLogDefault.log");
+ props.setProperty(LOG_FILE, "testShowLogDefault.log");
setUpJmxManagerOnVm0ThenConnect(props);
final VM vm1 = Host.getHost(0).getVM(0);
final String vm1MemberId = (String) vm1.invoke(() -> getMemberId());
@@ -146,7 +148,7 @@ public class MiscellaneousCommandsDUnitTest extends CliCommandTestBase {
@Test
public void testShowLogNumLines() {
Properties props = new Properties();
- props.setProperty(DistributionConfig.LOG_FILE_NAME, "testShowLogNumLines.log");
+ props.setProperty(LOG_FILE, "testShowLogNumLines.log");
try {
setUpJmxManagerOnVm0ThenConnect(props);
final VM vm1 = Host.getHost(0).getVM(0);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
index d58a226..d1ee565 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommandsDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.asyncqueue.AsyncEventQueue;
import com.gemstone.gemfire.distributed.Locator;
@@ -261,8 +263,8 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
final Properties locatorProps = new Properties();
locatorProps.setProperty(SystemConfigurationProperties.NAME, "Locator");
locatorProps.setProperty(MCAST_PORT, "0");
- locatorProps.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
- locatorProps.setProperty(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "true");
+ locatorProps.setProperty(LOG_LEVEL, "fine");
+ locatorProps.setProperty(ENABLE_CLUSTER_CONFIGURATION, "true");
try {
final InternalLocator locator = (InternalLocator) Locator.startLocatorAndDS(locatorPort, locatorLogFile, null,
locatorProps);
@@ -365,7 +367,7 @@ public class QueueCommandsDUnitTest extends CliCommandTestBase {
localProps.setProperty(MCAST_PORT, "0");
localProps.setProperty(LOCATORS, "localhost:" + locatorPort);
localProps.setProperty(DistributionConfig.GROUPS_NAME, groupName);
- localProps.setProperty(DistributionConfig.USE_CLUSTER_CONFIGURATION_NAME, "true");
+ localProps.setProperty(USE_CLUSTER_CONFIGURATION, "true");
getSystem(localProps);
cache = getCache();
assertNotNull(cache);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/cb291539/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
index 42ef6eb..e94aa5a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/internal/cli/commands/ShowDeadlockDUnitTest.java
@@ -16,6 +16,8 @@
*/
package com.gemstone.gemfire.management.internal.cli.commands;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.execute.Function;
import com.gemstone.gemfire.cache.execute.FunctionContext;
@@ -164,10 +166,10 @@ public class ShowDeadlockDUnitTest extends JUnit4CacheTestCase {
Properties props = new Properties();
props.setProperty(MCAST_PORT, "0");
// props.setProperty(DistributionConfig.LOCATORS_NAME, getServerHostName(host) + "[" + locatorPort + "]");
- props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
- props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
- props.setProperty(DistributionConfig.ENABLE_TIME_STATISTICS_NAME, "true");
- props.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "true");
+ props.setProperty(LOG_LEVEL, "info");
+ props.setProperty(STATISTIC_SAMPLING_ENABLED, "true");
+ props.setProperty(ENABLE_TIME_STATISTICS, "true");
+ props.put(ENABLE_NETWORK_PARTITION_DETECTION, "true");
return props;
}
[09/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
index 3845587..ca5f6f7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/MaxPoolSizeDUnitTest.java
@@ -16,36 +16,24 @@
*/
package com.gemstone.gemfire.internal.jta.dunit;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+import java.io.*;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
+
public class MaxPoolSizeDUnitTest extends DistributedTestCase {
static DistributedSystem ds;
@@ -138,9 +126,9 @@ public class MaxPoolSizeDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
String tableName = "";
- // props.setProperty("mcast-port", "10339");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
// ds = DistributedSystem.connect(props);
ds = (new MaxPoolSizeDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
index 07fa3df..710b7dc 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TransactionTimeOutDUnitTest.java
@@ -16,40 +16,26 @@
*/
package com.gemstone.gemfire.internal.jta.dunit;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.sql.Connection;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-import javax.transaction.UserTransaction;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.datasource.GemFireTransactionDataSource;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.internal.jta.UserTransactionImpl;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
+import javax.naming.Context;
+import javax.sql.DataSource;
+import javax.transaction.UserTransaction;
+import java.io.*;
+import java.sql.Connection;
+import java.sql.ResultSet;
+import java.sql.Statement;
+import java.util.Properties;
+
/**
*This test tests TransactionTimeOut functionality
*/
@@ -75,8 +61,8 @@ public class TransactionTimeOutDUnitTest extends DistributedTestCase {
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
-// props.setProperty("mcast-port", "10321");
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10321");
try {
// ds = DistributedSystem.connect(props);
ds = (new TransactionTimeOutDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
index f8542b3..109c316 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnManagerMultiThreadDUnitTest.java
@@ -16,40 +16,27 @@
*/
package com.gemstone.gemfire.internal.jta.dunit;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.sql.DataSource;
-
-import org.junit.FixMethodOrder;
-import org.junit.runners.MethodSorters;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
import com.gemstone.gemfire.internal.jta.JTAUtils;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
+import org.junit.FixMethodOrder;
+import org.junit.runners.MethodSorters;
+
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.sql.DataSource;
+import java.io.*;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.Properties;
/**
* This test case is to test the following test scenarios: 1) Behaviour of
@@ -197,9 +184,9 @@ public class TxnManagerMultiThreadDUnitTest extends DistributedTestCase {
wr.write(modified_file_str1);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
String tableName = "";
- // props.setProperty("mcast-port", "10339");
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10339");
try {
// ds = DistributedSystem.connect(props);
ds = (new TxnManagerMultiThreadDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
index 38edde0..fa835be 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/jta/dunit/TxnTimeOutDUnitTest.java
@@ -16,34 +16,22 @@
*/
package com.gemstone.gemfire.internal.jta.dunit;
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.FileReader;
-import java.io.IOException;
-import java.io.OutputStreamWriter;
-import java.sql.SQLException;
-import java.util.Properties;
-
-import javax.naming.Context;
-import javax.naming.NamingException;
-import javax.transaction.UserTransaction;
-
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.jta.CacheUtils;
-import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.DistributedTestCase;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.ThreadUtils;
-import com.gemstone.gemfire.test.dunit.VM;
+import com.gemstone.gemfire.test.dunit.*;
import com.gemstone.gemfire.util.test.TestUtil;
+import javax.naming.Context;
+import javax.naming.NamingException;
+import javax.transaction.UserTransaction;
+import java.io.*;
+import java.sql.SQLException;
+import java.util.Properties;
+
/**
*This test sees if the TransactionTimeOut works properly
*/
@@ -69,9 +57,9 @@ public class TxnTimeOutDUnitTest extends DistributedTestCase {
wr.write(modified_file_str);
wr.flush();
wr.close();
- props.setProperty("cache-xml-file", path);
-// props.setProperty("mcast-port", "10321");
- props.setProperty("log-level", LogWriterUtils.getDUnitLogLevel());
+ props.setProperty(DistributionConfig.CACHE_XML_FILE_NAME, path);
+ // props.setProperty(DistributionConfig.SystemConfigurationProperties.MCAST_PORT, "10321");
+ props.setProperty(DistributionConfig.LOG_LEVEL_NAME, LogWriterUtils.getDUnitLogLevel());
try {
// ds = DistributedSystem.connect(props);
ds = (new TxnTimeOutDUnitTest("temp")).getSystem(props);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
index 061ea97..d4ef01b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/DistributedSystemLogFileJUnitTest.java
@@ -16,17 +16,14 @@
*/
package com.gemstone.gemfire.internal.logging;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.util.Properties;
-import java.util.Scanner;
-
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.logging.log4j.FastLogger;
+import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
+import com.gemstone.gemfire.test.dunit.Wait;
+import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -38,14 +35,15 @@ import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.logging.log4j.FastLogger;
-import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.util.Properties;
+import java.util.Scanner;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Connects DistributedSystem and tests logging behavior at a high level.
@@ -83,13 +81,13 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-0.log";
final Properties properties = new Properties();
- properties.put("log-file", logFileName);
- properties.put("log-level", "config");
- properties.put("mcast-port", "0");
- properties.put("locators", "");
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File logFile = new File(logFileName);
@@ -471,13 +469,13 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put("log-file", logFileName);
- properties.put("log-level", "fine");
- properties.put("mcast-port", "0");
- properties.put("locators", "");
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File logFile = new File(logFileName);
@@ -687,13 +685,13 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put("log-file", logFileName);
- properties.put("log-level", "debug");
- properties.put("mcast-port", "0");
- properties.put("locators", "");
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "debug");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File logFile = new File(logFileName);
@@ -904,14 +902,14 @@ public class DistributedSystemLogFileJUnitTest {
final String securityLogFileName = "security" + name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put("log-file", logFileName);
- properties.put("log-level", "fine");
- properties.put("security-log-file", securityLogFileName);
- properties.put("mcast-port", "0");
- properties.put("locators", "");
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(DistributionConfig.SECURITY_LOG_FILE_NAME, securityLogFileName);
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File securityLogFile = new File(securityLogFileName);
@@ -1022,15 +1020,15 @@ public class DistributedSystemLogFileJUnitTest {
final String securityLogFileName = "security" + name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put("log-file", logFileName);
- properties.put("log-level", "fine");
- properties.put("security-log-file", securityLogFileName);
- properties.put("security-log-level", "fine");
- properties.put("mcast-port", "0");
- properties.put("locators", "");
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(DistributionConfig.SECURITY_LOG_FILE_NAME, securityLogFileName);
+ properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "fine");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File securityLogFile = new File(securityLogFileName);
@@ -1201,14 +1199,14 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put("log-file", logFileName);
- properties.put("log-level", "fine");
- properties.put("security-log-level", "info");
- properties.put("mcast-port", "0");
- properties.put("locators", "");
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+ properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "info");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File logFile = new File(logFileName);
@@ -1350,14 +1348,14 @@ public class DistributedSystemLogFileJUnitTest {
final String logFileName = name.getMethodName() + "-system-"+ System.currentTimeMillis()+".log";
final Properties properties = new Properties();
- properties.put("log-file", logFileName);
- properties.put("log-level", "info");
- properties.put("security-log-level", "fine");
- properties.put("mcast-port", "0");
- properties.put("locators", "");
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_FILE_NAME, logFileName);
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "info");
+ properties.put(DistributionConfig.SECURITY_LOG_LEVEL_NAME, "fine");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, "");
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File logFile = new File(logFileName);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
index df9e5b6..f5baa9c 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LocatorLogFileJUnitTest.java
@@ -16,20 +16,6 @@
*/
package com.gemstone.gemfire.internal.logging;
-import java.io.File;
-import java.io.FileInputStream;
-import java.util.Properties;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.TestName;
-
-import static org.junit.Assert.*;
-import junit.framework.TestCase;
-
import com.gemstone.gemfire.distributed.Locator;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
@@ -38,6 +24,19 @@ import com.gemstone.gemfire.internal.logging.log4j.LogWriterLogger;
import com.gemstone.gemfire.test.dunit.Wait;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.TestName;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Creates Locator and tests logging behavior at a high level.
@@ -71,12 +70,12 @@ public class LocatorLogFileJUnitTest {
final String locators = "localhost[" + port + "]";
final Properties properties = new Properties();
- properties.put("log-level", "config");
- properties.put("mcast-port", "0");
- properties.put("locators", locators);
- properties.put("enable-network-partition-detection", "false");
- properties.put("disable-auto-reconnect", "true");
- properties.put("member-timeout", "2000");
+ properties.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+ properties.put(MCAST_PORT, "0");
+ properties.put(LOCATORS, locators);
+ properties.put(DistributionConfig.ENABLE_NETWORK_PARTITION_DETECTION_NAME, "false");
+ properties.put(DistributionConfig.DISABLE_AUTO_RECONNECT_NAME, "true");
+ properties.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
properties.put(DistributionConfig.ENABLE_CLUSTER_CONFIGURATION_NAME, "false");
final File logFile = new File(name.getMethodName() + "-locator-" + port + ".log");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
index 4498ca6..d767e98 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LogWriterPerformanceTest.java
@@ -16,19 +16,18 @@
*/
package com.gemstone.gemfire.internal.logging;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.Properties;
-
-import org.junit.Ignore;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
import com.gemstone.gemfire.internal.util.IOUtils;
import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
+import org.junit.Ignore;
+import org.junit.experimental.categories.Category;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.Properties;
/**
* Tests performance of logging when level is OFF.
@@ -44,7 +43,7 @@ public class LogWriterPerformanceTest extends LoggingPerformanceTestCase {
protected Properties createGemFireProperties() {
final Properties props = new Properties();
- this.logFile = new File(this.configDirectory, "gemfire.log");
+ this.logFile = new File(this.configDirectory, DistributionConfig.GEMFIRE_PREFIX + "log");
final String logFilePath = IOUtils.tryGetCanonicalPathElseGetAbsolutePath(logFile);
props.setProperty(DistributionConfig.LOG_FILE_NAME, logFilePath);
props.setProperty(DistributionConfig.LOG_LEVEL_NAME, "info");
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LoggingPerformanceTestCase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LoggingPerformanceTestCase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LoggingPerformanceTestCase.java
index c7f326f..bc7cf39 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LoggingPerformanceTestCase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/LoggingPerformanceTestCase.java
@@ -16,20 +16,20 @@
*/
package com.gemstone.gemfire.internal.logging;
-import java.io.File;
-import java.io.IOException;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.util.StopWatch;
-
import junit.framework.TestCase;
+import java.io.File;
+import java.io.IOException;
+
/**
* Tests performance of logging when level is OFF.
*
*/
public abstract class LoggingPerformanceTestCase extends TestCase {
- protected static final boolean TIME_BASED = Boolean.getBoolean("gemfire.test.LoggingPerformanceTestCase.TIME_BASED");
+ protected static final boolean TIME_BASED = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "test.LoggingPerformanceTestCase.TIME_BASED");
protected static final long TIME_TO_RUN = 1000 * 60 * 10; // ten minutes
protected static final int LOG_SETS = 1000;
protected static final int LOG_REPETITIONS_PER_SET = 1000;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
index 786565a..9b587a6 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/TestLogWriterFactory.java
@@ -16,14 +16,6 @@
*/
package com.gemstone.gemfire.internal.logging;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-
-import junit.framework.Assert;
-
import com.gemstone.gemfire.GemFireIOException;
import com.gemstone.gemfire.LogWriter;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -33,6 +25,9 @@ import com.gemstone.gemfire.internal.OSProcess;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.process.ProcessLauncherContext;
import com.gemstone.gemfire.internal.util.LogFileUtils;
+import junit.framework.Assert;
+
+import java.io.*;
/**
* Creates LogWriter instances for testing.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
index 1ad30bd..f303d35 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/Log4J2PerformanceTest.java
@@ -16,13 +16,11 @@
*/
package com.gemstone.gemfire.internal.logging.log4j;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.FileUtil;
+import com.gemstone.gemfire.internal.logging.LoggingPerformanceTestCase;
+import com.gemstone.gemfire.internal.util.IOUtils;
+import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
@@ -31,10 +29,8 @@ import org.apache.logging.log4j.core.config.ConfigurationFactory;
import org.junit.Ignore;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.internal.logging.LoggingPerformanceTestCase;
-import com.gemstone.gemfire.internal.util.IOUtils;
-import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
+import java.io.*;
+import java.net.URL;
@Category(PerformanceTest.class)
@Ignore("Tests have no assertions")
@@ -99,8 +95,8 @@ public class Log4J2PerformanceTest extends LoggingPerformanceTestCase {
FileUtils.copyFileToDirectory(src, this.configDirectory);
this.config = new File(this.configDirectory, "log4j2-test.xml");
assertTrue(this.config.exists());
-
- this.logFile = new File(this.configDirectory, "gemfire.log");
+
+ this.logFile = new File(this.configDirectory, DistributionConfig.GEMFIRE_PREFIX + "log");
final String logFilePath = IOUtils.tryGetCanonicalPathElseGetAbsolutePath(logFile);
final String logFileName = FileUtil.stripOffExtension(logFilePath);
setPropertySubstitutionValues(logFileName, DEFAULT_LOG_FILE_SIZE_LIMIT, DEFAULT_LOG_FILE_COUNT_LIMIT);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
index 3d8ee46..f186672 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/LogWriterLoggerPerformanceTest.java
@@ -16,13 +16,11 @@
*/
package com.gemstone.gemfire.internal.logging.log4j;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.PrintWriter;
-import java.net.URL;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.FileUtil;
+import com.gemstone.gemfire.internal.logging.LoggingPerformanceTestCase;
+import com.gemstone.gemfire.internal.util.IOUtils;
+import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
import org.apache.commons.io.FileUtils;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;
@@ -30,10 +28,8 @@ import org.apache.logging.log4j.core.config.ConfigurationFactory;
import org.junit.Ignore;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.internal.FileUtil;
-import com.gemstone.gemfire.internal.logging.LoggingPerformanceTestCase;
-import com.gemstone.gemfire.internal.util.IOUtils;
-import com.gemstone.gemfire.test.junit.categories.PerformanceTest;
+import java.io.*;
+import java.net.URL;
@Category(PerformanceTest.class)
@Ignore("Tests have no assertions")
@@ -98,8 +94,8 @@ public class LogWriterLoggerPerformanceTest extends LoggingPerformanceTestCase {
FileUtils.copyFileToDirectory(src, this.configDirectory);
this.config = new File(this.configDirectory, "log4j2-test.xml");
assertTrue(this.config.exists());
-
- this.logFile = new File(this.configDirectory, "gemfire.log");
+
+ this.logFile = new File(this.configDirectory, DistributionConfig.GEMFIRE_PREFIX + "log");
final String logFilePath = IOUtils.tryGetCanonicalPathElseGetAbsolutePath(logFile);
final String logFileName = FileUtil.stripOffExtension(logFilePath);
setPropertySubstitutionValues(logFileName, DEFAULT_LOG_FILE_SIZE_LIMIT, DEFAULT_LOG_FILE_COUNT_LIMIT);
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
index 632b69c..2e86404 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/logging/log4j/custom/CustomConfigWithCacheIntegrationTest.java
@@ -16,12 +16,13 @@
*/
package com.gemstone.gemfire.internal.logging.log4j.custom;
-import static com.gemstone.gemfire.internal.logging.log4j.custom.CustomConfiguration.*;
-import static org.assertj.core.api.Assertions.*;
-
-import java.io.File;
-import java.util.Properties;
-
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.logging.log4j.Configurator;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.core.LogEvent;
import org.apache.logging.log4j.core.config.ConfigurationFactory;
@@ -36,13 +37,13 @@ import org.junit.experimental.categories.Category;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.TestName;
-import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.log4j.Configurator;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.io.File;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static com.gemstone.gemfire.internal.logging.log4j.custom.CustomConfiguration.*;
+import static org.assertj.core.api.Assertions.assertThat;
/**
* Integration tests with custom log4j2 configuration.
@@ -81,8 +82,8 @@ public class CustomConfigWithCacheIntegrationTest {
System.setProperty(ConfigurationFactory.CONFIGURATION_FILE_PROPERTY, this.customConfigFile.getAbsolutePath());
Properties gemfireProperties = new Properties();
- gemfireProperties.put(DistributionConfig.LOCATORS_NAME, "");
- gemfireProperties.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ gemfireProperties.put(LOCATORS, "");
+ gemfireProperties.put(MCAST_PORT, "0");
gemfireProperties.put(DistributionConfig.LOG_LEVEL_NAME, "info");
this.cache = new CacheFactory(gemfireProperties).create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
index 9c6a3db..2b376da 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListManagerTest.java
@@ -16,22 +16,23 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static com.googlecode.catchexception.CatchException.*;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.junit.Assert.fail;
-import static org.mockito.Mockito.*;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicReferenceArray;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
import org.apache.logging.log4j.Logger;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicReferenceArray;
+
+import static com.googlecode.catchexception.CatchException.catchException;
+import static com.googlecode.catchexception.CatchException.caughtException;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.*;
@Category(UnitTest.class)
public class FreeListManagerTest {
@@ -528,7 +529,7 @@ public class FreeListManagerTest {
FreeListManager.verifyOffHeapFreeListCount(-1);
fail("expected IllegalStateException");
} catch (IllegalStateException expected) {
- assertThat(expected.getMessage()).contains("gemfire.OFF_HEAP_FREE_LIST_COUNT must be >= 1.");
+ assertThat(expected.getMessage()).contains(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_FREE_LIST_COUNT must be >= 1.");
}
}
@Test
@@ -537,7 +538,7 @@ public class FreeListManagerTest {
FreeListManager.verifyOffHeapFreeListCount(0);
fail("expected IllegalStateException");
} catch (IllegalStateException expected) {
- assertThat(expected.getMessage()).contains("gemfire.OFF_HEAP_FREE_LIST_COUNT must be >= 1.");
+ assertThat(expected.getMessage()).contains(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_FREE_LIST_COUNT must be >= 1.");
}
}
@Test
@@ -550,7 +551,7 @@ public class FreeListManagerTest {
FreeListManager.verifyOffHeapAlignment(-1);
fail("expected IllegalStateException");
} catch (IllegalStateException expected) {
- assertThat(expected.getMessage()).contains("gemfire.OFF_HEAP_ALIGNMENT must be a multiple of 8");
+ assertThat(expected.getMessage()).contains(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_ALIGNMENT must be a multiple of 8");
}
}
@Test
@@ -559,7 +560,7 @@ public class FreeListManagerTest {
FreeListManager.verifyOffHeapAlignment(9);
fail("expected IllegalStateException");
} catch (IllegalStateException expected) {
- assertThat(expected.getMessage()).contains("gemfire.OFF_HEAP_ALIGNMENT must be a multiple of 8");
+ assertThat(expected.getMessage()).contains(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_ALIGNMENT must be a multiple of 8");
}
}
@Test
@@ -568,7 +569,7 @@ public class FreeListManagerTest {
FreeListManager.verifyOffHeapAlignment(256+8);
fail("expected IllegalStateException");
} catch (IllegalStateException expected) {
- assertThat(expected.getMessage()).contains("gemfire.OFF_HEAP_ALIGNMENT must be <= 256");
+ assertThat(expected.getMessage()).contains(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_ALIGNMENT must be <= 256");
}
}
@Test
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
index 0272e38..74ddd13 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
@@ -16,9 +16,9 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import org.junit.experimental.categories.Category;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
@Category(IntegrationTest.class)
public class FreeListOffHeapRegionJUnitTest extends OffHeapRegionBase {
@@ -30,12 +30,12 @@ public class FreeListOffHeapRegionJUnitTest extends OffHeapRegionBase {
@Override
public void configureOffHeapStorage() {
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "1m");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "1m");
}
@Override
public void unconfigureOffHeapStorage() {
- System.clearProperty("gemfire.OFF_HEAP_SLAB_SIZE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE");
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/InlineKeyJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/InlineKeyJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/InlineKeyJUnitTest.java
index 9916b0a..b08c860 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/InlineKeyJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/InlineKeyJUnitTest.java
@@ -16,36 +16,31 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import java.util.Properties;
-import java.util.UUID;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.util.ObjectSizer;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryOffHeapIntKey;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryOffHeapLongKey;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryOffHeapObjectKey;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryOffHeapStringKey1;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryOffHeapStringKey2;
-import com.gemstone.gemfire.internal.cache.VMThinRegionEntryOffHeapUUIDKey;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+import java.util.UUID;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
@Category(IntegrationTest.class)
public class InlineKeyJUnitTest {
private GemFireCacheImpl createCache() {
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
- props.setProperty("off-heap-memory-size", "1m");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, "1m");
GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).create();
return result;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java
index 2f202f8..5187c04 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternIntegrationTest.java
@@ -16,7 +16,12 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
import java.util.Collections;
import java.util.LinkedList;
@@ -26,12 +31,8 @@ import java.util.concurrent.CountDownLatch;
import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.TimeUnit;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
/**
* Tests fill pattern validation for the {@link MemoryAllocatorImpl}.
@@ -91,7 +92,7 @@ public class MemoryAllocatorFillPatternIntegrationTest {
*/
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.validateOffHeapWithFill", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "validateOffHeapWithFill", "true");
this.slab = new SlabImpl(SLAB_SIZE);
this.allocator = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{this.slab});
}
@@ -102,7 +103,7 @@ public class MemoryAllocatorFillPatternIntegrationTest {
@After
public void tearDown() throws Exception {
MemoryAllocatorImpl.freeOffHeapMemory();
- System.clearProperty("gemfire.validateOffHeapWithFill");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "validateOffHeapWithFill");
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
index be1fcad..b90c3b8 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryAllocatorFillPatternJUnitTest.java
@@ -16,15 +16,17 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static com.googlecode.catchexception.CatchException.*;
-import static org.junit.Assert.*;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import static com.googlecode.catchexception.CatchException.catchException;
+import static com.googlecode.catchexception.CatchException.caughtException;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
/**
* Tests fill pattern validation for the {@link MemoryAllocatorImpl}.
@@ -61,7 +63,7 @@ public class MemoryAllocatorFillPatternJUnitTest {
*/
@Before
public void setUp() throws Exception {
- System.setProperty("gemfire.validateOffHeapWithFill", "true");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "validateOffHeapWithFill", "true");
this.slab = new SlabImpl(SLAB_SIZE);
this.allocator = MemoryAllocatorImpl.createForUnitTest(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new SlabImpl[]{this.slab});
}
@@ -72,7 +74,7 @@ public class MemoryAllocatorFillPatternJUnitTest {
@After
public void tearDown() throws Exception {
MemoryAllocatorImpl.freeOffHeapMemory();
- System.clearProperty("gemfire.validateOffHeapWithFill");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "validateOffHeapWithFill");
}
/**
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
index 4e7c827..e41b61e 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNodeJUnitTest.java
@@ -16,13 +16,12 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
-
-import java.io.ByteArrayOutputStream;
-import java.io.PrintStream;
-import java.nio.ByteBuffer;
-
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.internal.DSCODE;
+import com.gemstone.gemfire.internal.cache.EntryEventImpl;
+import com.gemstone.gemfire.internal.offheap.MemoryBlock.State;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
import org.assertj.core.api.JUnitSoftAssertions;
import org.junit.After;
import org.junit.Before;
@@ -33,11 +32,12 @@ import org.junit.contrib.java.lang.system.RestoreSystemProperties;
import org.junit.experimental.categories.Category;
import org.junit.rules.ExpectedException;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.offheap.MemoryBlock.State;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+import java.nio.ByteBuffer;
+
+import static org.junit.Assert.fail;
+import static org.mockito.Mockito.*;
@Category(UnitTest.class)
public class MemoryBlockNodeJUnitTest {
@@ -52,7 +52,8 @@ public class MemoryBlockNodeJUnitTest {
private StoredObject storedObject = null;
@Rule
- public final ProvideSystemProperty myPropertyHasMyValue = new ProvideSystemProperty("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION", "true");
+ public final ProvideSystemProperty myPropertyHasMyValue = new ProvideSystemProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_DO_EXPENSIVE_VALIDATION",
+ "true");
@Rule
public final RestoreSystemProperties restoreSystemProperties = new RestoreSystemProperties();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
index 2cc5f03..12f6d9b 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapIndexJUnitTest.java
@@ -16,25 +16,23 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.query.*;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.query.IndexExistsException;
-import com.gemstone.gemfire.cache.query.IndexInvalidException;
-import com.gemstone.gemfire.cache.query.IndexNameConflictException;
-import com.gemstone.gemfire.cache.query.QueryService;
-import com.gemstone.gemfire.cache.query.RegionNotFoundException;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
* Test off-heap regions with indexes.
@@ -48,9 +46,9 @@ public class OffHeapIndexJUnitTest {
@Before
public void setUp() {
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
- props.setProperty("off-heap-memory-size", "100m");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, "100m");
this.gfc = (GemFireCacheImpl) new CacheFactory(props).create();
}
@After
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
index f3b0c33..70c709f 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
@@ -16,19 +16,6 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.Serializable;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Properties;
-
-import org.junit.Test;
-
import com.gemstone.gemfire.OutOfOffHeapMemoryException;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.EntryEvent;
@@ -37,11 +24,8 @@ import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.compression.Compressor;
import com.gemstone.gemfire.compression.SnappyCompressor;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.cache.OffHeapRegionEntry;
-import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier;
import com.gemstone.gemfire.internal.offheap.annotations.Released;
import com.gemstone.gemfire.internal.offheap.annotations.Retained;
@@ -49,6 +33,16 @@ import com.gemstone.gemfire.pdx.PdxReader;
import com.gemstone.gemfire.pdx.PdxSerializable;
import com.gemstone.gemfire.pdx.PdxWriter;
import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import org.junit.Test;
+
+import java.io.Serializable;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Basic test of regions that use off heap storage.
@@ -68,9 +62,9 @@ public abstract class OffHeapRegionBase {
private GemFireCacheImpl createCache(boolean isPersistent) {
configureOffHeapStorage();
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
- props.setProperty("off-heap-memory-size", getOffHeapMemorySize());
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, getOffHeapMemorySize());
GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).setPdxPersistent(isPersistent).create();
unconfigureOffHeapStorage();
return result;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
index 2836a38..90ff3cf 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapStorageJUnitTest.java
@@ -16,22 +16,23 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.*;
-import static org.mockito.Mockito.*;
-
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.contrib.java.lang.system.RestoreSystemProperties;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.OutOfOffHeapMemoryException;
import com.gemstone.gemfire.StatisticsFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionStats;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
import com.gemstone.gemfire.internal.LocalStatisticsFactory;
import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.contrib.java.lang.system.RestoreSystemProperties;
+import org.junit.experimental.categories.Category;
+
+import static org.junit.Assert.*;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
@Category(UnitTest.class)
public class OffHeapStorageJUnitTest {
@@ -90,28 +91,28 @@ public class OffHeapStorageJUnitTest {
assertEquals(100, OffHeapStorage.calcMaxSlabSize(100L));
assertEquals(Integer.MAX_VALUE, OffHeapStorage.calcMaxSlabSize(Long.MAX_VALUE));
try {
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "99");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "99");
assertEquals(99 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(100L * 1024 * 1024));
assertEquals(88, OffHeapStorage.calcMaxSlabSize(88));
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "88m");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "88m");
assertEquals(88 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(100L * 1024 * 1024));
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "77M");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "77M");
assertEquals(77 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(100L * 1024 * 1024));
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "1g");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "1g");
assertEquals(1 * 1024 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(2L * 1024 * 1024 * 1024));
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "1G");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "1G");
assertEquals(1L * 1024 * 1024 * 1024, OffHeapStorage.calcMaxSlabSize(2L * 1024 * 1024 * 1024 + 1));
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "foobarG");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "foobarG");
try {
OffHeapStorage.calcMaxSlabSize(100);
fail("expected IllegalArgumentException");
} catch (IllegalArgumentException expected) {
}
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "");
assertEquals(100, OffHeapStorage.calcMaxSlabSize(100L));
assertEquals(Integer.MAX_VALUE, OffHeapStorage.calcMaxSlabSize(Long.MAX_VALUE));
} finally {
- System.clearProperty("gemfire.OFF_HEAP_SLAB_SIZE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE");
}
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
index ba030e8..e7fc8b7 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
@@ -16,52 +16,30 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.io.Serializable;
-import java.sql.Timestamp;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.Comparator;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.IdentityHashMap;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Stack;
-import java.util.TreeMap;
-import java.util.TreeSet;
-import java.util.UUID;
-import java.util.Vector;
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.cache.CacheFactory;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.RegionShortcut;
import com.gemstone.gemfire.compression.SnappyCompressor;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.HeapDataOutputStream;
import com.gemstone.gemfire.internal.Version;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.io.IOException;
+import java.io.Serializable;
+import java.sql.Timestamp;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.*;
/**
* Basic integration tests for validating the off-heap implementation.
@@ -84,9 +62,9 @@ public class OffHeapValidationJUnitTest {
protected GemFireCacheImpl createCache() {
Properties props = new Properties();
- props.setProperty("locators", "");
- props.setProperty("mcast-port", "0");
- props.setProperty("off-heap-memory-size", getOffHeapMemorySize());
+ props.setProperty(LOCATORS, "");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, getOffHeapMemorySize());
GemFireCacheImpl result = (GemFireCacheImpl) new CacheFactory(props).create();
return result;
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
index e9ca59d..e8fa29b 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
@@ -16,9 +16,9 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import org.junit.experimental.categories.Category;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.experimental.categories.Category;
@Category(IntegrationTest.class)
public class OldFreeListOffHeapRegionJUnitTest extends OffHeapRegionBase {
@@ -30,13 +30,13 @@ public class OldFreeListOffHeapRegionJUnitTest extends OffHeapRegionBase {
@Override
public void configureOffHeapStorage() {
- System.setProperty("gemfire.OFF_HEAP_SLAB_SIZE", "1m");
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE", "1m");
}
@Override
public void unconfigureOffHeapStorage() {
- System.clearProperty("gemfire.OFF_HEAP_TOTAL_SIZE");
- System.clearProperty("gemfire.OFF_HEAP_SLAB_SIZE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_TOTAL_SIZE");
+ System.clearProperty(DistributionConfig.GEMFIRE_PREFIX + "OFF_HEAP_SLAB_SIZE");
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
index 99fadfc..3b57d7c 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/OutOfOffHeapMemoryDUnitTest.java
@@ -16,14 +16,6 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import java.util.Properties;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.OutOfOffHeapMemoryException;
import com.gemstone.gemfire.cache.Cache;
import com.gemstone.gemfire.cache.Region;
@@ -43,10 +35,15 @@ import com.gemstone.gemfire.test.dunit.Host;
import com.gemstone.gemfire.test.dunit.IgnoredException;
import com.gemstone.gemfire.test.dunit.Invoke;
import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import org.apache.logging.log4j.Logger;
+import java.util.Properties;
+import java.util.concurrent.Callable;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
import static com.jayway.awaitility.Awaitility.with;
import static org.hamcrest.CoreMatchers.equalTo;
@@ -118,7 +115,7 @@ public class OutOfOffHeapMemoryDUnitTest extends CacheTestCase {
@Override
public Properties getDistributedSystemProperties() {
final Properties props = new Properties();
- props.put(DistributionConfig.MCAST_PORT_NAME, "0");
+ props.put(MCAST_PORT, "0");
props.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
if (isSmallerVM.get()) {
props.setProperty(DistributionConfig.OFF_HEAP_MEMORY_SIZE_NAME, getSmallerOffHeapMemorySize());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
index d8999fe..fcd1448 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/offheap/TxReleasesOffHeapOnCloseJUnitTest.java
@@ -16,19 +16,17 @@
*/
package com.gemstone.gemfire.internal.offheap;
-import static org.junit.Assert.assertEquals;
-
-import java.util.Properties;
-
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.CacheTransactionManager;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
@Category(IntegrationTest.class)
public class TxReleasesOffHeapOnCloseJUnitTest {
@@ -37,9 +35,9 @@ public class TxReleasesOffHeapOnCloseJUnitTest {
protected void createCache() {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
- props.setProperty("locators", "");
- props.setProperty("off-heap-memory-size", "1m");
+ props.setProperty(MCAST_PORT, "0");
+ props.setProperty(LOCATORS, "");
+ props.setProperty(SystemConfigurationProperties.OFF_HEAP_MEMORY_SIZE, "1m");
cache = new CacheFactory(props).create();
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
index 87ca34f..dbb8842 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/size/ObjectTraverserJUnitTest.java
@@ -16,19 +16,16 @@
*/
package com.gemstone.gemfire.internal.size;
-import static org.junit.Assert.*;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.Map;
-import java.util.Set;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
+import java.util.*;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
@Category(UnitTest.class)
public class ObjectTraverserJUnitTest {
@@ -100,8 +97,8 @@ public class ObjectTraverserJUnitTest {
Object object3 = new Object();
set1.add(set2);
set2.add(object3);
-
- System.setProperty("gemfire.ObjectSizer.SIZE_OF_CLASS", "com.gemstone.gemfire.internal.size.SizeOfUtil0");
+
+ System.setProperty(DistributionConfig.GEMFIRE_PREFIX + "ObjectSizer.SIZE_OF_CLASS", "com.gemstone.gemfire.internal.size.SizeOfUtil0");
System.out.println(ObjectGraphSizer.histogram(set1, true));
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
index 830a73f..8aa78af 100755
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/statistics/StatisticsDUnitTest.java
@@ -16,35 +16,8 @@
*/
package com.gemstone.gemfire.internal.statistics;
-import java.io.File;
-import java.io.FileFilter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Properties;
-import java.util.Random;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.atomic.AtomicReferenceArray;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.Statistics;
-import com.gemstone.gemfire.StatisticsFactory;
-import com.gemstone.gemfire.StatisticsType;
-import com.gemstone.gemfire.StatisticsTypeFactory;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheException;
-import com.gemstone.gemfire.cache.CacheListener;
-import com.gemstone.gemfire.cache.EntryEvent;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionEvent;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.Scope;
+import com.gemstone.gemfire.*;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.util.CacheListenerAdapter;
import com.gemstone.gemfire.cache.util.RegionMembershipListenerAdapter;
import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
@@ -53,21 +26,21 @@ import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.internal.GemFireStatSampler;
-import com.gemstone.gemfire.internal.NanoTimer;
-import com.gemstone.gemfire.internal.StatArchiveReader;
+import com.gemstone.gemfire.internal.*;
import com.gemstone.gemfire.internal.StatArchiveReader.StatSpec;
-import com.gemstone.gemfire.internal.StatSamplerStats;
-import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
import com.gemstone.gemfire.internal.StatArchiveReader.StatValue;
import com.gemstone.gemfire.test.dunit.Assert;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.Host;
-import com.gemstone.gemfire.test.dunit.Invoke;
-import com.gemstone.gemfire.test.dunit.SerializableCallable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
+import com.gemstone.gemfire.test.dunit.*;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.io.IOException;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.atomic.AtomicReferenceArray;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
/**
* Integration tests for Statistics. VM0 performs puts and VM1 receives
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
index 20e953d..ee59e8a 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/stats50/AtomicStatsJUnitTest.java
@@ -16,23 +16,24 @@
*/
package com.gemstone.gemfire.internal.stats50;
-import static org.junit.Assert.assertEquals;
-
-import java.util.Properties;
-import java.util.concurrent.BrokenBarrierException;
-import java.util.concurrent.CyclicBarrier;
-import java.util.concurrent.atomic.AtomicReference;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
import com.gemstone.gemfire.StatisticDescriptor;
import com.gemstone.gemfire.Statistics;
import com.gemstone.gemfire.StatisticsType;
import com.gemstone.gemfire.StatisticsTypeFactory;
import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.StatisticsTypeFactoryImpl;
import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.Properties;
+import java.util.concurrent.BrokenBarrierException;
+import java.util.concurrent.CyclicBarrier;
+import java.util.concurrent.atomic.AtomicReference;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+import static org.junit.Assert.assertEquals;
/**
*
@@ -49,9 +50,9 @@ public class AtomicStatsJUnitTest {
public void testConcurrentGets() throws Throwable {
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
// props.setProperty("statistic-sample-rate", "60000");
- props.setProperty("statistic-sampling-enabled", "false");
+ props.setProperty(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "false");
DistributedSystem ds = DistributedSystem.connect(props);
String statName = "TestStats";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ConcurrentHashMapIteratorJUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ConcurrentHashMapIteratorJUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ConcurrentHashMapIteratorJUnitTest.java
index e4489d4..ea927cc 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ConcurrentHashMapIteratorJUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/internal/util/concurrent/ConcurrentHashMapIteratorJUnitTest.java
@@ -16,19 +16,15 @@
*/
package com.gemstone.gemfire.internal.util.concurrent;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.concurrent.ConcurrentMap;
-
+import com.gemstone.gemfire.distributed.DistributedSystem;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import junit.framework.TestCase;
import org.junit.experimental.categories.Category;
-import junit.framework.TestCase;
+import java.util.*;
+import java.util.concurrent.ConcurrentMap;
-import com.gemstone.gemfire.distributed.DistributedSystem;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
@SuppressWarnings({ "rawtypes", "unchecked" })
@Category(IntegrationTest.class)
@@ -39,7 +35,7 @@ public class ConcurrentHashMapIteratorJUnitTest extends TestCase {
//Apparently, we need a distributed system to create
//this CHM, because it's locks use DS properties.
Properties props = new Properties();
- props.setProperty("mcast-port", "0");
+ props.setProperty(MCAST_PORT, "0");
DistributedSystem.connect(props);
java.util.concurrent.ConcurrentHashMap baselineMap = new java.util.concurrent.ConcurrentHashMap();
CustomEntryConcurrentHashMap testMap = new CustomEntryConcurrentHashMap();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java b/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
index 741fa2a..30a4255 100644
--- a/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
+++ b/geode-core/src/test/java/com/gemstone/gemfire/management/CacheManagementDUnitTest.java
@@ -16,44 +16,24 @@
*/
package com.gemstone.gemfire.management;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.Callable;
-import java.util.concurrent.TimeUnit;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.JMException;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.FixedPartitionAttributes;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionFactory;
-import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.management.internal.MBeanJMXAdapter;
import com.gemstone.gemfire.management.internal.ManagementConstants;
-import com.gemstone.gemfire.management.internal.SystemManagementService;
import com.gemstone.gemfire.management.internal.NotificationHub.NotificationHubListener;
-import com.gemstone.gemfire.test.dunit.AsyncInvocation;
-import com.gemstone.gemfire.test.dunit.LogWriterUtils;
-import com.gemstone.gemfire.test.dunit.SerializableRunnable;
-import com.gemstone.gemfire.test.dunit.VM;
-import com.gemstone.gemfire.test.dunit.Wait;
-import com.gemstone.gemfire.test.dunit.WaitCriterion;
-
-import static com.jayway.awaitility.Awaitility.*;
-import static org.hamcrest.Matchers.*;
+import com.gemstone.gemfire.management.internal.SystemManagementService;
+import com.gemstone.gemfire.test.dunit.*;
+
+import javax.management.*;
+import java.util.*;
+import java.util.concurrent.TimeUnit;
+
+import static com.jayway.awaitility.Awaitility.to;
+import static com.jayway.awaitility.Awaitility.waitAtMost;
+import static org.hamcrest.Matchers.equalTo;
/**
* This class checks and verifies various data and operations exposed through
[39/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
index b3e49e8..9f3c6c9 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
@@ -16,42 +16,23 @@
*/
package com.gemstone.gemfire.admin.internal;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.PrintStream;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Properties;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.admin.AdminXmlException;
-import com.gemstone.gemfire.admin.CacheServerConfig;
-import com.gemstone.gemfire.admin.CacheVmConfig;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.DistributionLocator;
-import com.gemstone.gemfire.admin.DistributionLocatorConfig;
+import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
-import com.gemstone.gemfire.internal.Banner;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.internal.logging.LocalLogWriter;
import com.gemstone.gemfire.internal.logging.LogConfig;
import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.LogWriterFactory;
import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import com.gemstone.gemfire.internal.logging.ManagerLogWriter;
-import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.*;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
/**
* An implementation of the configuration object for an
@@ -65,11 +46,11 @@ import com.gemstone.gemfire.internal.logging.log4j.LogWriterAppender;
*
* @since GemFire 3.5
*/
-public class DistributedSystemConfigImpl
- implements DistributedSystemConfig {
+public class DistributedSystemConfigImpl
+ implements DistributedSystemConfig {
private static final Logger logger = LogService.getLogger();
-
+
private String entityConfigXMLFile = DEFAULT_ENTITY_CONFIG_XML_FILE;
private String systemId = DEFAULT_SYSTEM_ID;
private String mcastAddress = DEFAULT_MCAST_ADDRESS;
@@ -86,7 +67,6 @@ public class DistributedSystemConfigImpl
private int memberTimeout = DEFAULT_MEMBER_TIMEOUT;
private String membershipPortRange = getMembershipPortRangeString(DEFAULT_MEMBERSHIP_PORT_RANGE);
private int tcpPort = DEFAULT_TCP_PORT;
-
private String logFile = DEFAULT_LOG_FILE;
private String logLevel = DEFAULT_LOG_LEVEL;
@@ -95,29 +75,39 @@ public class DistributedSystemConfigImpl
private int refreshInterval = DEFAULT_REFRESH_INTERVAL;
private Properties gfSecurityProperties = new Properties();
- /** Listeners to notify when this DistributedSystemConfig changes */
+ /**
+ * Listeners to notify when this DistributedSystemConfig changes
+ */
private Set listeners = new HashSet();
-
- /** Configs for CacheServers that this system config is aware of */
+
+ /**
+ * Configs for CacheServers that this system config is aware of
+ */
private Set cacheServerConfigs = new HashSet();
- /** Configs for the managed distribution locators in the distributed
- * system */
+ /**
+ * Configs for the managed distribution locators in the distributed
+ * system
+ */
private Set locatorConfigs = new HashSet();
-
- /** The display name of this distributed system */
+
+ /**
+ * The display name of this distributed system
+ */
private String systemName = DEFAULT_NAME;
- /** The admin distributed system object that is configured by this
- * config object.
+ /**
+ * The admin distributed system object that is configured by this
+ * config object.
*
* @since GemFire 4.0 */
private AdminDistributedSystemImpl system;
- /** The GemFire log writer used by the distributed system */
+ /**
+ * The GemFire log writer used by the distributed system
+ */
private InternalLogWriter logWriter;
-
/////////////////////// Static Methods ///////////////////////
/**
@@ -128,17 +118,17 @@ public class DistributedSystemConfigImpl
* @since GemFire 4.0
*/
private static Properties
- filterOutAdminProperties(Properties props) {
+ filterOutAdminProperties(Properties props) {
Properties props2 = new Properties();
for (Enumeration names = props.propertyNames();
names.hasMoreElements(); ) {
String name = (String) names.nextElement();
if (!(ENTITY_CONFIG_XML_FILE_NAME.equals(name) ||
- REFRESH_INTERVAL_NAME.equals(name) ||
- REMOTE_COMMAND_NAME.equals(name)
- )
- ) {
+ REFRESH_INTERVAL_NAME.equals(name) ||
+ REMOTE_COMMAND_NAME.equals(name)
+ )
+ ) {
String value = props.getProperty(name);
if ((name != null) && (value != null)) {
props2.setProperty(name, value);
@@ -154,10 +144,10 @@ public class DistributedSystemConfigImpl
/**
* Creates a new <code>DistributedSystemConfigImpl</code> based on
* the configuration stored in a <code>DistributedSystem</code>'s
- * <code>DistributionConfig</code>.
+ * <code>DistributionConfig</code>.
*/
public DistributedSystemConfigImpl(DistributionConfig distConfig,
- String remoteCommand) {
+ String remoteCommand) {
if (distConfig == null) {
throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_DISTRIBUTIONCONFIG_MUST_NOT_BE_NULL.toLocalizedString());
}
@@ -165,11 +155,11 @@ public class DistributedSystemConfigImpl
this.mcastAddress = InetAddressUtil.toString(distConfig.getMcastAddress());
this.mcastPort = distConfig.getMcastPort();
this.locators = distConfig.getLocators();
- this.membershipPortRange =
- getMembershipPortRangeString(distConfig.getMembershipPortRange());
+ this.membershipPortRange =
+ getMembershipPortRangeString(distConfig.getMembershipPortRange());
this.systemName = distConfig.getName();
-
+
this.sslEnabled = distConfig.getSSLEnabled();
this.sslCiphers = distConfig.getSSLCiphers();
this.sslProtocols = distConfig.getSSLProtocols();
@@ -177,13 +167,13 @@ public class DistributedSystemConfigImpl
this.logFile = distConfig.getLogFile().getPath();
this.logLevel =
- LogWriterImpl.levelToString(distConfig.getLogLevel());
+ LogWriterImpl.levelToString(distConfig.getLogLevel());
this.logDiskSpaceLimit = distConfig.getLogDiskSpaceLimit();
this.logFileSizeLimit = distConfig.getLogFileSizeLimit();
-
+
basicSetBindAddress(distConfig.getBindAddress());
this.tcpPort = distConfig.getTcpPort();
-
+
this.disableTcp = distConfig.getDisableTcp();
this.remoteCommand = remoteCommand;
@@ -202,7 +192,7 @@ public class DistributedSystemConfigImpl
protected DistributedSystemConfigImpl() {
}
-
+
/**
* Creates a new <code>DistributedSystemConifgImpl</code> whose
* configuration is specified by the given <code>Properties</code>
@@ -224,10 +214,10 @@ public class DistributedSystemConfigImpl
*
* @since GemFire 6.5
*/
- protected DistributedSystemConfigImpl(Properties props,
- boolean ignoreGemFirePropsFile) {
+ protected DistributedSystemConfigImpl(Properties props,
+ boolean ignoreGemFirePropsFile) {
this(new DistributionConfigImpl(
- filterOutAdminProperties(props), ignoreGemFirePropsFile),
+ filterOutAdminProperties(props), ignoreGemFirePropsFile),
DEFAULT_REMOTE_COMMAND);
String remoteCommand = props.getProperty(REMOTE_COMMAND_NAME);
if (remoteCommand != null) {
@@ -235,18 +225,19 @@ public class DistributedSystemConfigImpl
}
String entityConfigXMLFile =
- props.getProperty(ENTITY_CONFIG_XML_FILE_NAME);
+ props.getProperty(ENTITY_CONFIG_XML_FILE_NAME);
if (entityConfigXMLFile != null) {
this.entityConfigXMLFile = entityConfigXMLFile;
}
String refreshInterval =
- props.getProperty(REFRESH_INTERVAL_NAME);
+ props.getProperty(REFRESH_INTERVAL_NAME);
if (refreshInterval != null) {
try {
- this.refreshInterval = Integer.parseInt(refreshInterval);
+ this.refreshInterval = Integer.parseInt(refreshInterval);
} catch (NumberFormatException nfEx) {
- throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_0_IS_NOT_A_VALID_INTEGER_1.toLocalizedString(new Object[] { refreshInterval, REFRESH_INTERVAL_NAME }));
+ throw new IllegalArgumentException(
+ LocalizedStrings.DistributedSystemConfigImpl_0_IS_NOT_A_VALID_INTEGER_1.toLocalizedString(new Object[] { refreshInterval, REFRESH_INTERVAL_NAME }));
}
}
}
@@ -275,36 +266,41 @@ public class DistributedSystemConfigImpl
// LOG: used only for sharing between IDS, AdminDSImpl and AgentImpl -- to prevent multiple banners, etc.
synchronized (this) {
this.logWriter = logWriter;
- }
+ }
}
-
+
public LogConfig createLogConfig() {
return new LogConfig() {
- @Override
- public int getLogLevel() {
- return LogWriterImpl.levelNameToCode(DistributedSystemConfigImpl.this.getLogLevel());
- }
- @Override
- public File getLogFile() {
- return new File(DistributedSystemConfigImpl.this.getLogFile());
- }
- @Override
- public int getLogFileSizeLimit() {
- return DistributedSystemConfigImpl.this.getLogFileSizeLimit();
- }
- @Override
- public int getLogDiskSpaceLimit() {
- return DistributedSystemConfigImpl.this.getLogDiskSpaceLimit();
- }
- @Override
- public String getName() {
- return DistributedSystemConfigImpl.this.getSystemName();
- }
- @Override
- public String toLoggerString() {
- return DistributedSystemConfigImpl.this.toString();
- }
- };
+ @Override
+ public int getLogLevel() {
+ return LogWriterImpl.levelNameToCode(DistributedSystemConfigImpl.this.getLogLevel());
+ }
+
+ @Override
+ public File getLogFile() {
+ return new File(DistributedSystemConfigImpl.this.getLogFile());
+ }
+
+ @Override
+ public int getLogFileSizeLimit() {
+ return DistributedSystemConfigImpl.this.getLogFileSizeLimit();
+ }
+
+ @Override
+ public int getLogDiskSpaceLimit() {
+ return DistributedSystemConfigImpl.this.getLogDiskSpaceLimit();
+ }
+
+ @Override
+ public String getName() {
+ return DistributedSystemConfigImpl.this.getSystemName();
+ }
+
+ @Override
+ public String toLoggerString() {
+ return DistributedSystemConfigImpl.this.toString();
+ }
+ };
}
/**
@@ -326,7 +322,9 @@ public class DistributedSystemConfigImpl
*/
protected void checkReadOnly() {
if (this.system != null) {
- throw new IllegalStateException(LocalizedStrings.DistributedSystemConfigImpl_A_DISTRIBUTEDSYSTEMCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_ADMINDISTRIBUTEDSYSTEM.toLocalizedString());
+ throw new IllegalStateException(
+ LocalizedStrings.DistributedSystemConfigImpl_A_DISTRIBUTEDSYSTEMCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_ADMINDISTRIBUTEDSYSTEM
+ .toLocalizedString());
}
}
@@ -344,8 +342,7 @@ public class DistributedSystemConfigImpl
* Parses the XML configuration file that describes managed
* entities.
*
- * @throws AdminXmlException
- * If a problem is encountered while parsing the XML file.
+ * @throws AdminXmlException If a problem is encountered while parsing the XML file.
*/
private void parseEntityConfigXMLFile() {
String fileName = this.entityConfigXMLFile;
@@ -363,12 +360,10 @@ public class DistributedSystemConfigImpl
InputStream is = new FileInputStream(xmlFile);
try {
ManagedEntityConfigXmlParser.parse(is, this);
- }
- finally {
+ } finally {
is.close();
}
- }
- catch (IOException ex) {
+ } catch (IOException ex) {
throw new AdminXmlException(LocalizedStrings.DistributedSystemConfigImpl_WHILE_PARSING_0.toLocalizedString(fileName), ex);
}
}
@@ -382,23 +377,27 @@ public class DistributedSystemConfigImpl
this.systemId = systemId;
configChanged();
}
-
- /** Returns the multicast address for the system */
+
+ /**
+ * Returns the multicast address for the system
+ */
public String getMcastAddress() {
return this.mcastAddress;
}
-
+
public void setMcastAddress(String mcastAddress) {
checkReadOnly();
this.mcastAddress = mcastAddress;
configChanged();
}
- /** Returns the multicast port for the system */
+ /**
+ * Returns the multicast port for the system
+ */
public int getMcastPort() {
return this.mcastPort;
}
-
+
public void setMcastPort(int mcastPort) {
checkReadOnly();
this.mcastPort = mcastPort;
@@ -408,7 +407,7 @@ public class DistributedSystemConfigImpl
public int getAckWaitThreshold() {
return this.ackWaitThreshold;
}
-
+
public void setAckWaitThreshold(int seconds) {
checkReadOnly();
this.ackWaitThreshold = seconds;
@@ -418,14 +417,16 @@ public class DistributedSystemConfigImpl
public int getAckSevereAlertThreshold() {
return this.ackSevereAlertThreshold;
}
-
+
public void setAckSevereAlertThreshold(int seconds) {
checkReadOnly();
this.ackSevereAlertThreshold = seconds;
configChanged();
}
- /** Returns the comma-delimited list of locators for the system */
+ /**
+ * Returns the comma-delimited list of locators for the system
+ */
public String getLocators() {
return this.locators;
}
@@ -434,17 +435,16 @@ public class DistributedSystemConfigImpl
checkReadOnly();
if (locators == null) {
this.locators = "";
- }
- else {
+ } else {
this.locators = locators;
}
configChanged();
}
-
+
/**
* Returns the value for membership-port-range
- *
- * @return the value for the Distributed System property membership-port-range
+ *
+ * @return the value for the Distributed System property membership-port-range
*/
public String getMembershipPortRange() {
return this.membershipPortRange;
@@ -452,10 +452,9 @@ public class DistributedSystemConfigImpl
/**
* Sets the Distributed System property membership-port-range
- *
- * @param membershipPortRangeStr
- * the value for membership-port-range given as two numbers separated
- * by a minus sign.
+ *
+ * @param membershipPortRangeStr the value for membership-port-range given as two numbers separated
+ * by a minus sign.
*/
public void setMembershipPortRange(String membershipPortRangeStr) {
/*
@@ -475,8 +474,8 @@ public class DistributedSystemConfigImpl
} else {
throw new IllegalArgumentException(
LocalizedStrings.DistributedSystemConfigImpl_INVALID_VALUE_FOR_MEMBERSHIP_PORT_RANGE
- .toLocalizedString(new Object[] {membershipPortRangeStr,
- MEMBERSHIP_PORT_RANGE_NAME}));
+ .toLocalizedString(new Object[] { membershipPortRangeStr,
+ MEMBERSHIP_PORT_RANGE_NAME }));
}
} catch (Exception e) {
if (logger.isDebugEnabled()) {
@@ -485,13 +484,13 @@ public class DistributedSystemConfigImpl
}
}
}
-
+
public void setTcpPort(int port) {
checkReadOnly();
this.tcpPort = port;
configChanged();
}
-
+
public int getTcpPort() {
return this.tcpPort;
}
@@ -500,10 +499,9 @@ public class DistributedSystemConfigImpl
* Validates the given string - which is expected in the format as two numbers
* separated by a minus sign - in to an integer array of length 2 with first
* element as lower end & second element as upper end of the range.
- *
- * @param membershipPortRange
- * membership-port-range given as two numbers separated by a minus
- * sign.
+ *
+ * @param membershipPortRange membership-port-range given as two numbers separated by a minus
+ * sign.
* @return true if the membership-port-range string is valid, false otherwise
*/
private boolean validateMembershipRange(String membershipPortRange) {
@@ -514,27 +512,27 @@ public class DistributedSystemConfigImpl
range[0] = Integer.parseInt(splitted[0].trim());
range[1] = Integer.parseInt(splitted[1].trim());
//NumberFormatException if any could be thrown
-
- if (range[0] < 0 || range[0] >= range[1] ||
+
+ if (range[0] < 0 || range[0] >= range[1] ||
range[1] < 0 || range[1] > 65535) {
range = null;
}
}
return range != null;
- }
-
+ }
+
/**
* @return the String representation of membershipPortRange with lower & upper
- * limits of the port range separated by '-' e.g. 1-65535
+ * limits of the port range separated by '-' e.g. 1-65535
*/
private static String getMembershipPortRangeString(int[] membershipPortRange) {
String membershipPortRangeString = "";
- if (membershipPortRange != null &&
+ if (membershipPortRange != null &&
membershipPortRange.length == 2) {
- membershipPortRangeString = membershipPortRange[0] + "-" +
- membershipPortRange[1];
+ membershipPortRangeString = membershipPortRange[0] + "-" +
+ membershipPortRange[1];
}
-
+
return membershipPortRangeString;
}
@@ -547,7 +545,7 @@ public class DistributedSystemConfigImpl
basicSetBindAddress(bindAddress);
configChanged();
}
-
+
public String getServerBindAddress() {
return this.serverBindAddress;
}
@@ -557,11 +555,11 @@ public class DistributedSystemConfigImpl
basicSetServerBindAddress(bindAddress);
configChanged();
}
-
+
public boolean getDisableTcp() {
return this.disableTcp;
}
-
+
public void setDisableTcp(boolean flag) {
checkReadOnly();
disableTcp = flag;
@@ -573,20 +571,25 @@ public class DistributedSystemConfigImpl
this.enableNetworkPartitionDetection = newValue;
configChanged();
}
+
public boolean getEnableNetworkPartitionDetection() {
return this.enableNetworkPartitionDetection;
}
+
public void setDisableAutoReconnect(boolean newValue) {
checkReadOnly();
this.disableAutoReconnect = newValue;
configChanged();
}
+
public boolean getDisableAutoReconnect() {
return this.disableAutoReconnect;
}
+
public int getMemberTimeout() {
- return this.memberTimeout;
+ return this.memberTimeout;
}
+
public void setMemberTimeout(int value) {
checkReadOnly();
this.memberTimeout = value;
@@ -599,19 +602,21 @@ public class DistributedSystemConfigImpl
}
this.bindAddress = bindAddress;
}
-
+
private void basicSetServerBindAddress(String bindAddress) {
if (!validateBindAddress(bindAddress)) {
throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_INVALID_BIND_ADDRESS_0.toLocalizedString(bindAddress));
}
this.serverBindAddress = bindAddress;
}
-
- /** Returns the remote command setting to use for remote administration */
+
+ /**
+ * Returns the remote command setting to use for remote administration
+ */
public String getRemoteCommand() {
return this.remoteCommand;
}
-
+
/**
* Sets the remote command for this config object. This attribute
* may be modified after this config object has been used to create
@@ -624,10 +629,11 @@ public class DistributedSystemConfigImpl
this.remoteCommand = remoteCommand;
configChanged();
}
-
- private static final boolean ALLOW_ALL_REMOTE_COMMANDS = Boolean.getBoolean("gemfire.admin.ALLOW_ALL_REMOTE_COMMANDS");
+
+ private static final boolean ALLOW_ALL_REMOTE_COMMANDS = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "admin.ALLOW_ALL_REMOTE_COMMANDS");
private static final String[] LEGAL_REMOTE_COMMANDS = { "rsh", "ssh" };
private static final String ILLEGAL_REMOTE_COMMAND_RSH_OR_SSH = "Allowed remote commands include \"rsh {HOST} {CMD}\" or \"ssh {HOST} {CMD}\" with valid rsh or ssh switches. Invalid: ";
+
private final void checkRemoteCommand(final String remoteCommand) {
if (remoteCommand == null || remoteCommand.isEmpty()) {
return;
@@ -636,9 +642,9 @@ public class DistributedSystemConfigImpl
if (!command.contains("{host}") || !command.contains("{cmd}")) {
throw new IllegalArgumentException(ILLEGAL_REMOTE_COMMAND_RSH_OR_SSH + remoteCommand);
}
-
+
final StringTokenizer tokenizer = new StringTokenizer(command, " ");
- final ArrayList<String> array = new ArrayList<String>();
+ final ArrayList<String> array = new ArrayList<String>();
for (int i = 0; tokenizer.hasMoreTokens(); i++) {
String string = tokenizer.nextToken();
if (i == 0) {
@@ -647,7 +653,7 @@ public class DistributedSystemConfigImpl
for (int j = 0; j < LEGAL_REMOTE_COMMANDS.length; j++) {
if (string.contains(LEGAL_REMOTE_COMMANDS[j])) {
// verify command is at end of string
- if (!(string.endsWith(LEGAL_REMOTE_COMMANDS[j]) || string.endsWith(LEGAL_REMOTE_COMMANDS[j]+".exe"))) {
+ if (!(string.endsWith(LEGAL_REMOTE_COMMANDS[j]) || string.endsWith(LEGAL_REMOTE_COMMANDS[j] + ".exe"))) {
throw new IllegalArgumentException(ILLEGAL_REMOTE_COMMAND_RSH_OR_SSH + remoteCommand);
}
found = true;
@@ -659,13 +665,13 @@ public class DistributedSystemConfigImpl
} else {
final boolean isSwitch = string.startsWith("-");
final boolean isHostOrCmd = string.equals("{host}") || string.equals("{cmd}");
-
+
// additional elements must be switches or values-for-switches or {host} or user@{host} or {cmd}
if (!isSwitch && !isHostOrCmd) {
- final String previous = (array == null || array.isEmpty()) ? null : array.get(array.size()-1);
+ final String previous = (array == null || array.isEmpty()) ? null : array.get(array.size() - 1);
final boolean isValueForSwitch = previous != null && previous.startsWith("-");
final boolean isHostWithUser = string.contains("@") && string.endsWith("{host}");
-
+
if (!(isValueForSwitch || isHostWithUser)) {
throw new IllegalArgumentException(ILLEGAL_REMOTE_COMMAND_RSH_OR_SSH + remoteCommand);
}
@@ -674,18 +680,18 @@ public class DistributedSystemConfigImpl
array.add(string);
}
}
-
- public String getSystemName() {
- return this.systemName;
- }
-
- public void setSystemName(final String systemName) {
- checkReadOnly();
- this.systemName = systemName;
+
+ public String getSystemName() {
+ return this.systemName;
+ }
+
+ public void setSystemName(final String systemName) {
+ checkReadOnly();
+ this.systemName = systemName;
configChanged();
- }
-
- /**
+ }
+
+ /**
* Returns an array of configurations for statically known
* CacheServers
*
@@ -695,12 +701,12 @@ public class DistributedSystemConfigImpl
return (CacheServerConfig[]) this.cacheServerConfigs.toArray(
new CacheServerConfig[this.cacheServerConfigs.size()]);
}
+
public CacheVmConfig[] getCacheVmConfigs() {
return (CacheVmConfig[]) this.cacheServerConfigs.toArray(new CacheVmConfig[this.cacheServerConfigs.size()]);
}
-
-
- /**
+
+ /**
* Creates the configuration for a CacheServer
*
* @since GemFire 4.0
@@ -710,11 +716,12 @@ public class DistributedSystemConfigImpl
addCacheServerConfig(config);
return config;
}
+
public CacheVmConfig createCacheVmConfig() {
- return (CacheVmConfig)createCacheServerConfig();
+ return (CacheVmConfig) createCacheServerConfig();
}
-
- /**
+
+ /**
* Adds the configuration for a CacheServer
*
* @since GemFire 4.0
@@ -722,8 +729,9 @@ public class DistributedSystemConfigImpl
private void addCacheServerConfig(CacheServerConfig managerConfig) {
checkReadOnly();
- if (managerConfig == null) return;
- for (Iterator iter = this.cacheServerConfigs.iterator(); iter.hasNext();) {
+ if (managerConfig == null)
+ return;
+ for (Iterator iter = this.cacheServerConfigs.iterator(); iter.hasNext(); ) {
CacheServerConfigImpl impl = (CacheServerConfigImpl) iter.next();
if (impl.equals(managerConfig)) {
return;
@@ -732,30 +740,31 @@ public class DistributedSystemConfigImpl
this.cacheServerConfigs.add(managerConfig);
configChanged();
}
-
- /**
+
+ /**
* Removes the configuration for a CacheServer
*
* @since GemFire 4.0
*/
public void removeCacheServerConfig(CacheServerConfig managerConfig) {
- removeCacheVmConfig((CacheVmConfig)managerConfig);
+ removeCacheVmConfig((CacheVmConfig) managerConfig);
}
+
public void removeCacheVmConfig(CacheVmConfig managerConfig) {
checkReadOnly();
this.cacheServerConfigs.remove(managerConfig);
configChanged();
}
- /**
+ /**
* Returns the configurations of all managed distribution locators
*/
public DistributionLocatorConfig[] getDistributionLocatorConfigs() {
if (this.system != null) {
DistributionLocator[] locators =
- this.system.getDistributionLocators();
+ this.system.getDistributionLocators();
DistributionLocatorConfig[] configs =
- new DistributionLocatorConfig[locators.length];
+ new DistributionLocatorConfig[locators.length];
for (int i = 0; i < locators.length; i++) {
configs[i] = locators[i].getConfig();
}
@@ -763,27 +772,31 @@ public class DistributedSystemConfigImpl
} else {
Object[] array =
- new DistributionLocatorConfig[this.locatorConfigs.size()];
+ new DistributionLocatorConfig[this.locatorConfigs.size()];
return (DistributionLocatorConfig[]) this.locatorConfigs.toArray(array);
}
}
-
- /** Creates the configuration for a DistributionLocator */
+
+ /**
+ * Creates the configuration for a DistributionLocator
+ */
public DistributionLocatorConfig createDistributionLocatorConfig() {
checkReadOnly();
DistributionLocatorConfig config = new DistributionLocatorConfigImpl();
addDistributionLocatorConfig(config);
return config;
}
-
- /** Adds the configuration for a DistributionLocator */
+
+ /**
+ * Adds the configuration for a DistributionLocator
+ */
private void addDistributionLocatorConfig(DistributionLocatorConfig config) {
checkReadOnly();
this.locatorConfigs.add(config);
configChanged();
}
-
- /**
+
+ /**
* Removes the configuration for a DistributionLocator
*/
public void removeDistributionLocatorConfig(DistributionLocatorConfig config) {
@@ -792,7 +805,7 @@ public class DistributedSystemConfigImpl
configChanged();
}
- /**
+ /**
* Validates the bind address. The address may be a host name or IP address,
* but it must not be empty and must be usable for creating an InetAddress.
* Cannot have a leading '/' (which InetAddress.toString() produces).
@@ -800,15 +813,17 @@ public class DistributedSystemConfigImpl
* @param bindAddress host name or IP address to validate
*/
public static boolean validateBindAddress(String bindAddress) {
- if (bindAddress == null || bindAddress.length() == 0) return true;
- if (InetAddressUtil.validateHost(bindAddress) == null) return false;
+ if (bindAddress == null || bindAddress.length() == 0)
+ return true;
+ if (InetAddressUtil.validateHost(bindAddress) == null)
+ return false;
return true;
}
-
+
public synchronized void configChanged() {
ConfigListener[] clients = null;
- synchronized(this.listeners) {
- clients = (ConfigListener[])
+ synchronized (this.listeners) {
+ clients = (ConfigListener[])
listeners.toArray(new ConfigListener[this.listeners.size()]);
}
for (int i = 0; i < clients.length; i++) {
@@ -819,66 +834,78 @@ public class DistributedSystemConfigImpl
}
}
}
-
- /** Registers listener for notification of changes in this config. */
+
+ /**
+ * Registers listener for notification of changes in this config.
+ */
public void addListener(ConfigListener listener) {
- synchronized(this.listeners) {
+ synchronized (this.listeners) {
this.listeners.add(listener);
}
}
-
- /** Removes previously registered listener of this config. */
+
+ /**
+ * Removes previously registered listener of this config.
+ */
public void removeListener(ConfigListener listener) {
- synchronized(this.listeners) {
+ synchronized (this.listeners) {
this.listeners.remove(listener);
}
}
-
+
// -------------------------------------------------------------------------
// SSL support...
// -------------------------------------------------------------------------
- private boolean sslEnabled =
+ private boolean sslEnabled =
DistributionConfig.DEFAULT_SSL_ENABLED;
- private String sslProtocols =
+ private String sslProtocols =
DistributionConfig.DEFAULT_SSL_PROTOCOLS;
- private String sslCiphers =
+ private String sslCiphers =
DistributionConfig.DEFAULT_SSL_CIPHERS;
- private boolean sslAuthenticationRequired =
+ private boolean sslAuthenticationRequired =
DistributionConfig.DEFAULT_SSL_REQUIRE_AUTHENTICATION;
private Properties sslProperties = new Properties();
-
+
public boolean isSSLEnabled() {
return this.sslEnabled;
}
+
public void setSSLEnabled(boolean enabled) {
checkReadOnly();
this.sslEnabled = enabled;
configChanged();
}
+
public String getSSLProtocols() {
return this.sslProtocols;
}
+
public void setSSLProtocols(String protocols) {
checkReadOnly();
this.sslProtocols = protocols;
configChanged();
}
+
public String getSSLCiphers() {
return this.sslCiphers;
}
+
public void setSSLCiphers(String ciphers) {
checkReadOnly();
this.sslCiphers = ciphers;
configChanged();
}
+
public boolean isSSLAuthenticationRequired() {
return this.sslAuthenticationRequired;
}
+
public void setSSLAuthenticationRequired(boolean authRequired) {
checkReadOnly();
this.sslAuthenticationRequired = authRequired;
configChanged();
}
+
public Properties getSSLProperties() {
return this.sslProperties;
}
@@ -891,7 +918,7 @@ public class DistributedSystemConfigImpl
}
configChanged();
}
-
+
public void addSSLProperty(String key, String value) {
checkReadOnly();
this.sslProperties.put(key, value);
@@ -903,10 +930,8 @@ public class DistributedSystemConfigImpl
this.sslProperties.remove(key);
configChanged();
}
-
+
/**
- *
- *
* @return the gfSecurityProperties
* @since GemFire 6.6.3
*/
@@ -970,18 +995,17 @@ public class DistributedSystemConfigImpl
configChanged();
}
-
/**
* Makes sure that the mcast port and locators are correct and
* consistent.
*
- * @throws IllegalArgumentException
- * If configuration is not valid
+ * @throws IllegalArgumentException If configuration is not valid
*/
public void validate() {
if (this.getMcastPort() < MIN_MCAST_PORT ||
this.getMcastPort() > MAX_MCAST_PORT) {
- throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_MCASTPORT_MUST_BE_AN_INTEGER_INCLUSIVELY_BETWEEN_0_AND_1.toLocalizedString(new Object[] {Integer.valueOf(MIN_MCAST_PORT), Integer.valueOf(MAX_MCAST_PORT)}));
+ throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_MCASTPORT_MUST_BE_AN_INTEGER_INCLUSIVELY_BETWEEN_0_AND_1
+ .toLocalizedString(new Object[] { Integer.valueOf(MIN_MCAST_PORT), Integer.valueOf(MAX_MCAST_PORT) }));
}
// disabled in 5.1 - multicast and locators can be used together
@@ -993,14 +1017,16 @@ public class DistributedSystemConfigImpl
LogWriterImpl.levelNameToCode(this.logLevel);
- if (this.logFileSizeLimit < MIN_LOG_FILE_SIZE_LIMIT ||
+ if (this.logFileSizeLimit < MIN_LOG_FILE_SIZE_LIMIT ||
this.logFileSizeLimit > MAX_LOG_FILE_SIZE_LIMIT) {
- throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGFILESIZELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1.toLocalizedString(new Object[] {Integer.valueOf(MIN_LOG_FILE_SIZE_LIMIT), Integer.valueOf(MAX_LOG_FILE_SIZE_LIMIT)}));
+ throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGFILESIZELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1
+ .toLocalizedString(new Object[] { Integer.valueOf(MIN_LOG_FILE_SIZE_LIMIT), Integer.valueOf(MAX_LOG_FILE_SIZE_LIMIT) }));
}
- if (this.logDiskSpaceLimit < MIN_LOG_DISK_SPACE_LIMIT ||
+ if (this.logDiskSpaceLimit < MIN_LOG_DISK_SPACE_LIMIT ||
this.logDiskSpaceLimit > MAX_LOG_DISK_SPACE_LIMIT) {
- throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGDISKSPACELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1.toLocalizedString(new Object[] {Integer.valueOf(MIN_LOG_DISK_SPACE_LIMIT), Integer.valueOf(MAX_LOG_DISK_SPACE_LIMIT)}));
+ throw new IllegalArgumentException(LocalizedStrings.DistributedSystemConfigImpl_LOGDISKSPACELIMIT_MUST_BE_AN_INTEGER_BETWEEN_0_AND_1
+ .toLocalizedString(new Object[] { Integer.valueOf(MIN_LOG_DISK_SPACE_LIMIT), Integer.valueOf(MAX_LOG_DISK_SPACE_LIMIT) }));
}
parseEntityConfigXMLFile();
@@ -1012,13 +1038,13 @@ public class DistributedSystemConfigImpl
@Override
public Object clone() throws CloneNotSupportedException {
DistributedSystemConfigImpl other =
- (DistributedSystemConfigImpl) super.clone();
+ (DistributedSystemConfigImpl) super.clone();
other.system = null;
other.cacheServerConfigs = new HashSet();
other.locatorConfigs = new HashSet();
DistributionLocatorConfig[] myLocators =
- this.getDistributionLocatorConfigs();
+ this.getDistributionLocatorConfigs();
for (int i = 0; i < myLocators.length; i++) {
DistributionLocatorConfig locator = myLocators[i];
other.addDistributionLocatorConfig((DistributionLocatorConfig) locator.clone());
@@ -1032,69 +1058,70 @@ public class DistributedSystemConfigImpl
return other;
}
-
+
@Override
public String toString() {
StringBuffer buf = new StringBuffer(1000);
String lf = System.getProperty("line.separator");
- if (lf == null) lf = ",";
-
+ if (lf == null)
+ lf = ",";
+
buf.append("DistributedSystemConfig(");
buf.append(lf);
buf.append(" system-name=");
buf.append(String.valueOf(this.systemName));
buf.append(lf);
- buf.append(" "+MCAST_ADDRESS_NAME+"=");
+ buf.append(" " + MCAST_ADDRESS + "=");
buf.append(String.valueOf(this.mcastAddress));
buf.append(lf);
- buf.append(" "+MCAST_PORT_NAME+"=");
+ buf.append(" " + MCAST_PORT + "=");
buf.append(String.valueOf(this.mcastPort));
buf.append(lf);
- buf.append(" "+LOCATORS_NAME+"=");
+ buf.append(" " + LOCATORS + "=");
buf.append(String.valueOf(this.locators));
buf.append(lf);
- buf.append(" "+MEMBERSHIP_PORT_RANGE_NAME+"=");
+ buf.append(" " + MEMBERSHIP_PORT_RANGE_NAME + "=");
buf.append(getMembershipPortRange());
buf.append(lf);
- buf.append(" "+BIND_ADDRESS_NAME+"=");
+ buf.append(" " + BIND_ADDRESS + "=");
buf.append(String.valueOf(this.bindAddress));
buf.append(lf);
- buf.append(" "+TCP_PORT_NAME+"="+this.tcpPort);
+ buf.append(" " + TCP_PORT + "=" + this.tcpPort);
buf.append(lf);
- buf.append(" "+DistributionConfig.DISABLE_TCP_NAME+"=");
+ buf.append(" " + DistributionConfig.DISABLE_TCP_NAME + "=");
buf.append(String.valueOf(this.disableTcp));
buf.append(lf);
- buf.append(" "+DistributionConfig.DISABLE_AUTO_RECONNECT_NAME+"=");
+ buf.append(" " + DistributionConfig.DISABLE_AUTO_RECONNECT_NAME + "=");
buf.append(String.valueOf(this.disableAutoReconnect));
buf.append(lf);
- buf.append(" "+REMOTE_COMMAND_NAME+"=");
+ buf.append(" " + REMOTE_COMMAND_NAME + "=");
buf.append(String.valueOf(this.remoteCommand));
buf.append(lf);
- buf.append(" "+SSL_ENABLED_NAME+"=");
+ buf.append(" " + SSL_ENABLED_NAME + "=");
buf.append(String.valueOf(this.sslEnabled));
buf.append(lf);
- buf.append(" "+SSL_CIPHERS_NAME+"=");
+ buf.append(" " + SSL_CIPHERS_NAME + "=");
buf.append(String.valueOf(this.sslCiphers));
buf.append(lf);
- buf.append(" "+SSL_PROTOCOLS_NAME+"=");
+ buf.append(" " + SSL_PROTOCOLS_NAME + "=");
buf.append(String.valueOf(this.sslProtocols));
buf.append(lf);
- buf.append(" "+SSL_REQUIRE_AUTHENTICATION_NAME+"=");
+ buf.append(" " + SSL_REQUIRE_AUTHENTICATION_NAME + "=");
buf.append(String.valueOf(this.sslAuthenticationRequired));
buf.append(lf);
- buf.append(" "+LOG_FILE_NAME+"=");
+ buf.append(" " + LOG_FILE_NAME + "=");
buf.append(String.valueOf(this.logFile));
buf.append(lf);
- buf.append(" "+LOG_LEVEL_NAME+"=");
+ buf.append(" " + LOG_LEVEL_NAME + "=");
buf.append(String.valueOf(this.logLevel));
buf.append(lf);
- buf.append(" "+LOG_DISK_SPACE_LIMIT_NAME+"=");
+ buf.append(" " + LOG_DISK_SPACE_LIMIT_NAME + "=");
buf.append(String.valueOf(this.logDiskSpaceLimit));
buf.append(lf);
- buf.append(" "+LOG_FILE_SIZE_LIMIT_NAME+"=");
+ buf.append(" " + LOG_FILE_SIZE_LIMIT_NAME + "=");
buf.append(String.valueOf(this.logFileSizeLimit));
buf.append(lf);
- buf.append(" "+REFRESH_INTERVAL_NAME+"=");
+ buf.append(" " + REFRESH_INTERVAL_NAME + "=");
buf.append(String.valueOf(this.refreshInterval));
buf.append(")");
return buf.toString();
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthEvaluator.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthEvaluator.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthEvaluator.java
index 013f0c2..33989a8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthEvaluator.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemHealthEvaluator.java
@@ -17,15 +17,16 @@
package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.admin.DistributedSystemHealthConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
import com.gemstone.gemfire.distributed.internal.MembershipListener;
-import java.util.*;
-
-import com.gemstone.gemfire.distributed.internal.membership.*;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import java.util.List;
+import java.util.Set;
+
/**
* Contains the logic for evaluating the health of an entire GemFire
* distributed system according to the thresholds provided in a {@link
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorConfigImpl.java
index 9abfd57..818e45f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorConfigImpl.java
@@ -19,12 +19,13 @@ package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.admin.DistributionLocator;
import com.gemstone.gemfire.admin.DistributionLocatorConfig;
import com.gemstone.gemfire.distributed.internal.InternalLocator;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import java.net.InetAddress;
import java.util.Properties;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
+
/**
* Provides an implementation of
* <code>DistributionLocatorConfig</code>.
@@ -104,7 +105,7 @@ public class DistributionLocatorConfigImpl
this.bindAddress = null;
this.locator = null;
this.dsProperties = new java.util.Properties();
- this.dsProperties.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
+ this.dsProperties.setProperty(MCAST_PORT, "0");
}
///////////////////// Instance Methods /////////////////////
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorImpl.java
index 58952c2..bda1b59 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributionLocatorImpl.java
@@ -17,26 +17,22 @@
package com.gemstone.gemfire.admin.internal;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.Collection;
-import java.util.Enumeration;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.admin.AdminDistributedSystem;
import com.gemstone.gemfire.admin.DistributionLocator;
import com.gemstone.gemfire.admin.DistributionLocatorConfig;
import com.gemstone.gemfire.admin.ManagedEntityConfig;
import com.gemstone.gemfire.distributed.internal.DM;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.admin.remote.DistributionLocatorId;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
/**
* Default administrative implementation of a DistributionLocator.
@@ -44,37 +40,47 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
* @since GemFire 3.5
*/
public class DistributionLocatorImpl
- implements DistributionLocator, InternalManagedEntity {
-
+ implements DistributionLocator, InternalManagedEntity {
+
private static final Logger logger = LogService.getLogger();
-
- /** How many new <code>DistributionLocator</code>s have been created? */
+
+ /**
+ * How many new <code>DistributionLocator</code>s have been created?
+ */
private static int newLocators = 0;
//////////////////// Instance Fields ////////////////////
- /** The configuration object for this locator */
+ /**
+ * The configuration object for this locator
+ */
private final DistributionLocatorConfigImpl config;
- /** The id of this distribution locator */
+ /**
+ * The id of this distribution locator
+ */
private final String id;
-
- /** Used to control the actual DistributionLocator service */
+
+ /**
+ * Used to control the actual DistributionLocator service
+ */
private ManagedEntityController controller;
- /** The system that this locator is a part of */
+ /**
+ * The system that this locator is a part of
+ */
private AdminDistributedSystemImpl system;
// -------------------------------------------------------------------------
// constructor(s)...
// -------------------------------------------------------------------------
-
+
/**
* Constructs new instance of <code>DistributionLocatorImpl</code>
* that is a member of the given distributed system.
*/
public DistributionLocatorImpl(DistributionLocatorConfig config,
- AdminDistributedSystemImpl system) {
+ AdminDistributedSystemImpl system) {
this.config = (DistributionLocatorConfigImpl) config;
this.config.validate();
this.config.setManagedEntity(this);
@@ -82,14 +88,14 @@ public class DistributionLocatorImpl
this.controller = system.getEntityController();
this.system = system;
}
-
+
// -------------------------------------------------------------------------
// Attribute accessors/mutators...
// -------------------------------------------------------------------------
-
- public String getId() {
- return this.id;
- }
+
+ public String getId() {
+ return this.id;
+ }
public String getNewId() {
synchronized (DistributionLocatorImpl.class) {
@@ -124,16 +130,17 @@ public class DistributionLocatorImpl
// -------------------------------------------------------------------------
// Operations...
// -------------------------------------------------------------------------
-
+
/**
* Polls to determine whether or not this managed entity has
* started.
*/
- public boolean waitToStart(long timeout)
- throws InterruptedException {
+ public boolean waitToStart(long timeout)
+ throws InterruptedException {
+
+ if (Thread.interrupted())
+ throw new InterruptedException();
- if (Thread.interrupted()) throw new InterruptedException();
-
long start = System.currentTimeMillis();
while (System.currentTimeMillis() - start < timeout) {
if (this.isRunning()) {
@@ -145,7 +152,7 @@ public class DistributionLocatorImpl
}
logger.info(LocalizedMessage.create(
- LocalizedStrings.DistributionLocatorImpl_DONE_WAITING_FOR_LOCATOR));
+ LocalizedStrings.DistributionLocatorImpl_DONE_WAITING_FOR_LOCATOR));
return this.isRunning();
}
@@ -153,11 +160,12 @@ public class DistributionLocatorImpl
* Polls to determine whether or not this managed entity has
* stopped.
*/
- public boolean waitToStop(long timeout)
- throws InterruptedException {
+ public boolean waitToStop(long timeout)
+ throws InterruptedException {
+
+ if (Thread.interrupted())
+ throw new InterruptedException();
- if (Thread.interrupted()) throw new InterruptedException();
-
long start = System.currentTimeMillis();
while (System.currentTimeMillis() - start < timeout) {
if (!this.isRunning()) {
@@ -172,24 +180,23 @@ public class DistributionLocatorImpl
}
public boolean isRunning() {
- DM dm = ((AdminDistributedSystemImpl)getDistributedSystem()).getDistributionManager();
- if(dm == null) {
+ DM dm = ((AdminDistributedSystemImpl) getDistributedSystem()).getDistributionManager();
+ if (dm == null) {
try {
return this.controller.isRunning(this);
- }
- catch (IllegalStateException e) {
+ } catch (IllegalStateException e) {
return false;
}
}
-
+
String host = getConfig().getHost();
int port = getConfig().getPort();
String bindAddress = getConfig().getBindAddress();
-
+
boolean found = false;
Map<InternalDistributedMember, Collection<String>> hostedLocators = dm.getAllHostedLocators();
- for (Iterator<InternalDistributedMember> memberIter = hostedLocators.keySet().iterator(); memberIter.hasNext();) {
- for (Iterator<String> locatorIter = hostedLocators.get(memberIter.next()).iterator(); locatorIter.hasNext();) {
+ for (Iterator<InternalDistributedMember> memberIter = hostedLocators.keySet().iterator(); memberIter.hasNext(); ) {
+ for (Iterator<String> locatorIter = hostedLocators.get(memberIter.next()).iterator(); locatorIter.hasNext(); ) {
DistributionLocatorId locator = new DistributionLocatorId(locatorIter.next());
found = found || locator.getHost().getHostAddress().equals(host);
found = found || locator.getHost().getHostName().equals(host);
@@ -200,8 +207,7 @@ public class DistributionLocatorImpl
if (!found) {
found = locator.getHost().getHostAddress().equals(inetAddr.getHostAddress());
}
- }
- catch (UnknownHostException e) {
+ } catch (UnknownHostException e) {
// try config host as if it is an IP address instead of host name
}
}
@@ -217,32 +223,32 @@ public class DistributionLocatorImpl
}
return found;
}
-
+
public void start() {
this.config.validate();
this.controller.start(this);
this.config.setLocator(this);
this.system.updateLocatorsString();
}
-
+
public void stop() {
this.controller.stop(this);
this.config.setLocator(null);
}
-
+
public String getLog() {
return this.controller.getLog(this);
}
-
- /**
- * Returns a string representation of the object.
- *
- * @return a string representation of the object
- */
+
+ /**
+ * Returns a string representation of the object.
+ *
+ * @return a string representation of the object
+ */
@Override
- public String toString() {
- return "DistributionLocator " + getId();
- }
+ public String toString() {
+ return "DistributionLocator " + getId();
+ }
//////////////////////// Command execution ////////////////////////
@@ -264,8 +270,8 @@ public class DistributionLocatorImpl
Properties props = config.getDistributedSystemProperties();
Enumeration en = props.propertyNames();
while (en.hasMoreElements()) {
- String pn = (String)en.nextElement();
- sb.append(" -Dgemfire." + pn + "=" + props.getProperty(pn));
+ String pn = (String) en.nextElement();
+ sb.append(" -D" + DistributionConfig.GEMFIRE_PREFIX + "" + pn + "=" + props.getProperty(pn));
}
String bindAddress = this.getConfig().getBindAddress();
@@ -276,7 +282,7 @@ public class DistributionLocatorImpl
sb.append(" ");
String sslArgs =
- this.controller.buildSSLArguments(this.system.getConfig());
+ this.controller.buildSSLArguments(this.system.getConfig());
if (sslArgs != null) {
sb.append(sslArgs);
}
@@ -300,7 +306,7 @@ public class DistributionLocatorImpl
sb.append(" ");
String sslArgs =
- this.controller.buildSSLArguments(this.system.getConfig());
+ this.controller.buildSSLArguments(this.system.getConfig());
if (sslArgs != null) {
sb.append(sslArgs);
}
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
index 536ffb1..ab39935 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/EnabledManagedEntityController.java
@@ -16,12 +16,6 @@
*/
package com.gemstone.gemfire.admin.internal;
-import java.io.File;
-import java.util.Iterator;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.admin.AdminDistributedSystem;
import com.gemstone.gemfire.admin.DistributedSystemConfig;
import com.gemstone.gemfire.admin.ManagedEntity;
@@ -32,6 +26,13 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.io.File;
+import java.util.Iterator;
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
* Implements the actual administration (starting, stopping, etc.) of
@@ -314,7 +315,7 @@ class EnabledManagedEntityController implements ManagedEntityController {
Properties sslProps = (Properties) config.getSSLProperties().clone();
// add ssl-enabled, etc...
sslProps.setProperty(prefix +
- DistributionConfig.MCAST_PORT_NAME,
+ MCAST_PORT,
"0");
sslProps.setProperty(prefix +
DistributionConfig.SSL_ENABLED_NAME,
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXml.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXml.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXml.java
index 321bce6..fdfd86d 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXml.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedEntityConfigXml.java
@@ -16,11 +16,12 @@
*/
package com.gemstone.gemfire.admin.internal;
+import com.gemstone.gemfire.distributed.SystemConfigurationProperties;
import com.gemstone.gemfire.internal.ClassPathLoader;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-
import org.xml.sax.*;
-import java.io.*;
+
+import java.io.InputStream;
/**
* The abstract superclass of classes that convert XML into a {@link
@@ -57,7 +58,7 @@ abstract class ManagedEntityConfigXml implements EntityResolver, ErrorHandler {
public static final String REMOTE_COMMAND = "remote-command";
/** The name of the <code>locators</code> element. */
- public static final String LOCATORS = "locators";
+ public static final String LOCATORS = SystemConfigurationProperties.LOCATORS;
/** The name of the <code>ssl</code> element. */
public static final String SSL = "ssl";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedSystemMemberImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedSystemMemberImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedSystemMemberImpl.java
index 678ae8e..7b01a62 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedSystemMemberImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/ManagedSystemMemberImpl.java
@@ -19,9 +19,10 @@ package com.gemstone.gemfire.admin.internal;
import com.gemstone.gemfire.admin.AdminException;
import com.gemstone.gemfire.admin.ConfigurationParameter;
import com.gemstone.gemfire.admin.ManagedEntityConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.admin.GemFireVM;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+
/**
* A <code>SystemMember</code> that is also managed (or manageable) by
* the admin API.
@@ -238,7 +239,7 @@ public abstract class ManagedSystemMemberImpl extends SystemMemberImpl
String value = param.getValueAsString();
if (value != null && !value.equals("")) {
- if (name.equals(DistributionConfig.LOCATORS_NAME)) {
+ if (name.equals(LOCATORS)) {
// Use the new locator syntax so that is plays nicely with
// rsh. See bug 32306.
String locator = value;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberImpl.java
index 3584e58..5bd8e5b 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/internal/SystemMemberImpl.java
@@ -16,27 +16,9 @@
*/
package com.gemstone.gemfire.admin.internal;
-import java.net.InetAddress;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.CacheDoesNotExistException;
-import com.gemstone.gemfire.admin.ConfigurationParameter;
-import com.gemstone.gemfire.admin.RuntimeAdminException;
-import com.gemstone.gemfire.admin.StatisticResource;
-import com.gemstone.gemfire.admin.SystemMemberCache;
-import com.gemstone.gemfire.admin.SystemMemberType;
+import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.distributed.DistributedMember;
import com.gemstone.gemfire.distributed.Role;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
@@ -48,6 +30,10 @@ import com.gemstone.gemfire.internal.admin.GemFireVM;
import com.gemstone.gemfire.internal.admin.StatResource;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.net.InetAddress;
+import java.util.*;
/**
* Member of a GemFire system.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/AgentConfig.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/AgentConfig.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/AgentConfig.java
index 1f1e187..9bb4c25 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/AgentConfig.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/AgentConfig.java
@@ -17,6 +17,7 @@
package com.gemstone.gemfire.admin.jmx;
import com.gemstone.gemfire.admin.DistributedSystemConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
//import com.gemstone.gemfire.admin.internal.InetAddressUtil;
/**
@@ -278,8 +279,7 @@ import com.gemstone.gemfire.admin.DistributedSystemConfig;
public interface AgentConfig extends DistributedSystemConfig {
/** The prefix for JMX Agent configuration system properties */
- public static final String SYSTEM_PROPERTY_PREFIX =
- "gemfire.agent.";
+ public static final String SYSTEM_PROPERTY_PREFIX = DistributionConfig.GEMFIRE_PREFIX + "agent.";
/** The default "propertyFile" value */
public static final String DEFAULT_PROPERTY_FILE = "agent.properties";
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
index 858ed71..fa5a1ea 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AdminDistributedSystemJmxImpl.java
@@ -16,83 +16,35 @@
*/
package com.gemstone.gemfire.admin.jmx.internal;
-import java.io.ByteArrayOutputStream;
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.InetAddress;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Hashtable;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-import java.util.TimerTask;
-import java.util.UUID;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.management.MBeanException;
-import javax.management.MalformedObjectNameException;
-import javax.management.Notification;
-import javax.management.ObjectName;
-import javax.management.RuntimeMBeanException;
-import javax.management.RuntimeOperationsException;
-import javax.management.modelmbean.ModelMBean;
-import javax.management.openmbean.CompositeData;
-import javax.management.openmbean.CompositeDataSupport;
-import javax.management.openmbean.CompositeType;
-import javax.management.openmbean.OpenDataException;
-import javax.management.openmbean.OpenType;
-import javax.management.openmbean.SimpleType;
-import javax.management.openmbean.TabularData;
-import javax.management.openmbean.TabularDataSupport;
-import javax.management.openmbean.TabularType;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.CacheServer;
-import com.gemstone.gemfire.admin.CacheServerConfig;
-import com.gemstone.gemfire.admin.CacheVm;
-import com.gemstone.gemfire.admin.CacheVmConfig;
-import com.gemstone.gemfire.admin.DistributedSystemConfig;
-import com.gemstone.gemfire.admin.DistributionLocator;
-import com.gemstone.gemfire.admin.DistributionLocatorConfig;
-import com.gemstone.gemfire.admin.GemFireHealth;
-import com.gemstone.gemfire.admin.SystemMember;
-import com.gemstone.gemfire.admin.SystemMemberCacheEvent;
-import com.gemstone.gemfire.admin.SystemMemberCacheListener;
-import com.gemstone.gemfire.admin.SystemMemberRegionEvent;
-import com.gemstone.gemfire.admin.SystemMemberType;
+import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.admin.internal.AdminDistributedSystemImpl;
import com.gemstone.gemfire.admin.internal.CacheServerConfigImpl;
import com.gemstone.gemfire.admin.internal.DistributionLocatorImpl;
import com.gemstone.gemfire.cache.persistence.PersistentID;
import com.gemstone.gemfire.distributed.DistributedMember;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
import com.gemstone.gemfire.internal.Assert;
import com.gemstone.gemfire.internal.admin.Alert;
-import com.gemstone.gemfire.internal.admin.ApplicationVM;
-import com.gemstone.gemfire.internal.admin.ClientMembershipMessage;
-import com.gemstone.gemfire.internal.admin.GemFireVM;
-import com.gemstone.gemfire.internal.admin.GfManagerAgent;
-import com.gemstone.gemfire.internal.admin.StatAlert;
-import com.gemstone.gemfire.internal.admin.StatAlertDefinition;
+import com.gemstone.gemfire.internal.admin.*;
import com.gemstone.gemfire.internal.admin.remote.UpdateAlertDefinitionMessage;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import javax.management.*;
+import javax.management.modelmbean.ModelMBean;
+import javax.management.openmbean.*;
+import java.io.*;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Provides MBean support for managing a GemFire distributed system.
@@ -341,23 +293,23 @@ public class AdminDistributedSystemJmxImpl
// -------------------------------------------------------------------------
/** Notification type for indicating system member joined */
- public static final String NOTIF_MEMBER_JOINED =
- "gemfire.distributedsystem.member.joined";
+ public static final String NOTIF_MEMBER_JOINED =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.member.joined";
/** Notification type for indicating system member left */
- public static final String NOTIF_MEMBER_LEFT =
- "gemfire.distributedsystem.member.left";
+ public static final String NOTIF_MEMBER_LEFT =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.member.left";
/** Notification type for indicating system member crashed */
- public static final String NOTIF_MEMBER_CRASHED =
- "gemfire.distributedsystem.member.crashed";
+ public static final String NOTIF_MEMBER_CRASHED =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.member.crashed";
/** Notification type for sending GemFire alerts as JMX notifications */
- public static final String NOTIF_ALERT =
- "gemfire.distributedsystem.alert";
+ public static final String NOTIF_ALERT =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.alert";
/** Notification type for sending GemFire StatAlerts as JMX notifications */
- public static final String NOTIF_STAT_ALERT =
- "gemfire.distributedsystem.statalert";
+ public static final String NOTIF_STAT_ALERT =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.statalert";
/** Notification type for indicating abnormal disconnection from the distributed system */
- public static final String NOTIF_ADMIN_SYSTEM_DISCONNECT =
- "gemfire.distributedsystem.disconnect";
+ public static final String NOTIF_ADMIN_SYSTEM_DISCONNECT =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.disconnect";
private static final String EML_SUBJ_PRFX_GFE_ALERT = "[GemFire Alert] ";
[38/67] [abbrv] incubator-geode git commit: GEODE-1377: Initial move
of system properties from private to public
Posted by ud...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
index b5e850d..5aaa184 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentConfigImpl.java
@@ -35,6 +35,8 @@ import java.util.Iterator;
import java.util.Properties;
import java.util.StringTokenizer;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.*;
+
/**
* Provides the JMX Agent configuration properties.
* <p>
@@ -49,52 +51,76 @@ import java.util.StringTokenizer;
* @since GemFire 3.5 (in which it was named AgentConfig)
*/
public class AgentConfigImpl extends DistributedSystemConfigImpl
- implements AgentConfig {
+ implements AgentConfig {
// -------------------------------------------------------------------------
// Static class variable(s)
// -------------------------------------------------------------------------
- /** Command-line arg to enable agent debugging */
+ /**
+ * Command-line arg to enable agent debugging
+ */
public static final String AGENT_DEBUG = "agent-debug";
- /** The name of the "propertyFile" property. May specify as cmd-line arg */
+ /**
+ * The name of the "propertyFile" property. May specify as cmd-line arg
+ */
public static final String PROPERTY_FILE_NAME = "property-file";
- /** The name of the "gfAgentPropertyFile" property, can be specified as System Property */
- public static final String AGENT_PROPSFILE_PROPERTY_NAME = "gfAgentPropertyFile";
+ /**
+ * The name of the "gfAgentPropertyFile" property, can be specified as System Property
+ */
+ public static final String AGENT_PROPSFILE_PROPERTY_NAME = "gfAgentPropertyFile";
// -------------------------------------------------------------------------
// DistributionLocator properties...
// -------------------------------------------------------------------------
- /** The name of the "locator.host-" property */
+ /**
+ * The name of the "locator.host-" property
+ */
public static final String LOCATOR_HOST_NAME =
"locator.host-";
- /** The name of the "locator.port-" property */
+ /**
+ * The name of the "locator.port-" property
+ */
public static final String LOCATOR_PORT_NAME =
"locator.port-";
- /** The name of the "locator.product-directory-" property */
+ /**
+ * The name of the "locator.product-directory-" property
+ */
public static final String LOCATOR_PRODUCT_DIRECTORY_NAME =
"locator.product-directory-";
- /** The name of the "locator.working-directory-" property */
+ /**
+ * The name of the "locator.working-directory-" property
+ */
public static final String LOCATOR_WORKING_DIRECTORY_NAME =
"locator.working-directory-";
- /** The name of the "locator.remote-command-" property */
+ /**
+ * The name of the "locator.remote-command-" property
+ */
public static final String LOCATOR_REMOTE_COMMAND =
"locator.remote-command-";
- /** The name of the "locator.bind-address-" property */
+ /**
+ * The name of the "locator.bind-address-" property
+ */
public static final String LOCATOR_BIND_ADDRESS =
"locator.bind-address-";
- /** the properties used in configuring a locator's distributed system */
+ /**
+ * the properties used in configuring a locator's distributed system
+ */
public static final String LOCATOR_DS_PROPERTIES =
"locator.ds-properties";
- /** The default log file for stand-alone JMX agents */
+ /**
+ * The default log file for stand-alone JMX agents
+ */
/*package scope*/
static final String DEFAULT_LOG_FILE = "agent.log";
- /** The default startup log file to be used by agent launcher */
+ /**
+ * The default startup log file to be used by agent launcher
+ */
/*package scope*/
static final String DEFAULT_STARTUP_LOG_FILE = "start_agent.log";
@@ -132,48 +158,47 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
Properties props = new Properties();
props.setProperty(AUTO_CONNECT_NAME,
- String.valueOf(DEFAULT_AUTO_CONNECT));
+ String.valueOf(DEFAULT_AUTO_CONNECT));
props.setProperty(HTTP_ENABLED_NAME,
- String.valueOf(DEFAULT_HTTP_ENABLED));
+ String.valueOf(DEFAULT_HTTP_ENABLED));
props.setProperty(HTTP_BIND_ADDRESS_NAME,
- String.valueOf(DEFAULT_HTTP_BIND_ADDRESS));
+ String.valueOf(DEFAULT_HTTP_BIND_ADDRESS));
props.setProperty(HTTP_PORT_NAME,
- String.valueOf(DEFAULT_HTTP_PORT));
+ String.valueOf(DEFAULT_HTTP_PORT));
props.setProperty(HTTP_AUTHENTICATION_ENABLED_NAME,
- String.valueOf(DEFAULT_HTTP_AUTHENTICATION_ENABLED));
+ String.valueOf(DEFAULT_HTTP_AUTHENTICATION_ENABLED));
props.setProperty(HTTP_AUTHENTICATION_USER_NAME,
- String.valueOf(DEFAULT_HTTP_AUTHENTICATION_USER));
+ String.valueOf(DEFAULT_HTTP_AUTHENTICATION_USER));
props.setProperty(HTTP_AUTHENTICATION_PASSWORD_NAME,
- String.valueOf(DEFAULT_HTTP_AUTHENTICATION_PASSWORD));
+ String.valueOf(DEFAULT_HTTP_AUTHENTICATION_PASSWORD));
props.setProperty(RMI_ENABLED_NAME,
- String.valueOf(DEFAULT_RMI_ENABLED));
+ String.valueOf(DEFAULT_RMI_ENABLED));
props.setProperty(RMI_REGISTRY_ENABLED_NAME,
- String.valueOf(DEFAULT_RMI_REGISTRY_ENABLED));
+ String.valueOf(DEFAULT_RMI_REGISTRY_ENABLED));
props.setProperty(RMI_BIND_ADDRESS_NAME,
- String.valueOf(DEFAULT_RMI_BIND_ADDRESS));
+ String.valueOf(DEFAULT_RMI_BIND_ADDRESS));
props.setProperty(RMI_PORT_NAME,
- String.valueOf(DEFAULT_RMI_PORT));
+ String.valueOf(DEFAULT_RMI_PORT));
props.setProperty(RMI_SERVER_PORT_NAME,
- String.valueOf(DEFAULT_RMI_SERVER_PORT));
+ String.valueOf(DEFAULT_RMI_SERVER_PORT));
props.setProperty(SNMP_ENABLED_NAME,
- String.valueOf(DEFAULT_SNMP_ENABLED));
+ String.valueOf(DEFAULT_SNMP_ENABLED));
props.setProperty(SNMP_DIRECTORY_NAME,
- String.valueOf(DEFAULT_SNMP_DIRECTORY));
+ String.valueOf(DEFAULT_SNMP_DIRECTORY));
props.setProperty(AGENT_SSL_ENABLED_NAME,
- String.valueOf(DEFAULT_AGENT_SSL_ENABLED));
+ String.valueOf(DEFAULT_AGENT_SSL_ENABLED));
props.setProperty(AGENT_SSL_PROTOCOLS_NAME,
- String.valueOf(DEFAULT_AGENT_SSL_PROTOCOLS));
+ String.valueOf(DEFAULT_AGENT_SSL_PROTOCOLS));
props.setProperty(AGENT_SSL_CIPHERS_NAME,
- String.valueOf(DEFAULT_AGENT_SSL_CIPHERS));
+ String.valueOf(DEFAULT_AGENT_SSL_CIPHERS));
props.setProperty(AGENT_SSL_REQUIRE_AUTHENTICATION_NAME,
- String.valueOf(DEFAULT_AGENT_SSL_REQUIRE_AUTHENTICATION));
+ String.valueOf(DEFAULT_AGENT_SSL_REQUIRE_AUTHENTICATION));
props.setProperty(HTTP_SSL_REQUIRE_AUTHENTICATION_NAME,
- String.valueOf(DEFAULT_HTTP_SSL_REQUIRE_AUTHENTICATION));
-
+ String.valueOf(DEFAULT_HTTP_SSL_REQUIRE_AUTHENTICATION));
return props;
}
@@ -277,16 +302,16 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
props.setProperty(ENTITY_CONFIG_XML_FILE_NAME,
String.valueOf(DEFAULT_ENTITY_CONFIG_XML_FILE));
- props.setProperty(MCAST_PORT_NAME,
+ props.setProperty(MCAST_PORT,
String.valueOf(DEFAULT_MCAST_PORT));
- props.setProperty(MCAST_ADDRESS_NAME,
+ props.setProperty(MCAST_ADDRESS,
String.valueOf(DEFAULT_MCAST_ADDRESS));
- props.setProperty(LOCATORS_NAME,
+ props.setProperty(LOCATORS,
String.valueOf(DEFAULT_LOCATORS));
- props.setProperty(BIND_ADDRESS_NAME,
+ props.setProperty(BIND_ADDRESS,
String.valueOf(DEFAULT_BIND_ADDRESS));
props.setProperty(REMOTE_COMMAND_NAME,
@@ -315,19 +340,29 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
// Member variable(s)
// -------------------------------------------------------------------------
- /** Does agent automatically connect to the distributed system? */
+ /**
+ * Does agent automatically connect to the distributed system?
+ */
private boolean autoConnect;
- /** True if Agent adaptors should use SSL */
+ /**
+ * True if Agent adaptors should use SSL
+ */
private boolean agentSSLEnabled;
- /** The SSL Protocols that the Agent adaptors will use */
+ /**
+ * The SSL Protocols that the Agent adaptors will use
+ */
private String agentSSLProtocols;
- /** The SSL Ciphers that the Agent adaptors will use */
+ /**
+ * The SSL Ciphers that the Agent adaptors will use
+ */
private String agentSSLCiphers;
- /** True if Agent adaptors require authentication when SSL is enabled */
+ /**
+ * True if Agent adaptors require authentication when SSL is enabled
+ */
private boolean agentSSLRequireAuth;
/**
@@ -337,61 +372,99 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
*/
private boolean httpSSLRequireAuth;
- /** True if HttpAdaptor authentication is enabled */
+ /**
+ * True if HttpAdaptor authentication is enabled
+ */
private boolean httpAuthEnabled;
- /** The login user for HttpAdaptor authentication */
+ /**
+ * The login user for HttpAdaptor authentication
+ */
private String httpAuthUser;
- /** The login password for HttpAdaptor authentication */
+ /**
+ * The login password for HttpAdaptor authentication
+ */
private String httpAuthPassword;
- /** True if the HttpAdaptor is enabled */
+ /**
+ * True if the HttpAdaptor is enabled
+ */
private boolean httpEnabled;
- /** The port for the MX4J HttpAdatper */
+ /**
+ * The port for the MX4J HttpAdatper
+ */
private int httpPort;
- /** The host for the MX4J HttpAdatper */
+ /**
+ * The host for the MX4J HttpAdatper
+ */
private String httpBindAddress;
- /** True if the RMIConnectorServer is enabled */
+ /**
+ * True if the RMIConnectorServer is enabled
+ */
private boolean rmiEnabled;
- /** True if the Agent is to create its own RMI registry */
+ /**
+ * True if the Agent is to create its own RMI registry
+ */
private boolean rmiRegistryEnabled;
- /** The host for the MX4J RMIConnectorServer */
+ /**
+ * The host for the MX4J RMIConnectorServer
+ */
private String rmiBindAddress;
- /** The port for the RMI Registry created by the Agent */
+ /**
+ * The port for the RMI Registry created by the Agent
+ */
private int rmiPort;
- /** The port for the MX4J RMIConnectorServer */
+ /**
+ * The port for the MX4J RMIConnectorServer
+ */
private int rmiServerPort;
- /** True if the SnmpAdaptor is enabled */
+ /**
+ * True if the SnmpAdaptor is enabled
+ */
private boolean snmpEnabled;
- /** The bind address for sockets used by the SNMP adapter */
+ /**
+ * The bind address for sockets used by the SNMP adapter
+ */
private String snmpBindAddress;
- /** Path to the directory containing the SNMP Adaptor and its sub-dirs */
+ /**
+ * Path to the directory containing the SNMP Adaptor and its sub-dirs
+ */
private String snmpDirectory;
- /** Is Email notification enabled */
+ /**
+ * Is Email notification enabled
+ */
private boolean isEmailNotificationEnabled;
- /** Email notification from: emailID */
+ /**
+ * Email notification from: emailID
+ */
private String emailNotificationFrom;
- /** The host name of the mail server to be used for email communication. */
+ /**
+ * The host name of the mail server to be used for email communication.
+ */
private String emailNotificationHostName;
- /** Email notification to: emailIDs list */
+ /**
+ * Email notification to: emailIDs list
+ */
private String emailNotificationToList;
- /** State Save File Name */
+ /**
+ * State Save File Name
+ */
private String stateSaveFile;
/**
@@ -400,11 +473,15 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
*/
private URL url;
- /** Original command line arguments */
+ /**
+ * Original command line arguments
+ */
private String[] originalCmdLineArgs = null;
- /** The <code>Agent</code> that is configured by this
- * <code>AgentConfigImpl</code> */
+ /**
+ * The <code>Agent</code> that is configured by this
+ * <code>AgentConfigImpl</code>
+ */
private Agent agent;
// -------------------------------------------------------------------------
@@ -424,7 +501,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
* are used to create a set of non-default properties for initializing this
* AgentConfig.
*
- * @param args array of non-default configuration arguments
+ * @param args array of non-default configuration arguments
*/
public AgentConfigImpl(String[] args) {
this(toProperties(args));
@@ -435,7 +512,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
* Creates a new <code>AgentConfig</code> with the given non-default
* configuration properties.
*
- * @param props overriding non-default configuration properties
+ * @param props overriding non-default configuration properties
*/
public AgentConfigImpl(Properties props) {
// for admin bug #40434
@@ -450,7 +527,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
/**
* Constructs new instance of AgentConfig using the specified property file.
*
- * @param propFile the file to load configuration properties from
+ * @param propFile the file to load configuration properties from
*/
public AgentConfigImpl(File propFile) {
// Initialize default values
@@ -462,12 +539,10 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
FileInputStream in = new FileInputStream(propFile);
props.load(in);
in.close();
- }
- catch (java.io.IOException e) {
+ } catch (java.io.IOException e) {
throw new GemFireIOException(LocalizedStrings.AgentConfigImpl_FAILED_READING_0.toLocalizedString(propFile), e);
}
- }
- else {
+ } else {
throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_SPECIFIED_PROPERTIES_FILE_DOES_NOT_EXIST_0.toLocalizedString(propFile));
}
@@ -493,7 +568,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
@Override
protected void checkReadOnly() {
if (this.agent != null) {
- throw new IllegalStateException(LocalizedStrings.AgentConfigImpl_AN_AGENTCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_AGENT.toLocalizedString());
+ throw new IllegalStateException(
+ LocalizedStrings.AgentConfigImpl_AN_AGENTCONFIG_OBJECT_CANNOT_BE_MODIFIED_AFTER_IT_HAS_BEEN_USED_TO_CREATE_AN_AGENT.toLocalizedString());
}
super.checkReadOnly();
@@ -516,7 +592,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
return LocalizedStrings.AgentConfigImpl_USING_DEFAULT_CONFIGURATION_BECAUSE_PROPERTY_FILE_WAS_FOUND.toLocalizedString();
} else {
return LocalizedStrings.AgentConfigImpl_CONFIGURATION_LOADED_FROM_0
- .toLocalizedString(this.url);
+ .toLocalizedString(this.url);
}
}
@@ -531,7 +607,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
if (!f.isAbsolute()) {
// save to <cwd>/propertyFile
f = new File(System.getProperty("user.dir"),
- retrievePropertyFile());
+ retrievePropertyFile());
}
} else {
f = new File(this.url.getFile());
@@ -553,7 +629,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
pw.println(LocalizedStrings.AgentConfigImpl_AGENT_CONFIGURATION.toLocalizedString());
Enumeration e = p.propertyNames();
while (e.hasMoreElements()) {
- String pn = (String)e.nextElement();
+ String pn = (String) e.nextElement();
String pv = p.getProperty(pn);
pw.println(" " + pn + " = " + pv);
}
@@ -571,14 +647,11 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
return toProperties(false /* include DS properties */);
}
-
/**
* Converts the contents of this config to a property instance.
*
- * @param includeDSProperties
- * Should distributed system properties be included in the
- * <code>Properties</code> object? See bug 32682.
- *
+ * @param includeDSProperties Should distributed system properties be included in the
+ * <code>Properties</code> object? See bug 32682.
* @return contents of this config as java.util.Properties
*/
public Properties toProperties(boolean includeDSProperties) {
@@ -630,17 +703,17 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
Properties sslProps = getSSLProperties();
if (sslProps.size() > 0) {
int sequence = 0;
- for (Iterator iter = sslProps.keySet().iterator(); iter.hasNext();) {
+ for (Iterator iter = sslProps.keySet().iterator(); iter.hasNext(); ) {
String key = (String) iter.next();
String value = sslProps.getProperty(key);
- props.setProperty("ssl-property-" + sequence, key+"="+OBFUSCATED_STRING);
+ props.setProperty("ssl-property-" + sequence, key + "=" + OBFUSCATED_STRING);
sequence++;
}
}
if (this.getDistributionLocatorConfigs().length > 0) {
DistributionLocatorConfig[] configs =
- this.getDistributionLocatorConfigs();
+ this.getDistributionLocatorConfigs();
for (int i = 0; i < configs.length; i++) {
DistributionLocatorConfig locator = configs[i];
props.setProperty(LOCATOR_HOST_NAME + i, toString(LOCATOR_HOST_NAME, locator.getHost()));
@@ -649,21 +722,21 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
props.setProperty(LOCATOR_WORKING_DIRECTORY_NAME + i, toString(LOCATOR_WORKING_DIRECTORY_NAME, locator.getWorkingDirectory()));
props.setProperty(LOCATOR_REMOTE_COMMAND + i, toString(LOCATOR_REMOTE_COMMAND, locator.getRemoteCommand()));
props.setProperty(LOCATOR_BIND_ADDRESS + i, toString(LOCATOR_BIND_ADDRESS, locator.getBindAddress()));
-// props.setProperty(LOCATOR_DS_PROPERTIES + i,
-// getdsPropertiesString(locator));
+ // props.setProperty(LOCATOR_DS_PROPERTIES + i,
+ // getdsPropertiesString(locator));
}
}
if (includeDSProperties) {
props.setProperty(ENTITY_CONFIG_XML_FILE_NAME, toString(ENTITY_CONFIG_XML_FILE_NAME, getEntityConfigXMLFile()));
// This could be different each time agent is started
-// props.setProperty(SYSTEM_ID_NAME, toString(getSystemId()));
- props.setProperty(MCAST_PORT_NAME, toString(MCAST_PORT_NAME, getMcastPort()));
- props.setProperty(MCAST_ADDRESS_NAME, toString(MCAST_ADDRESS_NAME, getMcastAddress()));
- props.setProperty(LOCATORS_NAME, toString(LOCATORS_NAME, getLocators()));
+ // props.setProperty(SYSTEM_ID_NAME, toString(getSystemId()));
+ props.setProperty(MCAST_PORT, toString(MCAST_PORT, getMcastPort()));
+ props.setProperty(MCAST_ADDRESS, toString(MCAST_ADDRESS, getMcastAddress()));
+ props.setProperty(LOCATORS, toString(LOCATORS, getLocators()));
props.setProperty(MEMBERSHIP_PORT_RANGE_NAME, getMembershipPortRange());
- props.setProperty(TCP_PORT_NAME, ""+getTcpPort());
- props.setProperty(BIND_ADDRESS_NAME, toString(BIND_ADDRESS_NAME, getBindAddress()));
+ props.setProperty(TCP_PORT, "" + getTcpPort());
+ props.setProperty(BIND_ADDRESS, toString(BIND_ADDRESS, getBindAddress()));
props.setProperty(REMOTE_COMMAND_NAME, toString(REMOTE_COMMAND_NAME, getRemoteCommand()));
props.setProperty(LOG_FILE_NAME, toString(LOG_FILE_NAME, getLogFile()));
props.setProperty(LOG_LEVEL_NAME, toString(LOG_LEVEL_NAME, getLogLevel()));
@@ -861,7 +934,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
/**
* Returns the port of the RMI Connector Server.
- *
+ * <p>
* See <a href="#rmi-server-port">description</a> above.
*
* @return the value set for rmi-server-port
@@ -1011,38 +1084,42 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
DEFAULT_SSL_REQUIRE_AUTHENTICATION);
this.sslProperties = new Properties();
for (int i = 0; true; i++) {
- String key = "ssl-property-"+i;
+ String key = "ssl-property-" + i;
String value = props.getProperty(key);
- if (value == null) break;
+ if (value == null)
+ break;
StringTokenizer st = new StringTokenizer(value, "=");
- if (!st.hasMoreTokens()) break;
+ if (!st.hasMoreTokens())
+ break;
String propKey = st.nextToken();
- if (!st.hasMoreTokens()) break;
+ if (!st.hasMoreTokens())
+ break;
String propValue = st.nextToken();
this.sslProperties.put(propKey, propValue);
}
this.isEmailNotificationEnabled = validateBoolean(props.getProperty(
- AgentConfig.EMAIL_NOTIFICATIONS_ENABLED_NAME),
- DEFAULT_EMAIL_NOTIFICATIONS_ENABLED);
- this.emailNotificationHostName= validateNonEmptyString(props.getProperty(
- AgentConfig.EMAIL_NOTIFICATIONS_HOST_NAME),
- DEFAULT_EMAIL_HOST);
- this.emailNotificationFrom= validateNonEmptyString(props.getProperty(
- AgentConfig.EMAIL_NOTIFICATIONS_FROM_NAME),
- DEFAULT_EMAIL_FROM);
- this.emailNotificationToList= validateNonEmptyString(props.getProperty(
- AgentConfig.EMAIL_NOTIFICATIONS_TO_LIST_NAME),
- DEFAULT_EMAIL_TO_LIST);
+ AgentConfig.EMAIL_NOTIFICATIONS_ENABLED_NAME),
+ DEFAULT_EMAIL_NOTIFICATIONS_ENABLED);
+ this.emailNotificationHostName = validateNonEmptyString(props.getProperty(
+ AgentConfig.EMAIL_NOTIFICATIONS_HOST_NAME),
+ DEFAULT_EMAIL_HOST);
+ this.emailNotificationFrom = validateNonEmptyString(props.getProperty(
+ AgentConfig.EMAIL_NOTIFICATIONS_FROM_NAME),
+ DEFAULT_EMAIL_FROM);
+ this.emailNotificationToList = validateNonEmptyString(props.getProperty(
+ AgentConfig.EMAIL_NOTIFICATIONS_TO_LIST_NAME),
+ DEFAULT_EMAIL_TO_LIST);
this.stateSaveFile = validateNonEmptyString(props.getProperty(
- AgentConfig.STATE_SAVE_FILE_NAME),
- DEFAULT_STATE_SAVE_FILE);
+ AgentConfig.STATE_SAVE_FILE_NAME),
+ DEFAULT_STATE_SAVE_FILE);
try {
for (int i = 0; true; i++) {
String hostProp = props.getProperty(LOCATOR_HOST_NAME + i);
- if (isEmpty(hostProp)) break;
+ if (isEmpty(hostProp))
+ break;
String host = hostProp;
int port = Integer.parseInt(
props.getProperty(LOCATOR_PORT_NAME + i));
@@ -1056,7 +1133,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
props.getProperty(LOCATOR_BIND_ADDRESS + i);
DistributionLocatorConfig config =
- this.createDistributionLocatorConfig();
+ this.createDistributionLocatorConfig();
config.setHost(host);
config.setPort(port);
config.setBindAddress(bindAddr);
@@ -1077,6 +1154,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
/**
* Filter all agent configuration attributes out of the given <code>Properties</code> object.
* <p/>
+ *
* @param props the <code>Properties</code> object of filter agent configuration attributes out of.
* @see AgentConfigImpl#_getPropertyDescription(String)
*/
@@ -1101,12 +1179,12 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
* Appends the log-file property to the Properties object if set of properties does not already define the
* log-file property or the gemfire.agent.log-file property.
* <p/>
+ *
* @param props the <code>Properties</code> to append the log-file property to if the property does not exist.
*/
private static void appendLogFileProperty(final Properties props) {
if (!(props.containsKey(DistributedSystemConfig.LOG_FILE_NAME)
- || props.containsKey(SYSTEM_PROPERTY_PREFIX + DistributedSystemConfig.LOG_FILE_NAME)))
- {
+ || props.containsKey(SYSTEM_PROPERTY_PREFIX + DistributedSystemConfig.LOG_FILE_NAME))) {
props.put(DistributedSystemConfig.LOG_FILE_NAME, DEFAULT_LOG_FILE);
}
}
@@ -1116,6 +1194,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
* Properties. If the supplied property overrides the property in the
* property-file, then property-file value is ignored. System Properties always
* override the supplied properties
+ *
* @return appendedProps Properties appened to from the property-file if any
*/
private static Properties appendOptionalPropertyFileProperties(final Properties props) {
@@ -1141,12 +1220,10 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
appendedProps.setProperty(key.toString(), agentPropertyFileProperties.getProperty(key.toString()));
}
}
- }
- catch (IOException e) {
+ } catch (IOException e) {
throw new GemFireIOException(LocalizedStrings.AgentConfigImpl_FAILED_READING_0.toLocalizedString(
- url.toString()), e);
- }
- finally {
+ url.toString()), e);
+ } finally {
IOUtils.close(in);
}
}
@@ -1168,9 +1245,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
/**
* Returns a description of the given agent config property
*
- * @throws IllegalArgumentException
- * If <code>prop</code> is not a recognized agent
- * configuration property
+ * @throws IllegalArgumentException If <code>prop</code> is not a recognized agent
+ * configuration property
*/
public static String getPropertyDescription(String prop) {
if (prop.equals(LOG_FILE_NAME)) {
@@ -1182,21 +1258,22 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
} else if (prop.equals(LOG_DISK_SPACE_LIMIT_NAME)) {
return LocalizedStrings.AgentConfigImpl_LIMIT_IN_MEGABYTES_OF_HOW_MUCH_DISK_SPACE_CAN_BE_CONSUMED_BY_OLD_INACTIVE_LOG_FILES.toLocalizedString();
} else if (prop.equals(LOG_FILE_SIZE_LIMIT_NAME)) {
- return LocalizedStrings.AgentConfigImpl_LIMIT_IN_MEGABYTES_OF_HOW_LARGE_THE_CURRENT_STATISTIC_ARCHIVE_FILE_CAN_GROW_BEFORE_IT_IS_CLOSED_AND_ARCHIVAL_ROLLS_ON_TO_A_NEW_FILE.toLocalizedString();
- } else if (prop.equals(MCAST_PORT_NAME)) {
+ return LocalizedStrings.AgentConfigImpl_LIMIT_IN_MEGABYTES_OF_HOW_LARGE_THE_CURRENT_STATISTIC_ARCHIVE_FILE_CAN_GROW_BEFORE_IT_IS_CLOSED_AND_ARCHIVAL_ROLLS_ON_TO_A_NEW_FILE
+ .toLocalizedString();
+ } else if (prop.equals(MCAST_PORT)) {
return LocalizedStrings.AgentConfigImpl_MULTICAST_PORT_USED_TO_CONNECT_TO_DISTRIBUTED_SYSTEM.toLocalizedString();
- } else if (prop.equals(MCAST_ADDRESS_NAME)) {
+ } else if (prop.equals(MCAST_ADDRESS)) {
return LocalizedStrings.AgentConfigImpl_MULTICAST_ADDRESS_USED_TO_CONNECT_TO_DISTRIBUTED_SYSTEM.toLocalizedString();
- } else if (prop.equals(BIND_ADDRESS_NAME)) {
+ } else if (prop.equals(BIND_ADDRESS)) {
return LocalizedStrings.AgentConfigImpl_IP_ADDRESS_OF_THE_AGENTS_DISTRIBUTED_SYSTEM.toLocalizedString();
- } else if (prop.equals(TCP_PORT_NAME)) {
+ } else if (prop.equals(TCP_PORT)) {
return LocalizedStrings.AgentConfigImpl_TCP_PORT.toLocalizedString();
- } else if (prop.equals(LOCATORS_NAME)) {
+ } else if (prop.equals(LOCATORS)) {
return LocalizedStrings.AgentConfigImpl_ADDRESSES_OF_THE_LOCATORS_OF_THE_DISTRIBUTED_SYSTEM.toLocalizedString();
} else if (prop.equals(MEMBERSHIP_PORT_RANGE_NAME)) {
- return LocalizedStrings.AgentConfigImpl_ALLOWED_RANGE_OF_UDP_PORTS_TO_FORM_UNIQUE_MEMBERSHIP_ID.toLocalizedString();
-// } else if (prop.equals(SYSTEM_ID_NAME)) {
-// return "The id of the distributed system";
+ return LocalizedStrings.AgentConfigImpl_ALLOWED_RANGE_OF_UDP_PORTS_TO_FORM_UNIQUE_MEMBERSHIP_ID.toLocalizedString();
+ // } else if (prop.equals(SYSTEM_ID_NAME)) {
+ // return "The id of the distributed system";
} else if (prop.equals(ENTITY_CONFIG_XML_FILE_NAME)) {
return LocalizedStrings.AgentConfigImpl_XML_CONFIGURATION_FILE_FOR_MANAGED_ENTITIES.toLocalizedString();
} else if (prop.equals(REFRESH_INTERVAL_NAME)) {
@@ -1231,8 +1308,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
if (prop.equals(AUTO_CONNECT_NAME)) {
return LocalizedStrings.AgentConfigImpl_WILL_THE_AGENT_AUTOMATICALLY_CONNECT_TO_THE_DISTRIBUTED_SYSTEM.toLocalizedString();
-// } else if (prop.equals(SYSTEM_NAME_NAME)) {
-// return "The logical name of the distributed system";
+ // } else if (prop.equals(SYSTEM_NAME_NAME)) {
+ // return "The logical name of the distributed system";
} else if (prop.equals(HTTP_ENABLED_NAME)) {
return LocalizedStrings.AgentConfigImpl_WILL_THE_AGENT_START_THE_HTTP_JMX_ADAPTER.toLocalizedString();
@@ -1316,19 +1393,19 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
return LocalizedStrings.AgentConfigImpl_PROPERTIES_FOR_CONFIGURING_A_LOCATORS_DISTRIBUTED_SYSTEM.toLocalizedString();
} else if (prop.equals(EMAIL_NOTIFICATIONS_ENABLED_NAME)) {
- return LocalizedStrings.AgentConfigImpl_IDENTIFY_IF_EMAIL_NOTIFICATIONS_ARE_ENABLED_OR_NOT.toLocalizedString();
+ return LocalizedStrings.AgentConfigImpl_IDENTIFY_IF_EMAIL_NOTIFICATIONS_ARE_ENABLED_OR_NOT.toLocalizedString();
} else if (prop.equals(EMAIL_NOTIFICATIONS_FROM_NAME)) {
- return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_EMAIL_ADDRESS_USING_WHICH_EMAIL_NOTIFICATIONS_ARE_SENT.toLocalizedString();
+ return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_EMAIL_ADDRESS_USING_WHICH_EMAIL_NOTIFICATIONS_ARE_SENT.toLocalizedString();
} else if (prop.equals(EMAIL_NOTIFICATIONS_HOST_NAME)) {
- return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_EMAIL_SERVER_HOST_USING_WHICH_EMAIL_NOTIFICATIONS_ARE_SENT.toLocalizedString();
+ return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_EMAIL_SERVER_HOST_USING_WHICH_EMAIL_NOTIFICATIONS_ARE_SENT.toLocalizedString();
} else if (prop.equals(EMAIL_NOTIFICATIONS_TO_LIST_NAME)) {
- return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_COMMA_SEPARATED_EMAIL_ADDRESSES_LIST_TO_WHICH_EMAIL_NOTIFICATIONS_ARE_SENT.toLocalizedString();
+ return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_COMMA_SEPARATED_EMAIL_ADDRESSES_LIST_TO_WHICH_EMAIL_NOTIFICATIONS_ARE_SENT.toLocalizedString();
} else if (prop.equals(STATE_SAVE_FILE_NAME)) {
- return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_NAME_OF_THE_FILE_TO_BE_USED_FOR_SAVING_AGENT_STATE.toLocalizedString();
+ return LocalizedStrings.AgentConfigImpl_IDENTIFY_THE_NAME_OF_THE_FILE_TO_BE_USED_FOR_SAVING_AGENT_STATE.toLocalizedString();
} else {
return null;
@@ -1349,14 +1426,12 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
if (args[i].startsWith("-J")) {
int eq = args[i].indexOf("=");
String key = args[i].substring(2, eq);
- String value = args[i].substring(eq+1);
+ String value = args[i].substring(eq + 1);
System.setProperty(key, value);
- }
-
- else if (args[i].indexOf(AGENT_DEBUG) > 0) {
+ } else if (args[i].indexOf(AGENT_DEBUG) > 0) {
int eq = args[i].indexOf("=");
String key = args[i].substring(2, eq);
- String value = args[i].substring(eq+1);
+ String value = args[i].substring(eq + 1);
System.setProperty(key, value);
}
@@ -1364,7 +1439,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
else if (args[i].indexOf("=") > 0) {
int eq = args[i].indexOf("=");
String key = args[i].substring(0, eq);
- String value = args[i].substring(eq+1);
+ String value = args[i].substring(eq + 1);
props.setProperty(key, value);
}
}
@@ -1372,7 +1447,9 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
return props;
}
- /** Returns the original command-line arguments. */
+ /**
+ * Returns the original command-line arguments.
+ */
public String[] getOriginalArgs() {
return this.originalCmdLineArgs;
}
@@ -1381,43 +1458,51 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
// Validation methods for configuration options
// -------------------------------------------------------------------------
- /**
+ /**
* Makes sure that the mcast port and locators are correct and
* consistent.
*
- * @throws IllegalArgumentException
- * If configuration is not valid
+ * @throws IllegalArgumentException If configuration is not valid
*/
@Override
public void validate() {
super.validate();
if (this.httpPort < 0 || this.httpPort > MAX_HTTP_PORT) {
- throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2.toLocalizedString(new Object[] {HTTP_PORT_NAME, Integer.valueOf(MIN_HTTP_PORT), Integer.valueOf(MAX_HTTP_PORT)}));
+ throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2
+ .toLocalizedString(new Object[] { HTTP_PORT_NAME, Integer.valueOf(MIN_HTTP_PORT), Integer.valueOf(MAX_HTTP_PORT) }));
}
if (this.rmiPort < 0 || this.rmiPort > MAX_RMI_PORT) {
- throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2.toLocalizedString(new Object[] {RMI_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT)}));
+ throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2
+ .toLocalizedString(new Object[] { RMI_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT) }));
}
if (this.rmiServerPort < 0 || this.rmiServerPort > MAX_RMI_PORT) {
- throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2.toLocalizedString(new Object[] {RMI_SERVER_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT)}));
+ throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2
+ .toLocalizedString(new Object[] { RMI_SERVER_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT) }));
}
}
- /** Returns defaultValue if value is empty. */
+ /**
+ * Returns defaultValue if value is empty.
+ */
private String validateNonEmptyString(String value,
- String defaultValue) {
+ String defaultValue) {
return isEmpty(value) ? defaultValue : value;
}
- /** Validates that systemHost can be used for an InetAddress. */
+ /**
+ * Validates that systemHost can be used for an InetAddress.
+ */
private String validateSystemHost(String systemHost) {
return InetAddressUtil.validateHost(systemHost);
}
- /** Returns null if productDir is empty; else converts it to File. */
+ /**
+ * Returns null if productDir is empty; else converts it to File.
+ */
private String validateProductDirectory(String productDir) {
if (isEmpty(productDir)) {
return null;
@@ -1425,9 +1510,12 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
return productDir;
}
- /** Returns true if value parses as true; null value returns defaultValue. */
+ /**
+ * Returns true if value parses as true; null value returns defaultValue.
+ */
private boolean validateBoolean(String value, boolean defaultValue) {
- if (isEmpty(value)) return defaultValue;
+ if (isEmpty(value))
+ return defaultValue;
return Boolean.valueOf(value).booleanValue();
}
@@ -1446,6 +1534,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
return validateHttpPort(Integer.parseInt(val));
}
}
+
/**
* Validates that httpPort is either zero or within the {@link
* com.gemstone.gemfire.admin.jmx.AgentConfig#MIN_HTTP_PORT} and {@link
@@ -1453,7 +1542,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
*/
private int validateHttpPort(int val) {
if (val < 0 || val > MAX_HTTP_PORT) {
- throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2.toLocalizedString(new Object[] {HTTP_PORT_NAME, Integer.valueOf(MIN_HTTP_PORT), Integer.valueOf(MAX_HTTP_PORT)}));
+ throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2
+ .toLocalizedString(new Object[] { HTTP_PORT_NAME, Integer.valueOf(MIN_HTTP_PORT), Integer.valueOf(MAX_HTTP_PORT) }));
}
return val;
}
@@ -1468,8 +1558,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
String value = InetAddressUtil.validateHost(val);
if (value == null) {
return DEFAULT_HTTP_BIND_ADDRESS;
- }
- else {
+ } else {
return value;
}
}
@@ -1496,21 +1585,20 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
String value = InetAddressUtil.validateHost(val);
if (value == null) {
return DEFAULT_SNMP_BIND_ADDRESS;
- }
- else {
+ } else {
return value;
}
}
-// /**
-// * Validates that snmpBindAddress is not null and then returns the string form of it.
-// */
-// private String validateSnmpBindAddress(InetAddress snmpBindAddress) {
-// if (snmpBindAddress == null) {
-// throw new IllegalArgumentException("SnmpBindAddress must not be null");
-// }
-// return toString(snmpBindAddress);
-// }
+ // /**
+ // * Validates that snmpBindAddress is not null and then returns the string form of it.
+ // */
+ // private String validateSnmpBindAddress(InetAddress snmpBindAddress) {
+ // if (snmpBindAddress == null) {
+ // throw new IllegalArgumentException("SnmpBindAddress must not be null");
+ // }
+ // return toString(snmpBindAddress);
+ // }
/**
* SnmpDirectory must be specified if SNMP is enabled. This directory must
@@ -1551,7 +1639,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
*/
private int validateRmiPort(int val) {
if (val < MIN_RMI_PORT || val > MAX_RMI_PORT) {
- throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2.toLocalizedString(new Object[] {RMI_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT)}));
+ throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2
+ .toLocalizedString(new Object[] { RMI_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT) }));
}
return val;
}
@@ -1577,7 +1666,8 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
*/
private int validateRmiServerPort(int val) {
if (val < MIN_RMI_PORT || val > MAX_RMI_PORT) {
- throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2.toLocalizedString(new Object[] {RMI_SERVER_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT)}));
+ throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_0_MUST_BE_ZERO_OR_AN_INTEGER_BETWEEN_1_AND_2
+ .toLocalizedString(new Object[] { RMI_SERVER_PORT_NAME, Integer.valueOf(MIN_RMI_PORT), Integer.valueOf(MAX_RMI_PORT) }));
}
return val;
}
@@ -1592,22 +1682,23 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
String value = InetAddressUtil.validateHost(val);
if (value == null) {
return DEFAULT_RMI_BIND_ADDRESS;
- }
- else {
+ } else {
return value;
}
}
-// /**
-// * Validates that rmiBindAddress is not null and then returns the string form of it.
-// */
-// private String validateRmiBindAddress(InetAddress rmiBindAddress) {
-// if (rmiBindAddress == null) {
-// throw new IllegalArgumentException("RmiBindAddress must not be null");
-// }
-// return toString(rmiBindAddress);
-// }
-
- /** Validates working directory is not null or empty. */
+ // /**
+ // * Validates that rmiBindAddress is not null and then returns the string form of it.
+ // */
+ // private String validateRmiBindAddress(InetAddress rmiBindAddress) {
+ // if (rmiBindAddress == null) {
+ // throw new IllegalArgumentException("RmiBindAddress must not be null");
+ // }
+ // return toString(rmiBindAddress);
+ // }
+
+ /**
+ * Validates working directory is not null or empty.
+ */
private File validateWorkingDirectory(String workingDir) {
if (isEmpty(workingDir)) {
throw new IllegalArgumentException(LocalizedStrings.AgentConfigImpl_LOCATOR_WORKINGDIRECTORY_MUST_NOT_BE_NULL.toLocalizedString());
@@ -1633,7 +1724,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
* Only the first file found will be used.
*
* @return a <code>URL</code> that names the property file;
- * otherwise Null if no property file was found.
+ * otherwise Null if no property file was found.
*/
public static URL getPropertyFileURL(final String propFileLocation) {
File propFile = new File(propFileLocation);
@@ -1644,8 +1735,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
try {
return propFile.toURI().toURL();
- }
- catch (java.net.MalformedURLException ignore) {
+ } catch (java.net.MalformedURLException ignore) {
}
}
@@ -1658,8 +1748,7 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
try {
return propFile.toURI().toURL();
- }
- catch (java.net.MalformedURLException ignore) {
+ } catch (java.net.MalformedURLException ignore) {
}
}
}
@@ -1689,17 +1778,18 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
}
return true;
}
-
+
/**
* Returns string representation of the specified object with special
* handling for InetAddress.
*
- * @param obj the object to convert to string
+ * @param obj the object to convert to string
* @return string representation of the specified object
*/
private static String toString(String attName, java.lang.Object obj) {
if (okToDisplayPropertyValue(attName)) {
- if (obj == null) return "";
+ if (obj == null)
+ return "";
if (obj instanceof InetAddress) {
return InetAddressUtil.toString(obj);
}
@@ -1709,7 +1799,9 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
}
}
- /** Returns string representation of the int. */
+ /**
+ * Returns string representation of the int.
+ */
private static String toString(String attName, int num) {
if (okToDisplayPropertyValue(attName)) {
return String.valueOf(num);
@@ -1718,7 +1810,9 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
}
}
- /** Returns string representation of the boolean value. */
+ /**
+ * Returns string representation of the boolean value.
+ */
private static String toString(String attName, boolean v) {
if (okToDisplayPropertyValue(attName)) {
return String.valueOf(v);
@@ -1727,7 +1821,9 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
}
}
- /** Returns true if the string is null or empty. */
+ /**
+ * Returns true if the string is null or empty.
+ */
public static boolean isEmpty(String string) {
return string == null || string.length() == 0;
}
@@ -1745,42 +1841,51 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
public boolean isSSLEnabled() {
return this.sslEnabled;
}
+
@Override
public void setSSLEnabled(boolean enabled) {
this.sslEnabled = enabled;
configChanged();
}
+
@Override
public String getSSLProtocols() {
return this.sslProtocols;
}
+
@Override
public void setSSLProtocols(String protocols) {
this.sslProtocols = protocols;
configChanged();
}
+
@Override
public String getSSLCiphers() {
return this.sslCiphers;
}
+
@Override
public void setSSLCiphers(String ciphers) {
this.sslCiphers = ciphers;
configChanged();
}
+
@Override
public boolean isSSLAuthenticationRequired() {
return this.sslAuthenticationRequired;
}
+
@Override
public void setSSLAuthenticationRequired(boolean authRequired) {
this.sslAuthenticationRequired = authRequired;
configChanged();
}
+
@Override
public Properties getSSLProperties() {
return this.sslProperties;
}
+
@Override
public void setSSLProperties(Properties sslProperties) {
this.sslProperties = sslProperties;
@@ -1791,50 +1896,50 @@ public class AgentConfigImpl extends DistributedSystemConfigImpl
}
public String getStateSaveFile() {
- return this.stateSaveFile;
+ return this.stateSaveFile;
}
public void setStateSaveFile(String file) {
- checkReadOnly();
- this.stateSaveFile = file;
- configChanged();
+ checkReadOnly();
+ this.stateSaveFile = file;
+ configChanged();
}
public boolean isEmailNotificationEnabled() {
- return this.isEmailNotificationEnabled;
+ return this.isEmailNotificationEnabled;
}
public void setEmailNotificationEnabled(boolean enabled) {
- checkReadOnly();
- this.isEmailNotificationEnabled = enabled;
- configChanged();
+ checkReadOnly();
+ this.isEmailNotificationEnabled = enabled;
+ configChanged();
}
public String getEmailNotificationFrom() {
- return this.emailNotificationFrom;
+ return this.emailNotificationFrom;
}
public void setEmailNotificationFrom(String emailID) {
- this.emailNotificationFrom = emailID;
- configChanged();
+ this.emailNotificationFrom = emailID;
+ configChanged();
}
public String getEmailNotificationHost() {
- return this.emailNotificationHostName;
+ return this.emailNotificationHostName;
}
public void setEmailNotificationHost(String hostName) {
- this.emailNotificationHostName = hostName;
- configChanged();
+ this.emailNotificationHostName = hostName;
+ configChanged();
}
public String getEmailNotificationToList() {
- return this.emailNotificationToList;
+ return this.emailNotificationToList;
}
public void setEmailNotificationToList(String emailIDs) {
- this.emailNotificationToList = emailIDs;
- configChanged();
+ this.emailNotificationToList = emailIDs;
+ configChanged();
}
@Override
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MX4JServerSocketFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MX4JServerSocketFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MX4JServerSocketFactory.java
index 3badf0f..649038e 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MX4JServerSocketFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MX4JServerSocketFactory.java
@@ -16,17 +16,16 @@
*/
package com.gemstone.gemfire.admin.jmx.internal;
-import java.io.IOException;
-import java.net.ServerSocket;
-import java.util.Properties;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.admin.DistributedSystemConfig;
import com.gemstone.gemfire.admin.internal.InetAddressUtil;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.SocketCreator;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.io.IOException;
+import java.net.ServerSocket;
+import java.util.Properties;
/**
* Creates <code>ServerSockets</code> for JMX adaptors.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
index 646c8d5..2667ec7 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/MemberInfoWithStatsMBean.java
@@ -16,51 +16,7 @@
*/
package com.gemstone.gemfire.admin.jmx.internal;
-import java.net.InetAddress;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeMap;
-import java.util.concurrent.atomic.AtomicLong;
-
-import javax.management.InstanceNotFoundException;
-import javax.management.ListenerNotFoundException;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanException;
-import javax.management.MBeanNotificationInfo;
-import javax.management.MBeanOperationInfo;
-import javax.management.MBeanParameterInfo;
-import javax.management.MBeanRegistrationException;
-import javax.management.MBeanServer;
-import javax.management.MalformedObjectNameException;
-import javax.management.Notification;
-import javax.management.NotificationBroadcasterSupport;
-import javax.management.NotificationEmitter;
-import javax.management.NotificationFilter;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-import javax.management.OperationsException;
-import javax.management.ReflectionException;
-
-import org.apache.logging.log4j.Logger;
-
-import mx4j.AbstractDynamicMBean;
-
-import com.gemstone.gemfire.admin.AdminDistributedSystem;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.CacheVm;
-import com.gemstone.gemfire.admin.ConfigurationParameter;
-import com.gemstone.gemfire.admin.GemFireMemberStatus;
-import com.gemstone.gemfire.admin.RegionSubRegionSnapshot;
-import com.gemstone.gemfire.admin.StatisticResource;
-import com.gemstone.gemfire.admin.SystemMember;
-import com.gemstone.gemfire.admin.SystemMemberCacheServer;
+import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.admin.jmx.Agent;
import com.gemstone.gemfire.cache.InterestPolicy;
import com.gemstone.gemfire.cache.SubscriptionAttributes;
@@ -70,6 +26,14 @@ import com.gemstone.gemfire.internal.admin.remote.ClientHealthStats;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import mx4j.AbstractDynamicMBean;
+import org.apache.logging.log4j.Logger;
+
+import javax.management.*;
+import java.net.InetAddress;
+import java.text.MessageFormat;
+import java.util.*;
+import java.util.concurrent.atomic.AtomicLong;
/**
* This class uses the JMX Attributes/Operations that use (return/throw)
@@ -591,48 +555,48 @@ public class MemberInfoWithStatsMBean extends AbstractDynamicMBean
// private static final String GATEWAYHUB_COUNT = "gemfire.gatewayhubcount.int";
// private static final String CLIENT_COUNT = "gemfire.clientcount.int";
- private static final String MEMBER_ID = "gemfire.member.id.string";
- private static final String MEMBER_NAME = "gemfire.member.name.string";
- private static final String MEMBER_HOST = "gemfire.member.host.string";
- private static final String MEMBER_PORT = "gemfire.member.port.int";
- private static final String MEMBER_UPTIME = "gemfire.member.uptime.long";
- private static final String MEMBER_CLIENTS = "gemfire.member.clients.map";
- private static final String MEMBER_REGIONS = "gemfire.member.regions.map";
- private static final String MEMBER_TYPE = "gemfire.member.type.string";
- private static final String IS_SERVER = "gemfire.member.isserver.boolean";
- private static final String IS_GATEWAY = "gemfire.member.isgateway.boolean";
+ private static final String MEMBER_ID = DistributionConfig.GEMFIRE_PREFIX + "member.id.string";
+ private static final String MEMBER_NAME = DistributionConfig.GEMFIRE_PREFIX + "member.name.string";
+ private static final String MEMBER_HOST = DistributionConfig.GEMFIRE_PREFIX + "member.host.string";
+ private static final String MEMBER_PORT = DistributionConfig.GEMFIRE_PREFIX + "member.port.int";
+ private static final String MEMBER_UPTIME = DistributionConfig.GEMFIRE_PREFIX + "member.uptime.long";
+ private static final String MEMBER_CLIENTS = DistributionConfig.GEMFIRE_PREFIX + "member.clients.map";
+ private static final String MEMBER_REGIONS = DistributionConfig.GEMFIRE_PREFIX + "member.regions.map";
+ private static final String MEMBER_TYPE = DistributionConfig.GEMFIRE_PREFIX + "member.type.string";
+ private static final String IS_SERVER = DistributionConfig.GEMFIRE_PREFIX + "member.isserver.boolean";
+ private static final String IS_GATEWAY = DistributionConfig.GEMFIRE_PREFIX + "member.isgateway.boolean";
- private static final String MEMBER_STATSAMPLING_ENABLED = "gemfire.member.config.statsamplingenabled.boolean";
- private static final String MEMBER_TIME_STATS_ENABLED = "gemfire.member.config.timestatsenabled.boolean";
-
- private static final String STATS_PROCESSCPUTIME = "gemfire.member.stat.processcputime.long";
- private static final String STATS_CPUS = "gemfire.member.stat.cpus.int";
- private static final String STATS_USEDMEMORY = "gemfire.member.stat.usedmemory.long";
- private static final String STATS_MAXMEMORY = "gemfire.member.stat.maxmemory.long";
- private static final String STATS_GETS = "gemfire.member.stat.gets.int";
- private static final String STATS_GETTIME = "gemfire.member.stat.gettime.long";
- private static final String STATS_PUTS = "gemfire.member.stat.puts.int";
- private static final String STATS_PUTTIME = "gemfire.member.stat.puttime.long";
-
- private static final String REGION_NAME = "gemfire.region.name.string";
- private static final String REGION_PATH = "gemfire.region.path.string";
- private static final String REGION_SCOPE = "gemfire.region.scope.string";
- private static final String REGION_DATAPOLICY = "gemfire.region.datapolicy.string";
- private static final String REGION_INTERESTPOLICY = "gemfire.region.interestpolicy.string";
- private static final String REGION_ENTRYCOUNT = "gemfire.region.entrycount.int";
- private static final String REGION_DISKATTRS = "gemfire.region.diskattrs.string";
+ private static final String MEMBER_STATSAMPLING_ENABLED = DistributionConfig.GEMFIRE_PREFIX + "member.config.statsamplingenabled.boolean";
+ private static final String MEMBER_TIME_STATS_ENABLED = DistributionConfig.GEMFIRE_PREFIX + "member.config.timestatsenabled.boolean";
+
+ private static final String STATS_PROCESSCPUTIME = DistributionConfig.GEMFIRE_PREFIX + "member.stat.processcputime.long";
+ private static final String STATS_CPUS = DistributionConfig.GEMFIRE_PREFIX + "member.stat.cpus.int";
+ private static final String STATS_USEDMEMORY = DistributionConfig.GEMFIRE_PREFIX + "member.stat.usedmemory.long";
+ private static final String STATS_MAXMEMORY = DistributionConfig.GEMFIRE_PREFIX + "member.stat.maxmemory.long";
+ private static final String STATS_GETS = DistributionConfig.GEMFIRE_PREFIX + "member.stat.gets.int";
+ private static final String STATS_GETTIME = DistributionConfig.GEMFIRE_PREFIX + "member.stat.gettime.long";
+ private static final String STATS_PUTS = DistributionConfig.GEMFIRE_PREFIX + "member.stat.puts.int";
+ private static final String STATS_PUTTIME = DistributionConfig.GEMFIRE_PREFIX + "member.stat.puttime.long";
+
+ private static final String REGION_NAME = DistributionConfig.GEMFIRE_PREFIX + "region.name.string";
+ private static final String REGION_PATH = DistributionConfig.GEMFIRE_PREFIX + "region.path.string";
+ private static final String REGION_SCOPE = DistributionConfig.GEMFIRE_PREFIX + "region.scope.string";
+ private static final String REGION_DATAPOLICY = DistributionConfig.GEMFIRE_PREFIX + "region.datapolicy.string";
+ private static final String REGION_INTERESTPOLICY = DistributionConfig.GEMFIRE_PREFIX + "region.interestpolicy.string";
+ private static final String REGION_ENTRYCOUNT = DistributionConfig.GEMFIRE_PREFIX + "region.entrycount.int";
+ private static final String REGION_DISKATTRS = DistributionConfig.GEMFIRE_PREFIX + "region.diskattrs.string";
- private static final String CLIENT_ID = "gemfire.client.id.string";
- private static final String CLIENT_NAME = "gemfire.client.name.string";
- private static final String CLIENT_HOST = "gemfire.client.host.string";
- private static final String CLIENT_QUEUESIZE = "gemfire.client.queuesize.int";
- private static final String CLIENT_STATS_GETS = "gemfire.client.stats.gets.int";
- private static final String CLIENT_STATS_PUTS = "gemfire.client.stats.puts.int";
- private static final String CLIENT_STATS_CACHEMISSES = "gemfire.client.stats.cachemisses.int";
- private static final String CLIENT_STATS_CPUUSAGE = "gemfire.client.stats.cpuusage.long";
- private static final String CLIENT_STATS_CPUS = "gemfire.client.stats.cpus.int";
- private static final String CLIENT_STATS_UPDATETIME = "gemfire.client.stats.updatetime.long";
- private static final String CLIENT_STATS_THREADS = "gemfire.client.stats.threads.int";
+ private static final String CLIENT_ID = DistributionConfig.GEMFIRE_PREFIX + "client.id.string";
+ private static final String CLIENT_NAME = DistributionConfig.GEMFIRE_PREFIX + "client.name.string";
+ private static final String CLIENT_HOST = DistributionConfig.GEMFIRE_PREFIX + "client.host.string";
+ private static final String CLIENT_QUEUESIZE = DistributionConfig.GEMFIRE_PREFIX + "client.queuesize.int";
+ private static final String CLIENT_STATS_GETS = DistributionConfig.GEMFIRE_PREFIX + "client.stats.gets.int";
+ private static final String CLIENT_STATS_PUTS = DistributionConfig.GEMFIRE_PREFIX + "client.stats.puts.int";
+ private static final String CLIENT_STATS_CACHEMISSES = DistributionConfig.GEMFIRE_PREFIX + "client.stats.cachemisses.int";
+ private static final String CLIENT_STATS_CPUUSAGE = DistributionConfig.GEMFIRE_PREFIX + "client.stats.cpuusage.long";
+ private static final String CLIENT_STATS_CPUS = DistributionConfig.GEMFIRE_PREFIX + "client.stats.cpus.int";
+ private static final String CLIENT_STATS_UPDATETIME = DistributionConfig.GEMFIRE_PREFIX + "client.stats.updatetime.long";
+ private static final String CLIENT_STATS_THREADS = DistributionConfig.GEMFIRE_PREFIX + "client.stats.threads.int";
/**
*
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberJmx.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberJmx.java b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberJmx.java
index aa06cc6..c57bf85 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberJmx.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/SystemMemberJmx.java
@@ -16,33 +16,20 @@
*/
package com.gemstone.gemfire.admin.jmx.internal;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import javax.management.MBeanException;
-import javax.management.MalformedObjectNameException;
-import javax.management.Notification;
-import javax.management.NotificationListener;
-import javax.management.ObjectName;
-import javax.management.RuntimeOperationsException;
-import javax.naming.OperationNotSupportedException;
-
-import org.apache.commons.modeler.ManagedBean;
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.admin.AdminException;
-import com.gemstone.gemfire.admin.ConfigurationParameter;
-import com.gemstone.gemfire.admin.OperationCancelledException;
-import com.gemstone.gemfire.admin.StatisticResource;
-import com.gemstone.gemfire.admin.SystemMember;
-import com.gemstone.gemfire.admin.SystemMemberCache;
-import com.gemstone.gemfire.admin.SystemMemberCacheEvent;
-import com.gemstone.gemfire.admin.SystemMemberRegionEvent;
+import com.gemstone.gemfire.admin.*;
import com.gemstone.gemfire.cache.Operation;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.internal.admin.ClientMembershipMessage;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.commons.modeler.ManagedBean;
+import org.apache.logging.log4j.Logger;
+
+import javax.management.*;
+import javax.naming.OperationNotSupportedException;
+import java.util.concurrent.atomic.AtomicInteger;
/**
* Defines methods that all <code>SystemMember</code> MBeans should
@@ -56,38 +43,38 @@ public interface SystemMemberJmx
* Notification type for indicating a cache got created on a member of this
* distributed system.
*/
- public static final String NOTIF_CACHE_CREATED =
- "gemfire.distributedsystem.cache.created";
+ public static final String NOTIF_CACHE_CREATED =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.created";
/**
* Notification type for indicating a cache is closed on a member of this
* distributed system.
*/
- public static final String NOTIF_CACHE_CLOSED =
- "gemfire.distributedsystem.cache.closed";
+ public static final String NOTIF_CACHE_CLOSED =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.closed";
/**
* Notification type for indicating a region is created in a cache on a member
* of this distributed system.
*/
- public static final String NOTIF_REGION_CREATED =
- "gemfire.distributedsystem.cache.region.created";
+ public static final String NOTIF_REGION_CREATED =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.region.created";
/**
* Notification type for indicating a region was removed from a cache on a
* member of this distributed system.
*/
- public static final String NOTIF_REGION_LOST =
- "gemfire.distributedsystem.cache.region.lost";
+ public static final String NOTIF_REGION_LOST =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.region.lost";
/** Notification type for indicating client joined */
- public static final String NOTIF_CLIENT_JOINED =
- "gemfire.distributedsystem.cache.client.joined";
+ public static final String NOTIF_CLIENT_JOINED =
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.client.joined";
/** Notification type for indicating client left */
public static final String NOTIF_CLIENT_LEFT =
- "gemfire.distributedsystem.cache.client.left";
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.client.left";
/** Notification type for indicating client crashed */
public static final String NOTIF_CLIENT_CRASHED =
- "gemfire.distributedsystem.cache.client.crashed";
+ DistributionConfig.GEMFIRE_PREFIX + "distributedsystem.cache.client.crashed";
/**
* Gets the interval in seconds between config refreshes
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java
index 1654b1a..620c79f 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/DiskStoreFactory.java
@@ -16,6 +16,7 @@
*/
package com.gemstone.gemfire.cache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import java.io.File;
@@ -60,7 +61,8 @@ public interface DiskStoreFactory
* The default maximum oplog file size in megabytes.
* <p>Current value: <code>1024</code> which is one gigabyte.
*/
- public static final long DEFAULT_MAX_OPLOG_SIZE = Long.getLong("gemfire.DEFAULT_MAX_OPLOG_SIZE", 1024L).longValue(); // 1024 == 1 GB; // sys prop used by dunit and junit
+ public static final long DEFAULT_MAX_OPLOG_SIZE = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "DEFAULT_MAX_OPLOG_SIZE", 1024L)
+ .longValue(); // 1024 == 1 GB; // sys prop used by dunit and junit
/**
* The default time interval in milliseconds.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
index 5b035a5..3cbfff8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/ClientCacheFactory.java
@@ -17,8 +17,6 @@
package com.gemstone.gemfire.cache.client;
-import java.util.Properties;
-
import com.gemstone.gemfire.cache.CacheClosedException;
import com.gemstone.gemfire.cache.Region;
import com.gemstone.gemfire.cache.server.CacheServer;
@@ -27,9 +25,13 @@ import com.gemstone.gemfire.internal.GemFireVersion;
import com.gemstone.gemfire.internal.cache.CacheConfig;
import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.jndi.JNDIInvoker;
-import com.gemstone.gemfire.pdx.PdxSerializer;
import com.gemstone.gemfire.pdx.PdxInstance;
+import com.gemstone.gemfire.pdx.PdxSerializer;
+
+import java.util.Properties;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.MCAST_PORT;
/**
Factory class used to create the singleton {@link ClientCache client cache} and connect to one or more GemFire Cache Servers. If the application wants to connect to GemFire as a peer it should use {@link com.gemstone.gemfire.cache.CacheFactory} instead.
@@ -194,7 +196,7 @@ public class ClientCacheFactory {
GemFireCacheImpl instance = GemFireCacheImpl.getInstance();
{
- String propValue = this.dsProps.getProperty("mcast-port");
+ String propValue = this.dsProps.getProperty(MCAST_PORT);
if (propValue != null) {
int mcastPort = Integer.parseInt(propValue);
if (mcastPort != 0) {
@@ -203,13 +205,13 @@ public class ClientCacheFactory {
}
}
{
- String propValue = this.dsProps.getProperty("locators");
+ String propValue = this.dsProps.getProperty(LOCATORS);
if (propValue != null && !propValue.equals("")) {
throw new IllegalStateException("On a client cache the locators property must be set to an empty string or not set. It was set to \"" + propValue + "\".");
}
}
- this.dsProps.setProperty("mcast-port", "0");
- this.dsProps.setProperty("locators", "");
+ this.dsProps.setProperty(MCAST_PORT, "0");
+ this.dsProps.setProperty(LOCATORS, "");
DistributedSystem system = DistributedSystem.connect(this.dsProps);
if (instance != null && !instance.isClosed()) {
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
index 135b7df..b85e17a 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/AuthenticateUserOp.java
@@ -19,10 +19,6 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-import java.util.Properties;
-
import com.gemstone.gemfire.DataSerializer;
import com.gemstone.gemfire.InternalGemFireError;
import com.gemstone.gemfire.cache.client.ServerOperationException;
@@ -45,6 +41,10 @@ import com.gemstone.gemfire.security.AuthenticationFailedException;
import com.gemstone.gemfire.security.AuthenticationRequiredException;
import com.gemstone.gemfire.security.NotAuthorizedException;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.util.Properties;
+
/**
* Authenticates this client (or a user) on a server. This op ideally should get
* executed once-per-server.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java
index 8e05175..6e255c4 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientMetadataService.java
@@ -16,28 +16,9 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.LinkedHashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Random;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.CopyOnWriteArraySet;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.EntryOperation;
-import com.gemstone.gemfire.cache.FixedPartitionResolver;
-import com.gemstone.gemfire.cache.Operation;
-import com.gemstone.gemfire.cache.PartitionResolver;
-import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.*;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.cache.BucketServerLocation66;
import com.gemstone.gemfire.internal.cache.EntryOperationImpl;
@@ -45,6 +26,11 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
import com.gemstone.gemfire.internal.cache.PartitionedRegionHelper;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
+
+import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
/**
* Maintains {@link ClientPartitionAdvisor} for Partitioned Regions on servers
@@ -63,7 +49,7 @@ public final class ClientMetadataService {
private final Set<String> nonPRs = new HashSet<String>();
- private boolean HONOUR_SERVER_GROUP_IN_PR_SINGLE_HOP = Boolean.getBoolean("gemfire.PoolImpl.honourServerGroupsInPRSingleHop");
+ private boolean HONOUR_SERVER_GROUP_IN_PR_SINGLE_HOP = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.honourServerGroupsInPRSingleHop");
public static final int SIZE_BYTES_ARRAY_RECEIVED = 2;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
index 6533b50..c1700d4 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ConnectionFactoryImpl.java
@@ -16,19 +16,12 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.concurrent.ScheduledExecutorService;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.cache.GatewayConfigurationException;
import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
import com.gemstone.gemfire.cache.client.internal.ServerBlackList.FailureTracker;
import com.gemstone.gemfire.cache.wan.GatewaySender;
-import com.gemstone.gemfire.distributed.DistributedSystem;
import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
@@ -41,6 +34,11 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import java.util.HashSet;
+import java.util.Set;
+import java.util.concurrent.ScheduledExecutorService;
/**
* Creates connections, using a connection source to determine
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ExplicitConnectionSourceImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ExplicitConnectionSourceImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ExplicitConnectionSourceImpl.java
index d8fc9b6..26aadf8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ExplicitConnectionSourceImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ExplicitConnectionSourceImpl.java
@@ -16,21 +16,16 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.cache.tier.sockets.ServerQueueStatus;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import java.net.InetSocketAddress;
+import java.util.*;
/**
* A connection source where the list of endpoints is specified explicitly.
@@ -55,7 +50,7 @@ public class ExplicitConnectionSourceImpl implements ConnectionSource {
* the endpoints list
*/
private boolean DISABLE_SHUFFLING = Boolean
- .getBoolean("gemfire.bridge.disableShufflingOfEndpoints");
+ .getBoolean(DistributionConfig.GEMFIRE_PREFIX + "bridge.disableShufflingOfEndpoints");
public ExplicitConnectionSourceImpl(List/*<InetSocketAddress>*/contacts) {
ArrayList serverList = new ArrayList(contacts.size());
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImpl.java
index 8410dbd..bbec12f 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/OpExecutorImpl.java
@@ -16,36 +16,12 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.io.EOFException;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.net.ConnectException;
-import java.net.SocketException;
-import java.net.SocketTimeoutException;
-import java.nio.BufferUnderflowException;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.logging.log4j.Logger;
-
-import com.gemstone.gemfire.CancelCriterion;
-import com.gemstone.gemfire.CancelException;
-import com.gemstone.gemfire.CopyException;
-import com.gemstone.gemfire.GemFireException;
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.SerializationException;
+import com.gemstone.gemfire.*;
import com.gemstone.gemfire.cache.CacheRuntimeException;
import com.gemstone.gemfire.cache.RegionDestroyedException;
import com.gemstone.gemfire.cache.SynchronizationCommitConflictException;
import com.gemstone.gemfire.cache.TransactionException;
-import com.gemstone.gemfire.cache.client.NoAvailableServersException;
-import com.gemstone.gemfire.cache.client.ServerConnectivityException;
-import com.gemstone.gemfire.cache.client.ServerOperationException;
-import com.gemstone.gemfire.cache.client.ServerRefusedConnectionException;
-import com.gemstone.gemfire.cache.client.SubscriptionNotEnabledException;
+import com.gemstone.gemfire.cache.client.*;
import com.gemstone.gemfire.cache.client.internal.ExecuteFunctionOp.ExecuteFunctionOpImpl;
import com.gemstone.gemfire.cache.client.internal.ExecuteRegionFunctionOp.ExecuteRegionFunctionOpImpl;
import com.gemstone.gemfire.cache.client.internal.QueueManager.QueueConnections;
@@ -53,6 +29,7 @@ import com.gemstone.gemfire.cache.client.internal.pooling.ConnectionDestroyedExc
import com.gemstone.gemfire.cache.client.internal.pooling.ConnectionManager;
import com.gemstone.gemfire.cache.execute.FunctionException;
import com.gemstone.gemfire.cache.execute.FunctionInvocationTargetException;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
import com.gemstone.gemfire.internal.cache.PutAllPartialResultException;
@@ -66,6 +43,16 @@ import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
import com.gemstone.gemfire.security.AuthenticationRequiredException;
import com.gemstone.gemfire.security.GemFireSecurityException;
+import org.apache.logging.log4j.Logger;
+
+import java.io.EOFException;
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.net.ConnectException;
+import java.net.SocketException;
+import java.net.SocketTimeoutException;
+import java.nio.BufferUnderflowException;
+import java.util.*;
/**
* Called from the client and execute client to server
@@ -75,9 +62,9 @@ import com.gemstone.gemfire.security.GemFireSecurityException;
*/
public class OpExecutorImpl implements ExecutablePool {
private static final Logger logger = LogService.getLogger();
-
- private static final boolean TRY_SERVERS_ONCE = Boolean.getBoolean("gemfire.PoolImpl.TRY_SERVERS_ONCE");
- private static final int TX_RETRY_ATTEMPT = Integer.getInteger("gemfire.txRetryAttempt", 500);
+
+ private static final boolean TRY_SERVERS_ONCE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.TRY_SERVERS_ONCE");
+ private static final int TX_RETRY_ATTEMPT = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "txRetryAttempt", 500);
private final ConnectionManager connectionManager;
private final int retryAttempts;
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/70612010/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
index 3579769..44465d8 100644
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PoolImpl.java
@@ -16,33 +16,11 @@
*/
package com.gemstone.gemfire.cache.client.internal;
-import java.net.InetSocketAddress;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.Properties;
-import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ScheduledExecutorService;
-import java.util.concurrent.ThreadFactory;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
-import org.apache.logging.log4j.Logger;
-
import com.gemstone.gemfire.CancelCriterion;
import com.gemstone.gemfire.CancelException;
import com.gemstone.gemfire.StatisticsFactory;
import com.gemstone.gemfire.SystemFailure;
-import com.gemstone.gemfire.cache.Cache;
-import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.cache.CacheFactory;
-import com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException;
-import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.cache.RegionService;
+import com.gemstone.gemfire.cache.*;
import com.gemstone.gemfire.cache.client.Pool;
import com.gemstone.gemfire.cache.client.ServerConnectivityException;
import com.gemstone.gemfire.cache.client.SubscriptionNotEnabledException;
@@ -58,18 +36,25 @@ import com.gemstone.gemfire.distributed.internal.ServerLocation;
import com.gemstone.gemfire.internal.DummyStatisticsFactory;
import com.gemstone.gemfire.internal.ScheduledThreadPoolExecutorWithKeepAlive;
import com.gemstone.gemfire.internal.admin.ClientStatsManager;
-import com.gemstone.gemfire.internal.cache.EventID;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.cache.InternalCache;
-import com.gemstone.gemfire.internal.cache.PoolFactoryImpl;
-import com.gemstone.gemfire.internal.cache.PoolManagerImpl;
-import com.gemstone.gemfire.internal.cache.PoolStats;
+import com.gemstone.gemfire.internal.cache.*;
import com.gemstone.gemfire.internal.cache.tier.sockets.AcceptorImpl;
import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
import com.gemstone.gemfire.internal.logging.InternalLogWriter;
import com.gemstone.gemfire.internal.logging.LogService;
import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import org.apache.logging.log4j.Logger;
+
+import java.net.InetSocketAddress;
+import java.util.*;
+import java.util.Map.Entry;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static com.gemstone.gemfire.distributed.SystemConfigurationProperties.LOCATORS;
/**
* Manages the client side of client to server connections
@@ -78,14 +63,17 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
* @since GemFire 5.7
*/
public class PoolImpl implements InternalPool {
- public static final String ON_DISCONNECT_CLEAR_PDXTYPEIDS = "gemfire.ON_DISCONNECT_CLEAR_PDXTYPEIDS";
+ public static final String ON_DISCONNECT_CLEAR_PDXTYPEIDS = DistributionConfig.GEMFIRE_PREFIX + "ON_DISCONNECT_CLEAR_PDXTYPEIDS";
private static final Logger logger = LogService.getLogger();
-
- public static final int HANDSHAKE_TIMEOUT = Long.getLong("gemfire.PoolImpl.HANDSHAKE_TIMEOUT", AcceptorImpl.DEFAULT_HANDSHAKE_TIMEOUT_MS).intValue();
- public static final long SHUTDOWN_TIMEOUT = Long.getLong("gemfire.PoolImpl.SHUTDOWN_TIMEOUT", 30000).longValue();
- public static final int BACKGROUND_TASK_POOL_SIZE = Integer.getInteger("gemfire.PoolImpl.BACKGROUND_TASK_POOL_SIZE", 20).intValue();
- public static final int BACKGROUND_TASK_POOL_KEEP_ALIVE = Integer.getInteger("gemfire.PoolImpl.BACKGROUND_TASK_POOL_KEEP_ALIVE", 1000).intValue();
+
+ public static final int HANDSHAKE_TIMEOUT = Long
+ .getLong(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.HANDSHAKE_TIMEOUT", AcceptorImpl.DEFAULT_HANDSHAKE_TIMEOUT_MS).intValue();
+ public static final long SHUTDOWN_TIMEOUT = Long.getLong(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.SHUTDOWN_TIMEOUT", 30000).longValue();
+ public static final int BACKGROUND_TASK_POOL_SIZE = Integer.getInteger(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.BACKGROUND_TASK_POOL_SIZE", 20)
+ .intValue();
+ public static final int BACKGROUND_TASK_POOL_KEEP_ALIVE = Integer
+ .getInteger(DistributionConfig.GEMFIRE_PREFIX + "PoolImpl.BACKGROUND_TASK_POOL_KEEP_ALIVE", 1000).intValue();
//For durable client tests only. Connection Sources read this flag
//and return an empty list of servers.
public volatile static boolean TEST_DURABLE_IS_NET_DOWN = false;
@@ -213,9 +201,9 @@ public class PoolImpl implements InternalPool {
}
this.dsys = ds;
this.cancelCriterion = new Stopper();
- if(Boolean.getBoolean("gemfire.SPECIAL_DURABLE")) {
- ClientProxyMembershipID.setPoolName(name);
- this.proxyId = ClientProxyMembershipID.getNewProxyMembership(ds);
+ if (Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE")) {
+ ClientProxyMembershipID.setPoolName(name);
+ this.proxyId = ClientProxyMembershipID.getNewProxyMembership(ds);
ClientProxyMembershipID.setPoolName(null);
} else {
this.proxyId = ClientProxyMembershipID.getNewProxyMembership(ds);
@@ -466,7 +454,7 @@ public class PoolImpl implements InternalPool {
public void destroy(boolean keepAlive) {
int cnt = getAttachCount();
this.keepAlive = keepAlive;
- boolean SPECIAL_DURABLE = Boolean.getBoolean("gemfire.SPECIAL_DURABLE");
+ boolean SPECIAL_DURABLE = Boolean.getBoolean(DistributionConfig.GEMFIRE_PREFIX + "SPECIAL_DURABLE");
if (cnt > 0) {
//special case to allow closing durable client pool under the keep alive flag
//closing regions prior to closing pool can cause them to unregister interest
@@ -680,7 +668,7 @@ public class PoolImpl implements InternalPool {
}
if (!getLocators().equals(other.getLocators())) {
throw new RuntimeException(
- LocalizedStrings.PoolImpl_0_ARE_DIFFERENT.toLocalizedString("locators"));
+ LocalizedStrings.PoolImpl_0_ARE_DIFFERENT.toLocalizedString(LOCATORS));
}
if (!getServers().equals(other.getServers())) {
throw new RuntimeException(