geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [44/50] [abbrv] geode git commit: GEODE-290: Remove deprecated methods from launcher classes
Date Tue, 13 Jun 2017 00:30:19 GMT
GEODE-290: Remove deprecated methods from launcher classes

* Removed deprecated stopWithPort from LocatorLauncher class.
* Removed deprecated members from LocatorLauncher and ServerLauncher classes.
* Modified test cases to use constants alternate to deprecated ones.

This closes #568


Project: http://git-wip-us.apache.org/repos/asf/geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode/commit/d1db2f02
Tree: http://git-wip-us.apache.org/repos/asf/geode/tree/d1db2f02
Diff: http://git-wip-us.apache.org/repos/asf/geode/diff/d1db2f02

Branch: refs/heads/feature/GEODE-2558
Commit: d1db2f02d2ce45a437b34488934e5b1d53c7b5ca
Parents: ad4e405
Author: Deepak Dixit <deepakdixit2011@gmail.com>
Authored: Tue Jun 6 22:39:14 2017 +0530
Committer: Kirk Lund <klund@apache.org>
Committed: Mon Jun 12 11:22:51 2017 -0700

----------------------------------------------------------------------
 .../geode/distributed/LocatorLauncher.java      | 26 --------------------
 .../geode/distributed/ServerLauncher.java       | 14 -----------
 .../geode/distributed/LocatorLauncherTest.java  |  6 ++---
 .../geode/distributed/ServerLauncherTest.java   |  4 +--
 4 files changed, 5 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode/blob/d1db2f02/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java b/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
index c175744..c5a2de8 100644
--- a/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/LocatorLauncher.java
@@ -86,12 +86,6 @@ import joptsimple.OptionSet;
 @SuppressWarnings({"unused"})
 public class LocatorLauncher extends AbstractLauncher<String> {
 
-  /**
-   * @deprecated This is specific to the internal implementation and may go away in a future
-   *             release.
-   */
-  public static final Integer DEFAULT_LOCATOR_PORT = getDefaultLocatorPort();
-
   private static final Boolean DEFAULT_LOAD_SHARED_CONFIG_FROM_DIR = Boolean.FALSE;
 
   private static final Map<String, String> helpMap = new HashMap<>();
@@ -137,12 +131,6 @@ public class LocatorLauncher extends AbstractLauncher<String> {
     usageMap.put(Command.VERSION, "version");
   }
 
-  /**
-   * @deprecated This is specific to the internal implementation and may go away in a future
-   *             release.
-   */
-  public static final String DEFAULT_LOCATOR_PID_FILE = "vf.gf.locator.pid";
-
   private static final String DEFAULT_LOCATOR_LOG_EXT = ".log";
   private static final String DEFAULT_LOCATOR_LOG_NAME = "locator";
   private static final String LOCATOR_SERVICE_NAME = "Locator";
@@ -1082,20 +1070,6 @@ public class LocatorLauncher extends AbstractLauncher<String>
{
     }
   }
 
-  @Deprecated
-  private LocatorState stopWithPort() {
-    try {
-      new TcpClient().stop(getBindAddress(), getPort());
-      return new LocatorState(this, Status.STOPPED);
-    } catch (ConnectException e) {
-      if (getBindAddress() == null) {
-        return createNoResponseState(e, "Failed to connect to locator on port " + getPort());
-      } else {
-        return createNoResponseState(e, "Failed to connect to locator on " + getId());
-      }
-    }
-  }
-
   private LocatorState stopWithWorkingDirectory() {
     int parsedPid = 0;
     try {

http://git-wip-us.apache.org/repos/asf/geode/blob/d1db2f02/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java b/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
index 395b262..158e7bf 100755
--- a/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
+++ b/geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java
@@ -98,13 +98,6 @@ import joptsimple.OptionSet;
 @SuppressWarnings({"unused"})
 public class ServerLauncher extends AbstractLauncher<String> {
 
-  /**
-   * @deprecated This is specific to the internal implementation and may go away in a future
-   *             release.
-   */
-  @Deprecated
-  protected static final Integer DEFAULT_SERVER_PORT = getDefaultServerPort();
-
   private static final Map<String, String> helpMap = new HashMap<>();
 
   static {
@@ -154,13 +147,6 @@ public class ServerLauncher extends AbstractLauncher<String> {
     usageMap.put(Command.VERSION, "version");
   }
 
-  /**
-   * @deprecated This is specific to the internal implementation and may go away in a future
-   *             release.
-   */
-  @Deprecated
-  public static final String DEFAULT_SERVER_PID_FILE = "vf.gf.server.pid";
-
   private static final String DEFAULT_SERVER_LOG_EXT = ".log";
   private static final String DEFAULT_SERVER_LOG_NAME = "gemfire";
   private static final String SERVER_SERVICE_NAME = "Server";

http://git-wip-us.apache.org/repos/asf/geode/blob/d1db2f02/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java
b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java
index d63da87..bc7c371 100644
--- a/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/LocatorLauncherTest.java
@@ -29,6 +29,7 @@ import org.apache.geode.distributed.LocatorLauncher.Command;
 import org.apache.geode.distributed.internal.DistributionConfig;
 import org.apache.geode.distributed.internal.InternalDistributedSystem;
 import org.apache.geode.distributed.internal.InternalLocator;
+import org.apache.geode.internal.DistributionLocator;
 import org.apache.geode.internal.i18n.LocalizedStrings;
 import org.apache.geode.test.junit.categories.FlakyTest;
 import org.apache.geode.test.junit.categories.UnitTest;
@@ -299,8 +300,7 @@ public class LocatorLauncherTest {
   @Test
   public void testSetAndGetPort() {
     Builder builder = new Builder();
-
-    assertEquals(LocatorLauncher.DEFAULT_LOCATOR_PORT, builder.getPort());
+    assertEquals(Integer.valueOf(DistributionLocator.DEFAULT_LOCATOR_PORT), builder.getPort());
     assertSame(builder, builder.setPort(65535));
     assertEquals(65535, builder.getPort().intValue());
     assertSame(builder, builder.setPort(1024));
@@ -312,7 +312,7 @@ public class LocatorLauncherTest {
     assertSame(builder, builder.setPort(0));
     assertEquals(0, builder.getPort().intValue());
     assertSame(builder, builder.setPort(null));
-    assertEquals(LocatorLauncher.DEFAULT_LOCATOR_PORT, builder.getPort());
+    assertEquals(Integer.valueOf(DistributionLocator.DEFAULT_LOCATOR_PORT), builder.getPort());
   }
 
   @Test(expected = IllegalArgumentException.class)

http://git-wip-us.apache.org/repos/asf/geode/blob/d1db2f02/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
----------------------------------------------------------------------
diff --git a/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
b/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
index 9611e32..e28421d 100755
--- a/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
+++ b/geode-core/src/test/java/org/apache/geode/distributed/ServerLauncherTest.java
@@ -330,7 +330,7 @@ public class ServerLauncherTest {
   public void testSetAndGetServerPort() {
     Builder builder = new Builder();
 
-    assertEquals(ServerLauncher.DEFAULT_SERVER_PORT, builder.getServerPort());
+    assertEquals(Integer.valueOf(CacheServer.DEFAULT_PORT), builder.getServerPort());
     assertSame(builder, builder.setServerPort(0));
     assertEquals(0, builder.getServerPort().intValue());
     assertSame(builder, builder.setServerPort(1));
@@ -342,7 +342,7 @@ public class ServerLauncherTest {
     assertSame(builder, builder.setServerPort(65535));
     assertEquals(65535, builder.getServerPort().intValue());
     assertSame(builder, builder.setServerPort(null));
-    assertEquals(ServerLauncher.DEFAULT_SERVER_PORT, builder.getServerPort());
+    assertEquals(Integer.valueOf(CacheServer.DEFAULT_PORT), builder.getServerPort());
   }
 
   @Test(expected = IllegalArgumentException.class)


Mime
View raw message