geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bschucha...@apache.org
Subject [14/14] incubator-geode git commit: jgroups source is now removed from asf branch GEODE-77 and is a downloaded dependency. Able to start/stop a locator and a server via gfsh but there is no HA or authentication in the membership system.
Date Mon, 27 Jul 2015 20:27:58 GMT
jgroups source is now removed from asf branch GEODE-77 and is a downloaded dependency.  Able to start/stop a locator and a server via gfsh but there is no HA or authentication in the membership system.


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

Branch: refs/heads/feature/GEODE-77
Commit: d2a942e8e5025b11432d87b5de902daae130aca7
Parents: 1f64628
Author: Bruce Schuchardt <bschuchardt@pivotal.io>
Authored: Mon Jul 27 13:21:08 2015 -0700
Committer: Bruce Schuchardt <bschuchardt@pivotal.io>
Committed: Mon Jul 27 13:21:08 2015 -0700

----------------------------------------------------------------------
 gemfire-assembly/build.gradle                   |   10 +-
 gemfire-core/build.gradle                       |    2 +-
 .../com/gemstone/gemfire/DataSerializer.java    |    2 +-
 .../internal/AdminDistributedSystemImpl.java    |    7 -
 .../internal/DistributedSystemConfigImpl.java   |    1 -
 .../gemfire/admin/jmx/internal/AgentImpl.java   |    2 +-
 .../gemfire/cache/client/internal/PingOp.java   |   16 -
 .../cache/client/internal/QueueManagerImpl.java |    2 +-
 .../internal/pooling/ConnectionManagerImpl.java |    2 +-
 .../cache/hdfs/internal/HDFSEventListener.java  |    4 +-
 .../gemfire/distributed/internal/DM.java        |    7 +-
 .../internal/DistributionChannel.java           |    2 +
 .../internal/DistributionManager.java           |   73 +-
 .../internal/DistributionManagerConfig.java     |   93 -
 .../internal/InternalDistributedSystem.java     |   26 +-
 .../distributed/internal/InternalLocator.java   |   86 +-
 .../internal/LonerDistributionManager.java      |   14 +-
 .../distributed/internal/ReplyProcessor21.java  |    5 +-
 .../distributed/internal/StartupMessage.java    |    2 +-
 .../distributed/internal/StartupOperation.java  |    4 -
 .../internal/WaitForViewInstallation.java       |    2 +-
 .../internal/direct/DirectChannel.java          |   13 +-
 .../membership/InternalDistributedMember.java   |  176 +-
 .../internal/membership/MemberFactory.java      |    8 +-
 .../internal/membership/MemberServices.java     |   10 +-
 .../internal/membership/MembershipManager.java  |   15 +-
 .../internal/membership/NetMember.java          |   17 +-
 .../internal/membership/NetView.java            |  293 +-
 .../internal/membership/gms/GMSMember.java      |  457 ++
 .../membership/gms/GMSMemberFactory.java        |  133 +
 .../internal/membership/gms/GMSUtil.java        |   97 +
 .../internal/membership/gms/ServiceConfig.java  |  140 +
 .../internal/membership/gms/Services.java       |  233 +
 .../internal/membership/gms/SuspectMember.java  |   39 +
 .../membership/gms/auth/GMSAuthenticator.java   |   84 +
 .../membership/gms/fd/GMSHealthMonitor.java     |  103 +
 .../gms/interfaces/Authenticator.java           |   11 +
 .../gms/interfaces/HealthMonitor.java           |   14 +
 .../membership/gms/interfaces/JoinLeave.java    |   38 +
 .../membership/gms/interfaces/Locator.java      |   16 +
 .../membership/gms/interfaces/Manager.java      |   50 +
 .../gms/interfaces/MessageHandler.java          |   14 +
 .../membership/gms/interfaces/Messenger.java    |   25 +
 .../membership/gms/interfaces/Service.java      |   58 +
 .../gms/locator/FindCoordinatorRequest.java     |   54 +
 .../gms/locator/FindCoordinatorResponse.java    |   72 +
 .../membership/gms/locator/GMSLocator.java      |  325 ++
 .../membership/gms/locator/GetViewRequest.java  |   33 +
 .../membership/gms/locator/GetViewResponse.java |   48 +
 .../gms/locator/PeerLocatorRequest.java         |    9 +
 .../membership/gms/membership/GMSJoinLeave.java |  909 ++++
 .../gms/messages/InstallViewMessage.java        |   81 +
 .../gms/messages/JoinRequestMessage.java        |   69 +
 .../gms/messages/JoinResponseMessage.java       |   84 +
 .../gms/messages/LeaveRequestMessage.java       |   55 +
 .../gms/messages/RemoveMemberMessage.java       |   70 +
 .../membership/gms/messages/ViewAckMessage.java |   74 +
 .../gms/messenger/AddressManager.java           |  113 +
 .../membership/gms/messenger/JGAddress.java     |  197 +
 .../gms/messenger/JGroupsMessenger.java         |  792 +++
 .../gms/messenger/JGroupsQuorumChecker.java     |  305 ++
 .../membership/gms/mgr/FakeViewMessage.java     |   76 +
 .../gms/mgr/GMSMembershipManager.java           | 3006 ++++++++++++
 .../internal/membership/gms/package.html        |   41 +
 .../membership/jgroup/GFJGBasicAdapter.java     |  602 ---
 .../membership/jgroup/GFJGPeerAdapter.java      |  484 --
 .../membership/jgroup/JGroupMember.java         |  251 -
 .../membership/jgroup/JGroupMemberFactory.java  |  119 -
 .../jgroup/JGroupMembershipManager.java         | 4232 ----------------
 .../internal/membership/jgroup/LocatorImpl.java |  474 --
 .../membership/jgroup/QuorumCheckerImpl.java    |  291 --
 .../internal/membership/jgroup/ViewMessage.java |   73 -
 .../internal/membership/jgroup/package.html     |   43 -
 .../internal/tcpserver/TcpClient.java           |   39 +-
 .../internal/tcpserver/TcpServer.java           |  103 +-
 .../gemstone/gemfire/i18n/LogWriterI18n.java    |    8 +-
 .../com/gemstone/gemfire/i18n/StringId.java     |  152 +
 .../com/gemstone/gemfire/i18n/StringIdImpl.java |  153 -
 .../gemfire/internal/ConnectionWatcher.java     |   25 +
 .../gemstone/gemfire/internal/DSFIDFactory.java |   30 +-
 .../internal/DataSerializableFixedID.java       |   28 +-
 .../internal/InternalDataSerializer.java        |   99 +-
 .../gemfire/internal/InternalInstantiator.java  |    2 +-
 .../gemfire/internal/SocketCreator.java         |    3 +-
 .../com/gemstone/gemfire/internal/Version.java  |   13 +-
 .../gemfire/internal/cache/DiskStoreImpl.java   |    6 +-
 .../internal/cache/DistributedRegion.java       |    2 +-
 .../internal/cache/InitialImageFlowControl.java |    2 +-
 .../internal/cache/LoaderHelperImpl.java        |    2 +-
 .../gemfire/internal/cache/LocalRegion.java     |    2 +-
 .../internal/cache/PRHARedundancyProvider.java  |    2 +-
 .../internal/cache/PartitionedRegion.java       |    2 +-
 .../cache/PartitionedRegionDataStore.java       |    2 +-
 .../internal/cache/StateFlushOperation.java     |    5 +-
 .../internal/cache/doc-files/properties.html    |   22 -
 .../internal/cache/ha/HARegionQueue.java        |    2 +-
 .../cache/tier/sockets/CacheClientProxy.java    |    2 +-
 .../sockets/command/GatewayReceiverCommand.java |    2 +-
 .../cache/tier/sockets/command/Get70.java       |    2 +-
 .../cache/tier/sockets/command/Ping.java        |   15 +-
 .../cache/tier/sockets/command/Put.java         |    2 +-
 .../tier/sockets/command/RegisterInterest.java  |    2 +-
 .../sockets/command/RegisterInterest61.java     |    2 +-
 .../sockets/command/RegisterInterestList.java   |    2 +-
 .../sockets/command/RegisterInterestList61.java |    2 +-
 .../sockets/command/RegisterInterestList66.java |    2 +-
 .../cache/tier/sockets/command/Request.java     |    2 +-
 .../sockets/command/UnregisterInterest.java     |    2 +-
 .../sockets/command/UnregisterInterestList.java |    2 +-
 .../GatewaySenderEventCallbackDispatcher.java   |    2 +-
 .../datasource/GemFireBasicDataSource.java      |    2 +-
 .../datasource/GemFireConnPooledDataSource.java |    2 +-
 .../i18n/AbstractStringIdResourceBundle.java    |    5 +-
 .../gemfire/internal/i18n/LocalizedStrings.java | 3971 ++++++++-------
 .../internal/i18n/ParentLocalizedStrings.java   | 4603 +++++++++---------
 .../gemfire/internal/i18n/StringId.java         |   49 +
 .../internal/logging/DebugLogWriter.java        |    4 +-
 .../internal/logging/InternalLogWriter.java     |    5 +-
 .../gemfire/internal/logging/LogWriterImpl.java |    2 +-
 .../internal/logging/LoggingThreadGroup.java    |    2 +-
 .../gemfire/internal/logging/PureLogWriter.java |    2 +-
 .../logging/SecurityLocalLogWriter.java         |    2 +-
 .../internal/logging/SecurityLogWriter.java     |    2 +-
 .../logging/SecurityManagerLogWriter.java       |    2 +-
 .../logging/log4j/LocalizedMessage.java         |    3 +-
 .../internal/logging/log4j/LogWriterLogger.java |    2 +-
 .../gemfire/internal/process/StartupStatus.java |    2 +-
 .../gemfire/internal/tcp/Connection.java        |    8 +-
 .../gemfire/internal/tcp/ConnectionTable.java   |    8 +-
 .../gemfire/internal/tcp/TCPConduit.java        |    3 +-
 .../gemfire/internal/util/Breadcrumbs.java      |    2 +-
 .../internal/JmxManagerLocatorRequest.java      |   11 -
 .../management/internal/MBeanJMXAdapter.java    |    2 +-
 .../management/internal/ManagementStrings.java  |  113 +-
 .../distributed/internal/jgroups-config.xml     |   51 +
 .../distributed/internal/jgroups-mcast.xml      |   55 +
 .../internal/logging/log4j/log4j2-default.xml   |    1 +
 .../BindDistributedSystemJUnitTest.java         |   10 -
 .../ClientServerRegisterInterestsDUnitTest.java |    4 +-
 .../gemstone/gemfire/cache30/CacheTestCase.java |    7 -
 .../DistributedAckRegionCCEDUnitTest.java       |    2 +-
 .../PRBucketSynchronizationDUnitTest.java       |    5 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |   31 +-
 .../ReconnectedCacheServerDUnitTest.java        |   10 +-
 .../RegionMembershipListenerDUnitTest.java      |   21 +-
 .../gemfire/cache30/TXDistributedDUnitTest.java |   64 +-
 .../codeAnalysis/decode/CompiledClass.java      |    4 +-
 .../distributed/DistributedSystemDUnitTest.java |  131 +-
 .../gemfire/distributed/JGroupsJUnitTest.java   |  171 -
 .../gemfire/distributed/LocatorDUnitTest.java   |  192 +-
 .../gemfire/distributed/LocatorJUnitTest.java   |   57 +-
 .../internal/DistributionManagerDUnitTest.java  |   30 +-
 ...istributionManagerTimeDUnitDisabledTest.java |  211 -
 .../GemFireTimeSyncServiceDUnitTest.java        |  260 -
 .../membership/MembershipJUnitTest.java         |  118 +-
 .../membership/gms/MembershipManagerHelper.java |  154 +
 .../jgroup/MembershipManagerHelper.java         |  180 -
 .../tcpserver/LocatorVersioningJUnitTest.java   |  205 -
 ...cpServerBackwardCompatDUnitDisabledTest.java |   63 +-
 ...wardCompatibilitySerializationJUnitTest.java |   10 -
 .../cache/ConcurrentMapOpsDUnitTest.java        |    2 +-
 .../cache/ConnectDisconnectDUnitTest.java       |    1 -
 .../PartitionedRegionLoadModelJUnitTest.java    |    2 +-
 .../internal/i18n/BasicI18nJUnitTest.java       |   49 +-
 .../log4j/LocalizedMessageJUnitTest.java        |    9 +-
 .../internal/stats50/AtomicStatsJUnitTest.java  |   16 +-
 .../concurrent/ReentrantSemaphoreJUnitTest.java |    1 -
 .../protocols/CacheTimeSlowDownDUnitTest.java   |  204 -
 .../GemFireTimeSyncProtocolDUnitTest.java       |  477 --
 .../JGroupsFailureDetectionJUnitTest.java       |  488 --
 .../protocols/JGroupsVersioningJUnitTest.java   |  343 --
 .../test/java/dunit/DistributedTestCase.java    |   25 +-
 .../src/test/java/hydra/log/AnyLogWriter.java   |    2 +-
 .../org/jgroups/util/GemFireTracer.java         |    2 +-
 settings.gradle                                 |    1 -
 175 files changed, 13701 insertions(+), 14908 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index 0e51563..a50d3ff 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -23,7 +23,6 @@ dependencies {
   
   archives project(':gemfire-json')  
   archives project(':gemfire-joptsimple')  
-  archives project(':gemfire-jgroups')  
   archives project(':gemfire-core')  
   archives project(':gemfire-web')
   archives project(':gemfire-web-api')
@@ -112,7 +111,8 @@ def cp = {
       it.contains('spring-core') ||
       it.contains('spring-shell') ||
       it.contains('snappy-java') ||
-      it.contains('hbase')
+      it.contains('hbase') ||
+      it.contains('jgroups')
     }.join(' ') 
 }
 
@@ -163,9 +163,6 @@ distributions {
       
       into ('lib') {
         exclude 'annotation*.jar'
-        from project(":gemfire-jgroups").configurations.runtime
-        from project(":gemfire-jgroups").configurations.archives.allArtifacts.files
-
         from project(":gemfire-json").configurations.runtime
         from project(":gemfire-json").configurations.archives.allArtifacts.files
 
@@ -213,10 +210,9 @@ def MavenRepos = [ springReleaseRepo, springSnapshotRepo, springLibsReleaseRepo,
 
 // Jars to be published via Maven
 def coreJar = [publicationName:'coreJar', project:project(":gemfire-core").name]
-def jgroupsJar = [publicationName:'jgroupsJar', project:project(":gemfire-jgroups").name]
 def jsonJar = [publicationName:'jsonJar', project:project(":gemfire-json").name]
 def joptsimpleJar = [publicationName:'joptsimpleJar', project:project(":gemfire-joptsimple").name]
-def MavenJars = [ coreJar, jgroupsJar, jsonJar, joptsimpleJar ]
+def MavenJars = [ coreJar, jsonJar, joptsimpleJar ]
 
 afterEvaluate {
   publishing {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-core/build.gradle b/gemfire-core/build.gradle
index 6b8a1df..aa30022 100755
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@ -12,6 +12,7 @@ configurations {
 
 dependencies {
   provided files("${System.getProperty('java.home')}/../lib/tools.jar")
+  compile 'org.jgroups:jgroups:3.6.4'
   compile 'antlr:antlr:2.7.7'
   compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.0'
   compile 'com.fasterxml.jackson.core:jackson-core:2.2.0'
@@ -70,7 +71,6 @@ dependencies {
   testRuntime 'commons-io:commons-io:2.1'
   testRuntime 'log4j:log4j:1.2.17'
   
-  compile project(':gemfire-jgroups')
   compile project(':gemfire-joptsimple')
   compile project(':gemfire-json')
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/DataSerializer.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/DataSerializer.java b/gemfire-core/src/main/java/com/gemstone/gemfire/DataSerializer.java
index 8f977d8..66e93af 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/DataSerializer.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/DataSerializer.java
@@ -2630,7 +2630,7 @@ public abstract class DataSerializer {
    *
    * @see #readHashMap
    */
-  public static void writeHashMap(HashMap<?,?> map, DataOutput out)
+  public static void writeHashMap(Map<?,?> map, DataOutput out)
     throws IOException {
 
     InternalDataSerializer.checkOut(out);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
index 3136cd1..356d115 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/AdminDistributedSystemImpl.java
@@ -1765,13 +1765,6 @@ implements com.gemstone.gemfire.admin.AdminDistributedSystem,
    */
   private String getBindAddress() {
     return this.config.getBindAddress();
-
-//     String bindAddress = 
-//         System.getProperty("gemfire.jg-bind-address");
-//     if (bindAddress == null || bindAddress.length() == 0) {
-//       return DistributionConfig.DEFAULT_BIND_ADDRESS;
-//     }
-//     return bindAddress;
   }
 
   /** Returns whether or not the given member is running */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
index 4918e29..92fbcc9 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/DistributedSystemConfigImpl.java
@@ -43,7 +43,6 @@ 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 com.gemstone.org.jgroups.util.StringId;
 
 /**
  * An implementation of the configuration object for an

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
index 4dfc517..6768ade 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/AgentImpl.java
@@ -62,7 +62,7 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 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.org.jgroups.util.StringId;
+import com.gemstone.gemfire.i18n.StringId;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import mx4j.tools.adaptor.http.HttpAdaptor;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PingOp.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PingOp.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PingOp.java
index ac32e39..dc8752c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PingOp.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/PingOp.java
@@ -66,22 +66,6 @@ public class PingOp {
     @Override
     protected Object processResponse(Message msg) throws Exception {
       processAck(msg, "ping");
-      final int msgType = msg.getMessageType();
-      if (msgType == MessageType.REPLY  &&  msg.getNumberOfParts() > 1) {
-        long endTime = System.currentTimeMillis();
-        long serverTime = msg.getPart(1).getLong();
-        // the new clock offset is computed assuming that the server's timestamp was
-        // taken mid-way between when the ping was sent and the reply was
-        // received:
-        //    timestampElapsedTime = (endTime - startTime)/2
-        //    localTime = startTime + timestampElapsedTime
-        //    offsetFromServer = serverTime - localTime
-        long newCacheTimeOffset = serverTime - startTime/2 - endTime/2;
-        InternalDistributedSystem ds = InternalDistributedSystem.getConnectedInstance();
-        if (ds != null && ds.isLoner()) { // check for loner so we don't jump time offsets across WAN connections
-          ds.getClock().setCacheTimeOffset(null, newCacheTimeOffset, false);
-        }
-      }
       return null;
     }
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/QueueManagerImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/QueueManagerImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/QueueManagerImpl.java
index f0bf9e9..9e866b3 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/QueueManagerImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/QueueManagerImpl.java
@@ -61,7 +61,7 @@ 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.org.jgroups.util.StringId;
+import com.gemstone.gemfire.i18n.StringId;
 
 /**
  * Manages Client Queues. Responsible for creating callback connections and

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
index 5be50ec..0f81eef 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/pooling/ConnectionManagerImpl.java
@@ -32,7 +32,7 @@ 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.org.jgroups.util.StringId;
+import com.gemstone.gemfire.i18n.StringId;
 
 import java.util.ArrayList;
 import java.util.Collections;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEventListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEventListener.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEventListener.java
index 39a2cb6..4c433cd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEventListener.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/hdfs/internal/HDFSEventListener.java
@@ -19,7 +19,7 @@ import com.gemstone.gemfire.cache.asyncqueue.AsyncEventListener;
 import com.gemstone.gemfire.cache.hdfs.internal.hoplog.Hoplog;
 import com.gemstone.gemfire.cache.hdfs.internal.hoplog.HoplogOrganizer;
 import com.gemstone.gemfire.i18n.LogWriterI18n;
-import com.gemstone.gemfire.i18n.StringIdImpl;
+import com.gemstone.gemfire.i18n.StringId;
 import com.gemstone.gemfire.internal.cache.BucketRegion;
 import com.gemstone.gemfire.internal.cache.ForceReattemptException;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
@@ -104,7 +104,7 @@ public class HDFSEventListener implements AsyncEventListener {
           list.add(new SortedHDFSQueuePersistedEvent(hdfsEvent));
         } catch (ClassNotFoundException e) {
           //TODO:HDFS add localized string
-          logger.warning(new StringIdImpl(0, "Error while converting HDFSGatewayEvent to PersistedEventImpl."), e);
+          logger.warning(new StringId(0, "Error while converting HDFSGatewayEvent to PersistedEventImpl."), e);
           return false;
         }
         prevBucketId = hdfsEvent.getBucketId();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DM.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DM.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DM.java
index 5a4c0d2..4adea7c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DM.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DM.java
@@ -10,11 +10,10 @@ package com.gemstone.gemfire.distributed.internal;
 import java.io.NotSerializableException;
 import java.net.InetAddress;
 import java.util.Collection;
+import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
-import java.util.Vector;
-import java.util.concurrent.Executor;
 import java.util.concurrent.ExecutorService;
 
 import com.gemstone.gemfire.CancelCriterion;
@@ -23,9 +22,7 @@ import com.gemstone.gemfire.distributed.Role;
 import com.gemstone.gemfire.distributed.internal.locks.ElderState;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
-import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.Version;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 
 /**
  * This interface defines the services provided  by any class that
@@ -285,7 +282,7 @@ public interface DM extends ReplySender {
    * Returns the ordered list of current DistributionManagers in
    * oldest-to-youngest order.  Added for DLockGrantor
    */
-  public Vector getViewMembers();
+  public List<InternalDistributedMember> getViewMembers();
   /**
    * Returns the oldest member in the given set of distribution managers.  The
    * current implementation may use n*n/2 comparisons, so use this judiciously

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionChannel.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionChannel.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionChannel.java
index 86fb7ac..819d29d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionChannel.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionChannel.java
@@ -86,6 +86,8 @@ public class DistributionChannel  {
 
     long start = System.currentTimeMillis();
 
+    logger.debug("DistributionChannel disconnecting with "+ membershipManager + "; duringStartup="+duringStartup);
+    
     if (membershipManager != null) {
       sb.append(membershipManager.getLocalMember());
       sb.append(" (took ");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
index 36d1602..a9111b5 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManager.java
@@ -26,7 +26,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
-import java.util.Vector;
 import java.util.concurrent.BlockingQueue;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
@@ -88,7 +87,7 @@ import com.gemstone.gemfire.internal.tcp.ConnectionTable;
 import com.gemstone.gemfire.internal.tcp.ReenteredConnectException;
 import com.gemstone.gemfire.internal.tcp.Stub;
 import com.gemstone.gemfire.internal.util.concurrent.StoppableReentrantLock;
-import com.gemstone.org.jgroups.util.StringId;
+import com.gemstone.gemfire.i18n.StringId;
 
 /**
  * The <code>DistributionManager</code> uses a {@link
@@ -569,7 +568,7 @@ public class DistributionManager
    * @return true if id1 and id2 are from the same host, false otherwise
    */
   public static boolean isSameHost(InternalDistributedMember id1, InternalDistributedMember id2) {
-    return (id1.getIpAddress().equals(id2.getIpAddress()));
+    return (id1.getInetAddress().equals(id2.getInetAddress()));
   }
 
   // @todo davidw Modify JGroups so that we do not have to send out a
@@ -613,7 +612,7 @@ public class DistributionManager
       {
         InternalDistributedMember id = dm.getDistributionManagerId();
         if (!"".equals(id.getName())) {
-          for (InternalDistributedMember m: (Vector<InternalDistributedMember>)dm.getViewMembers()) {
+          for (InternalDistributedMember m: (List<InternalDistributedMember>)dm.getViewMembers()) {
             if (m.equals(id)) {
               // I'm counting on the members returned by getViewMembers being ordered such that
               // members that joined before us will precede us AND members that join after us
@@ -1180,16 +1179,6 @@ public class DistributionManager
     StringBuffer sb = new StringBuffer(" (took ");
 
    long start = System.currentTimeMillis();
-    {
-      DistributionConfig config = system.getConfig();
-      String bindAddress = config.getBindAddress();
-      if (bindAddress != null && !bindAddress.equals(DistributionConfig.DEFAULT_BIND_ADDRESS)) {
-        System.setProperty("gemfire.jg-bind-address", bindAddress);
-      }
-      else {
-        System.getProperties().remove("gemfire.jg-bind-address");
-      }
-    }
     
     // Create direct channel first
 //    DirectChannel dc = new DirectChannel(new MyListener(this), system.getConfig(), logger, null);
@@ -1329,8 +1318,8 @@ public class DistributionManager
    */
   public boolean areOnEquivalentHost(InternalDistributedMember member1,
                                      InternalDistributedMember member2) {
-    Set<InetAddress> equivalents1 = getEquivalents(member1.getIpAddress());
-    return equivalents1.contains(member2.getIpAddress());
+    Set<InetAddress> equivalents1 = getEquivalents(member1.getInetAddress());
+    return equivalents1.contains(member2.getInetAddress());
   }
   
   /**
@@ -1432,8 +1421,8 @@ public class DistributionManager
     return this.dmType;
   }
   
-  public Vector getViewMembers() {
-    Vector result = null;
+  public List<InternalDistributedMember> getViewMembers() {
+    NetView result = null;
     DistributionChannel ch = this.channel;
     if (ch != null) {
       MembershipManager mgr = ch.getMembershipManager();
@@ -1442,13 +1431,13 @@ public class DistributionManager
         }
     }
     if (result == null) {
-      result = new Vector();
+      result = new NetView();
     }
-    return result;
+    return result.getMembers();
   }
   /* implementation of DM.getOldestMember */
   public DistributedMember getOldestMember(Collection c) throws NoSuchElementException {
-    Vector view = getViewMembers();
+    List<InternalDistributedMember> view = getViewMembers();
     for (int i=0; i<view.size(); i++) {
       Object viewMbr = view.get(i);
       Iterator it = c.iterator();
@@ -1476,23 +1465,7 @@ public class DistributionManager
     if (v == null)
       return "null";
     
-    StringBuffer sb = new StringBuffer();
-    Object leadObj = v.getLeadMember();
-    InternalDistributedMember lead = leadObj==null? null
-                            : new InternalDistributedMember(v.getLeadMember());
-    sb.append("[");
-    Iterator it = v.iterator();
-    while (it.hasNext()) {
-      InternalDistributedMember m = (InternalDistributedMember)it.next();
-      sb.append(m.toString());
-      if (lead != null && lead.equals(m)) {
-        sb.append("{lead}");
-      }
-      if (it.hasNext())
-        sb.append(", ");
-    }
-    sb.append("]");
-    return sb.toString();
+    return v.toString();
   }
 
   /**
@@ -1510,10 +1483,10 @@ public class DistributionManager
       logger.info(LocalizedMessage.create(LocalizedStrings.DistributionManager_INITIAL_MEMBERSHIPMANAGER_VIEW___0, printView(v)));
       
       // Add them all to our view
-      Iterator it = v.iterator();
+      Iterator<InternalDistributedMember> it = v.getMembers().iterator();
       while (it.hasNext()) {
-        addNewMember((InternalDistributedMember)it.next(), null);
-	}
+        addNewMember(it.next(), null);
+      }
       
       // Figure out who the elder is...
       selectElder(); // ShutdownException could be thrown here
@@ -3191,19 +3164,19 @@ public class DistributionManager
    * @return the elder candidate, possibly this VM.
    */
   private InternalDistributedMember getElderCandidate() {
-    Vector theMembers = getViewMembers();
+    List<InternalDistributedMember> theMembers = getViewMembers();
     
 //    Assert.assertTrue(!closeInProgress 
 //        && theMembers.contains(this.myid)); // bug36202?
     
     int elderCandidates = 0;
-    Iterator it;
+    Iterator<InternalDistributedMember> it;
     
     // for bug #50510 we need to know if there are any members older than v8.0
     it = theMembers.iterator();
     boolean anyPre80Members = false;
     while (it.hasNext()) {
-      InternalDistributedMember member = (InternalDistributedMember)it.next();
+      InternalDistributedMember member = it.next();
       if (member.getVersionObject().compareTo(Version.GFE_80) < 0) {
         anyPre80Members = true;
       }
@@ -3213,7 +3186,7 @@ public class DistributionManager
     if (!this.adam) {
       it = theMembers.iterator();
       while (it.hasNext()) {
-        InternalDistributedMember member = (InternalDistributedMember) it.next();
+        InternalDistributedMember member = it.next();
         int managerType = member.getVmKind();
         if (managerType == ADMIN_ONLY_DM_TYPE)
           continue;
@@ -3243,7 +3216,7 @@ public class DistributionManager
     // Second pass over members...
     it = theMembers.iterator();
     while (it.hasNext()) {
-      InternalDistributedMember member = (InternalDistributedMember) it.next(); 
+      InternalDistributedMember member = it.next(); 
       int managerType = member.getVmKind();
       if (managerType == ADMIN_ONLY_DM_TYPE)
         continue;
@@ -4859,7 +4832,7 @@ public class DistributionManager
       this.view = view;
     }
     public long getViewId() {
-      return view.getViewNumber();
+      return view.getViewId();
     }
     @Override
     public int eventType() {
@@ -4932,10 +4905,10 @@ public class DistributionManager
       }
     } else {
       buddyMembers.add(targetMember);
-      Set targetAddrs = getEquivalents(targetMember.getIpAddress());
+      Set targetAddrs = getEquivalents(targetMember.getInetAddress());
       for (Iterator i = getDistributionManagerIds().iterator(); i.hasNext();) {
         InternalDistributedMember o = (InternalDistributedMember)i.next();
-        if (SetUtils.intersectsWith(targetAddrs, getEquivalents(o.getIpAddress()))) {
+        if (SetUtils.intersectsWith(targetAddrs, getEquivalents(o.getInetAddress()))) {
           buddyMembers.add(o);
         }
       }
@@ -5000,7 +4973,7 @@ public class DistributionManager
     } else {
       for (Iterator it=ids.iterator(); it.hasNext(); ) {
         InternalDistributedMember mbr = (InternalDistributedMember)it.next();
-        if (mbr.getProcessId() > 0 && mbr.getIpAddress().equals(this.myid.getIpAddress())) {
+        if (mbr.getProcessId() > 0 && mbr.getInetAddress().equals(this.myid.getInetAddress())) {
           if (!mbr.equals(myid)) {
             if (!OSProcess.printStacks(mbr.getProcessId(), false)) {
               requiresMessage.add(mbr);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManagerConfig.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManagerConfig.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManagerConfig.java
deleted file mode 100644
index f0451d0..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionManagerConfig.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*=========================================================================
- * Copyright (c) 2010-2014 Pivotal Software, Inc. All Rights Reserved.
- * This product is protected by U.S. and international copyright
- * and intellectual property laws. Pivotal products are covered by
- * one or more patents listed at http://www.pivotal.io/patents.
- *=========================================================================
- */
-package com.gemstone.gemfire.distributed.internal;
-
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.org.jgroups.conf.XmlConfigurator;
-import java.io.*;
-
-/**
- * This class represents the configuration of a distribution manager.
- * Currently, it configures the {@link
- * com.gemstone.org.jgroups.JChannel} that is used to connect to
- * JGroups.
- *
- * @see XmlConfigurator
- */
-public class DistributionManagerConfig {
-
-  /** The name of the file in which the configuration information
-   * resides. */
-  public static final String FILE_NAME = "javagroups.xml";
-
-  //////////////////////  Instance Fields  ///////////////////////
-
-  /** A string representation of this config */
-  private String string;
-
-  ///////////////////////  Static Methods  ///////////////////////
-
-  /**
-   * Returns the default configuration for a distribution manager
-   *
-   * @param dir
-   *        The directory in which the configuration file resides
-   *
-   * @throws IllegalArgumentException
-   *         If <code>dir</code> does not exist or it does not contain
-   *         a file named {@link #FILE_NAME}, or we had difficulties
-   *         reading or parsing the file.
-   */
- static DistributionManagerConfig getConfig(File dir) {
-    if (!dir.exists()) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributionManagerConfig_CANNOT_READ_DISTRIBUTION_MANAGER_CONFIG_DIRECTORY_0_DOES_NOT_EXIST.toLocalizedString(dir));
-    }
-
-    File file = new File(dir, FILE_NAME);
-    if (!file.exists()) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributionManagerConfig_CANNOT_READ_DISTRIBUTION_MANAGER_CONFIG_CONFIGURATION_FILE_0_DOES_NOT_EXIST.toLocalizedString(file));
-    }
-
-    try {
-      return parse(file);
-
-    } catch (Exception ex) {
-      throw new IllegalArgumentException(LocalizedStrings.DistributionManagerConfig_WHILE_PARSING_0_1.toLocalizedString(new Object[] {file, ex}));
-    }
-  }
-
-  /**
-   * Parses the contents of a distribution manager config file and
-   * from it creates a new <code>DistributionManagerConfig</code>.
-   */
-  private static DistributionManagerConfig parse(File file) 
-    throws IOException {
-    DistributionManagerConfig config = new DistributionManagerConfig();
-    FileInputStream fis = new FileInputStream(file);
-    try {
-      XmlConfigurator conf =  XmlConfigurator.getInstance(fis);
-      config.string = conf.getProtocolStackString();
-    }
-    finally {
-      fis.close();
-    }
-    return config;
-  }
-
-  ////////////////////  Instance Methods  ////////////////////
-  
-  /**
-   * Returns a String representation of this config.  Note that this
-   * method is package protected because we may not need it in the
-   * future and thus is should not be for public consumption.
-   */
-  String asString() {
-    return this.string;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
index e30b20b..20db1fc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalDistributedSystem.java
@@ -55,8 +55,8 @@ import com.gemstone.gemfire.distributed.internal.locks.GrantorRequestProcessor;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
 import com.gemstone.gemfire.distributed.internal.membership.QuorumChecker;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.LocatorImpl;
+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;
@@ -66,7 +66,6 @@ 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;
@@ -98,7 +97,6 @@ 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 com.gemstone.org.jgroups.util.GemFireTracer;
 
 /**
  * The concrete implementation of {@link DistributedSystem} that
@@ -562,11 +560,8 @@ public final class InternalDistributedSystem
       this.securityLogWriter = LogWriterFactory.createLogWriterLogger(this.isLoner, true, this.config, false);
       this.securityLogWriter.fine("SecurityLogWriter is created.");
     }
-
-    GemFireTracer tracer = GemFireTracer.getLog(InternalDistributedSystem.class);
-    tracer.setLogWriter(this.logWriter);
-    tracer.setSecurityLogWriter(this.securityLogWriter);
-    tracer.setLogger(LogService.getLogger(GemFireTracer.class));
+    
+    Services.setSecurityLogWriter(this.securityLogWriter);
 
     this.clock = new DSClock(this.isLoner);
     
@@ -743,11 +738,6 @@ public final class InternalDistributedSystem
           boolean startedPeerLocation = false;
           try {
             this.startedLocator.startPeerLocation(true);
-            if (this.isConnected) {
-              InternalDistributedMember id = this.dm.getDistributionManagerId();
-              LocatorImpl gs = this.startedLocator.getLocatorHandler();
-              gs.setLocalAddress(id);
-            }
             startedPeerLocation = true;
           } finally {
             if (!startedPeerLocation) {
@@ -1157,14 +1147,14 @@ public final class InternalDistributedSystem
   private static volatile boolean emergencyClassesLoaded = false;
   
   /**
-   * Ensure that the JGroupMembershipManager class gets loaded.
+   * Ensure that the MembershipManager class gets loaded.
    * 
    * @see SystemFailure#loadEmergencyClasses()
    */
   static public void loadEmergencyClasses() {
     if (emergencyClassesLoaded) return;
     emergencyClassesLoaded = true;
-    JGroupMembershipManager.loadEmergencyClasses();
+    GMSMembershipManager.loadEmergencyClasses();
   }
   
   /**
@@ -1590,10 +1580,10 @@ public final class InternalDistributedSystem
     //Search through the set of all members
     for(InternalDistributedMember member: allMembers) {
       
-      Set<InetAddress> equivalentAddresses = dm.getEquivalents(member.getIpAddress());
+      Set<InetAddress> equivalentAddresses = dm.getEquivalents(member.getInetAddress());
       //Check to see if the passed in address is matches one of the addresses on
       //the given member.
-      if(address.equals(member.getIpAddress()) || equivalentAddresses.contains(address)) {
+      if(address.equals(member.getInetAddress()) || equivalentAddresses.contains(address)) {
         results.add(member);
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
index 9d6c049..51203d2 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/InternalLocator.java
@@ -12,24 +12,15 @@ import java.io.IOException;
 import java.net.ConnectException;
 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.Iterator;
-import java.util.List;
 import java.util.Properties;
-import java.util.ServiceLoader;
-import java.util.Set;
-import java.util.StringTokenizer;
 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.Executors;
 import java.util.concurrent.Future;
-import java.util.concurrent.ThreadFactory;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -48,26 +39,14 @@ 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.wan.LocatorMembershipListener;
-//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorDiscovery;
-//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorHelper;
-//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorJoinMessage;
-//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorMembershipListenerImpl;
-//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.cache.wan.GatewaySenderFactory;
 import com.gemstone.gemfire.distributed.DistributedSystem;
 import com.gemstone.gemfire.distributed.Locator;
 import com.gemstone.gemfire.distributed.LockServiceDestroyedException;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.ConnectListener;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem.DisconnectListener;
 import com.gemstone.gemfire.distributed.internal.membership.QuorumChecker;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.GFJGBasicAdapter;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMember;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.LocatorImpl;
+import com.gemstone.gemfire.distributed.internal.membership.gms.locator.GMSLocator;
+import com.gemstone.gemfire.distributed.internal.membership.gms.locator.PeerLocatorRequest;
 import com.gemstone.gemfire.distributed.internal.tcpserver.TcpClient;
 import com.gemstone.gemfire.distributed.internal.tcpserver.TcpHandler;
 import com.gemstone.gemfire.distributed.internal.tcpserver.TcpServer;
@@ -94,11 +73,16 @@ 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 com.gemstone.org.jgroups.Address;
-import com.gemstone.org.jgroups.JChannel;
-import com.gemstone.org.jgroups.stack.GossipData;
-import com.gemstone.org.jgroups.stack.GossipServer;
-import com.gemstone.org.jgroups.util.GemFireTracer;
+//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorDiscovery;
+//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorHelper;
+//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorJoinMessage;
+//import com.gemstone.gemfire.cache.client.internal.locator.wan.LocatorMembershipListenerImpl;
+//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;
 
 /**
  * Provides the implementation of a distribution <code>Locator</code>
@@ -178,8 +162,8 @@ public class InternalLocator extends Locator implements ConnectListener {
   //the system is started.
   private Properties env;
   
-  /** the gossip server used for peer location */
-  private LocatorImpl locatorImpl;
+  /** the TcpHandler used for peer location */
+  private GMSLocator locatorImpl;
   
   private DistributionConfigImpl config;
   
@@ -531,7 +515,7 @@ public class InternalLocator extends Locator implements ConnectListener {
     this.bindAddress = bindAddress;
     this.hostnameForClients = hostnameForClients;
     if (stateF == null) {
-      this.stateFile = new File("locator" + port + "state.dat");
+      this.stateFile = new File("locator" + port + "view.dat");
     }
     else {
       this.stateFile = stateF;
@@ -610,11 +594,6 @@ public class InternalLocator extends Locator implements ConnectListener {
     }
     this.handler = new PrimaryHandler(this.port, this, locatorListener);
   
-    GemFireTracer tracer = GemFireTracer.getLog(InternalLocator.class);
-    tracer.setLogWriter(logWriter);
-    tracer.setSecurityLogWriter(securityLogWriter);
-    tracer.setLogger(LogService.getLogger(GemFireTracer.class));
-    
     ThreadGroup group = LoggingThreadGroup.createThreadGroup("Distribution locators", logger);
     stats = new LocatorStats();
     server = new TcpServer(this.port, this.bindAddress, null, this.config,
@@ -685,13 +664,9 @@ public class InternalLocator extends Locator implements ConnectListener {
     //com.gemstone.org.jgroups.util.GemFireTracer
     //    .setSecurityLogWriter(this.securityLogWriter);
     
-    // install gemfire serialization and socket functions into jgroups
-    JChannel.setDefaultGFFunctions(new GFJGBasicAdapter());
-    this.locatorImpl = new LocatorImpl(port, EXPIRY_MS,
-        this.bindAddress, this.stateFile, locatorsProp, locatorsAreCoordinators,
-        networkPartitionDetectionEnabled, withDS
-        );
-    this.handler.addHandler(GossipData.class, this.locatorImpl);
+    this.locatorImpl = new GMSLocator(port, this.bindAddress, this.stateFile,
+        locatorsProp, locatorsAreCoordinators, networkPartitionDetectionEnabled);
+    this.handler.addHandler(PeerLocatorRequest.class, this.locatorImpl);
     peerLocator = true;
     if(!server.isAlive()) {
       startTcpServer();
@@ -701,7 +676,7 @@ public class InternalLocator extends Locator implements ConnectListener {
   /**
    * @return the gossipServer
    */
-  public LocatorImpl getLocatorHandler() {
+  public GMSLocator getLocatorHandler() {
     return this.locatorImpl;
   }
   
@@ -748,14 +723,6 @@ public class InternalLocator extends Locator implements ConnectListener {
     if (existing != null) {
       // LOG: changed from config to info
       logger.info(LocalizedMessage.create(LocalizedStrings.InternalLocator_USING_EXISTING_DISTRIBUTED_SYSTEM__0, existing));
-      if (getLocatorHandler() != null) {
-        // let the GossipServer know the system's address so they can start
-        // servicing requests
-        Address addr = ((JGroupMember)existing.getDistributedMember().getNetMember()).getAddress();
-        getLocatorHandler().setLocalAddress(addr);
-      }
-      // don't set the ds variable, so it won't be closed by the locator shutting down
-     
       startCache(existing);
     }
     else {
@@ -819,6 +786,10 @@ public class InternalLocator extends Locator implements ConnectListener {
 
         myDs = (InternalDistributedSystem)DistributedSystem.connect(connectEnv);
         
+        if (peerLocator) {
+          this.locatorImpl.setMembershipManager(myDs.getDM().getMembershipManager());
+        }
+        
         myDs.addDisconnectListener(new DisconnectListener() {
           @Override
           public void onDisconnect(InternalDistributedSystem sys) {
@@ -1323,13 +1294,20 @@ public class InternalLocator extends Locator implements ConnectListener {
     }
 
     public Object processRequest(Object request) throws IOException {
-      TcpHandler handler = (TcpHandler)handlerMapping.get(request.getClass());
+      TcpHandler handler = null;
+      if (request instanceof PeerLocatorRequest) {
+        handler = (TcpHandler)handlerMapping.get(PeerLocatorRequest.class);
+      }
+      else {
+        handler = (TcpHandler)handlerMapping.get(request.getClass());
+      }
+      
       if (handler != null) {
         Object result;
         result = handler.processRequest(request);
         return result;
       }
-      else {
+      else {  
         Object response;
         if(locatorListener != null){
           response = locatorListener.handleRequest(request);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
index 0d0c922..5194d9e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/LonerDistributionManager.java
@@ -38,14 +38,11 @@ import com.gemstone.gemfire.distributed.internal.locks.ElderState;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.GFJGBasicAdapter;
 import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
-import com.gemstone.gemfire.internal.logging.LogWriterImpl;
-import com.gemstone.org.jgroups.JChannel;
 
 /**
  * A <code>LonerDistributionManager</code> is a dm that never communicates
@@ -74,12 +71,11 @@ public class LonerDistributionManager implements DM {
    */
   public LonerDistributionManager(InternalDistributedSystem system,
                                   InternalLogWriter logger) {
-    JChannel.setDefaultGFFunctions(new GFJGBasicAdapter());
     this.system = system;
     this.logger = logger;
     this.id = generateMemberId();
     this.allIds = Collections.singleton(id);
-    this.viewMembers = new Vector(allIds);
+    this.viewMembers = new ArrayList<InternalDistributedMember>(allIds);
     DistributionStats.enableClockStats = this.system.getConfig().getEnableTimeStatistics();
   }
 
@@ -112,7 +108,7 @@ public class LonerDistributionManager implements DM {
   }*/
 
   private final Set<InternalDistributedMember> allIds;// = Collections.singleton(id);
-  private final Vector viewMembers;// = new Vector(allIds);
+  private final List<InternalDistributedMember> viewMembers;
   private ConcurrentMap<InternalDistributedMember, InternalDistributedMember> canonicalIds = new ConcurrentHashMap();
   static private final DummyDMStats stats = new DummyDMStats();
   static private final DummyExecutor executor = new DummyExecutor();
@@ -276,7 +272,9 @@ public class LonerDistributionManager implements DM {
   public void restartCommunications() {
 
   }
-  public Vector getViewMembers() {
+  
+  @Override
+  public List<InternalDistributedMember> getViewMembers() {
     return viewMembers;
   }
 
@@ -810,7 +808,7 @@ public class LonerDistributionManager implements DM {
   
   public Set<InetAddress> getEquivalents(InetAddress in) {
     Set<InetAddress> value = new HashSet<InetAddress>();
-    value.add(this.getId().getIpAddress());
+    value.add(this.getId().getInetAddress());
     return value;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
index 454b5c3..a318a8a 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/ReplyProcessor21.java
@@ -14,7 +14,6 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
-import java.util.Vector;
 
 import org.apache.logging.log4j.Logger;
 
@@ -34,7 +33,7 @@ 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.org.jgroups.util.StringId;
+import com.gemstone.gemfire.i18n.StringId;
 
 /**
  * This class processes responses to {@link DistributionMessage}s. It
@@ -435,7 +434,7 @@ public class ReplyProcessor21
       final DM dm = getDistributionManager(); // fix for bug 33253
       Set ids = getDistributionManagerIds();
       if (ids == null || ids.contains(sender)) {
-        Vector viewMembers = dm.getViewMembers();
+        List viewMembers = dm.getViewMembers();
         if (system.getConfig().getMcastPort() == 0  // could be using multicast & will get responses from everyone
              && (viewMembers == null || viewMembers.contains(sender))) {
           logger.warn(LocalizedMessage.create(

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
index 68879de..169c3c3 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupMessage.java
@@ -249,7 +249,7 @@ public final class StartupMessage extends HighPriorityDistributionMessage implem
 
     if (rejectionMessage == null) { // change state only if there's no rejectionMessage yet
       if (this.interfaces == null || this.interfaces.size() == 0) {
-        final com.gemstone.org.jgroups.util.StringId msg = 
+        final com.gemstone.gemfire.i18n.StringId msg = 
           LocalizedStrings.StartupMessage_REJECTED_NEW_SYSTEM_NODE_0_BECAUSE_PEER_HAS_NO_NETWORK_INTERFACES;
         rejectionMessage = msg.toLocalizedString(getSender());
       }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupOperation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupOperation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupOperation.java
index 4815700..d1070b8 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupOperation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/StartupOperation.java
@@ -10,7 +10,6 @@ package com.gemstone.gemfire.distributed.internal;
 import java.io.IOException;
 import java.util.HashSet;
 import java.util.Iterator;
-import java.util.Properties;
 import java.util.Set;
 
 import org.apache.logging.log4j.Logger;
@@ -20,8 +19,6 @@ import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
 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.org.jgroups.ChannelClosedException;
-import com.gemstone.org.jgroups.ChannelNotConnectedException;
 
 public class StartupOperation {
   private static final Logger logger = LogService.getLogger();
@@ -45,7 +42,6 @@ public class StartupOperation {
   boolean sendStartupMessage(Set recipients, long timeout, Set interfaces, 
       String redundancyZone, boolean enforceUniqueZone)
             throws InterruptedException, ReplyException,
-              ChannelNotConnectedException, ChannelClosedException,
               java.net.UnknownHostException, IOException
   {
     if (Thread.interrupted()) throw new InterruptedException();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
index b7fbad1..1aab4af 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/WaitForViewInstallation.java
@@ -29,7 +29,7 @@ public class WaitForViewInstallation extends HighPriorityDistributionMessage
   private static final Logger logger = LogService.getLogger();
   
   public static void send(DistributionManager dm) throws InterruptedException {
-    long viewId = dm.getMembershipManager().getView().getViewNumber();
+    long viewId = dm.getMembershipManager().getView().getViewId();
     ReplyProcessor21 rp = new ReplyProcessor21(dm, dm.getOtherDistributionManagerIds());
     rp.enableSevereAlertProcessing();
     dm.putOutgoing(new WaitForViewInstallation(viewId, rp.getProcessorId()));

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
index 983fc1a..c9dc316 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannel.java
@@ -16,6 +16,7 @@ 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;
@@ -38,6 +39,7 @@ import com.gemstone.gemfire.distributed.internal.ReplyProcessor21;
 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.i18n.StringId;
 import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.cache.DirectReplyMessage;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
@@ -56,7 +58,6 @@ import com.gemstone.gemfire.internal.tcp.Stub;
 import com.gemstone.gemfire.internal.tcp.TCPConduit;
 import com.gemstone.gemfire.internal.util.Breadcrumbs;
 import com.gemstone.gemfire.internal.util.concurrent.ReentrantSemaphore;
-import com.gemstone.org.jgroups.util.StringId;
 
 /**
  * @author Bruce Schuchardt
@@ -125,7 +126,7 @@ public class DirectChannel {
         throws ConnectionException {
       this.receiver = dm;
 
-      this.address = initAddress(dm);
+      this.address = initAddress(dm, dc);
       boolean isBindAddress = dc.getBindAddress() != null;
       try {
         int port = Integer.getInteger("tcpServerPort", 0).intValue();
@@ -882,9 +883,9 @@ public class DirectChannel {
     return this.conduit;
   }
 
-  private InetAddress initAddress(DistributedMembershipListener dm) {
+  private InetAddress initAddress(DistributedMembershipListener dm, DistributionConfig dc) {
 
-    String bindAddress = System.getProperty("gemfire.jg-bind-address");
+    String bindAddress = dc.getBindAddress();
 
     try {
       /* note: had to change the following to make sure the prop wasn't empty 
@@ -906,7 +907,7 @@ public class DirectChannel {
   /** Create a TCPConduit stub from a JGroups InternalDistributedMember */
   public Stub createConduitStub(InternalDistributedMember addr) {
     int port = addr.getDirectChannelPort();
-    Stub stub = new Stub(addr.getIpAddress(), port, addr.getVmViewId());
+    Stub stub = new Stub(addr.getInetAddress(), port, addr.getVmViewId());
     return stub;
   }
   
@@ -947,7 +948,7 @@ public class DirectChannel {
    * wait for the given connections to process the number of messages
    * associated with the connection in the given map
    */
-  public void waitForChannelState(Stub member, HashMap channelState)
+  public void waitForChannelState(Stub member, Map channelState)
     throws InterruptedException
   {
     if (Thread.interrupted()) throw new InterruptedException();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/d2a942e8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
index ada8c6a..dd9d6f3 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/InternalDistributedMember.java
@@ -7,17 +7,29 @@
  */
 package com.gemstone.gemfire.distributed.internal.membership;
 
+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.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;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DurableClientAttributes;
 import com.gemstone.gemfire.distributed.Role;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.DistributionAdvisor.ProfileId;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.GFJGBasicAdapter;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.GFJGPeerAdapter;
-import com.gemstone.gemfire.distributed.internal.membership.jgroup.JGroupMember;
+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;
@@ -25,23 +37,6 @@ import com.gemstone.gemfire.internal.SocketCreator;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.versions.VersionSource;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.org.jgroups.stack.IpAddress;
-
-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.io.Serializable;
-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 java.net.Inet4Address;
 
 /**
  * This is the fundamental representation of a member of a GemFire distributed
@@ -65,8 +60,7 @@ public final class InternalDistributedMember
 {
   private final static long serialVersionUID = -2785249969777296507L;
   
-  protected NetMember ipAddr; // the underlying member object, e.g. from JGroups
-  // private IpAddress ipAddr;
+  protected NetMember netMbr; // the underlying member object, e.g. from JGroups
 
   /**
    * This is the direct channel port. The underlying NetMember must be able to
@@ -151,13 +145,10 @@ public final class InternalDistributedMember
 
   /** The versions in which this message was modified */
   private static final Version[] dsfidVersions = new Version[] {
-        Version.GFE_71 };
+        Version.GFE_71, Version.GFE_90 };
 
   private void defaultToCurrentHost() {
     int defaultDcPort = MemberAttributes.DEFAULT.getPort();
- // [bruce] disabled to allow loners to modify the ID post-connect
- //    Assert.assertTrue(defaultDcPort > 0); 
-
     this.dcPort = defaultDcPort;;
     this.vmKind = MemberAttributes.DEFAULT.getVmKind();
     this.vmPid = MemberAttributes.DEFAULT.getVmPid();
@@ -165,9 +156,6 @@ public final class InternalDistributedMember
     this.groups = MemberAttributes.DEFAULT.getGroups();
     this.vmViewId = MemberAttributes.DEFAULT.getVmViewId();
     this.durableClientAttributes = MemberAttributes.DEFAULT.getDurableClientAttributes();
-    if (this.ipAddr instanceof JGroupMember) {
-      ((JGroupMember)this.ipAddr).getAddress().setProcessId(this.vmPid);
-    }
     try {
       if (SocketCreator.resolve_dns) {
         this.hostName = SocketCreator.getHostName(SocketCreator.getLocalHost());
@@ -179,7 +167,7 @@ public final class InternalDistributedMember
     catch(UnknownHostException ee){
       throw new InternalGemFireError(ee);
     }
-//    checkHostName();
+    synchPayload();
   }
 
 
@@ -212,11 +200,18 @@ public final class InternalDistributedMember
     this.name = attr.getName();
     this.groups = attr.getGroups();
     this.durableClientAttributes = attr.getDurableClientAttributes();
-    this.ipAddr = MemberFactory.newNetMember(i, p, splitBrainEnabled, canBeCoordinator, attr);
+    this.netMbr = MemberFactory.newNetMember(i, p, splitBrainEnabled, canBeCoordinator, Version.CURRENT_ORDINAL, attr);
     this.hostName = SocketCreator.resolve_dns? SocketCreator.getHostName(i) : i.getHostAddress();
+    this.version = netMbr.getVersionOrdinal();
+    try {
+      this.versionObj = Version.fromOrdinal(version, false);
+    } catch (UnsupportedVersionException e) {
+      this.versionObj = Version.CURRENT;
+    }
 //    checkHostName();
   }
 
+  
   /**
    * Construct a InternalDistributedMember based on the given NetMember.<p>
    * This is not the preferred way of creating an instance since the NetMember
@@ -225,11 +220,11 @@ public final class InternalDistributedMember
    * @param m
    */
   public InternalDistributedMember(NetMember m) {
-    ipAddr = m;
+    netMbr = m;
 
     MemberAttributes attr = m.getAttributes();
-    this.hostName = SocketCreator.resolve_dns? SocketCreator.getHostName(m.getIpAddress()) :
-      m.getIpAddress().getHostAddress();
+    this.hostName = SocketCreator.resolve_dns? SocketCreator.getHostName(m.getInetAddress()) :
+      m.getInetAddress().getHostAddress();
 //    checkHostName();
     if (attr == null) {
       // no extended information available, so this address is crippled
@@ -243,8 +238,7 @@ public final class InternalDistributedMember
       this.groups = attr.getGroups();
       this.durableClientAttributes = attr.getDurableClientAttributes();
     }
-    final IpAddress addr = ((JGroupMember)m).getAddress();
-    this.version = addr.getVersionOrdinal();
+    this.version = m.getVersionOrdinal();
     try {
       this.versionObj = Version.fromOrdinal(version, false);
     } catch (UnsupportedVersionException e) {
@@ -252,8 +246,8 @@ public final class InternalDistributedMember
     }
     cachedToString = null;
   }
-  
-//  private void checkHostName() {
+
+  //  private void checkHostName() {
 //    // bug #44858: debug method to find who is putting a host name instead of addr into an ID
 //    if (!SocketCreator.resolve_dns
 //        && this.hostName != null && this.hostName.length() > 0
@@ -280,10 +274,9 @@ public final class InternalDistributedMember
    * @throws UnknownHostException if the given hostname cannot be resolved
    */
   public InternalDistributedMember(String i, int p) throws UnknownHostException {
-    ipAddr = MemberFactory.newNetMember(i, p);
+    netMbr = MemberFactory.newNetMember(i, p);
     defaultToCurrentHost();
     this.vmKind = DistributionManager.NORMAL_DM_TYPE;
-    GFJGBasicAdapter.insertDefaultGemFireAttributes(((JGroupMember)ipAddr).getAddress());
   }
 
   /**
@@ -309,9 +302,8 @@ public final class InternalDistributedMember
    * @throws UnknownHostException if the given hostname cannot be resolved
    */
   public InternalDistributedMember(String i, int p, String n, String u) throws UnknownHostException {
-    ipAddr = MemberFactory.newNetMember(i, p);
+    netMbr = MemberFactory.newNetMember(i, p);
     defaultToCurrentHost();
-    GFJGBasicAdapter.insertDefaultGemFireAttributes(((JGroupMember)ipAddr).getAddress());
     this.name = n;
     this.uniqueTag = u;
   }
@@ -333,7 +325,7 @@ public final class InternalDistributedMember
    *          the membership listening port
    */
   public InternalDistributedMember(InetAddress i, int p) {
-    ipAddr = MemberFactory.newNetMember(i, p);
+    netMbr = MemberFactory.newNetMember(i, p);
     defaultToCurrentHost();
   }
 
@@ -359,7 +351,7 @@ public final class InternalDistributedMember
   public InternalDistributedMember(InetAddress addr,
                                    int p,
                                    boolean isCurrentHost) {
-    ipAddr = MemberFactory.newNetMember(addr, p);
+    netMbr = MemberFactory.newNetMember(addr, p);
     if (isCurrentHost) {
       defaultToCurrentHost();
     }
@@ -370,13 +362,13 @@ public final class InternalDistributedMember
    *
    * @return the underlying host address
    */
-  public InetAddress getIpAddress()
+  public InetAddress getInetAddress()
   {
-    return ipAddr.getIpAddress();
+    return netMbr.getInetAddress();
   }
 
   public NetMember getNetMember() {
-    return ipAddr;
+    return netMbr;
   }
 
   /**
@@ -385,7 +377,7 @@ public final class InternalDistributedMember
    */
   public int getPort()
   {
-    return ipAddr.getPort();
+    return netMbr.getPort();
   }
 
 
@@ -464,7 +456,7 @@ public final class InternalDistributedMember
   }
 
   private void synchPayload() {
-    ipAddr.setAttributes(new MemberAttributes(dcPort, vmPid, vmKind, 
+    netMbr.setAttributes(new MemberAttributes(dcPort, vmPid, vmKind, 
         vmViewId, name, groups, durableClientAttributes));
   }
 
@@ -564,8 +556,8 @@ public final class InternalDistributedMember
       return 1;
 
 
-    InetAddress myAddr = getIpAddress();
-    InetAddress otherAddr = other.getIpAddress();
+    InetAddress myAddr = getInetAddress();
+    InetAddress otherAddr = other.getInetAddress();
 
     // Discard null cases
     if (myAddr == null && otherAddr == null) {
@@ -655,7 +647,7 @@ public final class InternalDistributedMember
   public int hashCode()
   {
     int result = 0;
-     result = result + ipAddr.getIpAddress().hashCode();
+     result = result + netMbr.getInetAddress().hashCode();
     result = result + getPort();
     return result;
   }
@@ -683,7 +675,7 @@ public final class InternalDistributedMember
     if (result == null) {
       String host;
 
-      InetAddress add = getIpAddress();
+      InetAddress add = getInetAddress();
         if (add.isMulticastAddress())
           host = add.getHostAddress();
         else {
@@ -729,14 +721,14 @@ public final class InternalDistributedMember
         sb.append(vmStr);
         // for split-brain and security debugging we need to know if the
         // member has the "can't be coordinator" bit set
-//        JGroupMember jgm = (JGroupMember)ipAddr;
+//        GMSMember jgm = (GMSMember)ipAddr;
 //        if (!jgm.getAddress().canBeCoordinator()) {
 //          sb.append("<p>");
 //        }
         sb.append(")");
       }
-      if (ipAddr.splitBrainEnabled()) {
-        if (ipAddr.canBeCoordinator()) {
+      if (netMbr.splitBrainEnabled()) {
+        if (netMbr.preferredForCoordinator()) {
           sb.append("<ec>");
         }
       }
@@ -769,6 +761,10 @@ public final class InternalDistributedMember
       }
 
       // leave out Roles on purpose
+      
+//      if (netMbr instanceof GMSMember) {
+//        sb.append("(UUID=").append(((GMSMember)netMbr).getUUID()).append(")");
+//      }
 
       result = sb.toString();
       cachedToString = result;
@@ -792,7 +788,7 @@ public final class InternalDistributedMember
     Assert.assertTrue(vmKind > 0);
 
     // do it the way we like
-    byte[] address = getIpAddress().getAddress();
+    byte[] address = getInetAddress().getAddress();
 
     out.writeInt(address.length); // IPv6 compatible
     out.write(address);
@@ -801,8 +797,8 @@ public final class InternalDistributedMember
     DataSerializer.writeString(this.hostName, out);
     
     int flags = 0;
-    if (ipAddr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
-    if (ipAddr.canBeCoordinator()) flags |= COORD_ENABLED_MASK;
+    if (netMbr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
+    if (netMbr.preferredForCoordinator()) flags |= COORD_ENABLED_MASK;
     if (this.isPartial) flags |= PARTIAL_ID_MASK;
     // always write product version but enable reading from older versions
     // that do not have it
@@ -820,6 +816,7 @@ public final class InternalDistributedMember
     DataSerializer.writeString(this.durableClientAttributes==null ? "" : this.durableClientAttributes.getId(), out);
     DataSerializer.writeInteger(Integer.valueOf(this.durableClientAttributes==null ? 300 : this.durableClientAttributes.getTimeout()), out);
     Version.writeOrdinal(out, this.version, true);
+    netMbr.writeAdditionalData(out);
   }
 
   /**
@@ -829,7 +826,6 @@ public final class InternalDistributedMember
     */
    public void readExternal(ObjectInput in)
    throws IOException, ClassNotFoundException {
-     // do it the way we like
      int len = in.readInt(); // IPv6 compatible
      byte addr[] = new byte[len];
      in.readFully(addr);
@@ -857,9 +853,9 @@ public final class InternalDistributedMember
 
      readVersion(flags, in);
 
-     ipAddr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord,
+     netMbr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, version,
          new MemberAttributes(dcPort, vmPid, vmKind, vmViewId, name, groups, durableClientAttributes));
-     ((JGroupMember)ipAddr).getAddress().setVersionOrdinal(this.version);
+     netMbr.readAdditionalData(in);
 
      Assert.assertTrue(this.vmKind > 0);
    }
@@ -869,25 +865,24 @@ public final class InternalDistributedMember
   }
 
   public void toData(DataOutput out) throws IOException {
+    toDataPre_GFE_9_0_0_0(out);
+    getNetMember().writeAdditionalData(out);
+  }
+  
+  
+  public void toDataPre_GFE_9_0_0_0(DataOutput out) throws IOException {
     Assert.assertTrue(vmKind > 0);
-    // [bruce] disabled to allow post-connect setting of the port for loner systems
-//    Assert.assertTrue(getPort() > 0);
-//    if (this.getPort() == 0) {
-//      InternalDistributedSystem.getLoggerI18n().warning(LocalizedStrings.DEBUG,
-//          "Serializing ID with zero port", new Exception("Stack trace"));
-//    }
-
     // NOTE: If you change the serialized format of this class
     //       then bump Connection.HANDSHAKE_VERSION since an
     //       instance of this class is sent during Connection handshake.
-    DataSerializer.writeInetAddress(getIpAddress(), out);
+    DataSerializer.writeInetAddress(getInetAddress(), out);
     out.writeInt(getPort());
 
     DataSerializer.writeString(this.hostName, out);
 
     int flags = 0;
-    if (ipAddr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
-    if (ipAddr.canBeCoordinator()) flags |= COORD_ENABLED_MASK;
+    if (netMbr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
+    if (netMbr.preferredForCoordinator()) flags |= COORD_ENABLED_MASK;
     if (this.isPartial) flags |= PARTIAL_ID_MASK;
     // always write product version but enable reading from older versions
     // that do not have it
@@ -922,14 +917,14 @@ public final class InternalDistributedMember
     // NOTE: If you change the serialized format of this class
     //       then bump Connection.HANDSHAKE_VERSION since an
     //       instance of this class is sent during Connection handshake.
-    DataSerializer.writeInetAddress(getIpAddress(), out);
+    DataSerializer.writeInetAddress(getInetAddress(), out);
     out.writeInt(getPort());
 
     DataSerializer.writeString(this.hostName, out);
 
     int flags = 0;
-    if (ipAddr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
-    if (ipAddr.canBeCoordinator()) flags |= COORD_ENABLED_MASK;
+    if (netMbr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
+    if (netMbr.preferredForCoordinator()) flags |= COORD_ENABLED_MASK;
     if (this.isPartial) flags |= PARTIAL_ID_MASK;
     out.writeByte((byte)(flags & 0xff));
     
@@ -951,7 +946,12 @@ public final class InternalDistributedMember
   
   public void fromData(DataInput in)
   throws IOException, ClassNotFoundException {
-    // do it the way we like it.
+    fromDataPre_9_0_0_0(in);
+    netMbr.readAdditionalData(in);
+  }
+  
+  public void fromDataPre_9_0_0_0(DataInput in)
+  throws IOException, ClassNotFoundException {
     InetAddress inetAddr = DataSerializer.readInetAddress(in);
     int port = in.readInt();
 
@@ -986,8 +986,7 @@ public final class InternalDistributedMember
 
     MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid,
         this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes);
-    ipAddr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, attr);
-    ((JGroupMember)ipAddr).getAddress().setVersionOrdinal(this.version);
+    netMbr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, version, attr);
 
     synchPayload();
 
@@ -996,7 +995,6 @@ public final class InternalDistributedMember
   }
 
   public void fromDataPre_GFE_7_1_0_0(DataInput in)  throws IOException, ClassNotFoundException {
-    // do it the way we like it.
     InetAddress inetAddr = DataSerializer.readInetAddress(in);
     int port = in.readInt();
 
@@ -1029,7 +1027,8 @@ public final class InternalDistributedMember
 
     MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid,
         this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes);
-    ipAddr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, attr);
+    netMbr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, 
+        InternalDataSerializer.getVersionForDataStream(in).ordinal(), attr);
 
     synchPayload();
 
@@ -1072,7 +1071,8 @@ public final class InternalDistributedMember
 
      MemberAttributes attr = new MemberAttributes(this.dcPort, this.vmPid,
          this.vmKind, this.vmViewId, this.name, this.groups, this.durableClientAttributes);
-     ipAddr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, attr);
+     netMbr = MemberFactory.newNetMember(inetAddr, port, sbEnabled, elCoord, 
+         InternalDataSerializer.getVersionForDataStream(in).ordinal(), attr);
 
      synchPayload();
    }
@@ -1080,12 +1080,12 @@ public final class InternalDistributedMember
 
    public void writeEssentialData(DataOutput out) throws IOException {
      Assert.assertTrue(vmKind > 0);
-     DataSerializer.writeInetAddress(getIpAddress(), out);
+     DataSerializer.writeInetAddress(getInetAddress(), out);
      out.writeInt(getPort());
 
      int flags = 0;
-     if (ipAddr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
-     if (ipAddr.canBeCoordinator()) flags |= COORD_ENABLED_MASK;
+     if (netMbr.splitBrainEnabled()) flags |= SB_ENABLED_MASK;
+     if (netMbr.preferredForCoordinator()) flags |= COORD_ENABLED_MASK;
      flags |= PARTIAL_ID_MASK;
      out.writeByte((byte)(flags & 0xff));
      
@@ -1116,7 +1116,7 @@ public final class InternalDistributedMember
    */
   public void setPort(int p) {
     assert this.vmKind == DistributionManager.LONER_DM_TYPE;
-    this.ipAddr.setPort(p);
+    this.netMbr.setPort(p);
     synchPayload();
     cachedToString = null;
   }
@@ -1127,7 +1127,7 @@ public final class InternalDistributedMember
   }
 
   public String getHost() {
-    return this.ipAddr.getIpAddress().getCanonicalHostName();
+    return this.netMbr.getInetAddress().getCanonicalHostName();
   }
 
   public int getProcessId() {
@@ -1186,7 +1186,7 @@ public final class InternalDistributedMember
     int size = 0;
   
     // ipaddr:  1 byte length + 4 bytes (IPv4) or 16 bytes (IPv6)
-    if (ipAddr.getIpAddress() instanceof Inet4Address){
+    if (netMbr.getInetAddress() instanceof Inet4Address){
       size += 5;
     } else {
       size += 17;


Mime
View raw message