You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by je...@apache.org on 2015/12/07 18:05:43 UTC

[01/50] [abbrv] incubator-geode git commit: Add ASF License to html, xml, xsd & dtd files

Repository: incubator-geode
Updated Branches:
  refs/heads/feature/GEODE-17 d28bdfc29 -> 3bf38a030


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache8_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache8_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache8_0.dtd
index a318d13..96610d3 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache8_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache8_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
index 29d2945..8413364 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-config.xml
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <config xmlns="urn:org:jgroups"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
index e8440bc..ff5a8e1 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/jgroups-mcast.xml
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <config xmlns="urn:org:jgroups"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/jgroups.xsd">

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/management/internal/cli/commands/support/gfmon.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/management/internal/cli/commands/support/gfmon.html b/gemfire-core/src/main/resources/com/gemstone/gemfire/management/internal/cli/commands/support/gfmon.html
index 535be82..9e12b0f 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/management/internal/cli/commands/support/gfmon.html
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/management/internal/cli/commands/support/gfmon.html
@@ -1,11 +1,19 @@
 <!--
-  ~ Copyright (c) 2002-2012 VMware, Inc. All Rights Reserved.
-  ~ This product is protected by U.S. and international copyright
-  ~ and intellectual property laws. VMware products are covered by
-  ~ more patents listed at http://www.vmware.com/go/patents.
-  ~ All Rights Reserved.
-  -->
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
 <html>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/statisticsType.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/statisticsType.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/statisticsType.dtd
index e4eed51..4b7fe36 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/statisticsType.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/statisticsType.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
-
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for defining StatisticsType and StatistDescriptor instances.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/test/resources/templates/security/authz5_5.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/templates/security/authz5_5.dtd b/gemfire-core/src/test/resources/templates/security/authz5_5.dtd
index ddaa828..81a8150 100644
--- a/gemfire-core/src/test/resources/templates/security/authz5_5.dtd
+++ b/gemfire-core/src/test/resources/templates/security/authz5_5.dtd
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
 
 This is the XML DTD for the GemFire sample XML based authorization callback
 in templates.security.XmlAuthorization.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/test/resources/templates/security/authz6_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/templates/security/authz6_0.dtd b/gemfire-core/src/test/resources/templates/security/authz6_0.dtd
index 34b34a7..06cceff 100755
--- a/gemfire-core/src/test/resources/templates/security/authz6_0.dtd
+++ b/gemfire-core/src/test/resources/templates/security/authz6_0.dtd
@@ -1,5 +1,21 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
+<!--
 
 This is the XML DTD for the GemFire sample XML based authorization callback
 in templates.security.XmlAuthorization.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-lucene/src/main/resources/META-INF/schemas/geode.incubator.apache.org/lucene/lucene-1.0.xsd
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/main/resources/META-INF/schemas/geode.incubator.apache.org/lucene/lucene-1.0.xsd b/gemfire-lucene/src/main/resources/META-INF/schemas/geode.incubator.apache.org/lucene/lucene-1.0.xsd
index 88df552..b1eae03 100644
--- a/gemfire-lucene/src/main/resources/META-INF/schemas/geode.incubator.apache.org/lucene/lucene-1.0.xsd
+++ b/gemfire-lucene/src/main/resources/META-INF/schemas/geode.incubator.apache.org/lucene/lucene-1.0.xsd
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <xsd:schema
     targetNamespace="http://geode.incubator.apache.org/schema/lucene"
     xmlns:gpdb="http://geode.incubator.apache.org/schema/lucene"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml
----------------------------------------------------------------------
diff --git a/gemfire-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml b/gemfire-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml
index 997ad8e..e96acb0 100644
--- a/gemfire-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml
+++ b/gemfire-web-api/src/main/webapp/WEB-INF/gemfire-api-servlet.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:mvc="http://www.springframework.org/schema/mvc"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-web-api/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/gemfire-web-api/src/main/webapp/WEB-INF/web.xml b/gemfire-web-api/src/main/webapp/WEB-INF/web.xml
index 554ef4b..ad354f1 100644
--- a/gemfire-web-api/src/main/webapp/WEB-INF/web.xml
+++ b/gemfire-web-api/src/main/webapp/WEB-INF/web.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-web/src/main/webapp/WEB-INF/gemfire-servlet.xml
----------------------------------------------------------------------
diff --git a/gemfire-web/src/main/webapp/WEB-INF/gemfire-servlet.xml b/gemfire-web/src/main/webapp/WEB-INF/gemfire-servlet.xml
index ae8ec6b..eb1a533 100644
--- a/gemfire-web/src/main/webapp/WEB-INF/gemfire-servlet.xml
+++ b/gemfire-web/src/main/webapp/WEB-INF/gemfire-servlet.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:context="http://www.springframework.org/schema/context"
        xmlns:mvc="http://www.springframework.org/schema/mvc"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-web/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/gemfire-web/src/main/webapp/WEB-INF/web.xml b/gemfire-web/src/main/webapp/WEB-INF/web.xml
index fb6bee3..24180b9 100644
--- a/gemfire-web/src/main/webapp/WEB-INF/web.xml
+++ b/gemfire-web/src/main/webapp/WEB-INF/web.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"


[35/50] [abbrv] incubator-geode git commit: GEODE-611: Clean up distribution directives

Posted by je...@apache.org.
GEODE-611: Clean up distribution directives

Removes the exclude for the findbugs annotation jar which is
no longer a dependency.


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

Branch: refs/heads/feature/GEODE-17
Commit: bff59d1548d71dae61897b72a01ece02a3f3a2b1
Parents: 4d6df30
Author: Anthony Baker <ab...@pivotal.io>
Authored: Tue Dec 1 07:50:40 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Tue Dec 1 11:38:16 2015 -0800

----------------------------------------------------------------------
 gemfire-assembly/build.gradle | 2 --
 1 file changed, 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bff59d15/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index e097b65..8de6d4e 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -173,8 +173,6 @@ distributions {
       }
       
       into ('lib') {
-        exclude 'annotation*.jar'
-
         from project(":gemfire-common").configurations.runtime
         from project(":gemfire-common").configurations.archives.allArtifacts.files
 


[33/50] [abbrv] incubator-geode git commit: GEODE-606: Add some logging to war file detection

Posted by je...@apache.org.
GEODE-606: Add some logging to war file detection


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

Branch: refs/heads/feature/GEODE-17
Commit: 5a9fdb8ac6dfde9d1822a429ce94f6af05353a86
Parents: 38dd3ed
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Nov 25 14:53:08 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Tue Dec 1 09:54:09 2015 -0800

----------------------------------------------------------------------
 .../gemfire/management/internal/AgentUtil.java  | 56 ++++++++++----------
 1 file changed, 29 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/5a9fdb8a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
index e5b88ad..bb160ea 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/AgentUtil.java
@@ -38,8 +38,6 @@ public class AgentUtil {
   private static final String LIB_WEB_API_WAR = "/lib/gemfire-web-api-";
   private static final String TOOLS_WEB_WAR = "/tools/Extensions/gemfire-web-";
   private static final String LIB_WEB_WAR = "/lib/gemfire-web-";
-  private static final String TOOLS_API_WAR = "/tools/Extensions/gemfire-api-";
-  private static final String LIB_API_WAR = "/lib/gemfire-api-";
   private static final String TOOLS_PULSE_WAR = "/tools/Pulse/pulse.war";
   private static final String LIB_PULSE_WAR = "/lib/pulse.war";
   public static final String ERROR_VARIABLE_NOT_SET = "The GEMFIRE environment variable must be set!";
@@ -53,13 +51,18 @@ public class AgentUtil {
   public String getGemFireWebApiWarLocation() {
     String gemfireHome = getGemFireHome();
     assert !StringUtils.isBlank(gemfireHome) : ERROR_VARIABLE_NOT_SET;
-    logger.warn(gemfireHome + TOOLS_WEB_API_WAR + gemfireVersion + ".war");
 
-    if (new File(gemfireHome + TOOLS_WEB_API_WAR + gemfireVersion + ".war").isFile()) {
-      return gemfireHome + TOOLS_WEB_API_WAR + gemfireVersion + ".war";
-    } else if (new File(gemfireHome + LIB_WEB_API_WAR + gemfireVersion + ".war").isFile()) {
-      return gemfireHome + LIB_WEB_API_WAR + gemfireVersion + ".war";
+    String toolsWebApiWar = gemfireHome + TOOLS_WEB_API_WAR + gemfireVersion + ".war";
+    String libWebApiWar = gemfireHome + LIB_WEB_API_WAR + gemfireVersion + ".war";
+
+    if (new File(toolsWebApiWar).isFile()) {
+      logger.info("GemFire Dev REST API war: {}", toolsWebApiWar);
+      return toolsWebApiWar;
+    } else if (new File(libWebApiWar).isFile()) {
+      logger.info("GemFire Dev REST API war: {}", libWebApiWar);
+      return libWebApiWar;
     } else {
+      logger.warn("GemFire Dev REST API war not found - neither {} or {} exist", toolsWebApiWar, libWebApiWar);
       return null;
     }
   }
@@ -74,24 +77,17 @@ public class AgentUtil {
     String gemfireHome = getGemFireHome();
     assert !StringUtils.isBlank(gemfireHome) : ERROR_VARIABLE_NOT_SET;
 
-    if (new File(gemfireHome + TOOLS_WEB_WAR + gemfireVersion + ".war").isFile()) {
-      return gemfireHome + TOOLS_WEB_WAR + gemfireVersion + ".war";
-    } else if (new File(gemfireHome + LIB_WEB_WAR + gemfireVersion + ".war").isFile()) {
-      return gemfireHome + LIB_WEB_WAR + gemfireVersion + ".war";
-    } else {
-      return null;
-    }
-  }
-
-  public String getGemfireApiWarLocation() {
-    String gemfireHome = getGemFireHome();
-    assert !StringUtils.isBlank(gemfireHome) :ERROR_VARIABLE_NOT_SET;
+    String toolsWebWar = gemfireHome + TOOLS_WEB_WAR + gemfireVersion + ".war";
+    String libWebWar = gemfireHome + LIB_WEB_WAR + gemfireVersion + ".war";
 
-    if (new File(gemfireHome + TOOLS_API_WAR + gemfireVersion + ".war").isFile()) {
-      return gemfireHome + TOOLS_API_WAR + gemfireVersion + ".war";
-    } else if (new File(gemfireHome + LIB_API_WAR + gemfireVersion + ".war").isFile()) {
-      return gemfireHome + LIB_API_WAR + gemfireVersion + ".war";
+    if (new File(toolsWebWar).isFile()) {
+      logger.info("GemFire Admin REST war: {}", toolsWebWar);
+      return toolsWebWar;
+    } else if (new File(libWebWar).isFile()) {
+      logger.info("GemFire Admin REST war: {}", libWebWar);
+      return libWebWar;
     } else {
+      logger.warn("GemFire Admin REST war not found - neither {} or {} exist", toolsWebWar, libWebWar);
       return null;
     }
   }
@@ -104,11 +100,17 @@ public class AgentUtil {
     String gemfireHome = getGemFireHome();
     assert !StringUtils.isBlank(gemfireHome) : ERROR_VARIABLE_NOT_SET;
 
-    if (new File(gemfireHome + TOOLS_PULSE_WAR).isFile()) {
-      return gemfireHome + TOOLS_PULSE_WAR;
-    } else if (new File(gemfireHome + LIB_PULSE_WAR).isFile()) {
-      return gemfireHome + LIB_PULSE_WAR;
+    String toolsPulseWar = gemfireHome + TOOLS_PULSE_WAR;
+    String libPulseWar = gemfireHome + LIB_PULSE_WAR;
+
+    if (new File(toolsPulseWar).isFile()) {
+      logger.info("GemFire Pulse war: {}", toolsPulseWar);
+      return toolsPulseWar;
+    } else if (new File(libPulseWar).isFile()) {
+      logger.info("GemFire Pulse war: {}", libPulseWar);
+      return libPulseWar;
     } else {
+      logger.warn("GemFire Pulse war not found - neither {} or {} exist", toolsPulseWar, libPulseWar);
       return null;
     }
   }


[34/50] [abbrv] incubator-geode git commit: GEODE-611: Change findbugs annotations to use ASL library

Posted by je...@apache.org.
GEODE-611: Change findbugs annotations to use ASL library

Swtich the findbugs annotation dependency to use an ASL version
from https://github.com/stephenc/findbugs-annotations.  This
library only supports the SuppressWarning annotation, not
SuppressFBWarning so some source files were updated.


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

Branch: refs/heads/feature/GEODE-17
Commit: 4d6df30af1d4d6be997eb4b46fb57790c197c6de
Parents: 5a9fdb8
Author: Anthony Baker <ab...@pivotal.io>
Authored: Sun Nov 29 08:17:42 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Tue Dec 1 11:38:16 2015 -0800

----------------------------------------------------------------------
 build.gradle                                    |  1 +
 gemfire-core/build.gradle                       |  1 -
 .../com/gemstone/gemfire/SystemFailure.java     |  4 +--
 .../gemfire/admin/jmx/internal/AgentImpl.java   | 15 +++++------
 .../internal/GemFireHealthConfigJmxImpl.java    | 14 +++++-----
 .../cache/query/internal/CompiledOperation.java |  4 +--
 .../gemfire/internal/StatArchiveWriter.java     | 28 +++++++++-----------
 .../internal/cache/AbstractUpdateOperation.java |  4 +--
 .../internal/cache/TXStateProxyImpl.java        |  4 +--
 .../cache/tier/sockets/AcceptorImpl.java        |  4 +--
 .../cache/tier/sockets/BaseCommand.java         | 18 +------------
 .../tier/sockets/ClientProxyMembershipID.java   |  5 +---
 .../cache/versions/RegionVersionVector.java     |  6 ++---
 .../internal/datasource/AbstractPoolCache.java  |  4 +--
 .../internal/memcached/commands/GetCommand.java |  7 +----
 .../internal/statistics/SampleCollector.java    |  4 +--
 .../gemfire/internal/util/DebuggerSupport.java  |  4 +--
 .../gemfire/internal/util/SingletonValue.java   |  6 ++---
 .../CustomEntryConcurrentHashMap.java           |  8 ++----
 gradle/dependency-versions.properties           |  1 +
 20 files changed, 46 insertions(+), 96 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/build.gradle
----------------------------------------------------------------------
diff --git a/build.gradle b/build.gradle
index 991488b..b5465b8 100755
--- a/build.gradle
+++ b/build.gradle
@@ -304,6 +304,7 @@ subprojects {
     compile 'org.springframework:spring-expression:' + project.'springframework.version'
     compile 'org.springframework:spring-web:' + project.'springframework.version'
     compile 'org.springframework:spring-webmvc:' + project.'springframework.version'
+    compile 'com.github.stephenc.findbugs:findbugs-annotations:' + project.'stephenc-findbugs.version'
 
     testCompile 'com.jayway.awaitility:awaitility:' + project.'awaitility.version'
     testCompile 'com.github.stefanbirkner:system-rules:' + project.'system-rules.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-core/build.gradle b/gemfire-core/build.gradle
index 8e45a97..dd3b765 100755
--- a/gemfire-core/build.gradle
+++ b/gemfire-core/build.gradle
@@ -19,7 +19,6 @@ dependencies {
   compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version'
   compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version'
   compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version'
-  compile 'com.google.code.findbugs:annotations:' + project.'annotations.version'
   provided 'com.google.guava:guava:' + project.'guava.version'
   compile 'commons-io:commons-io:' + project.'commons-io.version'
   compile 'commons-lang:commons-lang:' + project.'commons-lang.version'

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/SystemFailure.java b/gemfire-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
index b37f257..494f5f7 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/SystemFailure.java
@@ -24,8 +24,6 @@ import com.gemstone.gemfire.internal.admin.remote.RemoteGfManagerAgent;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * Catches and responds to JVM failure
  * <p>
@@ -190,7 +188,7 @@ import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
  * @author jpenney
  * @since 5.1
  */
-@SuppressFBWarnings(value="DM_GC", justification="This class performs System.gc as last ditch effort during out-of-memory condition.") 
+@edu.umd.cs.findbugs.annotations.SuppressWarnings(value="DM_GC", justification="This class performs System.gc as last ditch effort during out-of-memory condition.") 
 public final class SystemFailure {
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/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 2acea99..4d1ad41 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
@@ -44,6 +44,8 @@ import javax.management.remote.JMXServiceURL;
 import javax.management.remote.rmi.RMIConnectorServer;
 import javax.rmi.ssl.SslRMIClientSocketFactory;
 
+import mx4j.tools.adaptor.http.HttpAdaptor;
+
 import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.GemFireException;
@@ -56,6 +58,7 @@ import com.gemstone.gemfire.admin.jmx.Agent;
 import com.gemstone.gemfire.admin.jmx.AgentConfig;
 import com.gemstone.gemfire.admin.jmx.AgentFactory;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.i18n.StringId;
 import com.gemstone.gemfire.internal.Banner;
 import com.gemstone.gemfire.internal.GemFireVersion;
 import com.gemstone.gemfire.internal.admin.remote.TailLogResponse;
@@ -70,10 +73,6 @@ 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.gemfire.i18n.StringId;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import mx4j.tools.adaptor.http.HttpAdaptor;
 
 /**
  * The GemFire JMX Agent provides the ability to administrate one GemFire
@@ -406,7 +405,7 @@ implements com.gemstone.gemfire.admin.jmx.Agent,
    *
    * @return the object name of the system that the Agent is now connected to
    */
-  @SuppressFBWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="This is only a style warning.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="This is only a style warning.") 
   public ObjectName connectToSystem()
   throws AdminException, MalformedObjectNameException {
     synchronized(CONN_SYNC) {
@@ -454,7 +453,7 @@ implements com.gemstone.gemfire.admin.jmx.Agent,
   /**
    * Disconnects from the current DistributedSystem (if connected to one).
    */
-  @SuppressFBWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="This is only a style warning.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="This is only a style warning.") 
   public void disconnectFromSystem() {
     synchronized(CONN_SYNC) {
       try {
@@ -878,7 +877,7 @@ implements com.gemstone.gemfire.admin.jmx.Agent,
   /**
    * Creates a LogWriterI18n for this Agent to use in logging.
    */
-  @SuppressFBWarnings(value="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification="Return value for file delete is not important here.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification="Return value for file delete is not important here.") 
   private void initLogWriter() throws com.gemstone.gemfire.admin.AdminException {
     final LogConfig logConfig = this.agentConfig.createLogConfig();
     
@@ -1570,7 +1569,7 @@ class ConnectionNotificationAdapter implements NotificationListener {
    *          the listener. The MBean object should not use or modify the
    *          object. (NOTE: copied from javax.management.NotificationListener)
    */
-  @SuppressFBWarnings(value="BC_UNCONFIRMED_CAST", justification="Only JMXConnectionNotification instances are used.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="BC_UNCONFIRMED_CAST", justification="Only JMXConnectionNotification instances are used.") 
   public void handleNotification(Notification notification, Object handback) {
     if (handback instanceof AgentImpl) {
       AgentImpl agent = (AgentImpl) handback;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/GemFireHealthConfigJmxImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
index a55a616..c05d4b8 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/GemFireHealthConfigJmxImpl.java
@@ -16,13 +16,13 @@
  */
 package com.gemstone.gemfire.admin.jmx.internal;
 
-import com.gemstone.gemfire.admin.*;
-import com.gemstone.gemfire.admin.internal.*;
+import javax.management.ObjectName;
+import javax.management.modelmbean.ModelMBean;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
-import javax.management.*;
-import javax.management.modelmbean.*;
+import com.gemstone.gemfire.admin.AdminException;
+import com.gemstone.gemfire.admin.GemFireHealth;
+import com.gemstone.gemfire.admin.GemFireHealthConfig;
+import com.gemstone.gemfire.admin.internal.GemFireHealthConfigImpl;
 
 /**
  * The JMX "managed resource" that represents the configuration for
@@ -46,7 +46,7 @@ import javax.management.modelmbean.*;
  *
  * @since 3.5
  */
-@SuppressFBWarnings(justification="This class is deprecated. Also, any further changes so close to the release is inadvisable.") 
+@edu.umd.cs.findbugs.annotations.SuppressWarnings(justification="This class is deprecated. Also, any further changes so close to the release is inadvisable.") 
 public class GemFireHealthConfigJmxImpl
   implements GemFireHealthConfig, ManagedResource, java.io.Serializable {
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledOperation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledOperation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledOperation.java
index 957f0fe..d9f0d6c 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledOperation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/CompiledOperation.java
@@ -41,8 +41,6 @@ import com.gemstone.gemfire.pdx.PdxSerializationException;
 import com.gemstone.gemfire.pdx.internal.PdxInstanceImpl;
 import com.gemstone.gemfire.pdx.internal.PdxString;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * Class Description
  *
@@ -223,7 +221,7 @@ public class CompiledOperation extends AbstractCompiledValue {
     return context.addDependencies(this, rcvr.computeDependencies(context));
   }
  
-  @SuppressFBWarnings(value="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED", justification="Does not matter if the methodDispatch that isn't stored in the map is used") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED", justification="Does not matter if the methodDispatch that isn't stored in the map is used") 
   private Object eval0(Object receiver, Class resolutionType, ExecutionContext context)
   throws TypeMismatchException, FunctionDomainException, NameResolutionException,
           QueryInvocationTargetException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
index c2bf3bd..562cce3 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/StatArchiveWriter.java
@@ -16,19 +16,6 @@
  */
 package com.gemstone.gemfire.internal;
 
-import com.gemstone.gemfire.GemFireIOException;
-import com.gemstone.gemfire.InternalGemFireException;
-import com.gemstone.gemfire.StatisticDescriptor;
-import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.statistics.ResourceInstance;
-import com.gemstone.gemfire.internal.statistics.ResourceType;
-import com.gemstone.gemfire.internal.statistics.SampleHandler;
-import com.gemstone.gemfire.internal.statistics.StatArchiveDescriptor;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 import java.io.BufferedOutputStream;
 import java.io.DataInput;
 import java.io.DataOutput;
@@ -49,6 +36,17 @@ import java.util.zip.GZIPOutputStream;
 
 import org.apache.logging.log4j.Logger;
 
+import com.gemstone.gemfire.GemFireIOException;
+import com.gemstone.gemfire.InternalGemFireException;
+import com.gemstone.gemfire.StatisticDescriptor;
+import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import com.gemstone.gemfire.internal.statistics.ResourceInstance;
+import com.gemstone.gemfire.internal.statistics.ResourceType;
+import com.gemstone.gemfire.internal.statistics.SampleHandler;
+import com.gemstone.gemfire.internal.statistics.StatArchiveDescriptor;
+
 /**
  * StatArchiveWriter provides APIs to write statistic snapshots to an archive
  * file.
@@ -168,7 +166,7 @@ public class StatArchiveWriter implements StatArchiveFormat, SampleHandler {
     }
   }
   
-  @SuppressFBWarnings(value="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification="Best effort attempt to delete a GFS file without any samples.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE", justification="Best effort attempt to delete a GFS file without any samples.") 
   private static void deleteFileIfPossible(File file) {
     file.delete();
   }
@@ -288,7 +286,7 @@ public class StatArchiveWriter implements StatArchiveFormat, SampleHandler {
     }
   }
   
-  @SuppressFBWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="This is only for debugging and there is never more than one instance being traced because there is only one stat sampler.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="This is only for debugging and there is never more than one instance being traced because there is only one stat sampler.") 
   public void allocatedResourceInstance(ResourceInstance statResource) {
     if (logger.isTraceEnabled(LogMarker.STATISTICS)) {
       logger.trace(LogMarker.STATISTICS, "StatArchiveWriter#allocatedResourceInstance statResource={}", statResource);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractUpdateOperation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractUpdateOperation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractUpdateOperation.java
index b94ce8b..3ac006b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractUpdateOperation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractUpdateOperation.java
@@ -45,8 +45,6 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 import com.gemstone.gemfire.internal.util.DelayedAction;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * Common code for both UpdateOperation and DistributedPutAllOperation.
  *
@@ -57,7 +55,7 @@ public abstract class AbstractUpdateOperation extends DistributedCacheOperation
   
   public static volatile boolean test_InvalidVersion;
   
-  @SuppressFBWarnings(value="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD",
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="UWF_UNWRITTEN_PUBLIC_OR_PROTECTED_FIELD",
       justification="test hook that is unset normally")
   public static volatile DelayedAction test_InvalidVersionAction;
   

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateProxyImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateProxyImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateProxyImpl.java
index 533a1f0..fda1a3a 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateProxyImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/TXStateProxyImpl.java
@@ -50,8 +50,6 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * @author mthomas
  *
@@ -570,7 +568,7 @@ public class TXStateProxyImpl implements TXStateProxy {
   /* (non-Javadoc)
    * @see com.gemstone.gemfire.internal.cache.InternalDataView#entryCount(com.gemstone.gemfire.internal.cache.LocalRegion)
    */
-  @SuppressFBWarnings(value="UL_UNRELEASED_LOCK", justification="This method unlocks and then conditionally undoes the unlock in the finally-block. Review again at later time.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="UL_UNRELEASED_LOCK", justification="This method unlocks and then conditionally undoes the unlock in the finally-block. Review again at later time.") 
   public int entryCount(LocalRegion localRegion) {
     // if size is the first operation in the transaction, then reset the txState
     boolean resetTXState = this.realDeal == null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
index c30102f..89c073f 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/AcceptorImpl.java
@@ -92,8 +92,6 @@ import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.tcp.ConnectionTable;
 import com.gemstone.gemfire.internal.util.ArrayUtils;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * Implements the acceptor thread on the bridge server. Accepts connections from
  * the edge and starts up threads to process requests from these.
@@ -1610,7 +1608,7 @@ public class AcceptorImpl extends Acceptor implements Runnable
   }
 
   @Override
-  @SuppressFBWarnings(value="REC_CATCH_EXCEPTION", justification="Allow this thread to die")
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="REC_CATCH_EXCEPTION", justification="Allow this thread to die")
   public void close() {
     if (!isRunning()) {
       return;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
index 1e6b8d8..52ea6f5 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/BaseCommand.java
@@ -47,25 +47,12 @@ import com.gemstone.gemfire.cache.CacheWriterException;
 import com.gemstone.gemfire.cache.InterestResultPolicy;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.cache.RegionDestroyedException;
-import com.gemstone.gemfire.cache.TransactionDataNodeHasDepartedException;
-import com.gemstone.gemfire.cache.TransactionDataRebalancedException;
 import com.gemstone.gemfire.cache.TransactionException;
-import com.gemstone.gemfire.cache.operations.QueryOperationContext;
 import com.gemstone.gemfire.cache.persistence.PartitionOfflineException;
-import com.gemstone.gemfire.cache.query.Query;
-import com.gemstone.gemfire.cache.query.QueryException;
-import com.gemstone.gemfire.cache.query.QueryInvalidException;
-import com.gemstone.gemfire.cache.query.SelectResults;
-import com.gemstone.gemfire.cache.query.Struct;
-import com.gemstone.gemfire.cache.query.internal.CqEntry;
-import com.gemstone.gemfire.cache.query.internal.DefaultQuery;
-import com.gemstone.gemfire.cache.query.internal.types.CollectionTypeImpl;
-import com.gemstone.gemfire.cache.query.internal.types.StructTypeImpl;
 import com.gemstone.gemfire.cache.query.types.CollectionType;
 import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
 import com.gemstone.gemfire.distributed.internal.DistributionStats;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.CachedDeserializable;
@@ -92,12 +79,9 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
-import com.gemstone.gemfire.internal.security.AuthorizeRequestPP;
 import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
 import com.gemstone.gemfire.security.GemFireSecurityException;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * @author ashahid
  *
@@ -1162,7 +1146,7 @@ public abstract class BaseCommand implements Command {
    * Handles both RR and PR cases
    */
   @SuppressWarnings("rawtypes")
-  @SuppressFBWarnings(value="NP_NULL_PARAM_DEREF", justification="Null value handled in sendNewRegisterInterestResponseChunk()")
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="NP_NULL_PARAM_DEREF", justification="Null value handled in sendNewRegisterInterestResponseChunk()")
   private static void handleKVSingleton(LocalRegion region, Object entryKey,
       boolean serializeValues, ServerConnection servConn)
       throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
index 4e7a179..daa07f4 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/ClientProxyMembershipID.java
@@ -39,15 +39,12 @@ import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedM
 import com.gemstone.gemfire.internal.Assert;
 import com.gemstone.gemfire.internal.DataSerializableFixedID;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.VersionedDataInputStream;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * This class represents a ConnectionProxy of the CacheClient
  * 
@@ -484,7 +481,7 @@ public final class ClientProxyMembershipID
   /**
    * call this when the distributed system ID has been modified
    */
-  @SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification = "Only applicable in client DS and in that case too multiple instances do not modify it at the same time.")
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification = "Only applicable in client DS and in that case too multiple instances do not modify it at the same time.")
   public void updateID(DistributedMember idm) {
 //    this.transientPort = ((InternalDistributedMember)this.memberId).getPort();
 //    if (this.transientPort == 0) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
index 1416b62..61423d1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/versions/RegionVersionVector.java
@@ -52,8 +52,6 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * RegionVersionVector tracks the highest region-level version number of
  * operations applied to a region for each member that has the region.<p>
@@ -296,7 +294,7 @@ public abstract class RegionVersionVector<T extends VersionSource<?>> implements
     // this could block for a while if a limit has been set on the waiting-thread-pool
     dm.getWaitingThreadPool().execute(
       new Runnable() {
-      @SuppressFBWarnings(value={"UL_UNRELEASED_LOCK","IMSE_DONT_CATCH_IMSE"})
+      @edu.umd.cs.findbugs.annotations.SuppressWarnings(value={"UL_UNRELEASED_LOCK","IMSE_DONT_CATCH_IMSE"})
       public void run() {
         boolean haveLock = false;
         synchronized(clearLockSync) {
@@ -667,7 +665,7 @@ public abstract class RegionVersionVector<T extends VersionSource<?>> implements
    * each oplog we recover.
    * @param latestOplog 
    */
-  @SuppressFBWarnings(value="ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD",
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="ML_SYNC_ON_FIELD_TO_GUARD_CHANGING_THAT_FIELD",
       justification="sync on localExceptions guards concurrent modification but this is a replacement")
   public void initRecoveredVersion(T member, RegionVersionHolder<T> v, boolean latestOplog) {
     RegionVersionHolder<T> recovered = v.clone();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCache.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCache.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCache.java
index a42cd6f..b615327 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCache.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/datasource/AbstractPoolCache.java
@@ -36,8 +36,6 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * AbstractPoolCache implements the ConnectionPoolCache interface. This is base
  * class for the all connection pools. The class also implements the
@@ -88,7 +86,7 @@ public abstract class AbstractPoolCache implements ConnectionPoolCache,
    *          configuration for the pool.
    * @throws PoolException
    */
-  @SuppressFBWarnings(value="SC_START_IN_CTOR",
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="SC_START_IN_CTOR",
       justification="the thread started is a cleanup thread and is not active until there is a timeout tx")
   public AbstractPoolCache(EventListener eventListner,
       ConfiguredDataSourceProperties configs) throws PoolException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/memcached/commands/GetCommand.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/memcached/commands/GetCommand.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/memcached/commands/GetCommand.java
index da1ef53..8fd0847 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/memcached/commands/GetCommand.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/memcached/commands/GetCommand.java
@@ -18,8 +18,6 @@ package com.gemstone.gemfire.internal.memcached.commands;
 
 import java.nio.ByteBuffer;
 import java.nio.CharBuffer;
-import java.nio.charset.CharacterCodingException;
-import java.util.Arrays;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
@@ -28,7 +26,6 @@ import java.util.Set;
 
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.memcached.Command;
 import com.gemstone.gemfire.internal.memcached.KeyWrapper;
 import com.gemstone.gemfire.internal.memcached.Reply;
 import com.gemstone.gemfire.internal.memcached.RequestReader;
@@ -36,8 +33,6 @@ import com.gemstone.gemfire.internal.memcached.ResponseStatus;
 import com.gemstone.gemfire.internal.memcached.ValueWrapper;
 import com.gemstone.gemfire.memcached.GemFireMemcachedServer.Protocol;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * 
  * The retrieval commands "get" and "gets" operates like this:<br/>
@@ -167,7 +162,7 @@ public class GetCommand extends AbstractCommand {
     return composeReply(results, isGets);
   }
 
-  @SuppressFBWarnings(value = "NP_NULL_PARAM_DEREF",
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "NP_NULL_PARAM_DEREF",
       justification = "findbugs complains that v is null while putting into buffer, but it is not")
   private ByteBuffer composeReply(Map<Object, ValueWrapper> results, boolean isGets) {
     Iterator<Entry<Object, ValueWrapper>> it = results.entrySet().iterator();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/SampleCollector.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/SampleCollector.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/SampleCollector.java
index ee00ff2..9b40e95 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/SampleCollector.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/SampleCollector.java
@@ -37,8 +37,6 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * Captures sample of statistics. The SampleCollector contains maps of 
  * StatisticsTypes to ResourceTypes and Statistics instances to 
@@ -148,7 +146,7 @@ public class SampleCollector {
    * @param config defines the configuration for the StatArchiveHandler
    * @param nanosTimeStamp the nanos time stamp to initialize stat archiver with
    */
-  @SuppressFBWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="There is never more than one SampleCollector instance.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD", justification="There is never more than one SampleCollector instance.") 
   public void initialize(StatArchiveHandlerConfig config, long nanosTimeStamp) {
     synchronized (SampleCollector.class) {
       instance = this;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/DebuggerSupport.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/DebuggerSupport.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/DebuggerSupport.java
index a5f8343..49ce32e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/DebuggerSupport.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/DebuggerSupport.java
@@ -20,8 +20,6 @@ package com.gemstone.gemfire.internal.util;
 import com.gemstone.gemfire.i18n.LogWriterI18n;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  *
  * @author Eric Zoerner
@@ -38,7 +36,7 @@ public abstract class DebuggerSupport  {
     waitForJavaDebugger(logger, null);
   }
   
-  @SuppressFBWarnings(value="IL_INFINITE_LOOP", justification="Endless loop is for debugging purposes.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="IL_INFINITE_LOOP", justification="Endless loop is for debugging purposes.") 
   public static void waitForJavaDebugger(LogWriterI18n logger, String extraLogMsg) {
     boolean cont = false;
     String msg = ":";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/SingletonValue.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/SingletonValue.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/SingletonValue.java
index c04e467..5f902b6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/SingletonValue.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/SingletonValue.java
@@ -22,8 +22,6 @@ import java.io.InterruptedIOException;
 import java.util.concurrent.locks.Condition;
 import java.util.concurrent.locks.ReentrantLock;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * A builder that caches the singleton value. 
  * 
@@ -205,7 +203,7 @@ public class SingletonValue<T extends Closeable> {
     }
   }
   
-  @SuppressFBWarnings(
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(
       value="UL_UNRELEASED_LOCK", 
       justification="findbugs is wrong and Darrel agrees")
   public T get() throws IOException {
@@ -263,7 +261,7 @@ public class SingletonValue<T extends Closeable> {
     }
   }
   
-  @SuppressFBWarnings(
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(
       value="UL_UNRELEASED_LOCK", 
       justification="findbugs is wrong and Darrel agrees")
   private T acquireValue() throws IOException {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap.java
index ad38724..75dc330 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/concurrent/CustomEntryConcurrentHashMap.java
@@ -51,7 +51,6 @@ package com.gemstone.gemfire.internal.util.concurrent;
 
 import java.io.IOException;
 import java.io.Serializable;
-import java.lang.reflect.Array;
 import java.util.AbstractCollection;
 import java.util.AbstractMap;
 import java.util.AbstractSet;
@@ -59,7 +58,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.Enumeration;
-import java.util.HashSet;
 import java.util.IdentityHashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -78,8 +76,6 @@ import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
 import com.gemstone.gemfire.internal.size.SingleObjectSizer;
 import com.gemstone.gemfire.internal.util.ArrayUtils;
 
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-
 /**
  * A hash table supporting full concurrency of retrievals and adjustable
  * expected concurrency for updates. This class obeys the same functional
@@ -1436,7 +1432,7 @@ RETRYLOOP:
    * @return the number of key-value mappings in this map
    */
   @Override
-  @SuppressFBWarnings(value="UL_UNRELEASED_LOCK", justification="The lock() calls are followed by unlock() calls without finally-block. Leaving this as is because it's lifted from JDK code and we want to minimize changes.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="UL_UNRELEASED_LOCK", justification="The lock() calls are followed by unlock() calls without finally-block. Leaving this as is because it's lifted from JDK code and we want to minimize changes.") 
   public final int size() {
     final Segment<K, V>[] segments = this.segments;
     long sum = 0;
@@ -1536,7 +1532,7 @@ RETRYLOOP:
    *           if the specified value is null
    */
   @Override
-  @SuppressFBWarnings(value="UL_UNRELEASED_LOCK", justification="Leaving this as is because it's lifted from JDK code and we want to minimize changes.") 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(value="UL_UNRELEASED_LOCK", justification="Leaving this as is because it's lifted from JDK code and we want to minimize changes.") 
   public final boolean containsValue(final Object value) {
     if (value == null) {
       throw new NullPointerException();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4d6df30a/gradle/dependency-versions.properties
----------------------------------------------------------------------
diff --git a/gradle/dependency-versions.properties b/gradle/dependency-versions.properties
index 4c3c16e..3e6b6a5 100644
--- a/gradle/dependency-versions.properties
+++ b/gradle/dependency-versions.properties
@@ -58,6 +58,7 @@ spring-data-gemfire.version = 1.5.1.RELEASE
 spring-hateos.version = 0.16.0.RELEASE
 spring-shell.version = 1.0.0.RELEASE
 springframework.version = 3.2.12.RELEASE
+stephenc-findbugs.version = 1.3.9-1
 spymemcached.version = 2.9.0
 swagger.version = 1.3.2
 swagger-springmvc.version = 0.8.2



[38/50] [abbrv] incubator-geode git commit: added null check

Posted by je...@apache.org.
added null check


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

Branch: refs/heads/feature/GEODE-17
Commit: dce479e4c54ff3f355158ee911ae4dae90857827
Parents: 2258d74
Author: Hitesh Khamesra <hk...@pivotal.io>
Authored: Tue Dec 1 10:30:25 2015 -0800
Committer: Hitesh Khamesra <hk...@pivotal.io>
Committed: Tue Dec 1 16:50:35 2015 -0800

----------------------------------------------------------------------
 .../internal/membership/gms/messenger/JGroupsMessenger.java        | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dce479e4/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 3a00f62..4e68b63 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -404,7 +404,7 @@ public class JGroupsMessenger implements Messenger {
     logger.info("processing JGroups IOException: " + e.getMessage());
     NetView v = this.view;
     JGAddress jgMbr = (JGAddress)dest;
-    if (v != null) {
+    if (jgMbr != null && v != null) {
       List<InternalDistributedMember> members = v.getMembers();
       InternalDistributedMember recipient = null;
       for (InternalDistributedMember mbr: members) {


[48/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-17

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
index 4a35015,f6edb9b..5a552c7
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/i18n/LocalizedStrings.java
@@@ -34,1471 -42,1470 +42,1471 @@@ import com.gemstone.gemfire.i18n.String
   *
   */
  public class LocalizedStrings extends ParentLocalizedStrings {
-   public static final StringId DataSerializer_NO_INSTANTIATOR_HAS_BEEN_REGISTERED_FOR_CLASS_WITH_ID_0 = new StringIdImpl(3413, "No Instantiator has been registered for class with id  {0}");
-   public static final StringId DataSerializer_COULD_NOT_INSTANTIATE_AN_INSTANCE_OF_0 = new StringIdImpl(3414, "Could not instantiate an instance of  {0}");
-   public static final StringId DataSerializer_WHILE_INSTANTIATING_AN_INSTANCE_OF_0 = new StringIdImpl(3415, "While instantiating an instance of  {0}");
-   public static final StringId Instantiator_CANNOT_REGISTER_A_NULL_CLASS = new StringIdImpl(3416, "Cannot register a null class.");
-   public static final StringId AdminDistributedSystemImpl_WHILE_WAITING_FOR_FUTURE = new StringIdImpl(3417, "While waiting for Future");
-   public static final StringId AdminDistributedSystemImpl_THIS_ADMINDISTRIBUTEDSYSTEM_IS_ALREADY_CONNECTED = new StringIdImpl(3418, "This AdminDistributedSystem is already connected.");
-   public static final StringId AdminDistributedSystemImpl_ONLY_ONE_ADMINDISTRIBUTEDSYSTEM_CONNECTION_CAN_BE_MADE_AT_ONCE = new StringIdImpl(3419, "Only one AdminDistributedSystem connection can be made at once.");
-   public static final StringId AdminDistributedSystemImpl_AN_ADMINEXCEPTION_WAS_THROWN_WHILE_GETTING_THE_GEMFIRE_HEALTH = new StringIdImpl(3420, "An AdminException was thrown while getting the GemFire health.");
-   public static final StringId DistributedSystemConfigImpl_ENTITY_CONFIGURATION_XML_FILE_0_DOES_NOT_EXIST = new StringIdImpl(3421, "Entity configuration XML file \"{0}\" does not exist");
-   public static final StringId ManagedEntityConfigXml_PUBLIC_ID_0_SYSTEM_ID_1 = new StringIdImpl(3422, "Public Id: \"{0}\" System Id: \"{1}\"");
-   public static final StringId ManagedEntityConfigXmlGenerator_AN_ADMINEXCEPTION_WAS_THROWN_WHILE_GENERATING_XML = new StringIdImpl(3423, "An AdminException was thrown while generating XML.");
-   public static final StringId ManagedEntityConfigXmlParser_WHILE_PARSING_XML = new StringIdImpl(3424, "While parsing XML");
-   public static final StringId ManagedEntityConfigXmlParser_MALFORMED_INTEGER_0 = new StringIdImpl(3425, "Malformed integer \"{0}\"");
-   public static final StringId SystemMemberBridgeServerImpl_UNEXPECTED_EXCEPTION_WHILE_REFRESHING = new StringIdImpl(3426, "Unexpected exception while refreshing");
-   public static final StringId AgentImpl_WHILE_CREATING_OBJECTNAME_0 = new StringIdImpl(3427, "While creating ObjectName:  {0}");
-   public static final StringId AgentImpl_COULD_NOT_OPEN_LOG_FILE_0 = new StringIdImpl(3428, "Could not open log file \"{0}\"");
-   public static final StringId GemFireHealthJmxImpl_WHILE_GETTING_THE_DISTRIBUTEDSYSTEMHEALTHCONFIG = new StringIdImpl(3429, "While getting the DistributedSystemHealthConfig");
-   public static final StringId GemFireHealthJmxImpl_WHILE_GETTING_THE_GEMFIREHEALTHCONFIG = new StringIdImpl(3430, "While getting the GemFireHealthConfig");
-   public static final StringId AbstractDistributionConfig_INVALID_LOCATOR_0_THE_PORT_1_WAS_NOT_GREATER_THAN_ZERO_AND_LESS_THAN_65536 = new StringIdImpl(3431, "Invalid locator \"{0}\". The port {1} was not greater than zero and less than 65,536.");
-   public static final StringId DistributionManager_INTERRUPTED_WHILE_WAITING_FOR_FIRST_STARTUPRESPONSEMESSAGE = new StringIdImpl(3432, "Interrupted while waiting for first StartupResponseMessage");
-   public static final StringId DistributionManager_RECEIVED_NO_CONNECTION_ACKNOWLEDGMENTS_FROM_ANY_OF_THE_0_SENIOR_CACHE_MEMBERS_1 = new StringIdImpl(3433, "Received no connection acknowledgments from any of the  {0}  senior cache members:  {1}");
-   public static final StringId MessageFactory_AN_INSTANTIATIONEXCEPTION_WAS_THROWN_WHILE_INSTANTIATING_A_0 = new StringIdImpl(3434, "An InstantiationException was thrown while instantiating a  {0}");
-   public static final StringId MessageFactory_COULD_NOT_ACCESS_ZEROARG_CONSTRUCTOR_OF_0 = new StringIdImpl(3435, "Could not access zero-arg constructor of  {0}");
-   public static final StringId JGroupMembershipManager_AN_IOEXCEPTION_WAS_THROWN_WHILE_OPENING_0 = new StringIdImpl(3436, "An IOException was thrown while opening \"{0}\"");
-   public static final StringId JGroupMembershipManager_AN_EXCEPTION_WAS_THROWN_WHILE_READING_JGROUPS_CONFIG = new StringIdImpl(3437, "An Exception was thrown while reading JGroups config.");
-   public static final StringId JGroupMembershipManager_AN_EXCEPTION_WAS_THROWN_WHILE_CONNECTING_TO_JGROUPS = new StringIdImpl(3438, "An Exception was thrown while connecting to Jgroups.");
-   public static final StringId InternalInstantiator_CANNOT_UNREGISTER_A_NULL_CLASS = new StringIdImpl(3439, "Cannot unregister a null class");
-   public static final StringId StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_AN_INT = new StringIdImpl(3440, "The statistic  {0}  with id  {1}  is of type  {2}  and it was expected to be an int.");
-   public static final StringId StatisticDescriptorImpl_THE_STATISTIC_0_WITH_ID_1_IS_OF_TYPE_2_AND_IT_WAS_EXPECTED_TO_BE_A_DOUBLE = new StringIdImpl(3441, "The statistic  {0}  with id  {1}  is of type  {2}  and it was expected to be a double.");
-   public static final StringId StatisticsTypeXml_SAX_ERROR_WHILE_WORKING_WITH_XML = new StringIdImpl(3442, "SAX error while working with XML");
-   public static final StringId StatisticsTypeXml_SAX_FATAL_ERROR_WHILE_WORKING_WITH_XML = new StringIdImpl(3443, "SAX fatal error while working with XML");
-   public static final StringId AdminRequest_A_REPLYEXCEPTION_WAS_THROWN_WHILE_WAITING_FOR_A_REPLY = new StringIdImpl(3444, "A ReplyException was thrown while waiting for a reply.");
-   public static final StringId AdminWaiters_ADMINISTRATION_REQUEST_0_SENT_TO_1_TIMED_OUT_AFTER_2_SECONDS = new StringIdImpl(3445, "Administration request  {0}  sent to  {1}  timed out after  {2}  seconds.");
-   public static final StringId RemoteAlert_INVALIDATE_TIMESTAMP_0 = new StringIdImpl(3446, "Invalidate timestamp:  {0}");
-   public static final StringId RemoteGemFireVM_AN_EXCEPTION_WAS_THROWN_WHILE_CREATING_VM_ROOT_REGION_0 = new StringIdImpl(3447, "An Exception was thrown while creating VM root region \"{0}\"");
-   public static final StringId RemoteGemFireVM_WHILE_CREATING_SUBREGION_0_OF_1 = new StringIdImpl(3448, "While creating subregion \"{0}\" of \"{1}\"");
-   public static final StringId RemoteGfManagerAgent_AN_EXCEPUTIONEXCEPTION_WAS_THROWN_WHILE_WAITING_FOR_FUTURE = new StringIdImpl(3449, "An ExceputionException was thrown while waiting for Future.");
-   public static final StringId AbstractLRURegionMap_INCREMENT_TO_LRU_DELTA_WITHOUT_USE_OF_PRIOR_VALUE_PUT_AND_REPLACE_CALLS_MUST_BE_FOLLOWED_BY_A_CALL_TO_LRUUPDATECALLBACK_DELTA_IS_0 = new StringIdImpl(3450, "Increment to lru delta without use of prior value, put and replace calls must be followed by a call to lruUpdateCallback. (delta is  {0} ).");
-   public static final StringId BucketAdvisor_CANNOT_CHANGE_FROM_0_TO_1_FOR_BUCKET_2 = new StringIdImpl(3451, "Cannot change from  {0}  to  {1}  for bucket  {2}");
-   public static final StringId GatewayEventRemoteDispatcher_0_EXCEPTION_DURING_PROCESSING_BATCH_1_ON_CONNECTION_2 = new StringIdImpl(3452, "{0} : Exception during processing batch  {1}  on connection  {2}");
-   public static final StringId GemFireCache_COULD_NOT_CONVERT_XML_FILE_0_TO_AN_URL = new StringIdImpl(3453, "Could not convert XML file \"{0}\" to an URL.");
-   public static final StringId GemFireCache_WHILE_OPENING_CACHE_XML_0_THE_FOLLOWING_ERROR_OCCURRED_1 = new StringIdImpl(3454, "While opening Cache XML \"{0}\" the following error occurred \"{1}\"");
-   public static final StringId Oplog_TRIED_TO_SEEK_TO_0_BUT_THE_FILE_LENGTH_IS_1_OPLOG_FILE_OBJECT_USED_FOR_READING_2 = new StringIdImpl(3455, "Tried to seek to {0}, but the file length is {1}. Oplog File object used for reading={2}");
-   public static final StringId PartitionedRegion_ATTEMPT_TO_ACQUIRE_PRIMARY_NODE_FOR_WRITE_ON_BUCKET_0_TIMED_OUT_IN_1_MS_CURRENT_REDUNDANCY_2_DOES_NOT_SATISFY_MINIMUM_3 = new StringIdImpl(3456, "Attempt to acquire primary node for write on bucket  {0}  timed out in  {1}  ms. Current redundancy [ {2} ] does not satisfy minimum [ {3} ]");
-   public static final StringId PartitionedRegion_ATTEMPT_TO_ACQUIRE_PRIMARY_NODE_FOR_READ_ON_BUCKET_0_TIMED_OUT_IN_1_MS_CURRENT_REDUNDANCY_2_DOES_NOT_SATISFY_MINIMUM_3 = new StringIdImpl(3457, "Attempt to acquire primary node for read on bucket  {0}  timed out in  {1}  ms. Current redundancy [ {2} ] does not satisfy minimum [ {3} ]");
-   public static final StringId PartitionedRegion_ATTEMPT_TO_ACQUIRE_PRIMARY_NODE_FOR_READ_ON_BUCKET_0_TIMED_OUT_IN_1_MS = new StringIdImpl(3458, "Attempt to acquire primary node for read on bucket  {0}  timed out in  {1}  ms");
- 
-   public static final StringId RegionAttributesCreation_CONCURRENCYCHECKSENABLED_IS_NOT_THE_SAME = new StringIdImpl(3459, "ConcurrencyChecksEnabled is not the same");
-   public static final StringId RegionAttributesCreation_ENABLE_OFF_HEAP_MEMORY_IS_NOT_THE_SAME = new StringIdImpl(3460, "EnableOffHeapMemory is not the same");
- 
-   public static final StringId ProxyRegionMap_NO_ENTRY_SUPPORT_ON_REGIONS_WITH_DATAPOLICY_0 = new StringIdImpl(3461, "No entry support on regions with DataPolicy  {0}");
-   public static final StringId SearchLoadAndWriteProcessor_WHILE_INVOKING_A_REMOTE_NETLOAD_0 = new StringIdImpl(3462, "While invoking a remote netLoad:  {0}");
-   public static final StringId SearchLoadAndWriteProcessor_WHILE_INVOKING_A_REMOTE_NETWRITE_0 = new StringIdImpl(3463, "While invoking a remote netWrite:  {0}");
-   public static final StringId SearchLoadAndWriteProcessor_TIMED_OUT_WHILE_DOING_NETSEARCHNETLOADNETWRITE_PROCESSORID_0_KEY_IS_1 = new StringIdImpl(3464, "Timed out while doing netsearch/netload/netwrite processorId= {0}  Key is  {1}");
-   public static final StringId SearchLoadAndWriteProcessor_TIMEOUT_DURING_NETSEARCHNETLOADNETWRITE_DETAILS_0 = new StringIdImpl(3465, "Timeout during netsearch/netload/netwrite. Details:  {0}");
-   public static final StringId TXCommitMessage_THESE_REGIONS_EXPERIENCED_RELIABILITY_FAILURE_DURING_DISTRIBUTION_OF_THE_OPERATION_0 = new StringIdImpl(3466, "These regions experienced reliability failure during distribution of the operation:  {0}");
-   public static final StringId TXCommitMessage_COMMIT_OPERATION_GENERATED_ONE_OR_MORE_EXCEPTIONS_FROM_0 = new StringIdImpl(3467, "Commit operation generated one or more exceptions from  {0}");
-   public static final StringId BucketSizeMessage_BUCKETSIZERESPONSE_GOT_REMOTE_CACHECLOSEDEXCEPTION_FORCING_REATTEMPT = new StringIdImpl(3468, "BucketSizeResponse got remote CacheClosedException; forcing reattempt.");
-   public static final StringId BucketSizeMessage_BUCKETSIZERESPONSE_GOT_REMOTE_REGION_DESTROYED_FORCING_REATTEMPT = new StringIdImpl(3469, "BucketSizeResponse got remote Region destroyed; forcing reattempt.");
-   public static final StringId ContainsKeyValueMessage_CONTAINSKEYVALUERESPONSE_GOT_REMOTE_CACHEEXCEPTION_FORCING_REATTEMPT = new StringIdImpl(3470, "ContainsKeyValueResponse got remote CacheException; forcing reattempt.");
-   public static final StringId DumpB2NRegion_B2NRESPONSE_GOT_REMOTE_CACHEEXCEPTION_THROWING_FORCEREATTEMPTEXCEPTION = new StringIdImpl(3471, "B2NResponse got remote CacheException, throwing ForceReattemptException.");
-   public static final StringId FetchEntriesMessage_FETCHKEYSRESPONSE_GOT_REMOTE_CANCELLATION_FORCING_REATTEMPT = new StringIdImpl(3472, "FetchKeysResponse got remote cancellation; forcing reattempt.");
-   public static final StringId FetchEntryMessage_FETCHENTRYRESPONSE_GOT_REMOTE_CACHEEXCEPTION_FORCING_REATTEMPT = new StringIdImpl(3473, "FetchEntryResponse got remote CacheException; forcing reattempt.");
-   public static final StringId FetchKeysMessage_FETCHKEYSRESPONSE_GOT_REMOTE_CACHECLOSEDEXCEPTION_FORCING_REATTEMPT = new StringIdImpl(3474, "FetchKeysResponse got remote CacheClosedException; forcing reattempt.");
-   public static final StringId GetMessage_UNABLE_TO_DESERIALIZE_VALUE_IOEXCEPTION = new StringIdImpl(3475, "Unable to deserialize value (IOException)");
-   public static final StringId GetMessage_UNABLE_TO_DESERIALIZE_VALUE_CLASSNOTFOUNDEXCEPTION = new StringIdImpl(3476, "Unable to deserialize value (ClassNotFoundException)");
-   public static final StringId RemoteOperationMessage_0_COULD_NOT_FIND_REGION_1 = new StringIdImpl(3477, "{0} : could not find region {1}");
-   public static final StringId ManageBucketMessage_NODERESPONSE_GOT_REMOTE_CANCELLATION_THROWING_PARTITIONEDREGIONCOMMUNICATION_EXCEPTION = new StringIdImpl(3478, "NodeResponse got remote cancellation, throwing PartitionedRegionCommunication Exception.");
-   public static final StringId ManageBucketMessage_NODERESPONSE_GOT_LOCAL_DESTROY_ON_THE_PARTITIONREGION_THROWING_FORCEREATTEMPTEXCEPTION = new StringIdImpl(3479, "NodeResponse got local destroy on the PartitionRegion , throwing ForceReattemptException.");
-   public static final StringId PartitionMessage_PARTITIONRESPONSE_GOT_REMOTE_CACHECLOSEDEXCEPTION = new StringIdImpl(3480, "PartitionResponse got remote CacheClosedException");
-   public static final StringId PrimaryRequestMessage_NODERESPONSE_GOT_REMOTE_CACHECLOSEDEXCEPTION_THROWING_PARTITIONEDREGIONCOMMUNICATION_EXCEPTION = new StringIdImpl(3481, "NodeResponse got remote CacheClosedException, throwing PartitionedRegionCommunication Exception.");
-   public static final StringId ConnectionImpl_INVALID_PING_REPLY_WITH_EXPECTED_TRANSACTION_0_AND_ACTUAL_TRANSACTION_1 = new StringIdImpl(3482, "Invalid ping reply with expected transaction  {0}  and actual transaction  {1}");
-   public static final StringId ConnectionImpl_EXCEPTION_DURING_PING_WITH_TRANSACTION_0_DUE_TO_THE_FOLLOWING_SERVER_EXCEPTION = new StringIdImpl(3483, "Exception during ping with transaction  {0}  due to the following server exception:");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_GET = new StringIdImpl(3484, "{0} : While performing a remote get.");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_PUT = new StringIdImpl(3485, "{0} : While performing a remote put.");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_DESTROY = new StringIdImpl(3486, "{0} : While performing a remote destroy.");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_DESTROY_REGION = new StringIdImpl(3487, "{0} : While performing a remote destroy region.");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_CLEAR_REGION = new StringIdImpl(3488, "{0} : While performing a remote clear region");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_CREATE_REGION = new StringIdImpl(3489, "{0} : While performing a remote create region");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_UNREGISTERINTEREST = new StringIdImpl(3490, "{0} : While performing a remote unregisterInterest");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_CONTAINSKEY = new StringIdImpl(3491, "{0} : While performing a remote containsKey");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_PROCESSBATCH = new StringIdImpl(3492, "{0} : While performing a remote processBatch");
-   public static final StringId ConnectionImpl_EXCEPTION_OCCURED_ON_SERVER_ERROR_0 = new StringIdImpl(3493, "Exception occurred on Server. Error : {0}.");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_REGISTERINTEREST = new StringIdImpl(3494, "{0} : While performing a remote registerInterest");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_REGISTERINTEREST_1 = new StringIdImpl(3495, "{0} : While performing a remote registerInterest:  {1}");
-   public static final StringId LicenseInfo_EVAL_NAG = new StringIdImpl(3496, "NOTICE: use of GemFire with this license key is only permitted in a non-production environment and for the period, if any, limited by the license key.  Notwithstanding any other provision in the EULA, this Evaluation License of GemFire is provided AS-IS without support or warranty of any kind, expressed or implied.");
-   public static final StringId ConnectionImpl_0_WHILE_DESERIALIZING_QUERY_RESULT = new StringIdImpl(3497, "{0} : While deserializing query result");
-   public static final StringId TombstoneService_UNEXPECTED_EXCEPTION = new StringIdImpl(3498, "GemFire garbage collection service encountered an unexpected exception");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_KEYSET_1 = new StringIdImpl(3499, "{0} : While performing a remote keySet {1}");
-   public static final StringId ConnectionImpl_0_WHILE_PERFORMING_A_REMOTE_KEYSET = new StringIdImpl(3500, "{0} : While performing a remote keySet");
-   public static final StringId ConnectionImpl_0_WHILE_MAKE_PRIMARY = new StringIdImpl(3501, "{0} : While make primary");
-   public static final StringId ConnectionImpl_CONNECTION_0_WHILE_SENDING_PERIODIC_ACK = new StringIdImpl(3502, "Connection ( {0} ): While sending periodic ack");
-   public static final StringId Oplog_FAILED_READING_FROM_0_OPLOG_DETAILS_1_2_3_4_5_6 = new StringIdImpl(3503, "Failed reading from \"{0}\". \n oplogID = {1}\n Offset being read={2} Current Oplog Size={3}  Actual File Size ={4} IS ASYNCH MODE ={5} IS ASYNCH WRITER ALIVE={6}");
-   public static final StringId EndpointImpl_0_CAN_NOT_REGISTER_INTEREST_IN_REGION_1_KEY_2_BECAUSE_THE_SERVER_IS_NOT_AVAILABLE = new StringIdImpl(3504, "{0} : Can not register interest in region  {1}  key  {2}  because the server is not available.");
-   public static final StringId EndpointImpl_0_CAN_NOT_REGISTER_INSTANTIATORS_1_BECAUSE_THE_SERVER_IS_NOT_AVAILABLE = new StringIdImpl(3505, "{0} : Can not register instantiators   {1}  because the server is not available.");
-   public static final StringId EndpointImpl_0_CANNOT_UNREGISTER_INTEREST_IN_REGION_1_KEY_2_BECAUSE_THE_SERVER_IS_NOT_AVAILABLE = new StringIdImpl(3506, "{0} : Cannot unregister interest in region  {1}  key  {2}  because the server is not available.");
-   public static final StringId EndpointImpl_0_CAN_NOT_NOTIFY_SERVER_THAT_THIS_CLIENT_IS_READY_BECAUSE_THE_SERVER_IS_NOT_AVAILABLE = new StringIdImpl(3507, "{0} : Can not notify server that this client is ready because the server is not available.");
-   public static final StringId CacheCreation_WHILE_STARTING_BRIDGE_SERVER_0 = new StringIdImpl(3508, "While starting bridge server  {0}");
-   public static final StringId CacheCreation_WHILE_STARTING_GATEWAY_HUB_0 = new StringIdImpl(3509, "While starting gateway hub  {0}");
-   public static final StringId CacheXml_ERROR_WHILE_PARSING_XML = new StringIdImpl(3510, "Error while parsing XML");
-   public static final StringId CacheXml_FATAL_ERROR_WHILE_PARSING_XML = new StringIdImpl(3511, "Fatal error while parsing XML");
-   public static final StringId CacheXmlParser_WHILE_PARSING_XML = new StringIdImpl(3512, "While parsing XML");
-   public static final StringId CacheXmlParser_MALFORMED_INTEGER_0 = new StringIdImpl(3513, "Malformed integer \"{0}\"");
-   public static final StringId CacheXmlParser_MALFORMED_FLOAT_0 = new StringIdImpl(3514, "Malformed float \"{0}\"");
-   public static final StringId CacheXmlParser_COULD_NOT_CREATE_GATEWAY_WITH_ID_0 = new StringIdImpl(3515, "Could not create gateway with id  {0}");
-   public static final StringId CacheXmlParser_COULD_NOT_ADD_ENDPOINT_WITH_ID_0 = new StringIdImpl(3516, "Could not add endpoint with id  {0}");
-   public static final StringId CacheXmlParser_COULD_NOT_LOAD_KEYCONSTRAINT_CLASS_0 = new StringIdImpl(3517, "Could not load key-constraint class:  {0}");
-   public static final StringId CacheXmlParser_COULD_NOT_LOAD_VALUECONSTRAINT_CLASS_0 = new StringIdImpl(3518, "Could not load value-constraint class:  {0}");
-   public static final StringId CacheXmlParser_WHILE_INSTANTIATING_A_0 = new StringIdImpl(3519, "While instantiating a  {0}");
-   public static final StringId RegionCreation_GETTING_ENTRIES_RECURSIVELY_IS_NOT_SUPPORTED = new StringIdImpl(3520, "Getting entries recursively is not supported.");
-   public static final StringId AbstractPoolCache_ABSTRACTPOOLEDCACHEGETPOOLEDCONNECTIONFROMPOOLINTERRUPTEDEXCEPTION_IN_WAITING_THREAD = new StringIdImpl(3521, "AbstractPooledCache::getPooledConnectionFromPool:InterruptedException in waiting thread");
-   public static final StringId ConnectionPoolCacheImpl_CONNECTIONPOOLCACHEIMPLGENEWCONNECTION_EXCEPTION_IN_CREATING_NEW_POOLEDCONNECTION = new StringIdImpl(3522, "ConnectionPoolCacheImpl::getNewConnection: Exception in creating new PooledConnection");
-   public static final StringId ConnectionPoolCacheImpl_CONNECTIONPOOLCACHEIMPLGENEWCONNECTION_CONNECTIONPOOLCACHE_NOT_INTIALIZED_WITH_CONNECTIONPOOLDATASOURCE = new StringIdImpl(3523, "ConnectionPoolCacheImpl::getNewConnection: ConnectionPoolCache not initialized with ConnectionPoolDatasource");
-   public static final StringId FacetsJCAConnectionManagerImpl_FACETSJCACONNECTIONMANAGERIMPL_ALLOCATECONNECTION_IN_GETTING_CONNECTION_FROM_POOL_DUE_TO_0 = new StringIdImpl(3524, "FacetsJCAConnectionManagerImpl:: allocateConnection : in getting connection from pool due to  {0}");
-   public static final StringId FacetsJCAConnectionManagerImpl_FACETSJCACONNECTIONMANAGERIMPL_ALLOCATECONNECTION_SYSTEM_EXCEPTION_DUE_TO_0 = new StringIdImpl(3525, "FacetsJCAConnectionManagerImpl:: allocateConnection :system exception due to  {0}");
-   //public static final StringId GemFireBasicDataSource_GEMFIREBASICDATASOURCEGETCONNECTIONEXCEPTION_WHILE_TRYING_TO_LOAD_THE_DRIVER_DUE_TO_0 = new StringIdImpl(3526, "GemFireBasicDataSource::getConnection:Exception while trying to load the driver due to  {0}");
-   public static final StringId JCAConnectionManagerImpl_JCACONNECTIONMANAGERIMPL_ALLOCATECONNECTION_IN_GETTING_CONNECTION_FROM_POOL_DUE_TO_0 = new StringIdImpl(3527, "JCAConnectionManagerImpl:: allocateConnection : in getting connection from pool due to  {0}");
-   public static final StringId JCAConnectionManagerImpl_JCACONNECTIONMANAGERIMPL_ALLOCATECONNECTION_IN_TRANSACTION_DUE_TO_0 = new StringIdImpl(3528, "JCAConnectionManagerImpl:: allocateConnection : in transaction due to  {0}");
-   public static final StringId JCAConnectionManagerImpl_JCACONNECTIONMANAGERIMPL_ALLOCATECONNECTION_SYSTEM_EXCEPTION_DUE_TO_0 = new StringIdImpl(3529, "JCAConnectionManagerImpl:: allocateConnection :system exception due to  {0}");
-   public static final StringId ManagedPoolCacheImpl_MANAGEDPOOLCACHEIMPLGETNEWCONNECTION_EXCEPTION_IN_CREATING_NEW_MANAGED_POOLEDCONNECTION = new StringIdImpl(3530, "ManagedPoolCacheImpl::getNewConnection: Exception in creating new Managed PooledConnection");
-   public static final StringId TranxPoolCacheImpl_TRANXPOOLCACHEIMPLGETNEWCONNECTION_EXCEPTION_IN_CREATING_NEW_TRANSACTION_POOLEDCONNECTION = new StringIdImpl(3531, "TranxPoolCacheImpl::getNewConnection: Exception in creating new transaction PooledConnection");
-   public static final StringId TranxPoolCacheImpl_TRANXPOOLCACHEIMPLGETNEWCONNECTION_CONNECTIONPOOLCACHE_NOT_INTIALIZED_WITH_XADATASOURCE = new StringIdImpl(3532, "TranxPoolCacheImpl::getNewConnection: ConnectionPoolCache not intialized with XADatasource");
-   public static final StringId ObjectXmlExporter_A_TRANFSFORMEREXCEPTION_WAS_THROWN_WHILE_GENERATING_XML_FOR_A_0 = new StringIdImpl(3533, "A TranfsformerException was thrown while generating XML for a  {0}");
-   public static final StringId ObjectXmlExporter_AN_EXCEPTION_WAS_THROWN_WHILE_ACCESSING_FIELD_0_IN_CLASS_1 = new StringIdImpl(3534, "An Exception was thrown while accessing field  {0}  in class  {1}");
-   public static final StringId ObjectXmlImporter_AN_IOEXCEPTION_WAS_THROWN_WHILE_PARSING_XML = new StringIdImpl(3535, "An IOException was thrown while parsing XML.");
-   public static final StringId ObjectXmlImporter_A_PARSERCONFIGURATIONEXCEPTION_WAS_THROWN_WHILE_PARSING_XML = new StringIdImpl(3536, "A ParserConfigurationException was thrown While parsing XML.");
-   public static final StringId ObjectXmlImporter_A_SAXEXCEPTION_WAS_THROWN_WHILE_PARSING_XML = new StringIdImpl(3537, "A SAXException was thrown While parsing XML.");
-   public static final StringId ObjectXmlImporter_COULD_NOT_LOAD_CLASS_0 = new StringIdImpl(3538, "Could not load class  {0}");
-   public static final StringId ObjectXmlImporter_AN_EXCEPTION_WAS_THROWN_WHILE_INSTANTIATING_0 = new StringIdImpl(3539, "An Exception was thrown while instantiating  {0}");
-   public static final StringId ObjectXmlImporter_AN_EXCEPTION_WAS_THROWN_WHILE_LOCATING_FIELD_0_IN_CLASS_1 = new StringIdImpl(3540, "An Exception was thrown while locating field  {0}  in class  {1}");
-   public static final StringId ObjectXmlImporter_A_CLASSNOTFOUNDEXCEPTION_AS_THROWN_WHILE_LOADING_ARRAY_ELEMENT_TYPE_0 = new StringIdImpl(3541, "A ClassNotFoundException was thrown while loading array element type:  {0}");
- 
-   public static final StringId DataSerializer_UNKNOWN_PRIMITIVE_TYPE_0 = new StringIdImpl(3542, "unknown primitive type:  {0}");
-   public static final StringId DataSerializer_UNEXPECTED_TYPECODE_0 = new StringIdImpl(3543, "unexpected typeCode:  {0}");
-   public static final StringId DataSerializer_CONFLICTING_NONPUBLIC_INTERFACE_CLASS_LOADERS = new StringIdImpl(3544, "Conflicting non-public interface class loaders");
-   public static final StringId SystemFailure_0_MEMORY_HAS_REMAINED_CHRONICALLY_BELOW_1_BYTES_OUT_OF_A_MAXIMUM_OF_2_FOR_3_SEC = new StringIdImpl(3545, "{0} : memory has remained chronically below  {1}  bytes (out of a maximum of  {2} ) for  {3}  sec.");
-   public static final StringId SystemFailure_JVM_CORRUPTION_HAS_BEEN_DETECTED = new StringIdImpl(3546, "JVM corruption has been detected");
-   public static final StringId LonerDistributionManager_CANNOT_RESOLVE_LOCAL_HOST_NAME_TO_AN_IP_ADDRESS = new StringIdImpl(3547, "Cannot resolve local host name to an IP address");
-   public static final StringId AbstractDistributionConfig_UNEXPECTED_PROBLEM_GETTING_INETADDRESS_0 = new StringIdImpl(3548, "Unexpected problem getting inetAddress: {0}");
-   public static final StringId DistributionManager_UNKNOWN_MEMBER_TYPE_0 = new StringIdImpl(3549, "Unknown  member type:  {0}");
-   public static final StringId DistributionManager_UNKNOWN_PROCESSOR_TYPE = new StringIdImpl(3550, "unknown processor type {0}");
-   public static final StringId DLockRequestProcessor_UNKNOWN_RESPONSE_CODE_0 = new StringIdImpl(3551, "Unknown response code {0}");
-   public static final StringId StreamingOperation_THIS_SHOULDNT_HAPPEN = new StringIdImpl(3552, "this should not happen");
-   public static final StringId MemberAttributes_IOEXCEPTION_ON_A_BYTE_ARRAY_0 = new StringIdImpl(3553, "IOException on a byte array:  {0}");
-   public static final StringId MemberAttributes_CLASSNOTFOUNDEXCEPTION_IN_DESERIALIZATION_0 = new StringIdImpl(3554, "ClassNotFoundException in deserialization:  {0}");
-   public static final StringId JGroupMembershipManager_UNKNOWN_STARTUP_EVENT_0 = new StringIdImpl(3555, "unknown startup event:  {0}");
-   public static final StringId JGroupMember_ATTEMPT_TO_EXTERNALIZE_NULL_IP_ADDRESS = new StringIdImpl(3556, "attempt to externalize null ip address");
-   public static final StringId UpdateOperation_UNKNOWN_DESERIALIZATION_POLICY = new StringIdImpl(3557, "unknown deserialization policy");
-   public static final StringId UpdateOperation_UNKNOWN_DESERIALIZATION_POLICY_0 = new StringIdImpl(3558, "unknown deserialization policy:  {0}");
-   public static final StringId QueuedOperation_CACHEWRITER_SHOULD_NOT_BE_CALLED = new StringIdImpl(3559, "CacheWriter should not be called");
-   public static final StringId QueuedOperation_DISTRIBUTEDLOCK_SHOULD_NOT_BE_ACQUIRED = new StringIdImpl(3560, "DistributedLock should not be acquired");
-   public static final StringId InitialImageOperation_ALREADY_PROCESSED_LAST_CHUNK = new StringIdImpl(3561, "Already processed last chunk");
-   public static final StringId PartitionedRegionQueryEvaluator_UNABLE_TO_GET_NODE_FOR_BUCKET_ID_0 = new StringIdImpl(3562, "unable to get node for bucket id  {0}");
-   public static final StringId DiskEntry_WRITE_TO_DISK_SHOULD_NOT_HAVE_BEEN_INVOKED_IN_THE_ENTRY_INITIALIZATION_PHASE = new StringIdImpl(3563, "Write to disk should not have been invoked in the entry initialization phase");
-   public static final StringId DistributedCacheOperation_SHOULD_NEVER_BE_CALLED = new StringIdImpl(3564, "should never be called");
-   public static final StringId ExpiryTask_UNRECOGNIZED_EXPIRATION_ACTION_0 = new StringIdImpl(3565, "unrecognized expiration action:  {0}");
-   public static final StringId LocalRegion_UNEXPECTED_EXCEPTION = new StringIdImpl(3566, "unexpected exception");
-   public static final StringId LocalRegion_CACHE_WRITER_SHOULD_NOT_HAVE_BEEN_CALLED_FOR_LOCALDESTROY = new StringIdImpl(3567, "Cache Writer should not have been called for localDestroy");
-   public static final StringId LocalRegion_NO_DISTRIBUTED_LOCK_SHOULD_HAVE_BEEN_ATTEMPTED_FOR_LOCALDESTROY = new StringIdImpl(3568, "No distributed lock should have been attempted for localDestroy");
-   public static final StringId LocalRegion_CACHEWRITEREXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION = new StringIdImpl(3569, "CacheWriterException should not be thrown in localDestroyRegion");
-   public static final StringId LocalRegion_TIMEOUTEXCEPTION_SHOULD_NOT_BE_THROWN_IN_LOCALDESTROYREGION = new StringIdImpl(3570, "TimeoutException should not be thrown in localDestroyRegion");
-   public static final StringId LocalRegion_UNKNOWN_INTEREST_TYPE = new StringIdImpl(3571, "unknown interest type");
-   public static final StringId LocalRegion_NOT_YET_SUPPORTED = new StringIdImpl(3572, "not yet supported");
-   public static final StringId LocalRegion_GOT_REGIONEXISTSEXCEPTION_IN_REINITIALIZE_WHEN_HOLDING_DESTROY_LOCK = new StringIdImpl(3573, "Got RegionExistsException in reinitialize when holding destroy lock");
-   public static final StringId LocalRegion_UNEXPECTED_THREADINITLEVELREQUIREMENT = new StringIdImpl(3574, "Unexpected threadInitLevelRequirement");
-   public static final StringId LocalRegion_ENTRY_ALREADY_EXISTED_0 = new StringIdImpl(3575, "Entry already existed:  {0}");
-   public static final StringId LocalRegion_CACHE_WRITER_SHOULD_NOT_HAVE_BEEN_CALLED_FOR_EVICTDESTROY = new StringIdImpl(3576, "Cache Writer should not have been called for evictDestroy");
-   public static final StringId LocalRegion_NO_DISTRIBUTED_LOCK_SHOULD_HAVE_BEEN_ATTEMPTED_FOR_EVICTDESTROY = new StringIdImpl(3577, "No distributed lock should have been attempted for evictDestroy");
-   public static final StringId LocalRegion_ENTRYNOTFOUNDEXCEPTION_SHOULD_BE_MASKED_FOR_EVICTDESTROY = new StringIdImpl(3578, "EntryNotFoundException should be masked for evictDestroy");
-   public static final StringId LocalRegion_CACHEWRITEREXCEPTION_SHOULD_NOT_BE_THROWN_HERE = new StringIdImpl(3579, "CacheWriterException should not be thrown here");
-   public static final StringId LocalRegion_TIMEOUTEXCEPTION_SHOULD_NOT_BE_THROWN_HERE = new StringIdImpl(3580, "TimeoutException should not be thrown here");
-   public static final StringId GemFireCache_CACHE_SHOULD_NOT_BE_CLOSED_YET = new StringIdImpl(3581, "cache should not be closed yet");
-   public static final StringId GemFireCache_UNEXPECTED_EXCEPTION = new StringIdImpl(3582, "unexpected exception");
-   public static final StringId EntryEvents_MUST_NOT_SERIALIZE_0_IN_THIS_CONTEXT = new StringIdImpl(3583, "Must not serialize {0} in this context.");
-   public static final StringId DistributedRegion_IF_LOADING_A_SNAPSHOT_THEN_SHOULD_NOT_BE_RECOVERING_ISRECOVERING_0_SNAPSHOTSTREAM_1 = new StringIdImpl(3584, "if loading a snapshot, then should not be recovering; isRecovering= {0} ,snapshotStream= {1}");
-   public static final StringId AbstractUpdateOperation_CACHEWRITER_SHOULD_NOT_BE_CALLED = new StringIdImpl(3585, "CacheWriter should not be called");
-   public static final StringId AbstractUpdateOperation_DISTRIBUTEDLOCK_SHOULD_NOT_BE_ACQUIRED = new StringIdImpl(3586, "DistributedLock should not be acquired");
-   public static final StringId RegionEventImpl_CLONE_IS_SUPPORTED = new StringIdImpl(3587, "clone IS supported");
-   public static final StringId DestroyOperation_CACHEWRITER_SHOULD_NOT_BE_CALLED = new StringIdImpl(3588, "CacheWriter should not be called");
-   public static final StringId DestroyOperation_DISTRIBUTEDLOCK_SHOULD_NOT_BE_ACQUIRED = new StringIdImpl(3589, "DistributedLock should not be acquired");
-   public static final StringId StreamingPartitionOperation_UNEXPECTED_CONDITION = new StringIdImpl(3590, "unexpected condition");
-   public static final StringId PartitionMessage_SORRY_USE_OPERATEONPARTITIONEDREGION_FOR_PR_MESSAGES = new StringIdImpl(3591, "Sorry, use operateOnPartitionedRegion for PR messages");
-   public static final StringId FetchEntryMessage_FETCHENTRYMESSAGE_MESSAGE_SENT_TO_WRONG_MEMBER = new StringIdImpl(3592, "FetchEntryMessage message sent to wrong member");
-   public static final StringId GetMessage_GET_MESSAGE_SENT_TO_WRONG_MEMBER = new StringIdImpl(3593, "Get message sent to wrong member");
-   public static final StringId FetchEntriesMessage_ALREADY_PROCESSED_LAST_CHUNK = new StringIdImpl(3594, "Already processed last chunk");
-   public static final StringId FetchKeysMessage_ALREADY_PROCESSED_LAST_CHUNK = new StringIdImpl(3595, "Already processed last chunk");
-   public static final StringId CacheClientProxy_UNKNOWN_INTEREST_TYPE = new StringIdImpl(3596, "Unknown interest type");
-   public static final StringId CacheClientProxy_BAD_INTEREST_TYPE = new StringIdImpl(3597, "bad interest type");
-   public static final StringId InternalDistributedSystem_PROBLEM_IN_INITIALIZING_KEYS_FOR_CLIENT_AUTHENTICATION = new StringIdImpl(3598, "Problem in initializing keys for client authentication");
-   public static final StringId ConnectionImpl_UNKNOWN_MESSAGE_TYPE_0 = new StringIdImpl(3599, "Unknown message type {0}");
-   public static final StringId ConnectionProxyImpl_UNKNOWN_INTERESTTYPE = new StringIdImpl(3600, "Unknown interestType");
-   public static final StringId ConnectionProxyImpl_WEIRD_ENDPOINT_TYPE_0 = new StringIdImpl(3601, "Weird endpoint type  {0}");
-   public static final StringId BaseCommand_NOT_YET_SUPPORTED = new StringIdImpl(3602, "not yet supported");
-   public static final StringId BaseCommand_UNKNOWN_INTEREST_TYPE = new StringIdImpl(3603, "unknown interest type");
-   public static final StringId SystemAdmin_REGION_OPTION_HELP = new StringIdImpl(3604, "Used to specify what region an operation is to be done on.");
-   public static final StringId EntryNotFoundInRegion_THIS_CLASS_IS_DEPRECATED = new StringIdImpl(3605, "this class is deprecated");
-   public static final StringId DynamicRegionFactory_UNEXPECTED_EXCEPTION = new StringIdImpl(3606, "unexpected exception");
-   public static final StringId CqAttributesFactory_CLONENOTSUPPORTEDEXCEPTION_THROWN_IN_CLASS_THAT_IMPLEMENTS_CLONEABLE = new StringIdImpl(3607, "CloneNotSupportedException thrown in class that implements cloneable");
-   public static final StringId Support_ERROR_ASSERTION_FAILED_0 = new StringIdImpl(3608, "ERROR: Assertion failed: '' {0} ''");
-   public static final StringId TypeUtils_EXPECTED_INSTANCE_OF_0_BUT_WAS_1 = new StringIdImpl(3609, "expected instance of  {0}  but was  {1}");
-   public static final StringId SystemFailure_SINCE_THIS_IS_A_DEDICATED_CACHE_SERVER_AND_THE_JVM_HAS_BEEN_CORRUPTED_THIS_PROCESS_WILL_NOW_TERMINATE_PERMISSION_TO_CALL_SYSTEM_EXIT_INT_WAS_GIVEN_IN_THE_FOLLOWING_CONTEXT = new StringIdImpl(3610, "Since this is a dedicated cache server and the JVM has been corrupted, this process will now terminate. Permission to call System#exit(int) was given in the following context.");
-   public static final StringId GatewayImpl_0_DID_NOT_WAIT_FOR_FAILOVER_COMPLETION_DUE_TO_INTERRUPTION = new StringIdImpl(3611, "{0}: did not wait for failover completion due to interruption.");
-   public static final StringId GatewayImpl_0_AN_EXCEPTION_OCCURRED_WHILE_QUEUEING_1_TO_PERFORM_OPERATION_2_FOR_3 = new StringIdImpl(3612, "{0}: An Exception occurred while queueing {1} to perform operation {2} for {3}");
-   public static final StringId GatewayImpl_THE_EVENT_QUEUE_SIZE_HAS_DROPPED_BELOW_THE_THRESHOLD_0 = new StringIdImpl(3613, "The event queue size has dropped below {0} events.");
-   public static final StringId GatewayImpl_A_CACHECLOSEDEXCEPTION_OCCURRED_STOPPING_THE_DISPATCHER = new StringIdImpl(3614, "A CacheClosedException occurred. Stopping the dispatcher.");
-   public static final StringId GatewayImpl_GATEWAY_FAILOVER_INITIATED_PROCESSING_0_UNPROCESSED_EVENTS = new StringIdImpl(3615, "Gateway Failover Initiated: Processing {0} unprocessed events.");
-   public static final StringId GatewayImpl_A_BATCHEXCEPTION_OCCURRED_DURING_FAILOVER_PROCESSING_EVENT_0_THIS_MESSAGE_WILL_CONTINUE_TO_BE_PROCESSED = new StringIdImpl(3616, "A BatchException occurred during failover processing event {0}. This message will continue to be processed.");
-   public static final StringId GatewayImpl_STOPPING_THE_DISPATCHER_BECAUSE_THE_FOLLOWING_EXCEPTION_OCCURRED_WHILE_PROCESSING_A_BATCH = new StringIdImpl(3617, "Stopping the dispatcher because the following exception occurred while processing a batch:");
-   public static final StringId GatewayImpl_AN_EXCEPTION_OCCURRED_THE_DISPATCHER_WILL_CONTINUE = new StringIdImpl(3618, "An Exception occurred. The dispatcher will continue.");
-   public static final StringId GatewayImpl_0_THE_UNPROCESSED_EVENTS_MAP_ALREADY_CONTAINED_AN_EVENT_FROM_THE_HUB_1_SO_IGNORING_NEW_EVENT_2 = new StringIdImpl(3619, "{0}: The secondary map already contained an event from hub {1} so ignoring new event {2}.");
-   public static final StringId GatewayImpl_EVENT_FAILED_TO_BE_INITIALIZED_0 = new StringIdImpl(3620, "Event failed to be initialized: {0}");
-   public static final StringId GatewayImpl_STOPPING_THE_DISPATCHER_BECAUSE_THE_FOLLOWING_GATEWAY_EXCEPTION_OCCURRED = new StringIdImpl(3621, "Stopping the dispatcher because the following gateway exception occurred.");
-   public static final StringId GatewayImpl_0_THE_EVENT_QUEUE_SIZE_HAS_REACHED_THE_THRESHOLD_1 = new StringIdImpl(3622, "{0}: The event queue has reached {1} events. Processing will continue.");
-   public static final StringId GatewayImpl_AN_INTERRUPTEDEXCEPTION_OCCURRED_BUT_THE_DISPATCHER_IS_NOT_STOPPED = new StringIdImpl(3623, "An InterruptedException occurred, but the dispatcher is not stopped.");
-   public static final StringId GatewayImpl_AN_INTERRUPTEDEXCEPTION_OCCURRED_THE_THREAD_WILL_EXIT = new StringIdImpl(3624, "An InterruptedException occurred. The thread will exit.");
-   public static final StringId GatewayImpl_A_BATCHEXCEPTION_OCCURRED_PROCESSING_EVENT_0 = new StringIdImpl(3625, "A BatchException occurred processing event {0}.");
-   public static final StringId GatewayImpl_A_THREADINTERRUPTEDEXCEPTION_OCCURRED_STOPPING_THE_DISPATCHER = new StringIdImpl(3626, "A ThreadInterruptedException occurred. Stopping the dispatcher.");
-   public static final StringId GatewayImpl_THE_FOLLOWING_CACHEEXCEPTION_OCCURRED_WHILE_REMOVING_0_EVENTS = new StringIdImpl(3627, "The following CacheException occurred while removing {0} events.");
-   public static final StringId GatewayImpl_EVENT_DROPPED_DURING_FAILOVER_0 = new StringIdImpl(3628, "Event dropped during failover: {0}");
-   public static final StringId GatewayImpl_0_DISPATCHER_STILL_ALIVE_EVEN_AFTER_JOIN_OF_5_SECONDS = new StringIdImpl(3629, "{0}:Dispatcher still alive even after join of 5 seconds.");
-   public static final StringId GatewayImpl_0_INTERRUPTEDEXCEPTION_IN_JOINING_WITH_DISPATCHER_THREAD = new StringIdImpl(3630, "{0}:InterruptedException in joining with dispatcher thread.");
-   public static final StringId GatewayImpl_THE_EVENT_BEING_PROCESSED_WHEN_THE_BATCHEXCEPTION_OCCURRED_WAS_0 = new StringIdImpl(3631, "The event being processed when the BatchException occurred was: {0}");
-   public static final StringId AdminConfig_THIS_FILE_IS_GENERATED_BY_ADMINCONSOLE_EDIT_AS_YOU_WISH_BUT_IT_WILL_BE_OVERWRITTEN_IF_IT_IS_MODIFIED_IN_ADMINCONSOLE = new StringIdImpl(3632, "This file is generated by AdminConsole. Edit as you wish but it will be overwritten if it is modified in AdminConsole.");
-   public static final StringId AdminConfig_MODIFIED_0 = new StringIdImpl(3633, "Modified {0}");
-   public static final StringId DLockService_DISCONNECT_LISTENER_FOR_DISTRIBUTEDLOCKSERVICE = new StringIdImpl(3634, "Disconnect listener for DistributedLockService");
-   public static final StringId DLockService_DISTRIBUTED_LOCKING_THREADS = new StringIdImpl(3635, "Distributed Locking Threads");
-   // public static final StringId Oplog_BACKUP = new StringIdImpl(3636, "BACKUP");
-   // public static final StringId Oplog_OVERFLOW = new StringIdImpl(3637, "OVERFLOW");
-   public static final StringId DiskRegion_DISK_WRITERS = new StringIdImpl(3638, "Disk Writers");
-   public static final StringId DiskRegion_ASYNCHRONOUS_DISK_WRITER_0 = new StringIdImpl(3639, "Asynchronous disk writer for region {0}");
-   public static final StringId PartitionedRegion_SHUTDOWN_LISTENER_FOR_PARTITIONEDREGION = new StringIdImpl(3640, "Shutdown listener for PartitionedRegion");
-   public static final StringId ExecuteFunction_CANNOT_SPECIFY_0_FOR_ONREGIONS_FUNCTION = new StringIdImpl(3641, "Cannot specify {0} for multi region function");
-   public static final StringId PartitionedRegion_AN_EXCEPTION_WAS_CAUGHT_WHILE_REGISTERING_PARTITIONEDREGION_0_DUMPPRID_1 = new StringIdImpl(3642, "An exception was caught while registering PartitionedRegion \"{0}\". dumpPRId: {1}");
-   public static final StringId Connection_COULD_NOT_START_READER_THREAD = new StringIdImpl(3643, "could not start reader thread");
-   public static final StringId Connection_IDLE_CONNECTION_TIMED_OUT = new StringIdImpl(3644, "idle connection timed out");
-   public static final StringId Connection_UNKNOWN = new StringIdImpl(3645, "unknown");
-   public static final StringId Connection_HANDSHAKE_TIMED_OUT = new StringIdImpl(3646, "handshake timed out");
-   public static final StringId Connection_INTERRUPTED = new StringIdImpl(3647, "interrupted");
-   public static final StringId Connection_FAILED_HANDSHAKE = new StringIdImpl(3648, "failed handshake");
-   public static final StringId Connection_FAILED_CONSTRUCTION = new StringIdImpl(3649, "failed construction");
-   public static final StringId Connection_RUNNIOREADER_CAUGHT_CLOSED_CHANNEL = new StringIdImpl(3650, "runNioReader caught closed channel");
-   public static final StringId Connection_RUNNIOREADER_CAUGHT_SHUTDOWN = new StringIdImpl(3651, "runNioReader caught shutdown");
-   public static final StringId Connection_SOCKETCHANNEL_READ_RETURNED_EOF = new StringIdImpl(3652, "SocketChannel.read returned EOF");
-   public static final StringId Connection_THREADINTERRUPTED_IN_CHANNEL_READ_0 = new StringIdImpl(3653, "ThreadInterrupted in channel read: {0}");
-   public static final StringId Connection_CACHECLOSED_IN_CHANNEL_READ_0 = new StringIdImpl(3654, "CacheClosed in channel read: {0}");
-   public static final StringId Connection_IOEXCEPTION_IN_CHANNEL_READ_0 = new StringIdImpl(3655, "IOException in channel read: {0}");
-   public static final StringId Connection_P2P_MESSAGE_READER_FOR_0 = new StringIdImpl(3656, "P2P message reader for {0} on port {1}");
-   public static final StringId Connection_CLOSEDCHANNELEXCEPTION_IN_CHANNEL_READ_0 = new StringIdImpl(3657, "ClosedChannelException in channel read: {0}");
-   public static final StringId Connection_IOEXCEPTION_RECEIVED_0 = new StringIdImpl(3658, "IOException received: {0}");
-   public static final StringId Connection_STREAM_READ_RETURNED_NONPOSITIVE_LENGTH = new StringIdImpl(3659, "Stream read returned non-positive length");
-   public static final StringId Connection_CURRENT_THREAD_INTERRUPTED = new StringIdImpl(3660, "Current thread interrupted");
-   public static final StringId ExecuteFunction_RESULTS_NOT_COLLECTED_IN_TIME_PROVIDED = new StringIdImpl(3661, "All results not received in time provided");
-   public static final StringId Connection_NO_DISTRIBUTION_MANAGER = new StringIdImpl(3662, "no distribution manager");
-   public static final StringId Connection_COULD_NOT_SEND_FORCE_DISCONNECT = new StringIdImpl(3663, "Could not send force disconnect");
-   public static final StringId Connection_FORCE_DISCONNECT_TIMED_OUT = new StringIdImpl(3664, "Force disconnect timed out");
-   public static final StringId Connection_P2P_PUSHER_IO_EXCEPTION_FOR_0 = new StringIdImpl(3665, "P2P pusher io exception for {0}");
-   public static final StringId Connection_P2P_PUSHER_0_CAUGHT_CACHECLOSEDEXCEPTION_1 = new StringIdImpl(3666, "P2P pusher {0} caught CacheClosedException: {1}");
-   public static final StringId Connection_P2P_PUSHER_0_CAUGHT_INTERRUPT_1 = new StringIdImpl(3667, "P2P pusher {0} caught interrupt: {1}");
-   public static final StringId Connection_NONPOSITIVE_RETURN_FROM_CHANNEL_READ_OF_ACK = new StringIdImpl(3668, "non-positive return from channel read of ack");
-   public static final StringId Connection_ACK_READ_IO_EXCEPTION_FOR_0 = new StringIdImpl(3669, "ack read io exception for {0}");
-   public static final StringId Connection_CLASSNOTFOUND_DESERIALIZING_MESSAGE = new StringIdImpl(3670, "ClassNotFound deserializing message");
-   public static final StringId Connection_FAILED_SENDING_HANDSHAKE_REPLY = new StringIdImpl(3671, "Failed sending handshake reply");
-   public static final StringId ConnectionProxyImpl_ASYNCHRONOUS_REDUNDANCY_SATISFIER_THREAD_INVOKED_FROM_ENDPOINTDIED = new StringIdImpl(3672, "Asynchronous redundancy satisfier thread invoked from endpointDied");
-   public static final StringId ConnectionProxyImpl_AFTER_REDUNDANT_SELECTION_HERE_ARE_THE_ENDPOINTS_0 = new StringIdImpl(3673, "After redundant selection, here are the endpoints: {0}");
-   public static final StringId ConnectionProxyImpl_AFTER_A_FAILURE_ON_THE_PRIMARY_HERE_ARE_THE_ENDPOINTS_0 = new StringIdImpl(3674, "After a failure on the primary endpoint, here are the endpoints: {0}");
-   public static final StringId ConnectionProxyImpl_AFTER_ADDING_AN_ENDPOINT_HERE_ARE_THE_ENDPOINTS_0 = new StringIdImpl(3675, "After adding an endpoint, here are the endpoints: {0}");
-   public static final StringId ConnectionProxyImpl_UNREGISTERED_INTEREST_IN_0_ON_REGION_1_OF_TYPE_2_WITH_POLICY_3_BECAUSE_OF_4 = new StringIdImpl(3677, "unregistered interest in {0} on region {1} of type {2} with policy {3} because of {4}");
-   public static final StringId JGroupMembershipManager_TCPIP_CONNECTIONS_CLOSED = new StringIdImpl(3678, "tcp/ip connections closed");
-   public static final StringId JGroupMembershipManager_THE_MEMBER_WITH_ID_0_IS_NO_LONGER_IN_MY_OWN_VIEW_1 = new StringIdImpl(3679, "The Member with id {0}, is no longer in my own view, {1}");
-   public static final StringId LicenseInfo_LICENSE_IS_VALID_UNTIL_0 = new StringIdImpl(3680, "License is valid until \"{0}\".");
-   public static final StringId LicenseInfo_LICENSE_NEVER_EXPIRES = new StringIdImpl(3681, "License never expires.");
-   public static final StringId LicenseInfo_LICENSE_IS_LIMITED_TO_NODES_0 = new StringIdImpl(3682, "License is limited to node(s) \"{0}\".");
-   public static final StringId LicenseInfo_LICENSE_IS_VALID_ON_ANY_NODE = new StringIdImpl(3683, "License is valid on any node.");
-   public static final StringId LicenseInfo_LICENSE_IS_LIMITED_TO_THIS_NATIVE_NODE_0 = new StringIdImpl(3684, "License is limited to this native node \"{0}\".");
-   public static final StringId LicenseInfo_LICENSE_HAD_NO_NATIVE_NODE_LIMITS = new StringIdImpl(3685, "License had no native node limits.");
-   public static final StringId LicenseInfo_LICENSE_LIMITS_DISTRIBUTED_SYSTEM_TO_0_MEMBERS = new StringIdImpl(3686, "License limits distributed system to \"{0}\" members.");
-   public static final StringId LicenseInfo_LICENSE_IS_LIMITED_TO_0_CPUS = new StringIdImpl(3687, "License is limited to {0} cpus.");
-   public static final StringId LicenseInfo_LICENSE_ALLOWS_FOR_HYPERTHREADED_CPUS = new StringIdImpl(3688, "License allows for hyperthreaded cpus.");
-   public static final StringId LicenseInfo_ACTUAL_NUMBER_OF_PURCHASED_CPUS_IS_0 = new StringIdImpl(3689, "Actual number of purchased cpus is \"{0}\".");
-   public static final StringId LicenseInfo_LICENSE_ALLOWS_AN_UNLIMITED_NUMBER_OF_CPUS = new StringIdImpl(3690, "License allows an unlimited number of cpus.");
-   public static final StringId LicenseInfo_NO_LIMIT_FOR_KEY_0 = new StringIdImpl(3691, "No limit for key \"{0}\"");
-   public static final StringId LicenseInfo_DETERMINED_BY_GEMSTONE = new StringIdImpl(3692, "<determined by GemStone>");
-   public static final StringId LicenseInfo_PLEASE_SUPPLY_A_CUSTOMER_NAME_HERE = new StringIdImpl(3693, "<Please supply a customer name here>");
-   public static final StringId LicenseInfo_DATA_NEEDED_TO_OBTAIN_LICENSE_FOR_CURRENT_MACHINE = new StringIdImpl(3694, "Data Needed to Obtain License for current machine.");
-   public static final StringId LicenseInfo_CONTENTS_OF_0 = new StringIdImpl(3695, "-------------------- Contents of {0} --------------------");
-   public static final StringId LicenseInfo_COULD_NOT_FIND_DEFAULT_LICENSE_FILE_0 = new StringIdImpl(3696, "Could not find default license file: {0}");
-   public static final StringId LicenseInfo_TROUBLE_READING_LICENSE_FILE_0 = new StringIdImpl(3697, "Trouble reading license file: {0}");
-   public static final StringId LicenseInfo_LICENSE_SIGNATURE_IS_VALID = new StringIdImpl(3698, "License signature is valid.");
-   public static final StringId LicenseInfo_THIS_LICENSE_IS_INVALID_0 = new StringIdImpl(3699, "This license is invalid. {0}");
-   public static final StringId GemFireVersion_COULD_NOT_FIND_GEMFIRE_JAR = new StringIdImpl(3700, "<Could not find gemfire.jar>");
-   public static final StringId GemFireVersion_COULD_NOT_FIND_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_0 = new StringIdImpl(3701, "<Could not find resource com/gemstone/gemfire/internal/{0}>");
-   public static final StringId GemFireVersion_COULD_NOT_READ_PROPERTIES_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_0_BECAUSE_1 = new StringIdImpl(3702, "<Could not read properties from resource com/gemstone/gemfire/internal/{0} because: {1}>");
-   public static final StringId GemFireVersion_MISSING_PROPERTY_0_FROM_RESOURCE_COM_GEMSTONE_GEMFIRE_INTERNAL_1 = new StringIdImpl(3703, "<Missing property {0} from resource com/gemstone/gemfire/internal/{1}>");
-   public static final StringId GemFireVersion_RUNNING_ON_0 = new StringIdImpl(3704, "Running on: {0}");
-   public static final StringId GemFireVersion_WARNING_EXPECTED_JAVA_VERSION_0 = new StringIdImpl(3705, "Warning expected java version: {0}");
-   public static final StringId GemFireVersion_WARNING_EXPECTED_NATIVE_VERSION_0 = new StringIdImpl(3706, "Warning expected native version: {0}");
-   public static final StringId GemFireVersion_WARNING_FAILED_TO_READ_0_BECAUSE_1 = new StringIdImpl(3707, "Warning failed to read \"{0}\" because {1}.");
-   public static final StringId GemFireVersion_WARNING_COULD_NOT_FIND_0 = new StringIdImpl(3708, "Warning could not find \"{0}\".");
-   public static final StringId GemFireVersion_WARNING_COULD_NOT_DETERMINE_THE_PRODUCTS_LIB_DIRECTORY = new StringIdImpl(3709, "Warning could not determine the product''s lib directory.");
-   public static final StringId LocalRegion_THE_CACHE_IS_NOT_AVAILABLE = new StringIdImpl(3710, "The cache is not available");
-   public static final StringId LocalRegion_THE_DISTRIBUTED_SYSTEM_IS_NOT_AVAILABLE = new StringIdImpl(3711, "The distributed system is not available.");
-   public static final StringId GemFireCache_NORMAL_DISCONNECT = new StringIdImpl(3712, "Normal disconnect");
-   public static final StringId GlobalTransaction_GLOBALTRANSACTION_ADDTRANSACTION_CANNOT_ADD_A_NULL_TRANSACTION = new StringIdImpl(3713, "GlobalTransaction::addTransaction::Cannot add a null Transaction");
-   public static final StringId GlobalTransaction_GLOBALTRANSACTION_COMMIT_ERROR_IN_COMMITTING_BUT_TRANSACTION_COULD_NOT_BE_ROLLED_BACK_DUE_TO_EXCEPTION_0 = new StringIdImpl(3714, "GlobalTransaction::commit::Error in committing, but transaction could not be rolled back due to exception: {0}");
-   public static final StringId GlobalTransaction_GLOBALTRANSACTION_COMMIT_ERROR_IN_COMMITTING_THE_TRANSACTION_TRANSACTION_ROLLED_BACK_EXCEPTION_0_1 = new StringIdImpl(3715, "GlobalTransaction::commit:Error in committing the transaction. Transaction rolled back.Exception = {0} {1}");
-   public static final StringId GlobalTransaction_GLOBALTRANSACTION_ROLLBACK_ROLLBACK_NOT_SUCCESSFUL_DUE_TO_EXCEPTION_0_1 = new StringIdImpl(3716, "GlobalTransaction::rollback:Rollback not successful due to exception {0} {1}");
-   public static final StringId GlobalTransaction_GLOBALTRANSACTION_ENLISTRESOURCE_CANNOT_ENLIST_A_RESOURCE_TO_A_TRANSACTION_WHICH_IS_NOT_ACTIVE = new StringIdImpl(3717, "GlobalTransaction::enlistResource::Cannot enlist a resource to a transaction which is not active");
-   public static final StringId GlobalTransaction_GLOBALTRANSACTION_ENLISTRESOURCE_EXCEPTION_OCCURED_IN_TRYING_TO_SET_XARESOURCE_TIMEOUT_DUE_TO_0_ERROR_CODE_1 = new StringIdImpl(3718, "GlobalTransaction::enlistResource:Exception occurred in trying to set XAResource timeout due to {0} Error Code = {1}");
-   public static final StringId GlobalTransaction_ERROR_WHILE_DELISTING_XARESOURCE_0_1 = new StringIdImpl(3719, "error while delisting XAResource {0} {1}");
-   public static final StringId GlobalTransaction_GLOBATRANSACTION_RESUME_RESUME_NOT_SUCCESFUL_DUE_TO_0 = new StringIdImpl(3720, "GlobaTransaction::resume:Resume not succesful due to {0}");
-   public static final StringId GlobalTransaction_EXCEPTION_OCCURED_WHILE_TRYING_TO_SET_THE_XARESOURCE_TIMEOUT_DUE_TO_0_ERROR_CODE_1 = new StringIdImpl(3721, "Exception occurred while trying to set the XAResource TimeOut due to {0} Error code = {1}");
-   public static final StringId SmHelper_NATIVE_CODE_UNAVAILABLE = new StringIdImpl(3722, "native code unavailable");
-   public static final StringId SystemAdmin_WAITING_5_SECONDS_FOR_LOCATOR_PROCESS_TO_TERMINATE = new StringIdImpl(3723, "Waiting 5 seconds for locator process to terminate...");
-   public static final StringId SystemAdmin_WAITING_FOR_LOCATOR_PROCESS_WITH_PID_0_TO_TERMINATE = new StringIdImpl(3724, "Waiting for locator process, with pid {0,number,#} to terminate...");
-   public static final StringId SystemAdmin_LOCATOR_PROCESS_HAS_TERMINATED = new StringIdImpl(3725, "Locator process has terminated.");
-   public static final StringId SystemAdmin_LOCATOR_IN_0_WAS_KILLED_WHILE_IT_WAS_1_LOCATOR_PROCESS_ID_WAS_2 = new StringIdImpl(3726, "Locator in \"{0}\" was killed while it was {1}. Locator process id was {2}.");
-   public static final StringId SystemAdmin_LOCATOR_IN_0_IS_1_LOCATOR_PROCESS_ID_IS_2 = new StringIdImpl(3727, "Locator in \"{0}\" is {1}. Locator process id is {2}.");
-   public static final StringId SystemAdmin_LOCATOR_IN_0_IS_STOPPED = new StringIdImpl(3728, "Locator in \"{0}\" is stopped.");
-   public static final StringId SystemAdmin_LOCATOR_IN_0_IS_STARTING = new StringIdImpl(3729, "Locator in \"{0}\" is starting.");
-   public static final StringId SystemAdmin_CLEANED_UP_ARTIFACTS_LEFT_BY_THE_PREVIOUS_KILLED_LOCATOR = new StringIdImpl(3730, "Cleaned up artifacts left by the previous killed locator.");
-   public static final StringId SystemAdmin_LOG_FILE_0_DOES_NOT_EXIST = new StringIdImpl(3731, "Log file \"{0}\" does not exist.");
-   public static final StringId SystemAdmin_AN_IOEXCEPTION_WAS_THROWN_WHILE_TAILING_0 = new StringIdImpl(3732, "An IOException was thrown while tailing \"{0}\"\n");
-   public static final StringId SystemAdmin_MERGING_THE_FOLLOWING_LOG_FILES = new StringIdImpl(3733, "Merging the following log files:");
-   public static final StringId SystemAdmin_COMPLETED_MERGE_OF_0_LOGS_TO_1 = new StringIdImpl(3734, "Completed merge of {0} logs to \"{1}\".");
-   public static final StringId SystemAdmin_WARNING_NO_STATS_MATCHED_0 = new StringIdImpl(3735, "[warning] No stats matched \"{0}\".");
-   public static final StringId SystemAdmin_ERROR_OPERATION_0_FAILED_BECAUSE_1 = new StringIdImpl(3736, "ERROR: Operation \"{0}\" failed because: {1}.");
-   public static final StringId SystemAdmin_ERROR_UNKNOWN_COMMAND_0 = new StringIdImpl(3737, "ERROR: Unknown command \"{0}\".");
-   public static final StringId SystemAdmin_INFO_FOUND_0_MATCHES_FOR_1 = new StringIdImpl(3738, "[info] Found {0} instances matching \"{1}\":");
-   public static final StringId SystemAdmin_THIS_PROGRAM_ALLOWS_GEMFIRE_TO_BE_MANAGED_FROM_THE_COMMAND_LINE_IT_EXPECTS_A_COMMAND_TO_EXECUTE_SEE_THE_HELP_TOPIC_0_FOR_A_SUMMARY_OF_SUPPORTED_OPTIONS_SEE_THE_HELP_TOPIC_1_FOR_A_CONCISE_DESCRIPTION_OF_COMMAND_LINE_SYNTAX_SEE_THE_HELP_TOPIC_2_FOR_A_DESCRIPTION_OF_SYSTEM_CONFIGURATION_SEE_THE_HELP_TOPIC_3_FOR_HELP_ON_A_SPECIFIC_COMMAND_USE_THE_4_OPTION_WITH_THE_COMMAND_NAME = new StringIdImpl(3739, "This program allows GemFire to be managed from the command line. It expects a command to execute.\nSee the help topic \"{0}\". For a summary of supported options see the help topic \"{1}\".\nFor a concise description of command line syntax see the help topic \"{2}\".\nFor a description of system configuration see the help topic \"{3}\".\nFor help on a specific command use the \"{4}\" option with the command name.");
-   public static final StringId SystemAdmin_ALL_COMMAND_LINE_OPTIONS_START_WITH_A_AND_ARE_NOT_REQUIRED_EACH_OPTION_HAS_A_DEFAULT_THAT_WILL_BE_USED_WHEN_ITS_NOT_SPECIFIED_OPTIONS_THAT_TAKE_AN_ARGUMENT_ALWAYS_USE_A_SINGLE_CHARACTER_WITH_NO_SPACES_TO_DELIMIT_WHERE_THE_OPTION_NAME_ENDS_AND_THE_ARGUMENT_BEGINS_OPTIONS_THAT_PRECEDE_THE_COMMAND_WORD_CAN_BE_USED_WITH_ANY_COMMAND_AND_ARE_ALSO_PERMITTED_TO_FOLLOW_THE_COMMAND_WORD = new StringIdImpl(3740, "All command line options start with a \"-\" and are not required.\nEach option has a default that will be used when its not specified.\nOptions that take an argument always use a single \"=\" character, with no spaces, to delimit where the option name ends and the argument begins.\nOptions that precede the command word can be used with any command and are also permitted to follow the command word.");
-   public static final StringId SystemAdmin_NO_HELP_FOR_OPTION_0 = new StringIdImpl(3741, "no help for option \"{0}]\"");
-   public static final StringId SystemAdmin_EXPLAINATION_OF_COMMAND_OPTIONS = new StringIdImpl(3742, "The following synax is used in the usage strings:\n\"[]\" designate an optional item\n\"()\" are used to group items\n\"<>\" designate non-literal text. Used to designate logical items\n\"*\" suffix means zero or more of the previous item\n\"|\" means the item to the left or right is required");
-   public static final StringId SystemAdmin_ERROR_INVALID_HELP_TOPIC_0 = new StringIdImpl(3743, "ERROR: Invalid help topic \"{0}\".");
-   public static final StringId SystemAdmin_USAGE = new StringIdImpl(3744, "Usage");
-   public static final StringId SystemAdmin_ERROR_INVALID_COMMAND_0 = new StringIdImpl(3745, "ERROR: Invalid command \"{0}\".");
-   public static final StringId SystemAdmin_GEMFIRE_HELP = new StringIdImpl(3746, "gemfire requires one of the following command strings:\n{0}\nFor additional help on a command specify it along with the \"{1}\" option.\nThe \"{2}\" option causes gemfire to print out extra information when it fails.\nThe \"{1}\" and \"{3}\" are synonyms that cause gemfire to print out help information instead of performing a task.\nThe \"{4}\" option quiets gemfire down by suppressing extra messages.\nThe \"{5}\" option passes <vmOpt> to the java vm''s command line.");
-   public static final StringId SystemAdmin_VERSION_HELP = new StringIdImpl(3747, "Prints GemFire product version information.");
-   public static final StringId SystemAdmin_LICENSE_HELP_0 = new StringIdImpl(3748, "Prints any current GemFire licenses and information needed to obtain a new license.\nThe \"{0}\" option can be used to specify the license file to print.");
-   public static final StringId SystemAdmin_HELP_HELP = new StringIdImpl(3749, "Prints information on how to use this executable.\nIf an optional help topic is specified then more detailed help is printed.");
-   public static final StringId SystemAdmin_STATS_HELP_PART_A = new StringIdImpl(3750, "Prints statistic values from a statistic archive\nBy default all statistics are printed.\nThe statSpec arguments can be used to print individual resources or a specific statistic.\nThe format of a statSpec is: an optional combine operator, followed by an optional instanceId, followed by an optional typeId, followed by an optional statId.\nA combine operator can be \"{0}\" to combine all matches in the same file, or \"{1}\" to combine all matches across all files.\nAn instanceId must be the name or id of a resource.\nA typeId is a \"{2}\" followed by the name of a resource type.\nA statId is a \"{3}\" followed by the name of a statistic.\nA typeId or instanceId with no statId prints out all the matching resources and all their statistics.\nA typeId or instanceId with a statId prints out just the named statistic on the matching resources.\nA statId with no typeId or instanceId matches all statistic
 s with that name.\nThe \"{4}\" option causes statistic descriptions to also be printed.\nThe \"{5}\" option, in conjunction with \"{6}\", causes the printed statistics to all be raw, unfiltered, values.\nThe \"{7}\" option, in conjunction with \"{6}\", causes the printed statistics to be the rate of change, per second, of the raw values.\nThe \"{8}\" option, in conjunction with \"{6}\", causes the printed statistics to be the rate of change, per sample, of the raw values.\nThe \"{9}\" option, in conjunction with \"{6}\", causes statistics whose values are all zero to not be printed.");
-   public static final StringId SystemAdmin_STATS_HELP_PART_B = new StringIdImpl(3751, "The \"{0}\" option, in conjunction with \"{1}\", causes statistics samples taken before this time to be ignored. The argument format must match \"{2}\".\nThe \"{3}\" option, in conjunction with \"{1}\", causes statistics samples taken after this time to be ignored. The argument format must match \"{2}\".\nThe \"{1}\" option causes the data to come from an archive file.");
-   public static final StringId SystemAdmin_ENCRYPTS_A_PASSWORD_FOR_USE_IN_CACHE_XML_DATA_SOURCE_CONFIGURATION = new StringIdImpl(3752, "Encrypts a password for use in cache.xml data source configuration.");
-   public static final StringId SystemAdmin_START_LOCATOR_HELP = new StringIdImpl(3753, "Starts a locator.\nThe \"{0}\" option specifies the port the locator will listen on. It defaults to \"{1}\"\nThe \"{2}\" option specifies the address the locator will listen on. It defaults to listening on all local addresses.\nThe \"{3}\" option can be used to specify the directory the locator will run in.\nThe \"{4}\" option can be used to specify the gemfire.properties file for configuring the locator''s distributed system.  The file''s path should be absolute, or relative to the locator''s directory ({3})\nThe \"{5}\" option can be used to specify whether peer locator service should be enabled. True (the default) will enable the service.\nThe \"{6}\" option can be used to specify whether server locator service should be enabled. True (the default) will enable the service.\nThe \"{7}\" option can be used to specify a host name or ip address that will be sent to clients so they can connect to 
 this locator. The default is to use the address the locator is listening on.\nThe \"{8}\" option can be used to set system properties for the locator VM\nThe \"{9}\" option can be used to set vendor-specific VM options and is usually used to increase the size of the locator VM when using multicast.\n");
-    public static final StringId SystemAdmin_STOP_LOCATOR_HELP = new StringIdImpl(3754, "Stops a locator.\nThe \"{0}\" option specifies the port the locator is listening on. It defaults to \"{1}\"\nThe \"{2}\" option specifies the address the locator is listening on. It defaults to the local host''s address.\nThe \"{3}\" option can be used to specify the directory the locator is running in.");
-   public static final StringId SystemAdmin_STATUS_LOCATOR_HELP = new StringIdImpl(3755, "Prints the status of a locator. The status string will one of the following:\n{0}\nThe \"{1}\" option can be used to specify the directory of the locator whose status is desired.");
-   public static final StringId SystemAdmin_INFO_LOCATOR_HELP = new StringIdImpl(3756, "Prints information on a locator.\nThe information includes the process id of the locator, if the product is not running in PureJava mode.\nThe \"{0}\" option can be used to specify the directory of the locator whose information is desired.");
-   public static final StringId SystemAdmin_TAIL_LOCATOR_HELP = new StringIdImpl(3757, "Prints the last 64K bytes of the locator''s log file.\nThe \"{0}\" option can be used to specify the directory of the locator whose information is desired.");
-   public static final StringId SystemAdmin_MERGE_LOGS = new StringIdImpl(3758, "Merges multiple logs files into a single log.\nThe \"{0}\" option can be used to specify the file to write the merged log to. The default is stdout.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_TO_WRITE_OUTPUT_TO_THE_SPECIFIED_FILE_THE_FILE_IS_OVERWRITTEN_IF_IT_ALREADY_EXISTS = new StringIdImpl(3759, "Causes gemfire to write output to the specified file. The file is overwritten if it already exists.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_TO_PRINT_OUT_EXTRA_INFORMATION_WHEN_IT_FAILS_THIS_OPTION_IS_SUPPORTED_BY_ALL_COMMANDS = new StringIdImpl(3760, "Causes gemfire to print out extra information when it fails. This option is supported by all commands.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_TO_PRINT_DETAILED_INFORMATION_WITH_THE_0_COMMAND_IT_MEANS_STATISTIC_DESCRIPTIONS = new StringIdImpl(3761, "Causes gemfire to print detailed information.  With the \"{0}\" command it means statistic descriptions.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_0_COMMAND_TO_PRINT_UNFILTERED_RAW_STATISTIC_VALUES_THIS_IS_THE_DEFAULT_FOR_NONCOUNTER_STATISTICS = new StringIdImpl(3762, "Causes gemfire \"{0}\" command to print unfiltered, raw, statistic values. This is the default for non-counter statistics.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_0_COMMAND_TO_PRINT_THE_RATE_OF_CHANGE_PER_SECOND_FOR_STATISTIC_VALUES_THIS_IS_THE_DEFAULT_FOR_COUNTER_STATISTICS = new StringIdImpl(3763, "Causes gemfire \"{0}\" command to print the rate of change, per second, for statistic values. This is the default for counter statistics.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_0_COMMAND_TO_PRINT_THE_RATE_OF_CHANGE_PER_SAMPLE_FOR_STATISTIC_VALUES = new StringIdImpl(3764, "Causes gemfire \"{0}\" command to print the rate of change, per sample, for statistic values.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_0_COMMAND_TO_NOT_PRINT_STATISTICS_WHOSE_VALUES_ARE_ALL_ZERO = new StringIdImpl(3765, "Causes gemfire \"{0}\" command to not print statistics whose values are all zero.");
-   public static final StringId SystemAdmin_USED_TO_SPECIFY_A_NONDEFAULT_PORT_WHEN_STARTING_OR_STOPPING_A_LOCATOR = new StringIdImpl(3766, "Used to specify a non-default port when starting or stopping a locator.");
-   public static final StringId SystemAdmin_USED_TO_SPECIFY_A_SPECIFIC_IP_ADDRESS_TO_LISTEN_ON_WHEN_STARTING_OR_STOPPING_A_LOCATOR = new StringIdImpl(3767, "Used to specify a specific IP address to listen on when starting or stopping a locator.");
-   public static final StringId SystemAdmin_THE_ARGUMENT_IS_THE_LICENSE_FILE_WHOSE_CONTENTS_WILL_BE_PRINTED_DEFAULTS_TO_0 = new StringIdImpl(3768, "The argument is the license file whose contents will be printed. Defaults to \"{0}\"");
-   public static final StringId SystemAdmin_THE_ARGUMENT_IS_THE_STATISTIC_ARCHIVE_FILE_THE_0_COMMAND_SHOULD_READ = new StringIdImpl(3769, "The argument is the statistic archive file the \"{0}\" command should read.");
-   public static final StringId SystemAdmin_CAUSES_GEMFIRE_TO_PRINT_OUT_INFORMATION_INSTEAD_OF_PERFORMING_THE_COMMAND_THIS_OPTION_IS_SUPPORTED_BY_ALL_COMMANDS = new StringIdImpl(3770, "Causes GemFire to print out information instead of performing the command. This option is supported by all commands.");
-   public static final StringId SystemAdmin_TURNS_ON_QUIET_MODE_THIS_OPTION_IS_SUPPORTED_BY_ALL_COMMANDS = new StringIdImpl(3771, "Turns on quiet mode. This option is supported by all commands.");
-   public static final StringId SystemAdmin_CAUSES_THE_0_COMMAND_TO_IGNORE_STATISTICS_SAMPLES_TAKEN_BEFORE_THIS_TIME_THE_ARGUMENT_FORMAT_MUST_MATCH_1 = new StringIdImpl(3772, "Causes the \"{0}\" command to ignore statistics samples taken before this time. The argument format must match \"{1}\".");
-   public static final StringId SystemAdmin_CAUSES_THE_0_COMMAND_TO_IGNORE_STATISTICS_SAMPLES_TAKEN_AFTER_THIS_TIME_THE_ARGUMENT_FORMAT_MUST_MATCH_1 = new StringIdImpl(3773, "Causes the \"{0}\" command to ignore statistics samples taken after this time. The argument format must match \"{1}\".");
-   public static final StringId SystemAdmin_DIR_ARGUMENT_HELP = new StringIdImpl(3774, "The argument is the system directory the command should operate on.\nIf the argument is empty then a default system directory will be search for.\nHowever the search will not include the \"{0}\" file.\nBy default if a command needs a system directory, and one is not specified, then a search is done. If a \"{0}\" file can be located then \"{1}\" property from that file is used. Otherwise if the \"{2}\" environment variable is set to a directory that contains a subdirectory named \"{3}\" then that directory is used.\nThe property file is search for in the following locations:\n1. The current working directory.\n2. The user''s home directory.\n3. The class path.\nAll commands except \"{4}\", and \"{5}\" use the system directory.");
-   public static final StringId SystemAdmin_SETS_A_JAVA_SYSTEM_PROPERTY_IN_THE_LOCATOR_VM_USED_MOST_OFTEN_FOR_CONFIGURING_SSL_COMMUNICATION = new StringIdImpl(3775, "Sets a Java system property in the locator VM.  Used most often for configuring SSL communication.");
-   public static final StringId SystemAdmin_SETS_A_JAVA_VM_X_SETTING_IN_THE_LOCATOR_VM_USED_MOST_OFTEN_FOR_INCREASING_THE_SIZE_OF_THE_VIRTUAL_MACHINE = new StringIdImpl(3776, "Sets a Java VM X setting in the locator VM.  Used most often for increasing the size of the virtual machine.");
-   public static final StringId SystemAdmin_HELP = new StringIdImpl(3777, "help");
-   public static final StringId SystemAdmin_ERROR_UNKNOWN_OPTION_0 = new StringIdImpl(3778, "ERROR: Unknown option \"{0}\".");
-   public static final StringId SystemAdmin_ERROR_WRONG_NUMBER_OF_COMMAND_LINE_ARGS = new StringIdImpl(3779, "ERROR: Wrong number of command line args.");
-   public static final StringId SystemAdmin_ERROR_UNEXPECTED_COMMAND_LINE_ARGUMENTS_0 = new StringIdImpl(3780, "ERROR: unexpected command line arguments: \"{0}\".");
-   public static final StringId SystemAdmin_GEMFIRE_PRODUCT_DIRECTORY_0 = new StringIdImpl(3781, "GemFire product directory: {0}");
-   public static final StringId SystemAdmin_LOCATOR_START_COMPLETE = new StringIdImpl(3782, "Locator start complete.");
-   public static final StringId SystemAdmin_LOCATOR_STOP_COMPLETE = new StringIdImpl(3783, "Locator stop complete.");
-   public static final StringId SystemAdmin_ERROR_EXPECTED_AT_LEAST_ONE_LOG_FILE_TO_MERGE = new StringIdImpl(3784, "ERROR: expected at least one log file to merge.");
-   public static final StringId AgentConfigImpl_USING_DEFAULT_CONFIGURATION_BECAUSE_PROPERTY_FILE_WAS_FOUND = new StringIdImpl(3785, "Using default configuration because property file was not found.");
-   public static final StringId AgentConfigImpl_CONFIGURATION_LOADED_FROM_0 = new StringIdImpl(3786, "Configuration loaded from: {0}.");
-   public static final StringId AgentConfigImpl_NAME_OF_THE_AGENTS_LOG_FILE = new StringIdImpl(3787, "Name of the agent''s log file");
-   public static final StringId AgentConfigImpl_MINIMUM_LEVEL_OF_LOGGING_PERFORMED_BY_AGENT = new StringIdImpl(3788, "Minimum level of logging performed by agent. Valid values are: all, finest, finer, fine, config, info, warning, error, severe and none.");
-   public static final StringId AgentConfigImpl_WHETHER_THE_AGENT_SHOULD_PRINT_DEBUGGING_INFORMATION = new StringIdImpl(3789, "Whether the agent should print debugging information");
-   public static final StringId AgentConfigImpl_LIMIT_IN_MEGABYTES_OF_HOW_MUCH_DISK_SPACE_CAN_BE_CONSUMED_BY_OLD_INACTIVE_LOG_FILES = new StringIdImpl(3790, "Limit, in megabytes, of how much disk space can be consumed by old inactive log files. This value (in megabytes) should be in the range: 0-1000000.");
-   public static final StringId AgentConfigImpl_LIMIT_IN_MEGABYTES_OF_HOW_LARGE_THE_CURRENT_STATISTIC_ARCHIVE_FILE_CAN_GROW_BEFORE_IT_IS_CLOSED_AND_ARCHIVAL_ROLLS_ON_TO_A_NEW_FILE = new StringIdImpl(3791, "Limit, in megabytes, of how large the current log file can grow before it is closed and log rolls on to a new file. This value (in megabytes) should be in the range: 0-1000000.");
-   public static final StringId AgentConfigImpl_MULTICAST_PORT_USED_TO_CONNECT_TO_DISTRIBUTED_SYSTEM = new StringIdImpl(3792, "Multicast port used to connect to distributed system. To use IP multicast, you must also define mcast-address. The value must be in the range: 0-65535.");
-   public static final StringId AgentConfigImpl_MULTICAST_ADDRESS_USED_TO_CONNECT_TO_DISTRIBUTED_SYSTEM = new StringIdImpl(3793, "Multicast address used to connect to distributed system. To use multicast, you must also define mcast-port, the IP port.");
-   public static final StringId AgentConfigImpl_ADDRESSES_OF_THE_LOCATORS_OF_THE_DISTRIBUTED_SYSTEM = new StringIdImpl(3794, "A comma-separated list of address(es) of the locator(s) in the distributed system in host[port] form. E.g. locators=host1[port1],host2[port2],...,hostn[portn]");
-   public static final StringId AgentConfigImpl_XML_CONFIGURATION_FILE_FOR_MANAGED_ENTITIES = new StringIdImpl(3795, "The name of an XML file that specifies the configuration for the managed entity administered by the Distributed System. The XML file must conform to the dtd - doc-files/ds5_0.dtd.");
-   public static final StringId AgentConfigImpl_WILL_THE_AGENT_AUTOMATICALLY_CONNECT_TO_THE_DISTRIBUTED_SYSTEM = new StringIdImpl(3796, "Whether the JMX agent will connect ''automatically'' to the distributed system that it is configured to monitor.");
-   public static final StringId AgentConfigImpl_COMMAND_PREFIX_USED_FOR_LAUNCHING_MEMBERS_OF_THE_DISTRIBUTED_SYSTEM = new StringIdImpl(3797, "Command prefix used for launching members of the distributed system");
-   public static final StringId AgentConfigImpl_WILL_THE_AGENT_START_THE_HTTP_JMX_ADAPTER = new StringIdImpl(3798, "Whether the HTTP adapter is enabled in the JMX agent.");
-   public static final StringId AgentConfigImpl_BIND_ADDRESS_OF_HTTP_ADAPTERS_SOCKETS = new StringIdImpl(3799, "Bind address of HTTP adapter''s sockets");
-   public static final StringId AgentConfigImpl_THE_PORT_ON_WHICH_THE_HTTP_ADAPTER_WILL_BE_STARTED = new StringIdImpl(3800, "The port on which the HTTP adapter will be started. This value should be in the range: 0-65535.");
-   public static final StringId AgentConfigImpl_WILL_THE_AGENT_START_THE_RMI_JMX_ADAPTER = new StringIdImpl(3801, "Whether the RMI JMX adapter is enabled.");
-   public static final StringId AgentConfigImpl_WILL_THE_AGENT_HOST_AN_RMI_REGISTRY = new StringIdImpl(3802, "Whether the JMX agent should start RMI registry. Alternatively, a registry outside of the JMX agent VM can be used.");
-   public static final StringId AgentConfigImpl_BIND_ADDRESS_OF_RMI_ADAPTERS_SOCKETS = new StringIdImpl(3803, "Bind address of RMI adapter''s sockets");
-   public static final StringId AgentConfigImpl_THE_PORT_ON_WHICH_TO_CONTACT_THE_RMI_REGISTER = new StringIdImpl(3804, "The port on which to contact the RMI registry. The value must be in the range: 0-65535.");
-   public static final StringId AgentConfigImpl_WILL_THE_AGENT_START_THE_SNMP_JMX_ADAPTER = new StringIdImpl(3805, "Whether the SNMP JMX adapter will be enabled.");
-   public static final StringId AgentConfigImpl_BIND_ADDRESS_OF_SNMP_ADAPTERS_SOCKETS = new StringIdImpl(3806, "Bind address of SNMP adapter''s sockets");
-   public static final StringId AgentConfigImpl_THE_DIRECTORY_IN_WHICH_SNMP_CONFIGURATION_RESIDES = new StringIdImpl(3807, "The directory in which SNMP configuration resides");
-   public static final StringId AgentConfigImpl_WILL_THE_AGENT_COMMUNICATE_USING_SSL = new StringIdImpl(3808, "Whether the JMX Agent will use the SSL protocol for communication.");
-   public static final StringId AgentConfigImpl_THE_SSL_PROTOCOLS_USED_BY_THE_AGENT = new StringIdImpl(3809, "The space-separated list of the SSL protocols to be used when connecting to the JMX agent.");
-   public static final StringId AgentConfigImpl_THE_SSL_CIPHERS_USED_BY_THE_AGENT = new StringIdImpl(3810, "The space-separated list of the SSL ciphers to be used when connecting to the JMX Agent.");
-   public static final StringId AgentConfigImpl_WILL_THE_AGENT_REQUIRE_SSL_AUTHENTICATION = new StringIdImpl(3811, "Whether or not SSL connections to the RMI adapter require authentication. If true, needs client authentication for RMI and other non-HTTP connectors/adaptors.");
-   public static final StringId AgentConfigImpl_WILL_THE_HTTP_ADAPTER_REQUIRE_SSL_AUTHENTICATION = new StringIdImpl(3812, "Whether SSL connections to the HTTP adapter will need authentication.");
-   public static final StringId AgentConfigImpl_WILL_THE_HTTP_JMX_ADAPTER_USE_HTTP_AUTHENTICATION = new StringIdImpl(3813, "Whether the HTTP adapter will use HTTP authentication.");
-   public static final StringId AgentConfigImpl_THE_USER_NAME_FOR_AUTHENTICATION_IN_THE_HTTP_JMX_ADAPTER = new StringIdImpl(3814, "The user name for authentication in the HTTP JMX adapter");
-   public static final StringId AgentConfigImpl_THE_PASSWORD_FOR_AUTHENTICATION_IN_THE_HTTP_JMX_ADAPTER = new StringIdImpl(3815, "The password for authentication in the HTTP JMX adapter");
-   public static final StringId AgentConfigImpl_DOES_THE_DISTRIBUTED_SYSTEM_COMMUNICATE_USING_SSL = new StringIdImpl(3816, "Whether to use the SSL protocol for communication between members of the admin distributed system. If set to true, locators should be used.");
-   public static final StringId AgentConfigImpl_SSL_PROTOCOLS_USED_TO_COMMUNICATE_WITH_DISTRIBUTED_SYSTEM = new StringIdImpl(3817, "A space-separated list of the SSL protocols used to communicate with distributed system.");
-   public static final StringId AgentConfigImpl_SSL_CIPHERS_USED_TO_COMMUNICATE_WITH_DISTRIBUTED_SYSTEM = new StringIdImpl(3818, "A space-separated list of the SSL ciphers to be used to communicate with distributed system.");
-   public static final StringId AgentConfigImpl_DOES_CONNECTING_TO_THE_DISTRIBUTED_SYSTEM_REQUIRE_SSL_AUTHENTICATION = new StringIdImpl(3819, "Whether connection to the distributed system needs SSL authentication.");
-   public static final StringId AgentConfigImpl_PROPERTY_FILE_FROM_WHICH_AGENT_READS_CONFIGURATION = new StringIdImpl(3820, "Name and path of the Agent''s properties file from which agent reads configuration");
-   public static final StringId AgentConfigImpl_HOST_ON_WHICH_THE_DISTRIBUTED_SYSTEMS_LOCATOR_RUNS = new StringIdImpl(3821, "Host on which the distributed system''s locator runs");
-   public static final StringId SystemAdmin_USED_TO_SPECIFY_THE_0_FILE_TO_BE_USED_IN_CONFIGURING_THE_LOCATORS_DISTRIBUTEDSYSTEM = new StringIdImpl(3822, "Used to specify the {0} file to be used in configuring the locator''s DistributedSystem.");
-   public static final StringId AgentConfigImpl_GEMFIRE_PRODUCT_DIRECTORY_USED_TO_LAUNCH_A_LOCATOR = new StringIdImpl(3823, "GemFire product directory used to launch a locator");
-   public static final StringId AgentConfigImpl_DIRECTORY_IN_WHICH_A_LOCATOR_WILL_BE_LAUNCHED = new StringIdImpl(3824, "Directory in which a locator will be launched");
-   public static final StringId AgentConfigImpl_COMMAND_PREFIX_USED_WHEN_LAUNCHING_A_LOCATOR = new StringIdImpl(3825, "Command prefix used when launching a locator");
-   public static final StringId AgentConfigImpl_IP_ADDRESS_TO_USE_WHEN_CONTACTING_LOCATOR = new StringIdImpl(3826, "IP address to use when contacting locator");
-   public static final StringId AgentConfigImpl_PROPERTIES_FOR_CONFIGURING_A_LOCATORS_DISTRIBUTED_SYSTEM = new StringIdImpl(3827, "Properties for configuring a locator''s distributed system");
-   public static final StringId AgentLauncher_STARTS_THE_GEMFIRE_JMX_AGENT = new StringIdImpl(3828, "Starts the GemFire JMX Agent");
-   public static final StringId AgentLauncher_VMARG = new StringIdImpl(3829, "<vmarg> a VM-option passed to the agent''s VM, example -J-Xmx1024M for a 1 Gb heap");
-   public static final StringId AgentLauncher_DIR = new StringIdImpl(3830, "<dir> Directory in which agent runs, default is the current directory");
-   public static final StringId AgentLauncher_PROP = new StringIdImpl(3831, "<prop> A configuration property/value passed to the agent");
-   public static final StringId AgentLauncher_SEE_HELP_CONFIG = new StringIdImpl(3832, "(see \"help config\" for more details)");
-   public static final StringId AgentLauncher_STOPS_A_GEMFIRE_JMX_AGENT = new StringIdImpl(3833, "Stops a GemFire JMX Agent");
-   public static final StringId AgentLauncher_REPORTS_THE_STATUS_AND_THE_PROCESS_ID_OF_A_GEMFIRE_JMX_AGENT = new StringIdImpl(3834, "Reports the status and the process id of a GemFire JMX Agent");
-   public static final StringId AgentLauncher_AGENT_CONFIGURATION_PROPERTIES = new StringIdImpl(3835, "Agent configuration properties");
-   public static final StringId AgentLauncher_DEFAULT = new StringIdImpl(3836, "Default");
-   public static final StringId AgentLauncher_STARTING_JMX_AGENT_WITH_PID_0 = new StringIdImpl(3837, "Starting JMX Agent with pid: {0,number,#}");
-   public static final StringId AgentLauncher_STARTING_AGENT = new StringIdImpl(3838, "Starting agent");
-   public static final StringId AgentLauncher_UNCAUGHT_EXCEPTION_IN_THREAD_0 = new StringIdImpl(3839, "Uncaught exception in thread {0}");
-   public static final StringId AgentLauncher_0_HAS_STOPPED = new StringIdImpl(3840, "The {0} has shut down.");
-   public static final StringId AgentLauncher_TIMEOUT_WAITING_FOR_0_TO_SHUTDOWN_STATUS_IS_1 = new StringIdImpl(3841, "Timeout waiting for {0} to shutdown, status is: {1}");
-   public static final StringId AgentLauncher_NO_HELP_AVAILABLE_FOR_0 = new StringIdImpl(3842, "No help available for \"{0}\"");
-   public static final StringId AgentLauncher_AGENT_HELP = new StringIdImpl(3843, "agent help");
-   public static final StringId AgentLauncher_UNKNOWN_COMMAND_0 = new StringIdImpl(3844, "Unknown command: {0}");
-   public static final StringId AgentLauncher_ERROR_0 = new StringIdImpl(3845, "Error : {0}");
-   public static final StringId AgentLauncher_0_PID_1_STATUS = new StringIdImpl(3846, "{0} pid: {1,number,#} status: ");
-   public static final StringId AgentLauncher_SHUTDOWN = new StringIdImpl(3847, "shutdown");
-   public static final StringId AgentLauncher_STARTING = new StringIdImpl(3848, "starting");
-   public static final StringId AgentLauncher_RUNNING = new StringIdImpl(3849, "running");
-   public static final StringId AgentLauncher_SHUTDOWN_PENDING = new StringIdImpl(3850, "shutdown pending");
-   public static final StringId AgentLauncher_UNKNOWN = new StringIdImpl(3851, "unknown");
-   public static final StringId MsgStreamer_CLOSING_DUE_TO_0 = new StringIdImpl(3852, "closing due to {0}");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_BEGIN_NESTED_TRANSACTION_IS_NOT_SUPPORTED = new StringIdImpl(3853, "Nested transaction is not supported");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_COMMIT_TRANSACTION_IS_NULL_CANNOT_COMMIT_A_NULL_TRANSACTION = new StringIdImpl(3854, "Transaction is null, cannot commit a null transaction");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_COMMIT_GLOBAL_TRANSACTION_IS_NULL_CANNOT_COMMIT_A_NULL_GLOBAL_TRANSACTION = new StringIdImpl(3855, "Global Transaction is null, cannot commit a null global transaction");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_COMMIT_TRANSACTION_NOT_ACTIVE_CANNOT_BE_COMMITTED_TRANSACTION_STATUS_0 = new StringIdImpl(3856, "transaction not active, cannot be committed. Transaction Status= {0}");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_COMMIT_TRANSACTION_IS_NOT_ACTIVE_AND_CANNOT_BE_COMMITTED = new StringIdImpl(3857, "transaction is not active and cannot be committed");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_COMMIT_TRANSACTION_ROLLED_BACK_BECAUSE_OF_EXCEPTION_IN_NOTIFYBEFORECOMPLETION_FUNCTION_CALL_ACTUAL_EXCEPTION_0 = new StringIdImpl(3858, "Transaction rolled back because of Exception in notifyBeforeCompletion processing");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_COMMIT_TRANSACTION_ROLLED_BACK_BECAUSE_A_USER_MARKED_IT_FOR_ROLLBACK = new StringIdImpl(3859, "Transaction rolled back because a user marked it for Rollback");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_ROLLBACK_NO_TRANSACTION_EXISTS = new StringIdImpl(3860, "no transaction exists");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_ROLLBACK_NO_GLOBAL_TRANSACTION_EXISTS = new StringIdImpl(3861, "no global transaction exists");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_ROLLBACK_TRANSACTION_STATUS_DOES_NOT_ALLOW_ROLLBACK_TRANSACTIONAL_STATUS_0 = new StringIdImpl(3862, "Transaction status does not allow Rollback .Transactional status = {0}");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_ROLLBACK_TRANSACTION_ALREADY_IN_A_ROLLING_BACK_STATE_TRANSACTIONAL_STATUS_0 = new StringIdImpl(3863, "Transaction already in a Rolling Back state.Transactional status = {0}");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_ROLLBACK_TRANSACTION_STATUS_DOES_NOT_ALLOW_ROLLBACK = new StringIdImpl(3864, "Transaction status does not allow Rollback");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_SETROLLBACKONLY_NO_GLOBAL_TRANSACTION_EXISTS = new StringIdImpl(3865, "no global transaction exists");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_SETROLLBACKONLY_TRANSACTION_CANNOT_BE_MARKED_FOR_ROLLBACK_TRANSCATION_STATUS_0 = new StringIdImpl(3866, "Transaction cannot be marked for rollback. Transcation status = {0}");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_SETTRANSACTIONTIMEOUT_NO_GLOBAL_TRANSACTION_EXISTS = new StringIdImpl(3867, "no global transaction exists");
-   public static final StringId GemFireCacheImpl_STARTING_GEMFIRE_MEMCACHED_SERVER_ON_PORT_0_FOR_1_PROTOCOL = new StringIdImpl(3868, "Starting GemFireMemcachedServer on port {0} for {1} protocol");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_SETTRANSACTIONTIMEOUT_TRANSACTION_HAS_EITHER_EXPIRED_OR_ROLLEDBACK_OR_COMITTED = new StringIdImpl(3869, "Transaction has either expired or rolledback or comitted");
-   public static final StringId TransactionManagerImpl_TRANSACTIONMANAGERIMPL_RESUME_CANNOT_RESUME_A_NULL_TRANSACTION = new StringIdImpl(3870, "cannot resume a null transaction");
-   public static final StringId AbstractDistributionConfig_SECURITY_CLIENT_DHALGO_NAME_0 = new StringIdImpl(3871, "User defined name for the symmetric encryption algorithm to use in Diffie-Hellman key exchange for encryption of credentials.  Defaults to \"{0}\". Legal values can be any of the available symmetric algorithm names in JDK like \"DES\", \"DESede\", \"AES\", \"Blowfish\". It may be required to install Unlimited Strength Jurisdiction Policy Files from Sun for some symmetric algorithms to work (like \"AES\")");
-   publ

<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/internal/security/AuthorizeRequest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/CacheServerMXBean.java
----------------------------------------------------------------------



[04/50] [abbrv] incubator-geode git commit: fixing GEODE-590: CI failure in GMSLocatorRecoveryJUnitTest

Posted by je...@apache.org.
fixing GEODE-590: CI failure in GMSLocatorRecoveryJUnitTest

GMSHealthMonitorJUnitTest was leaving a system property set and poisoning
subsequent unit tests by overriding the bind-address setting in the
junit JVM.

reviewed by Jianxia


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

Branch: refs/heads/feature/GEODE-17
Commit: 452328f5c71de8c60ff757bd33a6f96e6ee8d403
Parents: 1276cc8
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 23 12:29:52 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 23 12:29:52 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java     | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/452328f5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
index 697e899..1699068 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
@@ -100,6 +100,7 @@ public class GMSHealthMonitorJUnitTest {
   @After
   public void tearDown() {
     gmsHealthMonitor.stop();
+    System.getProperties().remove("gemfire.bind-address");
   }
 
   @Test


[17/50] [abbrv] incubator-geode git commit: GEODE-587: Improve classpath generation

Posted by je...@apache.org.
GEODE-587: Improve classpath generation

Improve classpath generation for the *-dependencies jar files.  All
dependent projects are now automatically analyzed for matching jar
names.


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

Branch: refs/heads/feature/GEODE-17
Commit: 3588b029a23c0dd4fd3576a7f25efe0c57581386
Parents: abad018
Author: Anthony Baker <ab...@pivotal.io>
Authored: Mon Nov 23 17:30:06 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Tue Nov 24 11:33:52 2015 -0800

----------------------------------------------------------------------
 gemfire-assembly/build.gradle | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3588b029/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index 8f803ae..1324cb9 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -74,13 +74,16 @@ task defaultCacheConfig(type: JavaExec, dependsOn: classes) {
 // This closure sets the gemfire classpath.  If we add another jar to the classpath it must
 // be included in the filter logic below.
 def cp = {
+  // first add all the dependent project jars
   def jars = configurations.archives.dependencies.collect { it.dependencyProject }
     .findAll { !it.name.contains('web') }
     .collect { it.jar.archiveName }
     .join(' ')
 
-  jars += ' ' + 
-    project(':gemfire-core').configurations.runtime.collect { it.getName() }.findAll {
+  // then add all the dependencies of the dependent jars
+  jars += ' ' + configurations.archives.dependencies.collect { 
+    it.dependencyProject.configurations.runtime.collect { it.getName() }.findAll {
+      // depedencies from gemfire-core
       it.contains('antlr') ||
       it.contains('commons-io') ||
       it.contains('commons-logging') ||
@@ -113,17 +116,16 @@ def cp = {
       it.contains('snappy-java') ||
       it.contains('hbase') ||
       it.contains('jgroups') ||
-      it.contains('netty')
-    }.join(' ')
-    
-  jars += ' ' +
-    project(':gemfire-lucene').configurations.runtime.collect { it.getName() }.findAll {
+      it.contains('netty') ||
+      
+      // dependencies from gemfire-lucene
       it.contains('lucene-analyzers-common') ||
       it.contains('lucene-core') ||
       it.contains('lucene-queries') ||
       it.contains('lucene-queryparser')
-    }.join(' ')
-    
+    }
+  }.flatten().unique().join(' ')
+
   return jars
 }
 


[26/50] [abbrv] incubator-geode git commit: GEODE-584: Update javadoc to fix link to OptionParser

Posted by je...@apache.org.
GEODE-584: Update javadoc to fix link to OptionParser


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

Branch: refs/heads/feature/GEODE-17
Commit: 91536e660e28cb7354db3e5d1819ff9deabb4146
Parents: f828a5e
Author: Anthony Baker <ab...@pivotal.io>
Authored: Wed Nov 25 11:34:52 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Wed Nov 25 11:34:52 2015 -0800

----------------------------------------------------------------------
 .../management/internal/cli/parser/jopt/JoptOptionParser.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/91536e66/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/parser/jopt/JoptOptionParser.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/parser/jopt/JoptOptionParser.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/parser/jopt/JoptOptionParser.java
index 29ebb02..6a1a828 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/parser/jopt/JoptOptionParser.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/parser/jopt/JoptOptionParser.java
@@ -43,7 +43,7 @@ import com.gemstone.gemfire.management.internal.cli.parser.preprocessor.TrimmedI
 
 /**
  * Implementation of {@link GfshOptionParser} which internally makes use of
- * {@link com.gemstone.joptsimple.OptionParser}
+ * {@link joptsimple.OptionParser}
  * 
  * @author Nikhil Jadhav
  * @since 7.0


[16/50] [abbrv] incubator-geode git commit: Fix Spark Connector tutorial links flow

Posted by je...@apache.org.
Fix Spark Connector tutorial links flow


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

Branch: refs/heads/feature/GEODE-17
Commit: 00ffa98e6d62c8f8b5c1df15aa8bae180ac1d266
Parents: abad018
Author: Paweł Antczak <pa...@antczak.org>
Authored: Tue Nov 24 20:17:23 2015 +0100
Committer: Paweł Antczak <pa...@antczak.org>
Committed: Tue Nov 24 20:17:23 2015 +0100

----------------------------------------------------------------------
 gemfire-spark-connector/doc/5_rdd_join.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/00ffa98e/gemfire-spark-connector/doc/5_rdd_join.md
----------------------------------------------------------------------
diff --git a/gemfire-spark-connector/doc/5_rdd_join.md b/gemfire-spark-connector/doc/5_rdd_join.md
index 40b14ae..81be061 100644
--- a/gemfire-spark-connector/doc/5_rdd_join.md
+++ b/gemfire-spark-connector/doc/5_rdd_join.md
@@ -234,4 +234,4 @@ rdd4o.foreach(println)
 ```
 
 
-Next: [Saving RDD to Geode](6_save_join.md)
+Next: [Saving RDD to Geode](6_save_rdd.md)


[02/50] [abbrv] incubator-geode git commit: Add ASF License to html, xml, xsd & dtd files

Posted by je...@apache.org.
Add ASF License to html, xml, xsd & dtd files


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

Branch: refs/heads/feature/GEODE-17
Commit: 4e4228e039a4ad3818a75d856e072dcf1bdc58af
Parents: e3fbf0c
Author: Niall Pemberton <ni...@apache.org>
Authored: Sun Nov 22 01:05:34 2015 +0000
Committer: Niall Pemberton <ni...@apache.org>
Committed: Mon Nov 23 02:01:14 2015 +0000

----------------------------------------------------------------------
 .../gemfire/admin/internal/package.html         | 16 ++++++++++++++++
 .../gemfire/admin/jmx/internal/package.html     | 16 ++++++++++++++++
 .../com/gemstone/gemfire/admin/jmx/package.html | 16 ++++++++++++++++
 .../com/gemstone/gemfire/admin/package.html     | 16 ++++++++++++++++
 .../gemfire/cache/client/internal/package.html  | 16 ++++++++++++++++
 .../gemstone/gemfire/cache/client/package.html  | 15 +++++++++++++++
 .../gemstone/gemfire/cache/control/package.html | 16 ++++++++++++++++
 .../gemstone/gemfire/cache/execute/package.html | 15 +++++++++++++++
 .../gemfire/cache/operations/package.html       | 16 ++++++++++++++++
 .../com/gemstone/gemfire/cache/package.html     | 16 ++++++++++++++++
 .../gemfire/cache/partition/package.html        | 16 ++++++++++++++++
 .../cache/query/internal/index/package.html     | 16 ++++++++++++++++
 .../gemfire/cache/query/internal/package.html   | 16 ++++++++++++++++
 .../gemstone/gemfire/cache/query/package.html   | 16 ++++++++++++++++
 .../gemstone/gemfire/cache/server/package.html  | 15 +++++++++++++++
 .../gemfire/cache/snapshot/package.html         | 17 ++++++++++++++++-
 .../gemstone/gemfire/cache/util/package.html    | 15 +++++++++++++++
 .../internal/distribution-overview.html         | 16 ++++++++++++++++
 .../distributed/internal/locks/package.html     | 16 ++++++++++++++++
 .../internal/membership/gms/package.html        | 16 ++++++++++++++++
 .../gemfire/distributed/internal/package.html   | 16 ++++++++++++++++
 .../gemstone/gemfire/distributed/package.html   | 16 ++++++++++++++++
 .../gemfire/internal/admin/package.html         | 16 ++++++++++++++++
 .../gemfire/internal/admin/remote/package.html  | 16 ++++++++++++++++
 .../internal/cache/doc-files/properties.html    | 16 ++++++++++++++++
 .../gemfire/internal/cache/package.html         | 16 ++++++++++++++++
 .../gemfire/internal/cache/tier/package.html    | 16 ++++++++++++++++
 .../internal/cache/tier/sockets/package.html    | 16 ++++++++++++++++
 .../internal/cache/xmlcache/package.html        | 16 ++++++++++++++++
 .../com/gemstone/gemfire/internal/package.html  | 16 ++++++++++++++++
 .../gemfire/internal/security/package.html      | 16 ++++++++++++++++
 .../gemfire/internal/statistics/package.html    | 16 ++++++++++++++++
 .../gemstone/gemfire/internal/tcp/package.html  | 16 ++++++++++++++++
 .../gemfire/management/cli/package.html         | 16 ++++++++++++++++
 .../gemstone/gemfire/management/package.html    | 16 ++++++++++++++++
 .../main/java/com/gemstone/gemfire/package.html | 16 ++++++++++++++++
 .../java/com/gemstone/gemfire/pdx/package.html  | 15 +++++++++++++++
 .../com/gemstone/gemfire/security/package.html  | 16 ++++++++++++++++
 .../src/main/java/external-overview.html        | 16 ++++++++++++++++
 .../src/main/java/internal-overview.html        | 16 ++++++++++++++++
 .../gemfire/cache/cache-8.1.xsd                 | 16 ++++++++++++++++
 .../gemfire/cache/cache-9.0.xsd                 | 16 ++++++++++++++++
 .../gemstone/gemfire/admin/doc-files/ds4_0.dtd  | 15 +++++++++++++++
 .../gemstone/gemfire/admin/doc-files/ds5_0.dtd  | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache3_0.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache4_0.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache4_1.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache5_0.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache5_1.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache5_5.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache5_7.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache5_8.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache6_0.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache6_1.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache6_5.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache6_6.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache7_0.dtd        | 15 +++++++++++++++
 .../gemfire/cache/doc-files/cache8_0.dtd        | 15 +++++++++++++++
 .../membership/gms/messenger/jgroups-config.xml | 16 ++++++++++++++++
 .../membership/gms/messenger/jgroups-mcast.xml  | 16 ++++++++++++++++
 .../internal/cli/commands/support/gfmon.html    | 20 ++++++++++++++------
 .../com/gemstone/gemfire/statisticsType.dtd     | 17 ++++++++++++++++-
 .../resources/templates/security/authz5_5.dtd   | 16 ++++++++++++++++
 .../resources/templates/security/authz6_0.dtd   | 16 ++++++++++++++++
 .../lucene/lucene-1.0.xsd                       | 16 ++++++++++++++++
 .../main/webapp/WEB-INF/gemfire-api-servlet.xml | 16 ++++++++++++++++
 gemfire-web-api/src/main/webapp/WEB-INF/web.xml | 16 ++++++++++++++++
 .../src/main/webapp/WEB-INF/gemfire-servlet.xml | 16 ++++++++++++++++
 gemfire-web/src/main/webapp/WEB-INF/web.xml     | 16 ++++++++++++++++
 69 files changed, 1081 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
index 0bffe07..87d71b8 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/internal/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/package.html
index 266cfa6..9bccd40 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/internal/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/package.html
index c637d23..acbefa8 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/jmx/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/admin/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/package.html
index 172e1b6..86d7651 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/admin/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/admin/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
index 28abb54..18443ca 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/internal/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
index e2f7bce..224951d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/client/package.html
@@ -1,5 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
   <HEAD>
     <TITLE>com.gemstone.gemfire.cache.client package</TITLE>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/control/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/control/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/control/package.html
index 21fe3b8..74c0aa0 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/control/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/control/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <body>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/execute/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/execute/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/execute/package.html
index 89ea50a..f66eec4 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/execute/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/execute/package.html
@@ -1,5 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
   <HEAD>
     <TITLE>com.gemstone.gemfire.cache.execute package</TITLE>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/package.html
index 3db873c..c7ad91b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/package.html
index f28a6b9..150d231 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <body>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/package.html
index c9e6939..a8457a5 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/partition/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <body>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/package.html
index baa7e1a..c77a3c9 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/package.html
@@ -1,4 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <HEAD>
 	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/package.html
index 131f7a6..709a0aa 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/package.html
@@ -1,4 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <HEAD>
 	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/package.html
index 854b922..c11298d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/package.html
@@ -1,4 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <HEAD>
 	<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=iso-8859-1">

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/package.html
index e08df71..608fa13 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/server/package.html
@@ -1,5 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
   <HEAD>
     <TITLE>com.gemstone.gemfire.cache.server package</TITLE>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/snapshot/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/snapshot/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/snapshot/package.html
index 78a9b0b..6239302 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/snapshot/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/snapshot/package.html
@@ -1,5 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <head>
  <title>com.gemstone.gemfire.cache.snapshot</title>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/package.html
index 0bd948f..9fc799f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/util/package.html
@@ -1,5 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
   <HEAD>
     <TITLE></TITLE>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/distribution-overview.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/distribution-overview.html b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/distribution-overview.html
index e9b5840..9e07ead 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/distribution-overview.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/distribution-overview.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
index 076c25e..e2b742e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/locks/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/package.html
index 54eb2a3..6686b80 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
index 2ffc8d5..4287ed6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/package.html
index d24dd05..d325f38 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/package.html
index 4371783..efcc8f2 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html
index 870795b..2f0fa6e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/admin/remote/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html
index 710d438..1cd1b72 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/doc-files/properties.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <head>
 <title>GemFire System Properties</title>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
index ef35583..cdef772 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 
 <BODY>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/package.html
index f1ba95c..b8794f2 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/package.html
index 5272617..515dee5 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/package.html
index b691d16..3ae3d93 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/package.html
index 3252df8..8a4bc9b 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/security/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/security/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/security/package.html
index 1097f98..ab368bd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/security/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/security/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/package.html
index 0a7eb2f..8875df2 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/statistics/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <body>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/package.html
index cb67fe6..2a2c6a7 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <body>
 Contains TCP/IP communications conduit

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/management/cli/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/cli/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/management/cli/package.html
index 238379a..a163b0e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/cli/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/cli/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <body>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/management/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/management/package.html
index 2221c75..c4dd290 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <html>
 <body>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/package.html
index 74a192e..1da3b37 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/package.html
index 66601f2..30cd868 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/package.html
@@ -1,5 +1,20 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
 
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
   <HEAD>
     <TITLE>com.gemstone.gemfire.pdx package</TITLE>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/com/gemstone/gemfire/security/package.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/security/package.html b/gemfire-core/src/main/java/com/gemstone/gemfire/security/package.html
index 259aef5..7772765 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/security/package.html
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/security/package.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/external-overview.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/external-overview.html b/gemfire-core/src/main/java/external-overview.html
index f9524ff..6472059 100644
--- a/gemfire-core/src/main/java/external-overview.html
+++ b/gemfire-core/src/main/java/external-overview.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/java/internal-overview.html
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/internal-overview.html b/gemfire-core/src/main/java/internal-overview.html
index 022cbf2..37d093e 100644
--- a/gemfire-core/src/main/java/internal-overview.html
+++ b/gemfire-core/src/main/java/internal-overview.html
@@ -1,3 +1,19 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <HTML>
 <BODY>
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-8.1.xsd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-8.1.xsd b/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-8.1.xsd
index ac6e96a..a6add2c 100644
--- a/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-8.1.xsd
+++ b/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-8.1.xsd
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <xsd:schema
     targetNamespace="http://schema.pivotal.io/gemfire/cache"
     xmlns:gf="http://schema.pivotal.io/gemfire/cache"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-9.0.xsd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-9.0.xsd b/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-9.0.xsd
index 989ca37..1cd3567 100644
--- a/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-9.0.xsd
+++ b/gemfire-core/src/main/resources/META-INF/schemas/schema.pivotal.io/gemfire/cache/cache-9.0.xsd
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <xsd:schema
     targetNamespace="http://schema.pivotal.io/gemfire/cache"
     xmlns:gf="http://schema.pivotal.io/gemfire/cache"

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds4_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds4_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds4_0.dtd
index 506cfc0..6566af6 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds4_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds4_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for the GemFire distributed system administrative

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds5_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds5_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds5_0.dtd
index 2211bdb..d56fd4d 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds5_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/admin/doc-files/ds5_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for the GemFire distributed system administrative

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache3_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache3_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache3_0.dtd
index 3993634..44d42c2 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache3_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache3_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for the GemFire distributed cache declarative

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_0.dtd
index 8ccd09a..d91d50e 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for the GemFire distributed cache declarative

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_1.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_1.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_1.dtd
index f628278..d64968a 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_1.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache4_1.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for the GemFire distributed cache declarative

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_0.dtd
index 4316af0..34ca2a9 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for the GemFire distributed cache declarative

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_1.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_1.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_1.dtd
index 52ddeab..4a93047 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_1.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_1.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!--
 
 This is the XML DTD for the GemFire distributed cache declarative

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_5.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_5.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_5.dtd
index f2be71a..090f7f9 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_5.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_5.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_7.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_7.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_7.dtd
index 77f05d7..95e54fd 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_7.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_7.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_8.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_8.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_8.dtd
index c7f01c6..dc2ae73 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_8.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache5_8.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_0.dtd
index 8ee1799..82bdc11 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_1.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_1.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_1.dtd
index 6bfd6d6..3215fbc 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_1.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_1.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_5.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_5.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_5.dtd
index 157f9c9..9798748 100755
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_5.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_5.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_6.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_6.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_6.dtd
index 808c044..0a2c2f2 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_6.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache6_6.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4e4228e0/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache7_0.dtd
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache7_0.dtd b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache7_0.dtd
index f2c9c99..5dce436 100644
--- a/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache7_0.dtd
+++ b/gemfire-core/src/main/resources/com/gemstone/gemfire/cache/doc-files/cache7_0.dtd
@@ -1,5 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
 
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+-->
 <!-- ======================================================= -->
 <!--
 



[03/50] [abbrv] incubator-geode git commit: fixing compilation problem for Eclipse v4.4.1 in new unit test

Posted by je...@apache.org.
fixing compilation problem for Eclipse v4.4.1 in new unit test

reviewed by Dan


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

Branch: refs/heads/feature/GEODE-17
Commit: 1276cc80033c4e8c642137d2d7e53291c4b4fc71
Parents: 25c8f0c
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 23 12:25:37 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 23 12:25:37 2015 -0800

----------------------------------------------------------------------
 .../lucene/internal/PartitionedRepositoryManagerJUnitTest.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1276cc80/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
index 41376f5..bf09f99 100644
--- a/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
+++ b/gemfire-lucene/src/test/java/com/gemstone/gemfire/cache/lucene/internal/PartitionedRepositoryManagerJUnitTest.java
@@ -171,7 +171,7 @@ public class PartitionedRepositoryManagerJUnitTest {
 
     Set<Integer> buckets = new LinkedHashSet<Integer>(Arrays.asList(0, 1));
     InternalRegionFunctionContext ctx = Mockito.mock(InternalRegionFunctionContext.class);
-    Mockito.when(ctx.getLocalBucketSet((any(Region.class)))).thenReturn(buckets);
+    Mockito.when(ctx.getLocalBucketSet((any()))).thenReturn(buckets);
     Collection<IndexRepository> repos = repoManager.getRepositories(ctx);
     assertEquals(2, repos.size());
 
@@ -199,7 +199,7 @@ public class PartitionedRepositoryManagerJUnitTest {
     Set<Integer> buckets = new LinkedHashSet<Integer>(Arrays.asList(0, 1));
 
     InternalRegionFunctionContext ctx = Mockito.mock(InternalRegionFunctionContext.class);
-    Mockito.when(ctx.getLocalBucketSet((any(Region.class)))).thenReturn(buckets);
+    Mockito.when(ctx.getLocalBucketSet((any()))).thenReturn(buckets);
     repoManager.getRepositories(ctx);
   }
   


[19/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-584

Posted by je...@apache.org.
Merge branch 'develop' into feature/GEODE-584


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

Branch: refs/heads/feature/GEODE-17
Commit: e38a9425a5ef193759139a4933079bdb728c6489
Parents: 1e33973 52f0a1d
Author: Anthony Baker <ab...@pivotal.io>
Authored: Tue Nov 24 12:26:05 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Tue Nov 24 12:26:05 2015 -0800

----------------------------------------------------------------------
 gemfire-assembly/build.gradle                   |   35 +-
 .../internal/GetOperationContextImpl.java       |    2 +-
 .../query/internal/index/AbstractIndex.java     |    2 +-
 .../query/internal/index/DummyQRegion.java      |    2 +-
 .../cache/query/internal/index/HashIndex.java   |  178 +-
 .../query/internal/index/HashIndexSet.java      | 1086 ++----
 .../query/internal/index/HashIndexStrategy.java |   90 -
 .../internal/DistributionManager.java           |    2 +-
 .../internal/InternalDistributedSystem.java     |    8 +-
 .../gms/messenger/JGroupsMessenger.java         |    9 +-
 .../internal/cache/AbstractRegionEntry.java     |   29 +-
 .../internal/cache/AbstractRegionMap.java       |   16 +-
 .../cache/BytesAndBitsForCompactor.java         |    2 +-
 .../gemfire/internal/cache/DiskEntry.java       |    8 +-
 .../internal/cache/DistributedRegion.java       |    2 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |   45 +-
 .../internal/cache/GemFireCacheImpl.java        |    4 -
 .../gemfire/internal/cache/LocalRegion.java     |   10 +-
 .../gemstone/gemfire/internal/cache/Oplog.java  |    6 +-
 .../internal/cache/PartitionedRegion.java       |    2 +-
 .../internal/cache/VMThinRegionEntry.java       |    5 -
 .../internal/cache/tier/sockets/Part.java       |    4 +-
 .../cache/wan/GatewaySenderEventImpl.java       |   10 +-
 .../gemfire/internal/offheap/Chunk.java         |  793 +++++
 .../gemfire/internal/offheap/ChunkFactory.java  |   51 +
 .../gemfire/internal/offheap/ChunkType.java     |   26 +
 .../internal/offheap/ChunkWithHeapForm.java     |   40 +
 .../gemfire/internal/offheap/DataAsAddress.java |  205 ++
 .../gemfire/internal/offheap/Fragment.java      |  125 +
 .../internal/offheap/FreeListManager.java       |  807 +++++
 .../gemfire/internal/offheap/GemFireChunk.java  |   55 +
 .../internal/offheap/GemFireChunkFactory.java   |   52 +
 .../internal/offheap/GemFireChunkSlice.java     |   44 +
 .../internal/offheap/LifecycleListener.java     |   98 +
 .../internal/offheap/MemoryAllocator.java       |    1 -
 .../gemfire/internal/offheap/MemoryBlock.java   |    1 -
 .../internal/offheap/MemoryBlockNode.java       |  158 +
 .../offheap/OffHeapCachedDeserializable.java    |    1 -
 .../gemfire/internal/offheap/OffHeapHelper.java |    8 +-
 .../offheap/OffHeapRegionEntryHelper.java       |    8 +-
 .../internal/offheap/RefCountChangeInfo.java    |  112 +
 .../internal/offheap/ReferenceCountHelper.java  |  235 ++
 .../offheap/SimpleMemoryAllocatorImpl.java      | 3242 +-----------------
 .../internal/offheap/SyncChunkStack.java        |  130 +
 .../internal/tcp/ByteBufferInputStream.java     |    2 +-
 .../tcp/ImmutableByteBufferInputStream.java     |    2 +-
 .../gemfire/internal/util/BlobHelper.java       |    2 +-
 .../gemfire/internal/util/ObjectProcedure.java  |   30 -
 .../gemfire/internal/util/PrimeFinder.java      |  159 -
 .../gemfire/pdx/internal/PdxInputStream.java    |    2 +-
 .../internal/index/HashIndexJUnitTest.java      |   23 +-
 .../internal/index/HashIndexSetJUnitTest.java   |  504 +++
 .../cache30/ClientMembershipDUnitTest.java      |    5 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |    4 +-
 .../locator/GMSLocatorRecoveryJUnitTest.java    |    4 +-
 .../fd/GMSHealthMonitorJUnitTest.java           |    3 +-
 ...wardCompatibilitySerializationDUnitTest.java |   13 +-
 .../cache/ChunkValueWrapperJUnitTest.java       |    2 +-
 .../gemfire/internal/cache/OffHeapTestUtil.java |    5 +-
 .../cache/OldValueImporterTestBase.java         |    4 +-
 .../offheap/ConcurrentBagJUnitTest.java         |  130 -
 .../offheap/FreeListOffHeapRegionJUnitTest.java |    2 +-
 .../internal/offheap/OffHeapRegionBase.java     |    1 -
 .../offheap/OffHeapValidationJUnitTest.java     |    1 -
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |    2 -
 .../OldFreeListOffHeapRegionJUnitTest.java      |    2 +-
 ...mpleMemoryAllocatorFillPatternJUnitTest.java |    2 -
 .../offheap/SimpleMemoryAllocatorJUnitTest.java |    9 +-
 ...moryAllocatorLifecycleListenerJUnitTest.java |    9 +-
 .../OffHeapByteBufferByteSourceJUnitTest.java   |    2 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |    2 +-
 .../gemfire/codeAnalysis/excludedClasses.txt    |    1 +
 .../codeAnalysis/sanctionedSerializables.txt    |    1 -
 gemfire-lucene/build.gradle                     |    4 +-
 .../PartitionedRepositoryManagerJUnitTest.java  |    4 +-
 75 files changed, 4073 insertions(+), 4612 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e38a9425/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --cc gemfire-assembly/build.gradle
index de8b584,1324cb9..1f1b798
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@@ -73,14 -74,19 +74,19 @@@ task defaultCacheConfig(type: JavaExec
  // This closure sets the gemfire classpath.  If we add another jar to the classpath it must
  // be included in the filter logic below.
  def cp = {
-   configurations.archives.dependencies.collect { it.dependencyProject }
+   // first add all the dependent project jars
+   def jars = configurations.archives.dependencies.collect { it.dependencyProject }
      .findAll { !it.name.contains('web') }
      .collect { it.jar.archiveName }
-     .join(' ') + ' ' +
-     project(':gemfire-core').configurations.runtime.collect { it.getName() }.findAll {
+     .join(' ')
+ 
+   // then add all the dependencies of the dependent jars
+   jars += ' ' + configurations.archives.dependencies.collect { 
+     it.dependencyProject.configurations.runtime.collect { it.getName() }.findAll {
+       // depedencies from gemfire-core
        it.contains('antlr') ||
        it.contains('commons-io') ||
 -      it.contains('commons-logging') ||
 +      it.contains('commons-lang') ||
        it.contains('fastutil') ||
        it.contains('jackson-annotations') ||
        it.contains('jackson-core') ||


[24/50] [abbrv] incubator-geode git commit: GEODE-584: Fix classpath

Posted by je...@apache.org.
GEODE-584: Fix classpath


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

Branch: refs/heads/feature/GEODE-17
Commit: f828a5ebf9acf57081434203d5a0d8715c0ed797
Parents: e38a942
Author: Anthony Baker <ab...@pivotal.io>
Authored: Tue Nov 24 17:06:59 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Tue Nov 24 17:06:59 2015 -0800

----------------------------------------------------------------------
 gemfire-assembly/build.gradle | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f828a5eb/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index 1f1b798..e097b65 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -87,6 +87,7 @@ def cp = {
       it.contains('antlr') ||
       it.contains('commons-io') ||
       it.contains('commons-lang') ||
+      it.contains('commons-logging') ||
       it.contains('fastutil') ||
       it.contains('jackson-annotations') ||
       it.contains('jackson-core') ||


[50/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-17

Posted by je...@apache.org.
Merge branch 'develop' into feature/GEODE-17


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

Branch: refs/heads/feature/GEODE-17
Commit: 3bf38a0309424e066c12b47a8a38b05ab2c47e75
Parents: d28bdfc 3259c02
Author: Jens Deppe <jd...@pivotal.io>
Authored: Mon Dec 7 09:02:45 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Mon Dec 7 09:02:45 2015 -0800

----------------------------------------------------------------------
 README.md                                       |   11 +-
 build.gradle                                    |  100 +-
 dev-tools/docker/base/Dockerfile                |   54 +
 dev-tools/docker/base/build-base-docker.sh      |   30 +
 dev-tools/docker/compile/Dockerfile             |   21 +
 .../docker/compile/start-compile-docker.sh      |   62 +
 docker/Dockerfile                               |   56 +-
 docker/README.md                                |    6 +-
 docker/build-runtime-docker.sh                  |   32 +
 gemfire-assembly/build.gradle                   |   57 +-
 gemfire-assembly/src/main/dist/bin/gfsh         |    2 +-
 gemfire-assembly/src/main/dist/bin/gfsh.bat     |    2 +-
 .../management/internal/AgentUtilJUnitTest.java |   14 +-
 gemfire-common/build.gradle                     |    3 +
 .../gemfire/annotations/Experimental.java       |   56 +
 .../annotations/ExperimentalJUnitTest.java      |  199 +
 .../ClassInExperimentalPackage.java             |   27 +
 .../experimentalpackage/package-info.java       |   27 +
 .../ClassInNonExperimentalPackage.java          |   27 +
 .../nonexperimentalpackage/package-info.java    |   24 +
 gemfire-core/build.gradle                       |  187 +-
 .../internal/ra/GFConnectionFactoryImpl.java    |   21 +-
 .../gemfire/internal/ra/GFConnectionImpl.java   |   21 +-
 .../internal/ra/spi/JCALocalTransaction.java    |   21 +-
 .../internal/ra/spi/JCAManagedConnection.java   |   21 +-
 .../ra/spi/JCAManagedConnectionFactory.java     |   21 +-
 .../ra/spi/JCAManagedConnectionMetaData.java    |   21 +-
 gemfire-core/src/jca/ra.xml                     |    2 +-
 .../com/gemstone/gemfire/CancelCriterion.java   |   21 +-
 .../com/gemstone/gemfire/CancelException.java   |   21 +-
 .../gemstone/gemfire/CanonicalInstantiator.java |   21 +-
 .../com/gemstone/gemfire/CopyException.java     |   21 +-
 .../java/com/gemstone/gemfire/CopyHelper.java   |   21 +-
 .../com/gemstone/gemfire/DataSerializable.java  |   21 +-
 .../com/gemstone/gemfire/DataSerializer.java    |   34 +-
 .../main/java/com/gemstone/gemfire/Delta.java   |   21 +-
 .../gemfire/DeltaSerializationException.java    |   21 +-
 .../gemfire/ForcedDisconnectException.java      |   21 +-
 .../gemstone/gemfire/GemFireCacheException.java |   21 +-
 .../gemfire/GemFireCheckedException.java        |   21 +-
 .../gemfire/GemFireConfigException.java         |   21 +-
 .../com/gemstone/gemfire/GemFireException.java  |   21 +-
 .../gemstone/gemfire/GemFireIOException.java    |   21 +-
 .../gemstone/gemfire/GemFireRethrowable.java    |   21 +-
 .../gemfire/IncompatibleSystemException.java    |   21 +-
 .../java/com/gemstone/gemfire/Instantiator.java |   21 +-
 .../gemstone/gemfire/InternalGemFireError.java  |   21 +-
 .../gemfire/InternalGemFireException.java       |   21 +-
 .../gemstone/gemfire/InvalidDeltaException.java |   21 +-
 .../gemstone/gemfire/InvalidValueException.java |   21 +-
 .../gemfire/InvalidVersionException.java        |   16 +
 .../com/gemstone/gemfire/LicenseException.java  |   21 +-
 .../java/com/gemstone/gemfire/LogWriter.java    |   21 +-
 .../com/gemstone/gemfire/NoSystemException.java |   21 +-
 .../gemfire/OutOfOffHeapMemoryException.java    |   21 +-
 .../gemfire/SerializationException.java         |   21 +-
 .../gemstone/gemfire/StatisticDescriptor.java   |   21 +-
 .../java/com/gemstone/gemfire/Statistics.java   |   21 +-
 .../com/gemstone/gemfire/StatisticsFactory.java |   21 +-
 .../com/gemstone/gemfire/StatisticsType.java    |   21 +-
 .../gemstone/gemfire/StatisticsTypeFactory.java |   21 +-
 .../gemfire/SystemConnectException.java         |   21 +-
 .../com/gemstone/gemfire/SystemFailure.java     |   25 +-
 .../gemfire/SystemIsRunningException.java       |   21 +-
 .../gemfire/ThreadInterruptedException.java     |   18 +-
 .../com/gemstone/gemfire/ToDataException.java   |   21 +-
 .../gemfire/UncreatedSystemException.java       |   21 +-
 .../gemstone/gemfire/UnmodifiableException.java |   21 +-
 .../gemfire/UnstartedSystemException.java       |   21 +-
 .../com/gemstone/gemfire/admin/AdminConfig.java |   21 +-
 .../gemfire/admin/AdminDistributedSystem.java   |   26 +-
 .../admin/AdminDistributedSystemFactory.java    |   21 +-
 .../gemstone/gemfire/admin/AdminException.java  |   21 +-
 .../gemfire/admin/AdminXmlException.java        |   21 +-
 .../java/com/gemstone/gemfire/admin/Alert.java  |   21 +-
 .../com/gemstone/gemfire/admin/AlertLevel.java  |   21 +-
 .../gemstone/gemfire/admin/AlertListener.java   |   21 +-
 .../gemstone/gemfire/admin/BackupStatus.java    |   21 +-
 .../admin/CacheDoesNotExistException.java       |   21 +-
 .../gemfire/admin/CacheHealthConfig.java        |   21 +-
 .../com/gemstone/gemfire/admin/CacheServer.java |   21 +-
 .../gemfire/admin/CacheServerConfig.java        |   21 +-
 .../com/gemstone/gemfire/admin/CacheVm.java     |   21 +-
 .../gemstone/gemfire/admin/CacheVmConfig.java   |   21 +-
 .../gemfire/admin/ConfigurationParameter.java   |   21 +-
 .../gemfire/admin/DistributedSystemConfig.java  |   21 +-
 .../admin/DistributedSystemHealthConfig.java    |   21 +-
 .../gemfire/admin/DistributionLocator.java      |   21 +-
 .../admin/DistributionLocatorConfig.java        |   21 +-
 .../gemstone/gemfire/admin/GemFireHealth.java   |   21 +-
 .../gemfire/admin/GemFireHealthConfig.java      |   21 +-
 .../gemfire/admin/GemFireMemberStatus.java      |   34 +-
 .../gemstone/gemfire/admin/ManagedEntity.java   |   21 +-
 .../gemfire/admin/ManagedEntityConfig.java      |   21 +-
 .../gemfire/admin/MemberHealthConfig.java       |   21 +-
 .../admin/OperationCancelledException.java      |   21 +-
 .../gemfire/admin/RegionNotFoundException.java  |   21 +-
 .../gemfire/admin/RegionSubRegionSnapshot.java  |   21 +-
 .../gemfire/admin/RuntimeAdminException.java    |   21 +-
 .../com/gemstone/gemfire/admin/Statistic.java   |   21 +-
 .../gemfire/admin/StatisticResource.java        |   21 +-
 .../gemstone/gemfire/admin/SystemMember.java    |   21 +-
 .../gemfire/admin/SystemMemberBridgeServer.java |   26 +-
 .../gemfire/admin/SystemMemberCache.java        |   48 +-
 .../gemfire/admin/SystemMemberCacheEvent.java   |   16 +
 .../admin/SystemMemberCacheListener.java        |   21 +-
 .../gemfire/admin/SystemMemberCacheServer.java  |   21 +-
 .../gemfire/admin/SystemMemberRegion.java       |   21 +-
 .../gemfire/admin/SystemMemberRegionEvent.java  |   16 +
 .../gemfire/admin/SystemMemberType.java         |   21 +-
 .../gemfire/admin/SystemMembershipEvent.java    |   21 +-
 .../gemfire/admin/SystemMembershipListener.java |   21 +-
 .../UnmodifiableConfigurationException.java     |   21 +-
 .../admin/internal/AbstractHealthEvaluator.java |   21 +-
 .../internal/AdminDistributedSystemImpl.java    |   45 +-
 .../admin/internal/BackupStatusImpl.java        |   21 +-
 .../admin/internal/CacheHealthConfigImpl.java   |   21 +-
 .../admin/internal/CacheHealthEvaluator.java    |   21 +-
 .../admin/internal/CacheServerConfigImpl.java   |   21 +-
 .../gemfire/admin/internal/CacheServerImpl.java |   21 +-
 .../internal/ConfigurationParameterImpl.java    |   21 +-
 .../ConfigurationParameterListener.java         |   21 +-
 .../DisabledManagedEntityController.java        |   21 +-
 .../internal/DistributedSystemConfigImpl.java   |   22 +-
 .../DistributedSystemHealthConfigImpl.java      |   21 +-
 .../DistributedSystemHealthEvaluator.java       |   21 +-
 .../DistributedSystemHealthMonitor.java         |   23 +-
 .../internal/DistributionLocatorConfigImpl.java |   21 +-
 .../admin/internal/DistributionLocatorImpl.java |   21 +-
 .../EnabledManagedEntityController.java         |   21 +-
 .../admin/internal/FinishBackupRequest.java     |   21 +-
 .../admin/internal/FinishBackupResponse.java    |   21 +-
 .../admin/internal/FlushToDiskRequest.java      |   21 +-
 .../admin/internal/FlushToDiskResponse.java     |   21 +-
 .../admin/internal/GemFireHealthConfigImpl.java |   21 +-
 .../admin/internal/GemFireHealthEvaluator.java  |   21 +-
 .../admin/internal/GemFireHealthImpl.java       |   21 +-
 .../gemfire/admin/internal/InetAddressUtil.java |   23 +-
 .../admin/internal/InternalManagedEntity.java   |   21 +-
 .../gemfire/admin/internal/LogCollator.java     |   21 +-
 .../admin/internal/ManagedEntityConfigImpl.java |   21 +-
 .../admin/internal/ManagedEntityConfigXml.java  |   21 +-
 .../ManagedEntityConfigXmlGenerator.java        |   42 +-
 .../internal/ManagedEntityConfigXmlParser.java  |   21 +-
 .../admin/internal/ManagedEntityController.java |   21 +-
 .../ManagedEntityControllerFactory.java         |   21 +-
 .../admin/internal/ManagedSystemMemberImpl.java |   21 +-
 .../admin/internal/MemberHealthConfigImpl.java  |   21 +-
 .../admin/internal/MemberHealthEvaluator.java   |   21 +-
 .../admin/internal/PrepareBackupRequest.java    |   21 +-
 .../admin/internal/PrepareBackupResponse.java   |   21 +-
 .../gemfire/admin/internal/StatisticImpl.java   |   21 +-
 .../admin/internal/StatisticResourceImpl.java   |   20 +-
 .../internal/SystemMemberBridgeServerImpl.java  |   21 +-
 .../internal/SystemMemberCacheEventImpl.java    |   21 +-
 .../SystemMemberCacheEventProcessor.java        |   21 +-
 .../admin/internal/SystemMemberCacheImpl.java   |   38 +-
 .../admin/internal/SystemMemberImpl.java        |   21 +-
 .../internal/SystemMemberRegionEventImpl.java   |   21 +-
 .../admin/internal/SystemMemberRegionImpl.java  |   21 +-
 .../internal/SystemMembershipEventImpl.java     |   21 +-
 .../gemfire/admin/internal/package.html         |   16 +
 .../com/gemstone/gemfire/admin/jmx/Agent.java   |   21 +-
 .../gemstone/gemfire/admin/jmx/AgentConfig.java |   21 +-
 .../gemfire/admin/jmx/AgentFactory.java         |   21 +-
 .../internal/AdminDistributedSystemJmxImpl.java |   21 +-
 .../admin/jmx/internal/AgentConfigImpl.java     |   21 +-
 .../gemfire/admin/jmx/internal/AgentImpl.java   |   35 +-
 .../admin/jmx/internal/AgentLauncher.java       |   21 +-
 .../admin/jmx/internal/CacheServerJmxImpl.java  |   21 +-
 .../admin/jmx/internal/ConfigAttributeInfo.java |   20 +-
 .../internal/ConfigurationParameterJmxImpl.java |   21 +-
 .../DistributedSystemHealthConfigJmxImpl.java   |   21 +-
 .../internal/DistributionLocatorJmxImpl.java    |   22 +-
 .../admin/jmx/internal/DynamicManagedBean.java  |   20 +-
 .../internal/GemFireHealthConfigJmxImpl.java    |   35 +-
 .../jmx/internal/GemFireHealthJmxImpl.java      |   21 +-
 .../admin/jmx/internal/GenerateMBeanHTML.java   |   21 +-
 .../gemfire/admin/jmx/internal/MBeanUtil.java   |   20 +-
 .../admin/jmx/internal/MX4JModelMBean.java      |   21 +-
 .../jmx/internal/MX4JServerSocketFactory.java   |   22 +-
 .../gemfire/admin/jmx/internal/MailManager.java |   21 +-
 .../admin/jmx/internal/ManagedResource.java     |   21 +-
 .../admin/jmx/internal/ManagedResourceType.java |   21 +-
 .../jmx/internal/MemberInfoWithStatsMBean.java  |   21 +-
 .../admin/jmx/internal/RMIRegistryService.java  |   20 +-
 .../jmx/internal/RMIRegistryServiceMBean.java   |   20 +-
 .../jmx/internal/RefreshNotificationType.java   |   21 +-
 .../jmx/internal/StatAlertNotification.java     |   21 +-
 .../jmx/internal/StatAlertsAggregator.java      |   21 +-
 .../jmx/internal/StatisticAttributeInfo.java    |   20 +-
 .../jmx/internal/StatisticResourceJmxImpl.java  |   21 +-
 .../SystemMemberBridgeServerJmxImpl.java        |   21 +-
 .../jmx/internal/SystemMemberCacheJmxImpl.java  |   34 +-
 .../admin/jmx/internal/SystemMemberJmx.java     |   21 +-
 .../admin/jmx/internal/SystemMemberJmxImpl.java |   21 +-
 .../jmx/internal/SystemMemberRegionJmxImpl.java |   21 +-
 .../gemfire/admin/jmx/internal/package.html     |   16 +
 .../com/gemstone/gemfire/admin/jmx/package.html |   16 +
 .../com/gemstone/gemfire/admin/package.html     |   16 +
 .../gemfire/cache/AttributesFactory.java        |  101 +-
 .../gemfire/cache/AttributesMutator.java        |   21 +-
 .../java/com/gemstone/gemfire/cache/Cache.java  |   50 +-
 .../gemstone/gemfire/cache/CacheCallback.java   |   21 +-
 .../gemfire/cache/CacheClosedException.java     |   21 +-
 .../com/gemstone/gemfire/cache/CacheEvent.java  |   21 +-
 .../gemstone/gemfire/cache/CacheException.java  |   21 +-
 .../gemfire/cache/CacheExistsException.java     |   21 +-
 .../gemstone/gemfire/cache/CacheFactory.java    |   21 +-
 .../gemstone/gemfire/cache/CacheListener.java   |   21 +-
 .../com/gemstone/gemfire/cache/CacheLoader.java |   21 +-
 .../gemfire/cache/CacheLoaderException.java     |   21 +-
 .../gemfire/cache/CacheRuntimeException.java    |   21 +-
 .../gemstone/gemfire/cache/CacheStatistics.java |   21 +-
 .../gemfire/cache/CacheTransactionManager.java  |   21 +-
 .../com/gemstone/gemfire/cache/CacheWriter.java |   21 +-
 .../gemfire/cache/CacheWriterException.java     |   21 +-
 .../gemfire/cache/CacheXmlException.java        |   21 +-
 .../gemstone/gemfire/cache/ClientSession.java   |   21 +-
 .../gemfire/cache/CommitConflictException.java  |   21 +-
 .../cache/CommitDistributionException.java      |   21 +-
 .../cache/CommitIncompleteException.java        |   16 +
 .../gemfire/cache/CustomEvictionAttributes.java |   22 +-
 .../gemstone/gemfire/cache/CustomExpiry.java    |   21 +-
 .../com/gemstone/gemfire/cache/DataPolicy.java  |   40 +-
 .../com/gemstone/gemfire/cache/Declarable.java  |   21 +-
 .../gemfire/cache/DiskAccessException.java      |   21 +-
 .../com/gemstone/gemfire/cache/DiskStore.java   |   21 +-
 .../gemfire/cache/DiskStoreFactory.java         |   21 +-
 .../gemfire/cache/DiskWriteAttributes.java      |   21 +-
 .../cache/DiskWriteAttributesFactory.java       |   21 +-
 .../DuplicatePrimaryPartitionException.java     |   21 +-
 .../gemfire/cache/DynamicRegionFactory.java     |  142 +-
 .../gemfire/cache/DynamicRegionListener.java    |   21 +-
 .../gemfire/cache/EntryDestroyedException.java  |   21 +-
 .../com/gemstone/gemfire/cache/EntryEvent.java  |   21 +-
 .../gemfire/cache/EntryExistsException.java     |   21 +-
 .../gemfire/cache/EntryNotFoundException.java   |   21 +-
 .../gemfire/cache/EntryNotFoundInRegion.java    |   21 +-
 .../gemstone/gemfire/cache/EntryOperation.java  |   23 +-
 .../gemstone/gemfire/cache/EvictionAction.java  |   26 +-
 .../gemfire/cache/EvictionAlgorithm.java        |   26 +-
 .../gemfire/cache/EvictionAttributes.java       |   20 +-
 .../cache/EvictionAttributesMutator.java        |   23 +-
 .../gemfire/cache/EvictionCriteria.java         |   22 +-
 .../gemfire/cache/ExpirationAction.java         |   21 +-
 .../gemfire/cache/ExpirationAttributes.java     |   21 +-
 .../cache/FailedSynchronizationException.java   |   21 +-
 .../gemfire/cache/FixedPartitionAttributes.java |   21 +-
 .../gemfire/cache/FixedPartitionResolver.java   |   20 +-
 .../cache/GatewayConfigurationException.java    |   21 +-
 .../gemfire/cache/GatewayException.java         |   21 +-
 .../gemstone/gemfire/cache/GemFireCache.java    |   46 +-
 .../cache/IncompatibleVersionException.java     |   21 +-
 .../gemstone/gemfire/cache/InterestPolicy.java  |   21 +-
 .../cache/InterestRegistrationEvent.java        |   21 +-
 .../cache/InterestRegistrationListener.java     |   21 +-
 .../gemfire/cache/InterestResultPolicy.java     |   21 +-
 .../gemstone/gemfire/cache/LoaderHelper.java    |   21 +-
 .../com/gemstone/gemfire/cache/LossAction.java  |   21 +-
 .../gemfire/cache/LowMemoryException.java       |   21 +-
 .../gemfire/cache/MembershipAttributes.java     |   21 +-
 .../com/gemstone/gemfire/cache/MirrorType.java  |   21 +-
 .../cache/NoQueueServersAvailableException.java |   21 +-
 ...NoSubscriptionServersAvailableException.java |   21 +-
 .../com/gemstone/gemfire/cache/Operation.java   |   21 +-
 .../cache/OperationAbortedException.java        |   21 +-
 .../gemfire/cache/PartitionAttributes.java      |   21 +-
 .../cache/PartitionAttributesFactory.java       |   20 +-
 .../gemfire/cache/PartitionResolver.java        |   20 +-
 .../PartitionedRegionDistributionException.java |   21 +-
 .../PartitionedRegionStorageException.java      |   21 +-
 .../java/com/gemstone/gemfire/cache/Region.java |   21 +-
 .../gemfire/cache/RegionAccessException.java    |   21 +-
 .../gemfire/cache/RegionAttributes.java         |   21 +-
 .../gemfire/cache/RegionDestroyedException.java |   21 +-
 .../cache/RegionDistributionException.java      |   21 +-
 .../com/gemstone/gemfire/cache/RegionEvent.java |   21 +-
 .../gemfire/cache/RegionExistsException.java    |   21 +-
 .../gemstone/gemfire/cache/RegionFactory.java   |   46 +-
 .../gemfire/cache/RegionMembershipListener.java |   21 +-
 .../cache/RegionReinitializedException.java     |   21 +-
 .../gemfire/cache/RegionRoleException.java      |   21 +-
 .../gemfire/cache/RegionRoleListener.java       |   21 +-
 .../gemstone/gemfire/cache/RegionService.java   |   23 +-
 .../gemstone/gemfire/cache/RegionShortcut.java  |   71 +-
 .../cache/RemoteTransactionException.java       |   21 +-
 .../gemstone/gemfire/cache/RequiredRoles.java   |   21 +-
 .../gemfire/cache/ResourceException.java        |   21 +-
 .../gemfire/cache/ResumptionAction.java         |   21 +-
 .../com/gemstone/gemfire/cache/RoleEvent.java   |   21 +-
 .../gemstone/gemfire/cache/RoleException.java   |   21 +-
 .../java/com/gemstone/gemfire/cache/Scope.java  |   21 +-
 .../gemfire/cache/SerializedCacheValue.java     |   21 +-
 .../cache/StatisticsDisabledException.java      |   21 +-
 .../gemfire/cache/SubscriptionAttributes.java   |   21 +-
 .../SynchronizationCommitConflictException.java |   21 +-
 .../gemfire/cache/TimeoutException.java         |   21 +-
 ...TransactionDataNodeHasDepartedException.java |   21 +-
 .../TransactionDataNotColocatedException.java   |   21 +-
 .../TransactionDataRebalancedException.java     |   21 +-
 .../gemfire/cache/TransactionEvent.java         |   21 +-
 .../gemfire/cache/TransactionException.java     |   21 +-
 .../gemstone/gemfire/cache/TransactionId.java   |   21 +-
 .../cache/TransactionInDoubtException.java      |   21 +-
 .../gemfire/cache/TransactionListener.java      |   21 +-
 .../gemfire/cache/TransactionWriter.java        |   21 +-
 .../cache/TransactionWriterException.java       |   21 +-
 ...upportedOperationInTransactionException.java |   21 +-
 .../cache/UnsupportedVersionException.java      |   21 +-
 .../gemfire/cache/VersionException.java         |   21 +-
 .../gemfire/cache/asyncqueue/AsyncEvent.java    |   21 +-
 .../cache/asyncqueue/AsyncEventListener.java    |   21 +-
 .../cache/asyncqueue/AsyncEventQueue.java       |   21 +-
 .../asyncqueue/AsyncEventQueueFactory.java      |   23 +-
 .../internal/AsyncEventQueueFactoryImpl.java    |   30 +-
 .../internal/AsyncEventQueueImpl.java           |   24 +-
 .../internal/AsyncEventQueueStats.java          |   21 +-
 .../internal/ParallelAsyncEventQueueImpl.java   |   18 +-
 .../internal/SerialAsyncEventQueueImpl.java     |   18 +-
 .../client/AllConnectionsInUseException.java    |   21 +-
 .../gemfire/cache/client/ClientCache.java       |   21 +-
 .../cache/client/ClientCacheFactory.java        |   21 +-
 .../cache/client/ClientNotReadyException.java   |   21 +-
 .../cache/client/ClientRegionFactory.java       |   21 +-
 .../cache/client/ClientRegionShortcut.java      |   23 +-
 .../client/NoAvailableLocatorsException.java    |   21 +-
 .../client/NoAvailableServersException.java     |   21 +-
 .../com/gemstone/gemfire/cache/client/Pool.java |   21 +-
 .../gemfire/cache/client/PoolFactory.java       |   31 +-
 .../gemfire/cache/client/PoolManager.java       |   21 +-
 .../client/ServerConnectivityException.java     |   21 +-
 .../cache/client/ServerOperationException.java  |   21 +-
 .../ServerRefusedConnectionException.java       |   21 +-
 .../client/SubscriptionNotEnabledException.java |   21 +-
 .../cache/client/internal/AbstractOp.java       |   23 +-
 .../cache/client/internal/AddPDXEnumOp.java     |   21 +-
 .../cache/client/internal/AddPDXTypeOp.java     |   21 +-
 .../client/internal/AuthenticateUserOp.java     |   23 +-
 .../internal/AutoConnectionSourceImpl.java      |   21 +-
 .../cache/client/internal/BridgePoolImpl.java   |  479 --
 .../internal/BridgeServerLoadMessage.java       |   99 -
 .../client/internal/CacheServerLoadMessage.java |  108 +
 .../gemfire/cache/client/internal/ClearOp.java  |   21 +-
 .../client/internal/ClientMetadataService.java  |   20 +-
 .../client/internal/ClientPartitionAdvisor.java |   21 +-
 .../internal/ClientRegionFactoryImpl.java       |   21 +-
 .../cache/client/internal/ClientUpdater.java    |   21 +-
 .../client/internal/CloseConnectionOp.java      |   21 +-
 .../gemfire/cache/client/internal/CommitOp.java |   21 +-
 .../cache/client/internal/Connection.java       |   21 +-
 .../client/internal/ConnectionFactory.java      |   21 +-
 .../client/internal/ConnectionFactoryImpl.java  |   52 +-
 .../cache/client/internal/ConnectionImpl.java   |   53 +-
 .../cache/client/internal/ConnectionSource.java |   21 +-
 .../cache/client/internal/ConnectionStats.java  |   21 +-
 .../cache/client/internal/ContainsKeyOp.java    |   21 +-
 .../DataSerializerRecoveryListener.java         |   21 +-
 .../cache/client/internal/DestroyOp.java        |   26 +-
 .../cache/client/internal/DestroyRegionOp.java  |   21 +-
 .../gemfire/cache/client/internal/Endpoint.java |   21 +-
 .../cache/client/internal/EndpointManager.java  |   21 +-
 .../client/internal/EndpointManagerImpl.java    |   31 +-
 .../cache/client/internal/ExecutablePool.java   |   21 +-
 .../client/internal/ExecuteFunctionHelper.java  |   21 +-
 .../client/internal/ExecuteFunctionNoAckOp.java |   21 +-
 .../client/internal/ExecuteFunctionOp.java      |   21 +-
 .../internal/ExecuteRegionFunctionNoAckOp.java  |   21 +-
 .../internal/ExecuteRegionFunctionOp.java       |   21 +-
 .../ExecuteRegionFunctionSingleHopOp.java       |   21 +-
 .../internal/ExplicitConnectionSourceImpl.java  |  106 +-
 .../gemfire/cache/client/internal/GetAllOp.java |   21 +-
 .../client/internal/GetClientPRMetaDataOp.java  |   20 +-
 .../GetClientPartitionAttributesOp.java         |   20 +-
 .../cache/client/internal/GetEntryOp.java       |   21 +-
 .../cache/client/internal/GetEventValueOp.java  |   20 +-
 .../client/internal/GetFunctionAttributeOp.java |   21 +-
 .../gemfire/cache/client/internal/GetOp.java    |   26 +-
 .../cache/client/internal/GetPDXEnumByIdOp.java |   21 +-
 .../cache/client/internal/GetPDXEnumsOp.java    |   21 +-
 .../client/internal/GetPDXIdForEnumOp.java      |   21 +-
 .../client/internal/GetPDXIdForTypeOp.java      |   21 +-
 .../cache/client/internal/GetPDXTypeByIdOp.java |   21 +-
 .../cache/client/internal/GetPDXTypesOp.java    |   21 +-
 .../internal/InstantiatorRecoveryListener.java  |   21 +-
 .../cache/client/internal/InternalPool.java     |   21 +-
 .../cache/client/internal/InvalidateOp.java     |   21 +-
 .../gemfire/cache/client/internal/KeySetOp.java |   21 +-
 .../cache/client/internal/LiveServerPinger.java |   21 +-
 .../internal/LocatorDiscoveryCallback.java      |   21 +-
 .../LocatorDiscoveryCallbackAdapter.java        |   21 +-
 .../cache/client/internal/MakePrimaryOp.java    |   21 +-
 .../gemfire/cache/client/internal/Op.java       |   23 +-
 .../cache/client/internal/OpExecutorImpl.java   |   21 +-
 .../internal/PdxRegistryRecoveryListener.java   |   21 +-
 .../gemfire/cache/client/internal/PingOp.java   |   37 +-
 .../gemfire/cache/client/internal/PoolImpl.java |   35 +-
 .../cache/client/internal/PrimaryAckOp.java     |   21 +-
 .../cache/client/internal/ProxyCache.java       |   21 +-
 .../client/internal/ProxyCacheCloseOp.java      |   21 +-
 .../cache/client/internal/ProxyRegion.java      |   21 +-
 .../gemfire/cache/client/internal/PutAllOp.java |   21 +-
 .../gemfire/cache/client/internal/PutOp.java    |   26 +-
 .../gemfire/cache/client/internal/QueryOp.java  |   21 +-
 .../client/internal/QueueConnectionImpl.java    |   21 +-
 .../cache/client/internal/QueueManager.java     |   21 +-
 .../cache/client/internal/QueueManagerImpl.java |   37 +-
 .../cache/client/internal/QueueState.java       |   16 +
 .../cache/client/internal/QueueStateImpl.java   |   27 +-
 .../cache/client/internal/ReadyForEventsOp.java |   21 +-
 .../internal/RegisterDataSerializersOp.java     |   29 +-
 .../internal/RegisterInstantiatorsOp.java       |   29 +-
 .../client/internal/RegisterInterestListOp.java |   21 +-
 .../client/internal/RegisterInterestOp.java     |   21 +-
 .../internal/RegisterInterestTracker.java       |   21 +-
 .../cache/client/internal/RemoveAllOp.java      |   21 +-
 .../cache/client/internal/RollbackOp.java       |   21 +-
 .../cache/client/internal/ServerBlackList.java  |   21 +-
 .../cache/client/internal/ServerProxy.java      |   21 +-
 .../client/internal/ServerRegionDataAccess.java |   23 +-
 .../client/internal/ServerRegionProxy.java      |   65 +-
 .../internal/SingleHopClientExecutor.java       |   21 +-
 .../internal/SingleHopOperationCallable.java    |   21 +-
 .../gemfire/cache/client/internal/SizeOp.java   |   21 +-
 .../cache/client/internal/TXFailoverOp.java     |   21 +-
 .../client/internal/TXSynchronizationOp.java    |   21 +-
 .../internal/UnregisterInterestListOp.java      |   21 +-
 .../client/internal/UnregisterInterestOp.java   |   21 +-
 .../cache/client/internal/UserAttributes.java   |   21 +-
 .../locator/ClientConnectionRequest.java        |   21 +-
 .../locator/ClientConnectionResponse.java       |   21 +-
 .../locator/ClientReplacementRequest.java       |   21 +-
 .../internal/locator/GetAllServersRequest.java  |   20 +-
 .../internal/locator/GetAllServersResponse.java |   20 +-
 .../internal/locator/LocatorListRequest.java    |   21 +-
 .../internal/locator/LocatorListResponse.java   |   21 +-
 .../internal/locator/LocatorStatusRequest.java  |   20 +-
 .../internal/locator/LocatorStatusResponse.java |   20 +-
 .../locator/QueueConnectionRequest.java         |   21 +-
 .../locator/QueueConnectionResponse.java        |   21 +-
 .../internal/locator/SerializationHelper.java   |   21 +-
 .../internal/locator/ServerLocationRequest.java |   23 +-
 .../locator/ServerLocationResponse.java         |   23 +-
 .../locator/wan/LocatorMembershipListener.java  |   21 +-
 .../gemfire/cache/client/internal/package.html  |   16 +
 .../pooling/ConnectionDestroyedException.java   |   21 +-
 .../internal/pooling/ConnectionManager.java     |   21 +-
 .../internal/pooling/ConnectionManagerImpl.java |   30 +-
 .../internal/pooling/PooledConnection.java      |   21 +-
 .../gemstone/gemfire/cache/client/package.html  |   15 +
 .../gemfire/cache/control/RebalanceFactory.java |   21 +-
 .../cache/control/RebalanceOperation.java       |   21 +-
 .../gemfire/cache/control/RebalanceResults.java |   21 +-
 .../gemfire/cache/control/ResourceManager.java  |   21 +-
 .../gemstone/gemfire/cache/control/package.html |   16 +
 .../execute/EmtpyRegionFunctionException.java   |   21 +-
 .../gemfire/cache/execute/Execution.java        |   20 +-
 .../gemfire/cache/execute/Function.java         |   20 +-
 .../gemfire/cache/execute/FunctionAdapter.java  |   20 +-
 .../gemfire/cache/execute/FunctionContext.java  |   20 +-
 .../cache/execute/FunctionException.java        |   20 +-
 .../FunctionInvocationTargetException.java      |   20 +-
 .../gemfire/cache/execute/FunctionService.java  |   20 +-
 .../cache/execute/RegionFunctionContext.java    |   21 +-
 .../gemfire/cache/execute/ResultCollector.java  |   20 +-
 .../gemfire/cache/execute/ResultSender.java     |   20 +-
 .../internal/FunctionServiceManager.java        |   27 +-
 .../gemstone/gemfire/cache/execute/package.html |   15 +
 .../gemfire/cache/hdfs/HDFSIOException.java     |   21 +-
 .../gemstone/gemfire/cache/hdfs/HDFSStore.java  |   21 +-
 .../gemfire/cache/hdfs/HDFSStoreFactory.java    |   21 +-
 .../gemfire/cache/hdfs/HDFSStoreMutator.java    |   21 +-
 .../cache/hdfs/StoreExistsException.java        |   21 +-
 .../cache/hdfs/internal/FailureTracker.java     |   21 +-
 .../cache/hdfs/internal/FlushObserver.java      |   16 +
 .../hdfs/internal/HDFSBucketRegionQueue.java    |   21 +-
 .../cache/hdfs/internal/HDFSEntriesSet.java     |   21 +-
 .../cache/hdfs/internal/HDFSEventListener.java  |   25 +-
 .../hdfs/internal/HDFSEventQueueFilter.java     |   21 +-
 .../hdfs/internal/HDFSGatewayEventImpl.java     |   22 +-
 .../hdfs/internal/HDFSIntegrationUtil.java      |   21 +-
 .../HDFSParallelGatewaySenderQueue.java         |   21 +-
 .../hdfs/internal/HDFSStoreConfigHolder.java    |   23 +-
 .../cache/hdfs/internal/HDFSStoreCreation.java  |   23 +-
 .../hdfs/internal/HDFSStoreFactoryImpl.java     |   21 +-
 .../cache/hdfs/internal/HDFSStoreImpl.java      |   21 +-
 .../hdfs/internal/HDFSStoreMutatorImpl.java     |   23 +-
 .../HDFSWriteOnlyStoreEventListener.java        |   21 +-
 .../hdfs/internal/HoplogListenerForRegion.java  |   21 +-
 .../cache/hdfs/internal/PersistedEventImpl.java |   21 +-
 .../hdfs/internal/QueuedPersistentEvent.java    |   16 +
 .../hdfs/internal/SignalledFlushObserver.java   |   16 +
 .../internal/SortedHDFSQueuePersistedEvent.java |   21 +-
 .../internal/SortedHoplogPersistedEvent.java    |   21 +-
 .../UnsortedHDFSQueuePersistedEvent.java        |   21 +-
 .../internal/UnsortedHoplogPersistedEvent.java  |   21 +-
 .../cache/hdfs/internal/cardinality/Bits.java   |   21 +-
 .../cardinality/CardinalityMergeException.java  |   21 +-
 .../hdfs/internal/cardinality/HyperLogLog.java  |   21 +-
 .../hdfs/internal/cardinality/IBuilder.java     |   21 +-
 .../hdfs/internal/cardinality/ICardinality.java |   21 +-
 .../hdfs/internal/cardinality/MurmurHash.java   |   21 +-
 .../hdfs/internal/cardinality/RegisterSet.java  |   21 +-
 .../hdfs/internal/hoplog/AbstractHoplog.java    |   21 +-
 .../hoplog/AbstractHoplogOrganizer.java         |   21 +-
 .../cache/hdfs/internal/hoplog/BloomFilter.java |   21 +-
 .../hoplog/CloseTmpHoplogsTimerTask.java        |   21 +-
 .../hdfs/internal/hoplog/CompactionStatus.java  |   21 +-
 .../cache/hdfs/internal/hoplog/FlushStatus.java |   16 +
 .../internal/hoplog/HDFSCompactionManager.java  |   21 +-
 .../internal/hoplog/HDFSFlushQueueArgs.java     |   16 +
 .../internal/hoplog/HDFSFlushQueueFunction.java |   16 +
 .../hoplog/HDFSForceCompactionArgs.java         |   21 +-
 .../hoplog/HDFSForceCompactionFunction.java     |   21 +-
 .../HDFSForceCompactionResultCollector.java     |   21 +-
 .../hoplog/HDFSLastCompactionTimeFunction.java  |   21 +-
 .../internal/hoplog/HDFSRegionDirector.java     |   21 +-
 .../hdfs/internal/hoplog/HDFSStoreDirector.java |   21 +-
 .../hoplog/HDFSUnsortedHoplogOrganizer.java     |   21 +-
 .../hdfs/internal/hoplog/HFileSortedOplog.java  |   21 +-
 .../hoplog/HdfsSortedOplogOrganizer.java        |   21 +-
 .../cache/hdfs/internal/hoplog/Hoplog.java      |   21 +-
 .../hdfs/internal/hoplog/HoplogConfig.java      |   21 +-
 .../hdfs/internal/hoplog/HoplogListener.java    |   21 +-
 .../hdfs/internal/hoplog/HoplogOrganizer.java   |   21 +-
 .../hdfs/internal/hoplog/HoplogSetIterator.java |   21 +-
 .../hdfs/internal/hoplog/HoplogSetReader.java   |   21 +-
 .../internal/hoplog/SequenceFileHoplog.java     |   21 +-
 .../hoplog/mapred/AbstractGFRecordReader.java   |   21 +-
 .../internal/hoplog/mapred/GFInputFormat.java   |   21 +-
 .../internal/hoplog/mapred/GFOutputFormat.java  |   21 +-
 .../mapreduce/AbstractGFRecordReader.java       |   21 +-
 .../hoplog/mapreduce/GFInputFormat.java         |   21 +-
 .../hdfs/internal/hoplog/mapreduce/GFKey.java   |   21 +-
 .../hoplog/mapreduce/GFOutputFormat.java        |   21 +-
 .../hoplog/mapreduce/HDFSSplitIterator.java     |   21 +-
 .../internal/hoplog/mapreduce/HoplogUtil.java   |   21 +-
 .../hoplog/mapreduce/RWSplitIterator.java       |   21 +-
 .../hoplog/mapreduce/StreamSplitIterator.java   |   21 +-
 .../org/apache/hadoop/io/SequenceFile.java      |   21 +-
 .../gemfire/cache/lucene/LuceneIndex.java       |   50 -
 .../gemfire/cache/lucene/LuceneQuery.java       |   37 -
 .../cache/lucene/LuceneQueryFactory.java        |  121 -
 .../cache/lucene/LuceneQueryResults.java        |   29 -
 .../cache/lucene/LuceneResultStruct.java        |   59 -
 .../gemfire/cache/lucene/LuceneService.java     |  103 -
 .../cache/lucene/LuceneServiceFactory.java      |   14 -
 .../cache/lucene/LuceneServiceProvider.java     |   36 -
 .../cache/lucene/internal/LuceneIndexImpl.java  |   54 -
 .../lucene/internal/LuceneQueryFactoryImpl.java |   88 -
 .../cache/lucene/internal/LuceneQueryImpl.java  |   62 -
 .../lucene/internal/LuceneQueryResultsImpl.java |   66 -
 .../lucene/internal/LuceneResultStructImpl.java |   45 -
 .../internal/LuceneServiceFactoryImpl.java      |   16 -
 .../lucene/internal/LuceneServiceImpl.java      |   90 -
 .../operations/CloseCQOperationContext.java     |   21 +-
 .../operations/DestroyOperationContext.java     |   21 +-
 .../operations/ExecuteCQOperationContext.java   |   21 +-
 .../ExecuteFunctionOperationContext.java        |   21 +-
 .../GetDurableCQsOperationContext.java          |   21 +-
 .../cache/operations/GetOperationContext.java   |   21 +-
 .../operations/InterestOperationContext.java    |   21 +-
 .../gemfire/cache/operations/InterestType.java  |   21 +-
 .../operations/InvalidateOperationContext.java  |   21 +-
 .../cache/operations/KeyOperationContext.java   |   21 +-
 .../operations/KeySetOperationContext.java      |   21 +-
 .../operations/KeyValueOperationContext.java    |   21 +-
 .../cache/operations/OperationContext.java      |   21 +-
 .../operations/PutAllOperationContext.java      |   21 +-
 .../cache/operations/PutOperationContext.java   |   21 +-
 .../cache/operations/QueryOperationContext.java |   21 +-
 .../operations/RegionClearOperationContext.java |   21 +-
 .../RegionCreateOperationContext.java           |   21 +-
 .../RegionDestroyOperationContext.java          |   21 +-
 .../operations/RegionOperationContext.java      |   21 +-
 .../RegisterInterestOperationContext.java       |   21 +-
 .../operations/RemoveAllOperationContext.java   |   21 +-
 .../operations/StopCQOperationContext.java      |   21 +-
 .../UnregisterInterestOperationContext.java     |   21 +-
 .../internal/GetOperationContextImpl.java       |   18 +-
 .../gemfire/cache/operations/package.html       |   16 +
 .../com/gemstone/gemfire/cache/package.html     |   16 +
 .../cache/partition/PartitionListener.java      |   20 +-
 .../partition/PartitionListenerAdapter.java     |   23 +-
 .../cache/partition/PartitionManager.java       |   22 +-
 .../cache/partition/PartitionMemberInfo.java    |   21 +-
 .../PartitionNotAvailableException.java         |   21 +-
 .../cache/partition/PartitionRebalanceInfo.java |   21 +-
 .../cache/partition/PartitionRegionHelper.java  |   20 +-
 .../cache/partition/PartitionRegionInfo.java    |   21 +-
 .../gemfire/cache/partition/package.html        |   16 +
 .../ConflictingPersistentDataException.java     |   21 +-
 .../persistence/PartitionOfflineException.java  |   21 +-
 .../gemfire/cache/persistence/PersistentID.java |   23 +-
 .../PersistentReplicatesOfflineException.java   |   21 +-
 .../persistence/RevokeFailedException.java      |   21 +-
 .../RevokedPersistentDataException.java         |   21 +-
 .../gemfire/cache/query/Aggregator.java         |   16 +
 .../cache/query/AmbiguousNameException.java     |   21 +-
 .../gemfire/cache/query/CqAttributes.java       |   21 +-
 .../cache/query/CqAttributesFactory.java        |   21 +-
 .../cache/query/CqAttributesMutator.java        |   21 +-
 .../gemfire/cache/query/CqClosedException.java  |   21 +-
 .../gemstone/gemfire/cache/query/CqEvent.java   |   21 +-
 .../gemfire/cache/query/CqException.java        |   21 +-
 .../gemfire/cache/query/CqExistsException.java  |   21 +-
 .../gemfire/cache/query/CqListener.java         |   21 +-
 .../gemstone/gemfire/cache/query/CqQuery.java   |   21 +-
 .../gemstone/gemfire/cache/query/CqResults.java |   21 +-
 .../cache/query/CqServiceStatistics.java        |   21 +-
 .../gemstone/gemfire/cache/query/CqState.java   |   21 +-
 .../gemfire/cache/query/CqStatistics.java       |   21 +-
 .../gemfire/cache/query/CqStatusListener.java   |   21 +-
 .../cache/query/FunctionDomainException.java    |   21 +-
 .../com/gemstone/gemfire/cache/query/Index.java |   21 +-
 .../cache/query/IndexCreationException.java     |   21 +-
 .../cache/query/IndexExistsException.java       |   21 +-
 .../cache/query/IndexInvalidException.java      |   21 +-
 .../cache/query/IndexMaintenanceException.java  |   21 +-
 .../cache/query/IndexNameConflictException.java |   21 +-
 .../gemfire/cache/query/IndexStatistics.java    |   21 +-
 .../gemstone/gemfire/cache/query/IndexType.java |   21 +-
 .../query/MultiIndexCreationException.java      |   16 +
 .../cache/query/NameNotFoundException.java      |   21 +-
 .../cache/query/NameResolutionException.java    |   21 +-
 .../query/ParameterCountInvalidException.java   |   21 +-
 .../com/gemstone/gemfire/cache/query/Query.java |   21 +-
 .../gemfire/cache/query/QueryException.java     |   21 +-
 .../query/QueryExecutionLowMemoryException.java |   21 +-
 .../query/QueryExecutionTimeoutException.java   |   21 +-
 .../cache/query/QueryInvalidException.java      |   21 +-
 .../query/QueryInvocationTargetException.java   |   21 +-
 .../gemfire/cache/query/QueryService.java       |   21 +-
 .../gemfire/cache/query/QueryStatistics.java    |   21 +-
 .../cache/query/RegionNotFoundException.java    |   21 +-
 .../gemfire/cache/query/SelectResults.java      |   21 +-
 .../gemstone/gemfire/cache/query/Struct.java    |   21 +-
 .../cache/query/TypeMismatchException.java      |   21 +-
 .../query/internal/AbstractCompiledValue.java   |   22 +-
 .../internal/AbstractGroupOrRangeJunction.java  |   21 +-
 .../cache/query/internal/AllGroupJunction.java  |   21 +-
 .../query/internal/AttributeDescriptor.java     |   22 +-
 .../gemfire/cache/query/internal/Bag.java       |   21 +-
 .../internal/CompiledAggregateFunction.java     |   16 +
 .../query/internal/CompiledBindArgument.java    |   22 +-
 .../query/internal/CompiledComparison.java      |   22 +-
 .../query/internal/CompiledConstruction.java    |   22 +-
 .../cache/query/internal/CompiledFunction.java  |   22 +-
 .../query/internal/CompiledGroupBySelect.java   |   16 +
 .../cache/query/internal/CompiledID.java        |   22 +-
 .../cache/query/internal/CompiledIn.java        |   22 +-
 .../query/internal/CompiledIndexOperation.java  |   22 +-
 .../query/internal/CompiledIteratorDef.java     |   21 +-
 .../cache/query/internal/CompiledJunction.java  |   22 +-
 .../cache/query/internal/CompiledLike.java      |   21 +-
 .../cache/query/internal/CompiledLiteral.java   |   22 +-
 .../cache/query/internal/CompiledNegation.java  |   22 +-
 .../cache/query/internal/CompiledOperation.java |   26 +-
 .../cache/query/internal/CompiledPath.java      |   22 +-
 .../cache/query/internal/CompiledRegion.java    |   22 +-
 .../cache/query/internal/CompiledSelect.java    |   56 +-
 .../query/internal/CompiledSortCriterion.java   |   21 +-
 .../query/internal/CompiledUnaryMinus.java      |   21 +-
 .../cache/query/internal/CompiledUndefined.java |   22 +-
 .../cache/query/internal/CompiledValue.java     |   22 +-
 .../query/internal/CompositeGroupJunction.java  |   21 +-
 .../gemfire/cache/query/internal/CqEntry.java   |   21 +-
 .../cache/query/internal/CqQueryVsdStats.java   |   21 +-
 .../cache/query/internal/CqStateImpl.java       |   22 +-
 .../internal/CumulativeNonDistinctResults.java  |   16 +
 .../cache/query/internal/DefaultQuery.java      |   31 +-
 .../query/internal/DefaultQueryService.java     |   22 +-
 .../cache/query/internal/ExecutionContext.java  |   22 +-
 .../gemfire/cache/query/internal/Filter.java    |   22 +-
 .../gemfire/cache/query/internal/Functions.java |   22 +-
 .../cache/query/internal/GroupJunction.java     |   21 +-
 .../cache/query/internal/HashingStrategy.java   |   21 +-
 .../gemfire/cache/query/internal/IndexInfo.java |   21 +-
 .../internal/IndexTrackingQueryObserver.java    |   28 +-
 .../cache/query/internal/IndexUpdater.java      |   21 +-
 .../gemfire/cache/query/internal/Indexable.java |   21 +-
 .../cache/query/internal/LinkedResultSet.java   |   21 +-
 .../cache/query/internal/LinkedStructSet.java   |   21 +-
 .../cache/query/internal/MapIndexable.java      |   16 +
 .../cache/query/internal/MethodDispatch.java    |   22 +-
 .../cache/query/internal/NWayMergeResults.java  |   16 +
 .../gemfire/cache/query/internal/Negatable.java |   22 +-
 .../gemfire/cache/query/internal/NullToken.java |   23 +-
 .../cache/query/internal/ObjectIntHashMap.java  |   21 +-
 .../cache/query/internal/OrderByComparator.java |   18 +-
 .../internal/OrderByComparatorUnmapped.java     |   16 +
 .../gemfire/cache/query/internal/Ordered.java   |   16 +
 .../cache/query/internal/OrganizedOperands.java |   21 +-
 .../cache/query/internal/PRQueryTraceInfo.java  |   22 +-
 .../gemfire/cache/query/internal/PathUtils.java |   22 +-
 .../gemfire/cache/query/internal/PlanInfo.java  |   22 +-
 .../cache/query/internal/ProxyQueryService.java |   21 +-
 .../gemfire/cache/query/internal/QCompiler.java |   22 +-
 .../gemfire/cache/query/internal/QRegion.java   |   21 +-
 .../gemfire/cache/query/internal/QScope.java    |   22 +-
 .../QueryExecutionCanceledException.java        |   21 +-
 .../query/internal/QueryExecutionContext.java   |   24 +-
 .../cache/query/internal/QueryExecutor.java     |   21 +-
 .../cache/query/internal/QueryMonitor.java      |   21 +-
 .../cache/query/internal/QueryObserver.java     |   22 +-
 .../query/internal/QueryObserverAdapter.java    |   22 +-
 .../query/internal/QueryObserverHolder.java     |   22 +-
 .../cache/query/internal/QueryUtils.java        |   21 +-
 .../cache/query/internal/RangeJunction.java     |   21 +-
 .../cache/query/internal/ResultsBag.java        |   16 +
 .../ResultsCollectionCopyOnReadWrapper.java     |   21 +-
 ...ResultsCollectionPdxDeserializerWrapper.java |   21 +-
 .../internal/ResultsCollectionWrapper.java      |   21 +-
 .../cache/query/internal/ResultsSet.java        |   21 +-
 .../cache/query/internal/RuntimeIterator.java   |   22 +-
 .../query/internal/SelectResultsComparator.java |   21 +-
 .../cache/query/internal/SortedResultSet.java   |   21 +-
 .../cache/query/internal/SortedResultsBag.java  |   16 +
 .../cache/query/internal/SortedStructBag.java   |   16 +
 .../cache/query/internal/SortedStructSet.java   |   21 +-
 .../gemfire/cache/query/internal/StructBag.java |   21 +-
 .../cache/query/internal/StructFields.java      |   16 +
 .../cache/query/internal/StructImpl.java        |   21 +-
 .../gemfire/cache/query/internal/StructSet.java |   21 +-
 .../gemfire/cache/query/internal/Support.java   |   22 +-
 .../gemfire/cache/query/internal/Undefined.java |   22 +-
 .../internal/aggregate/AbstractAggregator.java  |   16 +
 .../cache/query/internal/aggregate/Avg.java     |   16 +
 .../query/internal/aggregate/AvgBucketNode.java |   16 +
 .../query/internal/aggregate/AvgDistinct.java   |   16 +
 .../aggregate/AvgDistinctPRQueryNode.java       |   16 +
 .../internal/aggregate/AvgPRQueryNode.java      |   16 +
 .../cache/query/internal/aggregate/Count.java   |   16 +
 .../query/internal/aggregate/CountDistinct.java |   16 +
 .../aggregate/CountDistinctPRQueryNode.java     |   16 +
 .../internal/aggregate/CountPRQueryNode.java    |   16 +
 .../internal/aggregate/DistinctAggregator.java  |   16 +
 .../cache/query/internal/aggregate/MaxMin.java  |   16 +
 .../cache/query/internal/aggregate/Sum.java     |   16 +
 .../query/internal/aggregate/SumDistinct.java   |   16 +
 .../aggregate/SumDistinctPRQueryNode.java       |   16 +
 .../cache/query/internal/cq/ClientCQ.java       |   16 +
 .../cache/query/internal/cq/CqService.java      |   16 +
 .../query/internal/cq/CqServiceProvider.java    |   16 +
 .../query/internal/cq/InternalCqQuery.java      |   16 +
 .../query/internal/cq/MissingCqService.java     |   16 +
 .../internal/cq/MissingCqServiceStatistics.java |   16 +
 .../cache/query/internal/cq/ServerCQ.java       |   16 +
 .../query/internal/cq/spi/CqServiceFactory.java |   16 +
 .../query/internal/index/AbstractIndex.java     |   46 +-
 .../query/internal/index/AbstractMapIndex.java  |   21 +-
 .../internal/index/CompactMapRangeIndex.java    |   21 +-
 .../query/internal/index/CompactRangeIndex.java |   21 +-
 .../query/internal/index/DummyQRegion.java      |   23 +-
 .../index/FunctionalIndexCreationHelper.java    |   22 +-
 .../cache/query/internal/index/HashIndex.java   |  199 +-
 .../query/internal/index/HashIndexSet.java      | 1107 ++---
 .../query/internal/index/HashIndexStrategy.java |   81 -
 .../query/internal/index/IMQException.java      |   21 +-
 .../internal/index/IndexConcurrentHashSet.java  |   21 +-
 .../query/internal/index/IndexCreationData.java |   21 +-
 .../internal/index/IndexCreationHelper.java     |   21 +-
 .../cache/query/internal/index/IndexData.java   |   21 +-
 .../query/internal/index/IndexElemArray.java    |   21 +-
 .../query/internal/index/IndexManager.java      |   24 +-
 .../query/internal/index/IndexProtocol.java     |   20 +-
 .../cache/query/internal/index/IndexStats.java  |   21 +-
 .../cache/query/internal/index/IndexStore.java  |   23 +-
 .../cache/query/internal/index/IndexUtils.java  |   21 +-
 .../index/IndexedExpressionEvaluator.java       |   21 +-
 .../query/internal/index/MapIndexStore.java     |   21 +-
 .../query/internal/index/MapRangeIndex.java     |   21 +-
 .../query/internal/index/MemoryIndexStore.java  |   21 +-
 .../query/internal/index/PartitionedIndex.java  |   37 +-
 .../query/internal/index/PrimaryKeyIndex.java   |   21 +-
 .../index/PrimaryKeyIndexCreationHelper.java    |   21 +-
 .../cache/query/internal/index/RangeIndex.java  |   21 +-
 .../cache/query/internal/index/package.html     |   16 +
 .../gemfire/cache/query/internal/package.html   |   16 +
 .../query/internal/parse/ASTAggregateFunc.java  |   16 +
 .../cache/query/internal/parse/ASTAnd.java      |   21 +-
 .../query/internal/parse/ASTCombination.java    |   21 +-
 .../query/internal/parse/ASTCompareOp.java      |   21 +-
 .../query/internal/parse/ASTConstruction.java   |   21 +-
 .../query/internal/parse/ASTConversionExpr.java |   21 +-
 .../cache/query/internal/parse/ASTDummy.java    |   16 +
 .../cache/query/internal/parse/ASTGroupBy.java  |   21 +-
 .../cache/query/internal/parse/ASTHint.java     |   21 +-
 .../query/internal/parse/ASTHintIdentifier.java |   21 +-
 .../query/internal/parse/ASTIdentifier.java     |   21 +-
 .../cache/query/internal/parse/ASTImport.java   |   21 +-
 .../cache/query/internal/parse/ASTIn.java       |   21 +-
 .../query/internal/parse/ASTIteratorDef.java    |   21 +-
 .../cache/query/internal/parse/ASTLike.java     |   21 +-
 .../cache/query/internal/parse/ASTLimit.java    |   23 +-
 .../cache/query/internal/parse/ASTLiteral.java  |   21 +-
 .../internal/parse/ASTMethodInvocation.java     |   21 +-
 .../cache/query/internal/parse/ASTOr.java       |   21 +-
 .../cache/query/internal/parse/ASTOrderBy.java  |   21 +-
 .../query/internal/parse/ASTParameter.java      |   21 +-
 .../cache/query/internal/parse/ASTPostfix.java  |   21 +-
 .../query/internal/parse/ASTProjection.java     |   21 +-
 .../query/internal/parse/ASTRegionPath.java     |   21 +-
 .../cache/query/internal/parse/ASTSelect.java   |   21 +-
 .../query/internal/parse/ASTSortCriterion.java  |   21 +-
 .../cache/query/internal/parse/ASTTrace.java    |   21 +-
 .../cache/query/internal/parse/ASTType.java     |   21 +-
 .../cache/query/internal/parse/ASTTypeCast.java |   21 +-
 .../cache/query/internal/parse/ASTUnary.java    |   21 +-
 .../query/internal/parse/ASTUndefinedExpr.java  |   21 +-
 .../query/internal/parse/ASTUnsupported.java    |   21 +-
 .../cache/query/internal/parse/GemFireAST.java  |   21 +-
 .../cache/query/internal/parse/UtilParser.java  |   21 +-
 .../internal/types/CollectionTypeImpl.java      |   21 +-
 .../types/ExtendedNumericComparator.java        |   22 +-
 .../cache/query/internal/types/MapTypeImpl.java |   21 +-
 .../query/internal/types/NumericComparator.java |   22 +-
 .../query/internal/types/ObjectTypeImpl.java    |   21 +-
 .../query/internal/types/StructTypeImpl.java    |   21 +-
 .../internal/types/TemporalComparator.java      |   22 +-
 .../cache/query/internal/types/TypeUtils.java   |   22 +-
 .../query/internal/utils/LimitIterator.java     |   16 +
 .../cache/query/internal/utils/PDXUtils.java    |   16 +
 .../gemstone/gemfire/cache/query/package.html   |   16 +
 .../cache/query/types/CollectionType.java       |   21 +-
 .../gemfire/cache/query/types/MapType.java      |   21 +-
 .../gemfire/cache/query/types/ObjectType.java   |   21 +-
 .../gemfire/cache/query/types/StructType.java   |   21 +-
 .../gemfire/cache/server/CacheServer.java       |   21 +-
 .../cache/server/ClientSubscriptionConfig.java  |   21 +-
 .../gemfire/cache/server/ServerLoad.java        |   21 +-
 .../gemfire/cache/server/ServerLoadProbe.java   |   31 +-
 .../cache/server/ServerLoadProbeAdapter.java    |   21 +-
 .../gemfire/cache/server/ServerMetrics.java     |   31 +-
 .../server/internal/ConnectionCountProbe.java   |   21 +-
 .../cache/server/internal/LoadMonitor.java      |   33 +-
 .../server/internal/ServerMetricsImpl.java      |   21 +-
 .../gemstone/gemfire/cache/server/package.html  |   15 +
 .../cache/snapshot/CacheSnapshotService.java    |   21 +-
 .../cache/snapshot/RegionSnapshotService.java   |   21 +-
 .../gemfire/cache/snapshot/SnapshotFilter.java  |   21 +-
 .../cache/snapshot/SnapshotIterator.java        |   21 +-
 .../gemfire/cache/snapshot/SnapshotOptions.java |   21 +-
 .../gemfire/cache/snapshot/SnapshotReader.java  |   21 +-
 .../gemfire/cache/snapshot/package.html         |   17 +-
 .../cache/util/BoundedLinkedHashMap.java        |   24 +-
 .../gemfire/cache/util/BridgeClient.java        |  156 -
 .../gemfire/cache/util/BridgeLoader.java        |  607 ---
 .../gemfire/cache/util/BridgeMembership.java    |   55 -
 .../cache/util/BridgeMembershipEvent.java       |   23 -
 .../cache/util/BridgeMembershipListener.java    |   41 -
 .../util/BridgeMembershipListenerAdapter.java   |   43 -
 .../gemfire/cache/util/BridgeServer.java        |  442 --
 .../gemfire/cache/util/BridgeWriter.java        |  795 ---
 .../cache/util/BridgeWriterException.java       |   48 -
 .../cache/util/CacheListenerAdapter.java        |   21 +-
 .../gemfire/cache/util/CacheWriterAdapter.java  |   21 +-
 .../gemfire/cache/util/CqListenerAdapter.java   |   21 +-
 .../util/EndpointDoesNotExistException.java     |   34 -
 .../gemfire/cache/util/EndpointException.java   |   61 -
 .../cache/util/EndpointExistsException.java     |   28 -
 .../cache/util/EndpointInUseException.java      |   27 -
 .../gemstone/gemfire/cache/util/Gateway.java    |   16 +
 .../cache/util/GatewayConflictHelper.java       |   21 +-
 .../cache/util/GatewayConflictResolver.java     |   21 +-
 .../gemfire/cache/util/GatewayEvent.java        |   21 +-
 .../util/IncompatibleVersionException.java      |   47 -
 .../gemfire/cache/util/ObjectSizer.java         |   21 +-
 .../gemfire/cache/util/ObjectSizerImpl.java     |   16 +
 .../util/RegionMembershipListenerAdapter.java   |   21 +-
 .../cache/util/RegionRoleListenerAdapter.java   |   21 +-
 .../util/ServerRefusedConnectionException.java  |   36 -
 .../cache/util/TimestampedEntryEvent.java       |   21 +-
 .../cache/util/TransactionListenerAdapter.java  |   21 +-
 .../UniversalMembershipListenerAdapter.java     |  352 --
 .../cache/util/UnknownVersionException.java     |   39 -
 .../gemfire/cache/util/VersionException.java    |   45 -
 .../gemstone/gemfire/cache/util/package.html    |   18 +-
 .../gemfire/cache/wan/EventSequenceID.java      |   21 +-
 .../gemfire/cache/wan/GatewayEventFilter.java   |   20 +-
 .../wan/GatewayEventSubstitutionFilter.java     |   21 +-
 .../gemfire/cache/wan/GatewayQueueEvent.java    |   21 +-
 .../gemfire/cache/wan/GatewayReceiver.java      |   20 +-
 .../cache/wan/GatewayReceiverFactory.java       |   20 +-
 .../gemfire/cache/wan/GatewaySender.java        |   20 +-
 .../gemfire/cache/wan/GatewaySenderFactory.java |   20 +-
 .../cache/wan/GatewayTransportFilter.java       |   20 +-
 .../compression/CompressionException.java       |   23 +-
 .../gemfire/compression/Compressor.java         |   23 +-
 .../gemfire/compression/SnappyCompressor.java   |   21 +-
 .../gemfire/distributed/AbstractLauncher.java   |   20 +-
 .../distributed/ClientSocketFactory.java        |   21 +-
 .../distributed/DistributedLockService.java     |   21 +-
 .../gemfire/distributed/DistributedMember.java  |   21 +-
 .../gemfire/distributed/DistributedSystem.java  |   98 +-
 .../DistributedSystemDisconnectedException.java |   23 +-
 .../distributed/DurableClientAttributes.java    |   21 +-
 .../distributed/FutureCancelledException.java   |   21 +-
 .../distributed/GatewayCancelledException.java  |   23 +-
 .../distributed/LeaseExpiredException.java      |   21 +-
 .../gemstone/gemfire/distributed/Locator.java   |   26 +-
 .../gemfire/distributed/LocatorLauncher.java    |   22 +-
 .../distributed/LockNotHeldException.java       |   21 +-
 .../LockServiceDestroyedException.java          |   21 +-
 .../distributed/OplogCancelledException.java    |   23 +-
 .../distributed/PoolCancelledException.java     |   23 +-
 .../com/gemstone/gemfire/distributed/Role.java  |   21 +-
 .../gemfire/distributed/ServerLauncher.java     |   26 +-
 .../TXManagerCancelledException.java            |   23 +-
 .../internal/AbstractDistributionConfig.java    |   21 +-
 .../distributed/internal/AdminMessageType.java  |   16 +
 .../internal/AtomicLongWithTerminalState.java   |   21 +-
 .../internal/CollectingReplyProcessor.java      |   21 +-
 .../distributed/internal/ConflationKey.java     |   21 +-
 .../gemfire/distributed/internal/DM.java        |   30 +-
 .../gemfire/distributed/internal/DMStats.java   |  144 +-
 .../gemfire/distributed/internal/DSClock.java   |   18 +-
 .../internal/DirectReplyProcessor.java          |   21 +-
 .../distributed/internal/DistributedState.java  |   21 +-
 .../internal/DistributionAdvisee.java           |   21 +-
 .../internal/DistributionAdvisor.java           |   21 +-
 .../internal/DistributionChannel.java           |   25 +-
 .../internal/DistributionConfig.java            |   29 +-
 .../internal/DistributionConfigImpl.java        |   37 +-
 .../internal/DistributionConfigSnapshot.java    |   21 +-
 .../internal/DistributionException.java         |   21 +-
 .../internal/DistributionManager.java           |  562 +--
 .../internal/DistributionManagerConfig.java     |   93 -
 .../internal/DistributionMessage.java           |   36 +-
 .../internal/DistributionMessageObserver.java   |   23 +-
 .../distributed/internal/DistributionStats.java |  354 +-
 .../distributed/internal/FlowControlParams.java |   21 +-
 .../internal/ForceDisconnectOperation.java      |   21 +-
 .../FunctionExecutionPooledExecutor.java        |   28 +-
 .../distributed/internal/HealthMonitor.java     |   21 +-
 .../distributed/internal/HealthMonitorImpl.java |   21 +-
 .../internal/HighPriorityAckedMessage.java      |   29 +-
 .../HighPriorityDistributionMessage.java        |   21 +-
 .../distributed/internal/IgnoredByManager.java  |   16 +
 .../internal/InternalDistributedSystem.java     |  179 +-
 .../distributed/internal/InternalLocator.java   |  172 +-
 .../internal/LocatorLoadSnapshot.java           |   20 +-
 .../distributed/internal/LocatorStats.java      |   21 +-
 .../internal/LonerDistributionManager.java      |  259 +-
 .../gemfire/distributed/internal/MQueue.java    |   16 +
 .../internal/MembershipListener.java            |   21 +-
 .../distributed/internal/MessageFactory.java    |   21 +-
 .../distributed/internal/MessageWithReply.java  |   21 +-
 .../internal/OverflowQueueWithDMStats.java      |   21 +-
 .../distributed/internal/PoolStatHelper.java    |   21 +-
 .../internal/PooledDistributionMessage.java     |   21 +-
 .../internal/PooledExecutorWithDMStats.java     |   38 +-
 .../distributed/internal/ProcessorKeeper21.java |   21 +-
 .../distributed/internal/ProductUseLog.java     |   21 +-
 .../distributed/internal/ProfileListener.java   |   21 +-
 .../distributed/internal/QueueStatHelper.java   |   21 +-
 .../internal/ReliableReplyException.java        |   21 +-
 .../internal/ReliableReplyProcessor21.java      |   21 +-
 .../distributed/internal/ReplyException.java    |   21 +-
 .../distributed/internal/ReplyMessage.java      |   23 +-
 .../distributed/internal/ReplyProcessor21.java  |   26 +-
 .../distributed/internal/ReplySender.java       |   21 +-
 .../distributed/internal/ResourceEvent.java     |   20 +-
 .../internal/ResourceEventsListener.java        |   20 +-
 .../internal/RuntimeDistributionConfigImpl.java |   21 +-
 .../internal/SerialAckedMessage.java            |   21 +-
 .../internal/SerialDistributionMessage.java     |   21 +-
 .../SerialQueuedExecutorWithDMStats.java        |   21 +-
 .../distributed/internal/ServerLocation.java    |   21 +-
 .../distributed/internal/ServerLocator.java     |   31 +-
 .../internal/SharedConfiguration.java           |   21 +-
 .../distributed/internal/ShutdownMessage.java   |   23 +-
 .../gemfire/distributed/internal/Sizeable.java  |   16 +
 .../distributed/internal/SizeableRunnable.java  |   21 +-
 .../distributed/internal/StartupMessage.java    |   55 +-
 .../internal/StartupMessageData.java            |   21 +-
 .../internal/StartupMessageReplyProcessor.java  |   21 +-
 .../distributed/internal/StartupOperation.java  |   27 +-
 .../internal/StartupResponseMessage.java        |   23 +-
 .../StartupResponseWithVersionMessage.java      |   23 +-
 .../internal/ThrottledMemQueueStatHelper.java   |   21 +-
 .../internal/ThrottledQueueStatHelper.java      |   21 +-
 .../ThrottlingMemLinkedQueueWithDMStats.java    |   21 +-
 .../internal/WaitForViewInstallation.java       |   25 +-
 .../internal/WanLocatorDiscoverer.java          |   16 +
 .../deadlock/DLockDependencyMonitor.java        |   21 +-
 .../internal/deadlock/DeadlockDetector.java     |  206 +-
 .../internal/deadlock/Dependency.java           |   21 +-
 .../internal/deadlock/DependencyGraph.java      |  193 +-
 .../internal/deadlock/DependencyMonitor.java    |   21 +-
 .../deadlock/DependencyMonitorManager.java      |   21 +-
 .../deadlock/GemFireDeadlockDetector.java       |   21 +-
 .../internal/deadlock/LocalLockInfo.java        |   23 +-
 .../internal/deadlock/LocalThread.java          |   25 +-
 .../deadlock/MessageDependencyMonitor.java      |   25 +-
 .../internal/deadlock/ThreadReference.java      |   21 +-
 .../internal/deadlock/UnsafeThreadLocal.java    |   21 +-
 .../internal/direct/DirectChannel.java          |   67 +-
 .../internal/direct/DirectChannelListener.java  |   22 +
 .../internal/direct/MissingStubException.java   |   21 +-
 .../internal/distribution-overview.html         |   16 +
 .../internal/locks/Collaboration.java           |   21 +-
 .../distributed/internal/locks/DLockBatch.java  |   21 +-
 .../internal/locks/DLockBatchId.java            |   21 +-
 .../internal/locks/DLockGrantor.java            |   21 +-
 .../locks/DLockLessorDepartureHandler.java      |   21 +-
 .../internal/locks/DLockQueryProcessor.java     |   21 +-
 .../locks/DLockRecoverGrantorProcessor.java     |   21 +-
 .../internal/locks/DLockReleaseProcessor.java   |   21 +-
 .../internal/locks/DLockRemoteToken.java        |   21 +-
 .../internal/locks/DLockRequestProcessor.java   |   21 +-
 .../internal/locks/DLockService.java            |   21 +-
 .../distributed/internal/locks/DLockStats.java  |   21 +-
 .../distributed/internal/locks/DLockToken.java  |   21 +-
 .../internal/locks/DeposeGrantorProcessor.java  |   21 +-
 .../internal/locks/DistributedLockStats.java    |   21 +-
 .../internal/locks/DistributedMemberLock.java   |   21 +-
 .../internal/locks/DummyDLockStats.java         |   21 +-
 .../internal/locks/ElderInitProcessor.java      |   21 +-
 .../distributed/internal/locks/ElderState.java  |   21 +-
 .../distributed/internal/locks/GrantorInfo.java |   21 +-
 .../internal/locks/GrantorRequestProcessor.java |   21 +-
 .../locks/LockGrantorDestroyedException.java    |   21 +-
 .../internal/locks/LockGrantorId.java           |   21 +-
 .../locks/NonGrantorDestroyedProcessor.java     |   21 +-
 .../internal/locks/RemoteThread.java            |   21 +-
 .../distributed/internal/locks/package.html     |   16 +
 .../DistributedMembershipListener.java          |   34 +-
 .../membership/InternalDistributedMember.java   |  351 +-
 .../internal/membership/InternalRole.java       |   21 +-
 .../internal/membership/MemberAttributes.java   |   41 +-
 .../internal/membership/MemberFactory.java      |   54 +-
 .../internal/membership/MemberServices.java     |   49 +-
 .../internal/membership/MembershipManager.java  |   51 +-
 .../internal/membership/MembershipTestHook.java |   21 +-
 .../internal/membership/NetMember.java          |   80 +-
 .../internal/membership/NetView.java            |  596 ++-
 .../internal/membership/QuorumChecker.java      |   33 +-
 .../internal/membership/gms/GMSMember.java      |  449 ++
 .../membership/gms/GMSMemberFactory.java        |  133 +
 .../internal/membership/gms/GMSUtil.java        |  159 +
 .../internal/membership/gms/NetLocator.java     |   32 +
 .../internal/membership/gms/ServiceConfig.java  |  174 +
 .../internal/membership/gms/Services.java       |  387 ++
 .../internal/membership/gms/SuspectMember.java  |   53 +
 .../membership/gms/auth/GMSAuthenticator.java   |  235 +
 .../membership/gms/fd/GMSHealthMonitor.java     | 1396 ++++++
 .../gms/interfaces/Authenticator.java           |   27 +
 .../gms/interfaces/HealthMonitor.java           |   65 +
 .../membership/gms/interfaces/JoinLeave.java    |   67 +
 .../membership/gms/interfaces/Locator.java      |   32 +
 .../membership/gms/interfaces/Manager.java      |  121 +
 .../gms/interfaces/MessageHandler.java          |   30 +
 .../membership/gms/interfaces/Messenger.java    |   59 +
 .../membership/gms/interfaces/Service.java      |   82 +
 .../gms/locator/FindCoordinatorRequest.java     |  115 +
 .../gms/locator/FindCoordinatorResponse.java    |  162 +
 .../membership/gms/locator/GMSLocator.java      |  373 ++
 .../membership/gms/locator/GetViewRequest.java  |   49 +
 .../membership/gms/locator/GetViewResponse.java |   64 +
 .../gms/locator/PeerLocatorRequest.java         |   25 +
 .../membership/gms/membership/GMSJoinLeave.java | 2167 +++++++++
 .../membership/gms/messages/HasMemberID.java    |   25 +
 .../gms/messages/HeartbeatMessage.java          |   74 +
 .../gms/messages/HeartbeatRequestMessage.java   |   80 +
 .../gms/messages/InstallViewMessage.java        |  106 +
 .../gms/messages/JoinRequestMessage.java        |   97 +
 .../gms/messages/JoinResponseMessage.java       |  129 +
 .../gms/messages/LeaveRequestMessage.java       |   94 +
 .../gms/messages/NetworkPartitionMessage.java   |   44 +
 .../gms/messages/RemoveMemberMessage.java       |   96 +
 .../gms/messages/SuspectMembersMessage.java     |   91 +
 .../membership/gms/messages/SuspectRequest.java |   72 +
 .../membership/gms/messages/ViewAckMessage.java |  103 +
 .../gms/messenger/AddressManager.java           |  130 +
 .../membership/gms/messenger/GMSPingPonger.java |   57 +
 .../gms/messenger/GMSQuorumChecker.java         |  274 ++
 .../membership/gms/messenger/JGAddress.java     |  230 +
 .../gms/messenger/JGroupsMessenger.java         | 1089 +++++
 .../membership/gms/messenger/StatRecorder.java  |  162 +
 .../membership/gms/messenger/Transport.java     |  142 +
 .../gms/mgr/GMSMembershipManager.java           | 2779 +++++++++++
 .../membership/gms/mgr/LocalViewMessage.java    |   85 +
 .../internal/membership/gms/package.html        |   57 +
 .../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 -
 .../gemfire/distributed/internal/package.html   |   16 +
 .../internal/streaming/StreamingOperation.java  |   21 +-
 .../internal/tcpserver/InfoRequest.java         |   20 +-
 .../internal/tcpserver/InfoResponse.java        |   20 +-
 .../internal/tcpserver/ShutdownRequest.java     |   20 +-
 .../internal/tcpserver/ShutdownResponse.java    |   20 +-
 .../internal/tcpserver/TcpClient.java           |   76 +-
 .../internal/tcpserver/TcpHandler.java          |   16 +
 .../internal/tcpserver/TcpServer.java           |  121 +-
 .../internal/tcpserver/VersionRequest.java      |   16 +
 .../internal/tcpserver/VersionResponse.java     |   16 +
 .../unsafe/RegisterSignalHandlerSupport.java    |   20 +-
 .../gemstone/gemfire/distributed/package.html   |   16 +
 .../gemstone/gemfire/i18n/LogWriterI18n.java    |   29 +-
 .../com/gemstone/gemfire/i18n/StringId.java     |  161 +
 .../com/gemstone/gemfire/i18n/StringIdImpl.java |  153 -
 .../gemfire/internal/AbstractConfig.java        |   27 +-
 .../internal/AbstractStatisticsFactory.java     |   21 +-
 .../gemfire/internal/ArchiveSplitter.java       |   21 +-
 .../com/gemstone/gemfire/internal/Assert.java   |   21 +-
 .../gemfire/internal/AvailablePort.java         |   94 +-
 .../com/gemstone/gemfire/internal/Banner.java   |   49 +-
 .../gemfire/internal/ByteArrayDataInput.java    |   21 +-
 .../internal/ByteBufferOutputStream.java        |   21 +-
 .../gemfire/internal/ByteBufferWriter.java      |   16 +
 .../gemfire/internal/ClassLoadUtil.java         |   21 +-
 .../gemfire/internal/ClassPathLoader.java       |   21 +-
 .../com/gemstone/gemfire/internal/Config.java   |   21 +-
 .../gemstone/gemfire/internal/ConfigSource.java |   21 +-
 .../gemfire/internal/ConnectionWatcher.java     |   41 +
 .../gemfire/internal/CopyOnWriteHashSet.java    |   21 +-
 .../com/gemstone/gemfire/internal/DSCODE.java   |   21 +-
 .../gemstone/gemfire/internal/DSFIDFactory.java |   73 +-
 .../internal/DSFIDNotFoundException.java        |   21 +-
 .../internal/DataSerializableFixedID.java       |   73 +-
 .../gemfire/internal/DistributionLocator.java   |   21 +-
 .../internal/DummyStatisticsFactory.java        |   21 +-
 .../gemfire/internal/DummyStatisticsImpl.java   |   21 +-
 .../gemfire/internal/ExternalizableDSFID.java   |   21 +-
 .../com/gemstone/gemfire/internal/FileUtil.java |   21 +-
 .../gemfire/internal/GemFireStatSampler.java    |   21 +-
 .../gemfire/internal/GemFireUtilLauncher.java   |   21 +-
 .../gemfire/internal/GemFireVersion.java        |   21 +-
 .../internal/GfeConsoleReaderFactory.java       |   20 +-
 .../gemfire/internal/HeapDataOutputStream.java  |   21 +-
 .../gemfire/internal/HistogramStats.java        |   21 +-
 .../gemfire/internal/HostStatHelper.java        |   21 +-
 .../gemfire/internal/HostStatSampler.java       |   25 +-
 .../InsufficientDiskSpaceException.java         |   21 +-
 .../internal/InternalDataSerializer.java        |  203 +-
 .../gemfire/internal/InternalEntity.java        |   16 +
 .../gemfire/internal/InternalInstantiator.java  |   23 +-
 .../InternalStatisticsDisabledException.java    |   21 +-
 .../gemfire/internal/JarClassLoader.java        |   20 +-
 .../gemstone/gemfire/internal/JarDeployer.java  |   20 +-
 .../gemfire/internal/LinuxProcFsStatistics.java |   21 +-
 .../gemfire/internal/LinuxProcessStats.java     |   21 +-
 .../gemfire/internal/LinuxSystemStats.java      |   21 +-
 .../gemfire/internal/LocalStatListener.java     |   21 +-
 .../internal/LocalStatisticsFactory.java        |   21 +-
 .../gemfire/internal/LocalStatisticsImpl.java   |   21 +-
 .../gemstone/gemfire/internal/ManagerInfo.java  |   20 +-
 .../gemfire/internal/MigrationClient.java       |   21 +-
 .../gemfire/internal/MigrationServer.java       |   21 +-
 .../gemstone/gemfire/internal/NanoTimer.java    |   21 +-
 .../gemfire/internal/NullDataOutputStream.java  |   21 +-
 .../gemstone/gemfire/internal/OSProcess.java    |   19 +-
 .../gemfire/internal/OSXProcessStats.java       |   21 +-
 .../gemfire/internal/OSXSystemStats.java        |   21 +-
 .../gemfire/internal/ObjIdConcurrentMap.java    |   21 +-
 .../com/gemstone/gemfire/internal/ObjIdMap.java |   21 +-
 .../internal/ObjToByteArraySerializer.java      |   21 +-
 .../gemfire/internal/OneTaskOnlyExecutor.java   |   21 +-
 .../gemfire/internal/OsStatisticsFactory.java   |   21 +-
 .../gemfire/internal/PdxSerializerObject.java   |   21 +-
 .../gemfire/internal/ProcessOutputReader.java   |   21 +-
 .../gemstone/gemfire/internal/ProcessStats.java |   21 +-
 .../gemstone/gemfire/internal/PureJavaMode.java |   21 +-
 ...cheduledThreadPoolExecutorWithKeepAlive.java |   21 +-
 .../com/gemstone/gemfire/internal/Sendable.java |   18 +-
 .../gemfire/internal/SerializationVersions.java |   21 +-
 .../com/gemstone/gemfire/internal/SetUtils.java |   20 +-
 .../gemfire/internal/SharedLibrary.java         |   21 +-
 .../gemfire/internal/SimpleStatSampler.java     |   21 +-
 .../com/gemstone/gemfire/internal/SmHelper.java |   21 +-
 .../gemstone/gemfire/internal/SocketCloser.java |  257 +
 .../gemfire/internal/SocketCreator.java         |  162 +-
 .../gemfire/internal/SolarisProcessStats.java   |   21 +-
 .../gemfire/internal/SolarisSystemStats.java    |   21 +-
 .../gemfire/internal/StatArchiveFormat.java     |   21 +-
 .../gemfire/internal/StatArchiveReader.java     |   21 +-
 .../gemfire/internal/StatArchiveWriter.java     |   49 +-
 .../gemfire/internal/StatSamplerStats.java      |   21 +-
 .../internal/StatisticDescriptorImpl.java       |   21 +-
 .../gemfire/internal/StatisticsImpl.java        |   21 +-
 .../gemfire/internal/StatisticsManager.java     |   21 +-
 .../internal/StatisticsTypeFactoryImpl.java     |   21 +-
 .../gemfire/internal/StatisticsTypeImpl.java    |   21 +-
 .../gemfire/internal/StatisticsTypeXml.java     |   21 +-
 .../gemstone/gemfire/internal/SystemAdmin.java  |   36 +-
 .../gemfire/internal/SystemFailureTestHook.java |   21 +-
 .../gemstone/gemfire/internal/SystemTimer.java  |   21 +-
 .../gemfire/internal/UniqueIdGenerator.java     |   21 +-
 .../com/gemstone/gemfire/internal/VMStats.java  |   21 +-
 .../gemfire/internal/VMStatsContract.java       |   21 +-
 .../internal/VMStatsContractFactory.java        |   21 +-
 .../com/gemstone/gemfire/internal/Version.java  |   45 +-
 .../internal/VersionedDataInputStream.java      |   21 +-
 .../internal/VersionedDataOutputStream.java     |   21 +-
 .../internal/VersionedDataSerializable.java     |   16 +
 .../gemfire/internal/VersionedDataStream.java   |   21 +-
 .../gemfire/internal/VersionedObjectInput.java  |   21 +-
 .../gemfire/internal/VersionedObjectOutput.java |   21 +-
 .../gemfire/internal/WindowsProcessStats.java   |   21 +-
 .../gemfire/internal/WindowsSystemStats.java    |   21 +-
 .../internal/admin/AdminBridgeServer.java       |   16 +
 .../gemstone/gemfire/internal/admin/Alert.java  |   21 +-
 .../gemfire/internal/admin/AlertListener.java   |   21 +-
 .../gemfire/internal/admin/ApplicationVM.java   |   21 +-
 .../gemfire/internal/admin/CacheCollector.java  |   21 +-
 .../gemfire/internal/admin/CacheInfo.java       |   21 +-
 .../gemfire/internal/admin/CacheSnapshot.java   |   21 +-
 .../admin/ClientHealthMonitoringRegion.java     |   21 +-
 .../internal/admin/ClientMembershipMessage.java |   21 +-
 .../internal/admin/ClientStatsManager.java      |   28 +-
 .../internal/admin/CompoundEntrySnapshot.java   |   21 +-
 .../internal/admin/CompoundRegionSnapshot.java  |   21 +-
 .../gemfire/internal/admin/DLockInfo.java       |   21 +-
 .../gemfire/internal/admin/EntrySnapshot.java   |   21 +-
 .../gemfire/internal/admin/EntryValueNode.java  |   23 +-
 .../gemfire/internal/admin/GemFireVM.java       |   23 +-
 .../gemfire/internal/admin/GfManagerAgent.java  |   21 +-
 .../internal/admin/GfManagerAgentConfig.java    |   21 +-
 .../internal/admin/GfManagerAgentFactory.java   |   21 +-
 .../gemfire/internal/admin/GfObject.java        |   21 +-
 .../gemfire/internal/admin/HealthListener.java  |   21 +-
 .../internal/admin/JoinLeaveListener.java       |   21 +-
 .../gemfire/internal/admin/ListenerIdMap.java   |   21 +-
 .../gemfire/internal/admin/RegionSnapshot.java  |   21 +-
 .../gemfire/internal/admin/SSLConfig.java       |   21 +-
 .../gemfire/internal/admin/SnapshotClient.java  |   21 +-
 .../gemstone/gemfire/internal/admin/Stat.java   |   21 +-
 .../gemfire/internal/admin/StatAlert.java       |   21 +-
 .../internal/admin/StatAlertDefinition.java     |   21 +-
 .../internal/admin/StatAlertsManager.java       |   21 +-
 .../gemfire/internal/admin/StatListener.java    |   21 +-
 .../gemfire/internal/admin/StatResource.java    |   21 +-
 .../gemfire/internal/admin/TransportConfig.java |   21 +-
 .../gemfire/internal/admin/package.html         |   16 +
 .../admin/remote/AddHealthListenerRequest.java  |   21 +-
 .../admin/remote/AddHealthListenerResponse.java |   21 +-
 .../admin/remote/AddStatListenerRequest.java    |   21 +-
 .../admin/remote/AddStatListenerResponse.java   |   21 +-
 .../remote/AdminConsoleDisconnectMessage.java   |   21 +-
 .../admin/remote/AdminConsoleMessage.java       |   21 +-
 .../admin/remote/AdminFailureResponse.java      |   21 +-
 .../remote/AdminMultipleReplyProcessor.java     |   21 +-
 .../internal/admin/remote/AdminRegion.java      |   21 +-
 .../admin/remote/AdminReplyProcessor.java       |   21 +-
 .../internal/admin/remote/AdminRequest.java     |   21 +-
 .../internal/admin/remote/AdminResponse.java    |   23 +-
 .../internal/admin/remote/AdminWaiters.java     |   21 +-
 .../admin/remote/AlertLevelChangeMessage.java   |   26 +-
 .../admin/remote/AlertListenerMessage.java      |   23 +-
 .../admin/remote/AlertsNotificationMessage.java |   21 +-
 .../admin/remote/AppCacheSnapshotMessage.java   |   21 +-
 .../admin/remote/BridgeServerRequest.java       |   21 +-
 .../admin/remote/BridgeServerResponse.java      |   39 +-
 .../admin/remote/CacheConfigRequest.java        |   21 +-
 .../admin/remote/CacheConfigResponse.java       |   21 +-
 .../internal/admin/remote/CacheDisplay.java     |   21 +-
 .../internal/admin/remote/CacheInfoRequest.java |   21 +-
 .../admin/remote/CacheInfoResponse.java         |   21 +-
 .../admin/remote/CancelStatListenerRequest.java |   21 +-
 .../remote/CancelStatListenerResponse.java      |   21 +-
 .../internal/admin/remote/Cancellable.java      |   21 +-
 .../admin/remote/CancellationMessage.java       |   23 +-
 .../admin/remote/CancellationRegistry.java      |   23 +-
 .../remote/ChangeRefreshIntervalMessage.java    |   21 +-
 .../internal/admin/remote/CliLegacyMessage.java |   16 +
 .../admin/remote/ClientHealthStats.java         |   21 +-
 .../internal/admin/remote/CompactRequest.java   |   21 +-
 .../internal/admin/remote/CompactResponse.java  |   21 +-
 .../admin/remote/DestroyEntryMessage.java       |   23 +-
 .../admin/remote/DestroyRegionMessage.java      |   23 +-
 .../admin/remote/DistributionLocatorId.java     |   21 +-
 .../internal/admin/remote/DummyEntry.java       |   21 +-
 .../admin/remote/DurableClientInfoRequest.java  |   20 +-
 .../admin/remote/DurableClientInfoResponse.java |   24 +-
 .../admin/remote/EntryValueNodeImpl.java        |   23 +-
 .../admin/remote/FetchDistLockInfoRequest.java  |   21 +-
 .../admin/remote/FetchDistLockInfoResponse.java |   21 +-
 .../remote/FetchHealthDiagnosisRequest.java     |   21 +-
 .../remote/FetchHealthDiagnosisResponse.java    |   21 +-
 .../internal/admin/remote/FetchHostRequest.java |   21 +-
 .../admin/remote/FetchHostResponse.java         |   21 +-
 .../remote/FetchResourceAttributesRequest.java  |   21 +-
 .../remote/FetchResourceAttributesResponse.java |   21 +-
 .../admin/remote/FetchStatsRequest.java         |   21 +-
 .../admin/remote/FetchStatsResponse.java        |   22 +-
 .../admin/remote/FetchSysCfgRequest.java        |   23 +-
 .../admin/remote/FetchSysCfgResponse.java       |   21 +-
 .../remote/FlushAppCacheSnapshotMessage.java    |   21 +-
 .../admin/remote/HealthListenerMessage.java     |   23 +-
 .../remote/InspectionClasspathManager.java      |   21 +-
 .../admin/remote/LicenseInfoRequest.java        |   21 +-
 .../admin/remote/LicenseInfoResponse.java       |   21 +-
 .../remote/MissingPersistentIDsRequest.java     |   21 +-
 .../remote/MissingPersistentIDsResponse.java    |   21 +-
 .../admin/remote/ObjectDetailsRequest.java      |   21 +-
 .../admin/remote/ObjectDetailsResponse.java     |   21 +-
 .../admin/remote/ObjectNamesRequest.java        |   21 +-
 .../admin/remote/ObjectNamesResponse.java       |   21 +-
 .../PrepareRevokePersistentIDRequest.java       |   21 +-
 .../remote/RefreshMemberSnapshotRequest.java    |   21 +-
 .../remote/RefreshMemberSnapshotResponse.java   |   21 +-
 .../admin/remote/RegionAdminMessage.java        |   21 +-
 .../admin/remote/RegionAdminRequest.java        |   21 +-
 .../admin/remote/RegionAttributesRequest.java   |   21 +-
 .../admin/remote/RegionAttributesResponse.java  |   21 +-
 .../internal/admin/remote/RegionRequest.java    |   21 +-
 .../internal/admin/remote/RegionResponse.java   |   21 +-
 .../admin/remote/RegionSizeRequest.java         |   21 +-
 .../admin/remote/RegionSizeResponse.java        |   21 +-
 .../admin/remote/RegionStatisticsRequest.java   |   21 +-
 .../admin/remote/RegionStatisticsResponse.java  |   21 +-
 .../remote/RegionSubRegionSizeRequest.java      |   20 +-
 .../remote/RegionSubRegionsSizeResponse.java    |   20 +-
 .../internal/admin/remote/RemoteAlert.java      |   21 +-
 .../admin/remote/RemoteApplicationVM.java       |   21 +-
 .../admin/remote/RemoteBridgeServer.java        |   31 +-
 .../internal/admin/remote/RemoteCacheInfo.java  |   27 +-
 .../admin/remote/RemoteCacheStatistics.java     |   21 +-
 .../internal/admin/remote/RemoteDLockInfo.java  |   21 +-
 .../admin/remote/RemoteEntrySnapshot.java       |   21 +-
 .../internal/admin/remote/RemoteGemFireVM.java  |   23 +-
 .../admin/remote/RemoteGfManagerAgent.java      |   58 +-
 .../internal/admin/remote/RemoteObjectName.java |   21 +-
 .../admin/remote/RemoteRegionAttributes.java    |   23 +-
 .../admin/remote/RemoteRegionSnapshot.java      |   21 +-
 .../internal/admin/remote/RemoteStat.java       |   21 +-
 .../admin/remote/RemoteStatResource.java        |   21 +-
 .../admin/remote/RemoteTransportConfig.java     |  148 +-
 .../remote/RemoveHealthListenerRequest.java     |   21 +-
 .../remote/RemoveHealthListenerResponse.java    |   21 +-
 .../admin/remote/ResetHealthStatusRequest.java  |   21 +-
 .../admin/remote/ResetHealthStatusResponse.java |   21 +-
 .../admin/remote/RevokePersistentIDRequest.java |   21 +-
 .../remote/RevokePersistentIDResponse.java      |   21 +-
 .../admin/remote/RootRegionRequest.java         |   21 +-
 .../admin/remote/RootRegionResponse.java        |   21 +-
 .../remote/ShutdownAllGatewayHubsRequest.java   |   16 +
 .../admin/remote/ShutdownAllRequest.java        |   27 +-
 .../admin/remote/ShutdownAllResponse.java       |   23 +-
 .../admin/remote/SnapshotResultMessage.java     |   23 +-
 .../remote/StatAlertsManagerAssignMessage.java  |   21 +-
 .../admin/remote/StatListenerMessage.java       |   23 +-
 .../admin/remote/StoreSysCfgRequest.java        |   21 +-
 .../admin/remote/StoreSysCfgResponse.java       |   21 +-
 .../internal/admin/remote/SubRegionRequest.java |   21 +-
 .../admin/remote/SubRegionResponse.java         |   21 +-
 .../internal/admin/remote/TailLogRequest.java   |   21 +-
 .../internal/admin/remote/TailLogResponse.java  |   21 +-
 .../remote/UpdateAlertDefinitionMessage.java    |   21 +-
 .../admin/remote/VersionInfoRequest.java        |   21 +-
 .../admin/remote/VersionInfoResponse.java       |   21 +-
 .../admin/remote/VersionMismatchAlert.java      |   21 +-
 .../gemfire/internal/admin/remote/package.html  |   16 +
 .../admin/statalerts/BaseDecoratorImpl.java     |   21 +-
 .../statalerts/DummyStatisticInfoImpl.java      |   21 +-
 .../admin/statalerts/FunctionDecoratorImpl.java |   21 +-
 .../admin/statalerts/FunctionHelper.java        |   20 +-
 .../statalerts/GaugeThresholdDecoratorImpl.java |   21 +-
 .../statalerts/MultiAttrDefinitionImpl.java     |   21 +-
 .../NumberThresholdDecoratorImpl.java           |   21 +-
 .../statalerts/SingleAttrDefinitionImpl.java    |   21 +-
 .../admin/statalerts/StatisticInfo.java         |   21 +-
 .../admin/statalerts/StatisticInfoImpl.java     |   21 +-
 .../internal/cache/AbstractBridgeServer.java    |  425 --
 .../cache/AbstractBucketRegionQueue.java        |   21 +-
 .../internal/cache/AbstractCacheServer.java     |  407 ++
 .../cache/AbstractDiskLRURegionEntry.java       |   21 +-
 .../internal/cache/AbstractDiskRegion.java      |   21 +-
 .../internal/cache/AbstractDiskRegionEntry.java |   21 +-
 .../internal/cache/AbstractLRURegionEntry.java  |   21 +-
 .../internal/cache/AbstractLRURegionMap.java    |   21 +-
 .../cache/AbstractOplogDiskRegionEntry.java     |   21 +-
 .../gemfire/internal/cache/AbstractRegion.java  |   98 +-
 .../internal/cache/AbstractRegionEntry.java     |   50 +-
 .../internal/cache/AbstractRegionMap.java       |   37 +-
 .../internal/cache/AbstractUpdateOperation.java |   25 +-
 .../gemfire/internal/cache/AcceptHelper.java    |   21 +-
 .../cache/AddCacheServerProfileMessage.java     |   21 +-
 .../gemfire/internal/cache/BackupLock.java      |   21 +-
 .../gemfire/internal/cache/BridgeObserver.java  |   89 -
 .../internal/cache/BridgeObserverAdapter.java   |  107 -
 .../internal/cache/BridgeObserverHolder.java    |   53 -
 .../internal/cache/BridgeRegionEventImpl.java   |  108 -
 .../internal/cache/BridgeServerAdvisor.java     |  165 -
 .../internal/cache/BridgeServerImpl.java        |  816 ----
 .../gemfire/internal/cache/BucketAdvisor.java   |   23 +-
 .../gemfire/internal/cache/BucketDump.java      |   21 +-
 .../internal/cache/BucketNotFoundException.java |   21 +-
 .../cache/BucketPersistenceAdvisor.java         |   21 +-
 .../gemfire/internal/cache/BucketRegion.java    |   23 +-
 .../internal/cache/BucketRegionEvictior.java    |   21 +-
 .../internal/cache/BucketRegionQueue.java       |   21 +-
 .../internal/cache/BucketServerLocation.java    |   20 +-
 .../internal/cache/BucketServerLocation66.java  |   20 +-
 .../cache/BytesAndBitsForCompactor.java         |   23 +-
 .../internal/cache/CacheClientStatus.java       |   21 +-
 .../gemfire/internal/cache/CacheConfig.java     |   29 +-
 .../cache/CacheDistributionAdvisee.java         |   21 +-
 .../cache/CacheDistributionAdvisor.java         |   21 +-
 .../internal/cache/CacheLifecycleListener.java  |   21 +-
 .../gemfire/internal/cache/CacheObserver.java   |   21 +-
 .../internal/cache/CacheObserverAdapter.java    |   21 +-
 .../internal/cache/CacheObserverHolder.java     |   21 +-
 .../gemfire/internal/cache/CachePerfStats.java  |   21 +-
 .../internal/cache/CacheServerAdvisor.java      |  173 +
 .../gemfire/internal/cache/CacheServerImpl.java |  821 ++++
 .../internal/cache/CacheServerLauncher.java     |   21 +-
 .../gemfire/internal/cache/CacheService.java    |   42 +
 .../internal/cache/CacheStatisticsImpl.java     |   21 +-
 .../internal/cache/CachedDeserializable.java    |   21 +-
 .../cache/CachedDeserializableFactory.java      |   21 +-
 .../internal/cache/ClientRegionEventImpl.java   |  117 +
 .../internal/cache/ClientServerObserver.java    |   99 +
 .../cache/ClientServerObserverAdapter.java      |  116 +
 .../cache/ClientServerObserverHolder.java       |   62 +
 .../cache/ClientSubscriptionConfigImpl.java     |   21 +-
 .../internal/cache/CloseCacheMessage.java       |   23 +-
 .../cache/ClusterConfigurationLoader.java       |   16 +
 .../internal/cache/ColocationHelper.java        |   20 +-
 .../internal/cache/CommitReplyException.java    |   21 +-
 .../internal/cache/CompactableOplog.java        |   21 +-
 .../gemfire/internal/cache/Conflatable.java     |   21 +-
 .../internal/cache/ControllerAdvisor.java       |   21 +-
 .../internal/cache/CountingDataInputStream.java |   21 +-
 .../internal/cache/CreateRegionProcessor.java   |   27 +-
 .../internal/cache/CustomEntryExpiryTask.java   |   16 +
 .../cache/CustomEvictionAttributesImpl.java     |   21 +-
 .../internal/cache/DataLocationException.java   |   21 +-
 .../internal/cache/DestroyOperation.java        |   21 +-
 .../cache/DestroyPartitionedRegionMessage.java  |   21 +-
 .../internal/cache/DestroyRegionOperation.java  |   27 +-
 .../gemfire/internal/cache/DestroyedEntry.java  |   21 +-
 .../internal/cache/DirectReplyMessage.java      |   21 +-
 .../gemfire/internal/cache/DirectoryHolder.java |   21 +-
 .../internal/cache/DiskDirectoryStats.java      |   21 +-
 .../gemfire/internal/cache/DiskEntry.java       |   29 +-
 .../gemstone/gemfire/internal/cache/DiskId.java |   21 +-
 .../gemfire/internal/cache/DiskInitFile.java    |   21 +-
 .../gemfire/internal/cache/DiskRegion.java      |   21 +-
 .../gemfire/internal/cache/DiskRegionStats.java |   21 +-
 .../internal/cache/DiskStoreAttributes.java     |   21 +-
 .../gemfire/internal/cache/DiskStoreBackup.java |   21 +-
 .../internal/cache/DiskStoreFactoryImpl.java    |   21 +-
 .../gemfire/internal/cache/DiskStoreImpl.java   |   27 +-
 .../internal/cache/DiskStoreMonitor.java        |   21 +-
 .../internal/cache/DiskStoreObserver.java       |   21 +-
 .../gemfire/internal/cache/DiskStoreStats.java  |   21 +-
 .../gemfire/internal/cache/DiskStoreTask.java   |   21 +-
 .../internal/cache/DiskWriteAttributesImpl.java |   21 +-
 .../internal/cache/DistPeerTXStateStub.java     |   16 +
 .../cache/DistTXAdjunctCommitMessage.java       |   16 +
 .../internal/cache/DistTXCommitMessage.java     |   17 +-
 .../cache/DistTXCoordinatorInterface.java       |   21 +-
 .../internal/cache/DistTXPrecommitMessage.java  |   17 +-
 .../internal/cache/DistTXRollbackMessage.java   |   17 +-
 .../gemfire/internal/cache/DistTXState.java     |   16 +
 .../cache/DistTXStateOnCoordinator.java         |   16 +
 .../internal/cache/DistTXStateProxyImpl.java    |   16 +
 .../DistTXStateProxyImplOnCoordinator.java      |   18 +-
 .../cache/DistTXStateProxyImplOnDatanode.java   |   16 +
 .../cache/DistributedCacheOperation.java        |   34 +-
 .../cache/DistributedClearOperation.java        |   27 +-
 .../cache/DistributedPutAllOperation.java       |   21 +-
 .../internal/cache/DistributedRegion.java       |   31 +-
 ...stributedRegionFunctionStreamingMessage.java |   21 +-
 .../cache/DistributedRemoveAllOperation.java    |   21 +-
 .../cache/DistributedTombstoneOperation.java    |   21 +-
 .../internal/cache/DummyCachePerfStats.java     |   21 +-
 .../internal/cache/DynamicRegionAttributes.java |   21 +-
 .../cache/DynamicRegionFactoryImpl.java         |   21 +-
 .../gemfire/internal/cache/EntriesMap.java      |   21 +-
 .../gemfire/internal/cache/EntriesSet.java      |   21 +-
 .../gemfire/internal/cache/EntryBits.java       |   21 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |   67 +-
 .../gemfire/internal/cache/EntryExpiryTask.java |   24 +-
 .../internal/cache/EntryOperationImpl.java      |   23 +-
 .../gemfire/internal/cache/EntrySnapshot.java   |   23 +-
 .../internal/cache/EnumListenerEvent.java       |   20 +-
 .../gemfire/internal/cache/EventID.java         |   21 +-
 .../internal/cache/EventStateHelper.java        |   21 +-
 .../gemfire/internal/cache/EventTracker.java    |   21 +-
 .../internal/cache/EvictionAttributesImpl.java  |   23 +-
 .../gemfire/internal/cache/EvictorService.java  |   21 +-
 .../internal/cache/ExpirationScheduler.java     |   21 +-
 .../gemfire/internal/cache/ExpiryTask.java      |   81 +-
 .../internal/cache/ExportDiskRegion.java        |   16 +
 .../gemfire/internal/cache/FilterProfile.java   |   21 +-
 .../internal/cache/FilterRoutingInfo.java       |   21 +-
 .../cache/FindDurableQueueProcessor.java        |   25 +-
 .../internal/cache/FindRemoteTXMessage.java     |   23 +-
 .../internal/cache/FindVersionTagOperation.java |   21 +-
 .../cache/FixedPartitionAttributesImpl.java     |   21 +-
 .../internal/cache/ForceReattemptException.java |   21 +-
 .../cache/ForceableLinkedBlockingQueue.java     |   21 +-
 .../FunctionStreamingOrderedReplyMessage.java   |   21 +-
 .../cache/FunctionStreamingReplyMessage.java    |   21 +-
 .../internal/cache/GatewayEventFilter.java      |   16 +
 .../internal/cache/GemFireCacheImpl.java        |  244 +-
 .../internal/cache/GemfireCacheHelper.java      |   23 +-
 .../gemfire/internal/cache/GridAdvisor.java     |   27 +-
 .../gemfire/internal/cache/HARegion.java        |   21 +-
 .../internal/cache/HDFSLRURegionMap.java        |   21 +-
 .../gemfire/internal/cache/HDFSRegionMap.java   |   16 +
 .../internal/cache/HDFSRegionMapDelegate.java   |   21 +-
 .../internal/cache/HDFSRegionMapImpl.java       |   21 +-
 .../internal/cache/HasCachePerfStats.java       |   16 +
 .../gemfire/internal/cache/ImageState.java      |   21 +-
 .../cache/InMemoryPersistentMemberView.java     |   21 +-
 .../internal/cache/IncomingGatewayStatus.java   |   21 +-
 .../internal/cache/InitialImageFlowControl.java |   23 +-
 .../internal/cache/InitialImageOperation.java   |   21 +-
 .../gemfire/internal/cache/InlineKeyHelper.java |   21 +-
 .../gemfire/internal/cache/InterestEvent.java   |   21 +-
 .../gemfire/internal/cache/InterestFilter.java  |   21 +-
 .../cache/InterestRegistrationEventImpl.java    |   21 +-
 .../gemfire/internal/cache/InternalCache.java   |   23 +-
 .../internal/cache/InternalCacheEvent.java      |   21 +-
 .../internal/cache/InternalDataView.java        |   21 +-
 .../internal/cache/InternalRegionArguments.java |   21 +-
 .../internal/cache/InvalidateOperation.java     |   21 +-
 .../InvalidatePartitionedRegionMessage.java     |   21 +-
 .../cache/InvalidateRegionOperation.java        |   21 +-
 .../cache/JtaAfterCompletionMessage.java        |   21 +-
 .../cache/JtaBeforeCompletionMessage.java       |   21 +-
 .../gemfire/internal/cache/KeyInfo.java         |   21 +-
 .../internal/cache/KeyWithRegionContext.java    |   21 +-
 .../gemfire/internal/cache/ListOfDeltas.java    |   21 +-
 .../internal/cache/LoaderHelperFactory.java     |   21 +-
 .../internal/cache/LoaderHelperImpl.java        |   23 +-
 .../gemfire/internal/cache/LocalDataSet.java    |   21 +-
 .../gemfire/internal/cache/LocalRegion.java     |  101 +-
 .../internal/cache/LocalRegionDataView.java     |   21 +-
 .../cache/MemberFunctionStreamingMessage.java   |   30 +-
 .../cache/MinimumSystemRequirements.java        |   21 +-
 .../cache/NetSearchExpirationCalculator.java    |   21 +-
 .../gemstone/gemfire/internal/cache/Node.java   |   20 +-
 .../internal/cache/NonLocalRegionEntry.java     |   21 +-
 .../cache/NonLocalRegionEntryWithStats.java     |   23 +-
 .../internal/cache/OffHeapRegionEntry.java      |   16 +
 .../cache/OfflineCompactionDiskRegion.java      |   21 +-
 .../gemstone/gemfire/internal/cache/OpType.java |   21 +-
 .../gemstone/gemfire/internal/cache/Oplog.java  |   28 +-
 .../gemfire/internal/cache/OplogSet.java        |   16 +
 .../internal/cache/OrderedTombstoneMap.java     |   21 +-
 .../gemfire/internal/cache/OverflowOplog.java   |   21 +-
 .../internal/cache/OverflowOplogSet.java        |   21 +-
 .../internal/cache/PRContainsValueFunction.java |   21 +-
 .../internal/cache/PRHARedundancyProvider.java  |   22 +-
 .../internal/cache/PRQueryProcessor.java        |   20 +-
 .../internal/cache/PRSystemPropertyGetter.java  |   21 +-
 .../internal/cache/PartitionAttributesImpl.java |   21 +-
 .../internal/cache/PartitionRegionConfig.java   |   21 +-
 .../cache/PartitionRegionConfigValidator.java   |   21 +-
 .../internal/cache/PartitionedRegion.java       |   59 +-
 .../PartitionedRegionBucketMgmtHelper.java      |   20 +-
 .../cache/PartitionedRegionDataStore.java       |   24 +-
 .../cache/PartitionedRegionDataView.java        |   21 +-
 .../cache/PartitionedRegionException.java       |   21 +-
 .../internal/cache/PartitionedRegionHelper.java |   22 +-
 .../cache/PartitionedRegionQueryEvaluator.java  |   20 +-
 .../internal/cache/PartitionedRegionStats.java  |   21 +-
 .../internal/cache/PartitionedRegionStatus.java |   21 +-
 .../gemfire/internal/cache/PeerTXStateStub.java |   21 +-
 .../internal/cache/PersistentOplogSet.java      |   21 +-
 .../internal/cache/PlaceHolderDiskRegion.java   |   23 +-
 .../gemfire/internal/cache/PoolFactoryImpl.java |  192 +-
 .../gemfire/internal/cache/PoolManagerImpl.java |   40 +-
 .../gemfire/internal/cache/PoolStats.java       |   21 +-
 .../cache/PreferBytesCachedDeserializable.java  |   21 +-
 .../internal/cache/PrimaryBucketException.java  |   21 +-
 .../cache/ProfileExchangeProcessor.java         |   21 +-
 .../internal/cache/ProxyBucketRegion.java       |   21 +-
 .../gemfire/internal/cache/ProxyRegionMap.java  |   21 +-
 .../cache/PutAllPartialResultException.java     |   21 +-
 .../gemfire/internal/cache/QueuedOperation.java |   21 +-
 .../internal/cache/RegionClearedException.java  |   21 +-
 .../gemfire/internal/cache/RegionEntry.java     |   21 +-
 .../internal/cache/RegionEntryContext.java      |   21 +-
 .../internal/cache/RegionEntryFactory.java      |   21 +-
 .../gemfire/internal/cache/RegionEventImpl.java |   23 +-
 .../internal/cache/RegionEvictorTask.java       |   21 +-
 .../internal/cache/RegionExpiryTask.java        |   24 +-
 .../internal/cache/RegionFactoryImpl.java       |   21 +-
 .../internal/cache/RegionIdleExpiryTask.java    |   21 +-
 .../gemfire/internal/cache/RegionListener.java  |   46 +
 .../gemfire/internal/cache/RegionMap.java       |   21 +-
 .../internal/cache/RegionMapFactory.java        |   21 +-
 .../gemfire/internal/cache/RegionQueue.java     |   21 +-
 .../internal/cache/RegionQueueException.java    |   21 +-
 .../gemfire/internal/cache/RegionStatus.java    |   21 +-
 .../internal/cache/RegionTTLExpiryTask.java     |   21 +-
 .../internal/cache/ReleaseClearLockMessage.java |   23 +-
 .../cache/ReliableDistributionData.java         |   21 +-
 .../internal/cache/ReliableMessageQueue.java    |   21 +-
 .../cache/ReliableMessageQueueFactory.java      |   21 +-
 .../cache/ReliableMessageQueueFactoryImpl.java  |   21 +-
 .../cache/RemoteContainsKeyValueMessage.java    |   20 +-
 .../internal/cache/RemoteDestroyMessage.java    |   21 +-
 .../internal/cache/RemoteFetchEntryMessage.java |   20 +-
 .../cache/RemoteFetchVersionMessage.java        |   20 +-
 .../internal/cache/RemoteGetMessage.java        |   21 +-
 .../internal/cache/RemoteInvalidateMessage.java |   20 +-
 .../cache/RemoteOperationException.java         |   21 +-
 .../internal/cache/RemoteOperationMessage.java  |   21 +-
 .../RemoteOperationMessageWithDirectReply.java  |   21 +-
 .../internal/cache/RemotePutAllMessage.java     |   21 +-
 .../internal/cache/RemotePutMessage.java        |   77 +-
 .../internal/cache/RemoteRegionOperation.java   |   20 +-
 .../internal/cache/RemoteRemoveAllMessage.java  |   21 +-
 .../gemfire/internal/cache/RoleEventImpl.java   |   21 +-
 .../cache/SearchLoadAndWriteProcessor.java      |   21 +-
 .../internal/cache/SendQueueOperation.java      |   21 +-
 .../internal/cache/SerializationHelper.java     |   16 +
 .../internal/cache/ServerPingMessage.java       |   16 +
 .../internal/cache/StateFlushOperation.java     |   26 +-
 .../cache/StoreAllCachedDeserializable.java     |   21 +-
 .../internal/cache/TXBucketRegionState.java     |   21 +-
 .../gemfire/internal/cache/TXCommitMessage.java |   50 +-
 .../gemfire/internal/cache/TXEntry.java         |   21 +-
 .../gemfire/internal/cache/TXEntryState.java    |   40 +-
 .../internal/cache/TXEntryStateFactory.java     |   21 +-
 .../internal/cache/TXEntryUserAttrState.java    |   21 +-
 .../gemfire/internal/cache/TXEvent.java         |   21 +-
 .../internal/cache/TXFarSideCMTracker.java      |   21 +-
 .../gemstone/gemfire/internal/cache/TXId.java   |   22 +-
 .../gemfire/internal/cache/TXLockRequest.java   |   21 +-
 .../gemfire/internal/cache/TXManagerImpl.java   |   21 +-
 .../gemfire/internal/cache/TXMessage.java       |   21 +-
 .../internal/cache/TXRegionLockRequestImpl.java |   21 +-
 .../gemfire/internal/cache/TXRegionState.java   |   21 +-
 .../internal/cache/TXRemoteCommitMessage.java   |   21 +-
 .../internal/cache/TXRemoteRollbackMessage.java |   21 +-
 .../internal/cache/TXReservationMgr.java        |   21 +-
 .../gemfire/internal/cache/TXRmtEvent.java      |   21 +-
 .../gemfire/internal/cache/TXState.java         |   23 +-
 .../internal/cache/TXStateInterface.java        |   21 +-
 .../gemfire/internal/cache/TXStateProxy.java    |   21 +-
 .../internal/cache/TXStateProxyImpl.java        |   25 +-
 .../gemfire/internal/cache/TXStateStub.java     |   21 +-
 .../cache/TXSynchronizationRunnable.java        |   21 +-
 .../cache/TestHeapThresholdObserver.java        |   21 +-
 .../cache/TimestampedEntryEventImpl.java        |   21 +-
 .../gemstone/gemfire/internal/cache/Token.java  |   21 +-
 .../internal/cache/TombstoneService.java        |   24 +-
 .../internal/cache/TransactionMessage.java      |   21 +-
 .../gemfire/internal/cache/TxEntryFactory.java  |   16 +
 .../internal/cache/UnsharedImageState.java      |   21 +-
 .../cache/UpdateAttributesProcessor.java        |   23 +-
 .../cache/UpdateEntryVersionOperation.java      |   22 +-
 .../gemfire/internal/cache/UpdateOperation.java |   20 +-
 .../cache/UserSpecifiedDiskStoreAttributes.java |   21 +-
 .../cache/UserSpecifiedRegionAttributes.java    |   21 +-
 .../internal/cache/VMCachedDeserializable.java  |   21 +-
 .../gemfire/internal/cache/VMLRURegionMap.java  |   21 +-
 .../gemfire/internal/cache/VMRegionMap.java     |   21 +-
 .../cache/VMStatsDiskLRURegionEntry.java        |   21 +-
 .../cache/VMStatsDiskLRURegionEntryHeap.java    |   21 +-
 .../VMStatsDiskLRURegionEntryHeapIntKey.java    |   21 +-
 .../VMStatsDiskLRURegionEntryHeapLongKey.java   |   21 +-
 .../VMStatsDiskLRURegionEntryHeapObjectKey.java |   21 +-
 ...VMStatsDiskLRURegionEntryHeapStringKey1.java |   21 +-
 ...VMStatsDiskLRURegionEntryHeapStringKey2.java |   21 +-
 .../VMStatsDiskLRURegionEntryHeapUUIDKey.java   |   21 +-
 .../cache/VMStatsDiskLRURegionEntryOffHeap.java |   21 +-
 .../VMStatsDiskLRURegionEntryOffHeapIntKey.java |   21 +-
 ...VMStatsDiskLRURegionEntryOffHeapLongKey.java |   21 +-
 ...StatsDiskLRURegionEntryOffHeapObjectKey.java |   21 +-
 ...tatsDiskLRURegionEntryOffHeapStringKey1.java |   21 +-
 ...tatsDiskLRURegionEntryOffHeapStringKey2.java |   21 +-
 ...VMStatsDiskLRURegionEntryOffHeapUUIDKey.java |   21 +-
 .../internal/cache/VMStatsDiskRegionEntry.java  |   21 +-
 .../cache/VMStatsDiskRegionEntryHeap.java       |   21 +-
 .../cache/VMStatsDiskRegionEntryHeapIntKey.java |   21 +-
 .../VMStatsDiskRegionEntryHeapLongKey.java      |   21 +-
 .../VMStatsDiskRegionEntryHeapObjectKey.java    |   21 +-
 .../VMStatsDiskRegionEntryHeapStringKey1.java   |   21 +-
 .../VMStatsDiskRegionEntryHeapStringKey2.java   |   21 +-
 .../VMStatsDiskRegionEntryHeapUUIDKey.java      |   21 +-
 .../cache/VMStatsDiskRegionEntryOffHeap.java    |   21 +-
 .../VMStatsDiskRegionEntryOffHeapIntKey.java    |   21 +-
 .../VMStatsDiskRegionEntryOffHeapLongKey.java   |   21 +-
 .../VMStatsDiskRegionEntryOffHeapObjectKey.java |   21 +-
 ...VMStatsDiskRegionEntryOffHeapStringKey1.java |   21 +-
 ...VMStatsDiskRegionEntryOffHeapStringKey2.java |   21 +-
 .../VMStatsDiskRegionEntryOffHeapUUIDKey.java   |   21 +-
 .../internal/cache/VMStatsLRURegionEntry.java   |   21 +-
 .../cache/VMStatsLRURegionEntryHeap.java        |   21 +-
 .../cache/VMStatsLRURegionEntryHeapIntKey.java  |   21 +-
 .../cache/VMStatsLRURegionEntryHeapLongKey.java |   21 +-
 .../VMStatsLRURegionEntryHeapObjectKey.java     |   21 +-
 .../VMStatsLRURegionEntryHeapStringKey1.java    |   21 +-
 .../VMStatsLRURegionEntryHeapStringKey2.java    |   21 +-
 .../cache/VMStatsLRURegionEntryHeapUUIDKey.java |   21 +-
 .../cache/VMStatsLRURegionEntryOffHeap.java     |   21 +-
 .../VMStatsLRURegionEntryOffHeapIntKey.java     |   21 +-
 .../VMStatsLRURegionEntryOffHeapLongKey.java    |   21 +-
 .../VMStatsLRURegionEntryOffHeapObjectKey.java  |   21 +-
 .../VMStatsLRURegionEntryOffHeapStringKey1.java |   21 +-
 .../VMStatsLRURegionEntryOffHeapStringKey2.java |   21 +-
 .../VMStatsLRURegionEntryOffHeapUUIDKey.java    |   21 +-
 .../internal/cache/VMStatsRegionEntry.java      |   21 +-
 .../internal/cache/VMStatsRegionEntryHeap.java  |   21 +-
 .../cache/VMStatsRegionEntryHeapIntKey.java     |   21 +-
 .../cache/VMStatsRegionEntryHeapLongKey.java    |   21 +-
 .../cache/VMStatsRegionEntryHeapObjectKey.java  |   21 +-
 .../cache/VMStatsRegionEntryHeapStringKey1.java |   21 +-
 .../cache/VMStatsRegionEntryHeapStringKey2.java |   21 +-
 .../cache/VMStatsRegionEntryHeapUUIDKey.java    |   21 +-
 .../cache/VMStatsRegionEntryOffHeap.java        |   21 +-
 .../cache/VMStatsRegionEntryOffHeapIntKey.java  |   21 +-
 .../cache/VMStatsRegionEntryOffHeapLongKey.java |   21 +-
 .../VMStatsRegionEntryOffHeapObjectKey.java     |   21 +-
 .../VMStatsRegionEntryOffHeapStringKey1.java    |   21 +-
 .../VMStatsRegionEntryOffHeapStringKey2.java    |   21 +-
 .../cache/VMStatsRegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VMThinDiskLRURegionEntry.java         |   21 +-
 .../cache/VMThinDiskLRURegionEntryHeap.java     |   21 +-
 .../VMThinDiskLRURegionEntryHeapIntKey.java     |   21 +-
 .../VMThinDiskLRURegionEntryHeapLongKey.java    |   21 +-
 .../VMThinDiskLRURegionEntryHeapObjectKey.java  |   21 +-
 .../VMThinDiskLRURegionEntryHeapStringKey1.java |   21 +-
 .../VMThinDiskLRURegionEntryHeapStringKey2.java |   21 +-
 .../VMThinDiskLRURegionEntryHeapUUIDKey.java    |   21 +-
 .../cache/VMThinDiskLRURegionEntryOffHeap.java  |   21 +-
 .../VMThinDiskLRURegionEntryOffHeapIntKey.java  |   21 +-
 .../VMThinDiskLRURegionEntryOffHeapLongKey.java |   21 +-
 ...MThinDiskLRURegionEntryOffHeapObjectKey.java |   21 +-
 ...ThinDiskLRURegionEntryOffHeapStringKey1.java |   21 +-
 ...ThinDiskLRURegionEntryOffHeapStringKey2.java |   21 +-
 .../VMThinDiskLRURegionEntryOffHeapUUIDKey.java |   21 +-
 .../internal/cache/VMThinDiskRegionEntry.java   |   21 +-
 .../cache/VMThinDiskRegionEntryHeap.java        |   21 +-
 .../cache/VMThinDiskRegionEntryHeapIntKey.java  |   21 +-
 .../cache/VMThinDiskRegionEntryHeapLongKey.java |   21 +-
 .../VMThinDiskRegionEntryHeapObjectKey.java     |   21 +-
 .../VMThinDiskRegionEntryHeapStringKey1.java    |   21 +-
 .../VMThinDiskRegionEntryHeapStringKey2.java    |   21 +-
 .../cache/VMThinDiskRegionEntryHeapUUIDKey.java |   21 +-
 .../cache/VMThinDiskRegionEntryOffHeap.java     |   21 +-
 .../VMThinDiskRegionEntryOffHeapIntKey.java     |   21 +-
 .../VMThinDiskRegionEntryOffHeapLongKey.java    |   21 +-
 .../VMThinDiskRegionEntryOffHeapObjectKey.java  |   21 +-
 .../VMThinDiskRegionEntryOffHeapStringKey1.java |   21 +-
 .../VMThinDiskRegionEntryOffHeapStringKey2.java |   21 +-
 .../VMThinDiskRegionEntryOffHeapUUIDKey.java    |   21 +-
 .../internal/cache/VMThinLRURegionEntry.java    |   21 +-
 .../cache/VMThinLRURegionEntryHeap.java         |   21 +-
 .../cache/VMThinLRURegionEntryHeapIntKey.java   |   21 +-
 .../cache/VMThinLRURegionEntryHeapLongKey.java  |   21 +-
 .../VMThinLRURegionEntryHeapObjectKey.java      |   21 +-
 .../VMThinLRURegionEntryHeapStringKey1.java     |   21 +-
 .../VMThinLRURegionEntryHeapStringKey2.java     |   21 +-
 .../cache/VMThinLRURegionEntryHeapUUIDKey.java  |   21 +-
 .../cache/VMThinLRURegionEntryOffHeap.java      |   21 +-
 .../VMThinLRURegionEntryOffHeapIntKey.java      |   21 +-
 .../VMThinLRURegionEntryOffHeapLongKey.java     |   21 +-
 .../VMThinLRURegionEntryOffHeapObjectKey.java   |   21 +-
 .../VMThinLRURegionEntryOffHeapStringKey1.java  |   21 +-
 .../VMThinLRURegionEntryOffHeapStringKey2.java  |   21 +-
 .../VMThinLRURegionEntryOffHeapUUIDKey.java     |   21 +-
 .../internal/cache/VMThinRegionEntry.java       |   26 +-
 .../internal/cache/VMThinRegionEntryHeap.java   |   21 +-
 .../cache/VMThinRegionEntryHeapIntKey.java      |   21 +-
 .../cache/VMThinRegionEntryHeapLongKey.java     |   21 +-
 .../cache/VMThinRegionEntryHeapObjectKey.java   |   21 +-
 .../cache/VMThinRegionEntryHeapStringKey1.java  |   21 +-
 .../cache/VMThinRegionEntryHeapStringKey2.java  |   21 +-
 .../cache/VMThinRegionEntryHeapUUIDKey.java     |   21 +-
 .../cache/VMThinRegionEntryOffHeap.java         |   16 +
 .../cache/VMThinRegionEntryOffHeapIntKey.java   |   21 +-
 .../cache/VMThinRegionEntryOffHeapLongKey.java  |   21 +-
 .../VMThinRegionEntryOffHeapObjectKey.java      |   21 +-
 .../VMThinRegionEntryOffHeapStringKey1.java     |   21 +-
 .../VMThinRegionEntryOffHeapStringKey2.java     |   21 +-
 .../cache/VMThinRegionEntryOffHeapUUIDKey.java  |   21 +-
 .../internal/cache/ValidatingDiskRegion.java    |   21 +-
 .../internal/cache/ValueByteWrapper.java        |   21 +-
 .../internal/cache/VersionTimestamp.java        |   21 +-
 .../cache/VersionedStatsDiskLRURegionEntry.java |   21 +-
 .../VersionedStatsDiskLRURegionEntryHeap.java   |   21 +-
 ...sionedStatsDiskLRURegionEntryHeapIntKey.java |   21 +-
 ...ionedStatsDiskLRURegionEntryHeapLongKey.java |   21 +-
 ...nedStatsDiskLRURegionEntryHeapObjectKey.java |   21 +-
 ...edStatsDiskLRURegionEntryHeapStringKey1.java |   21 +-
 ...edStatsDiskLRURegionEntryHeapStringKey2.java |   21 +-
 ...ionedStatsDiskLRURegionEntryHeapUUIDKey.java |   21 +-
 ...VersionedStatsDiskLRURegionEntryOffHeap.java |   21 +-
 ...nedStatsDiskLRURegionEntryOffHeapIntKey.java |   21 +-
 ...edStatsDiskLRURegionEntryOffHeapLongKey.java |   21 +-
 ...StatsDiskLRURegionEntryOffHeapObjectKey.java |   21 +-
 ...tatsDiskLRURegionEntryOffHeapStringKey1.java |   21 +-
 ...tatsDiskLRURegionEntryOffHeapStringKey2.java |   21 +-
 ...edStatsDiskLRURegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VersionedStatsDiskRegionEntry.java    |   21 +-
 .../VersionedStatsDiskRegionEntryHeap.java      |   21 +-
 ...VersionedStatsDiskRegionEntryHeapIntKey.java |   21 +-
 ...ersionedStatsDiskRegionEntryHeapLongKey.java |   21 +-
 ...sionedStatsDiskRegionEntryHeapObjectKey.java |   21 +-
 ...ionedStatsDiskRegionEntryHeapStringKey1.java |   21 +-
 ...ionedStatsDiskRegionEntryHeapStringKey2.java |   21 +-
 ...ersionedStatsDiskRegionEntryHeapUUIDKey.java |   21 +-
 .../VersionedStatsDiskRegionEntryOffHeap.java   |   21 +-
 ...sionedStatsDiskRegionEntryOffHeapIntKey.java |   21 +-
 ...ionedStatsDiskRegionEntryOffHeapLongKey.java |   21 +-
 ...nedStatsDiskRegionEntryOffHeapObjectKey.java |   21 +-
 ...edStatsDiskRegionEntryOffHeapStringKey1.java |   21 +-
 ...edStatsDiskRegionEntryOffHeapStringKey2.java |   21 +-
 ...ionedStatsDiskRegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VersionedStatsLRURegionEntry.java     |   21 +-
 .../cache/VersionedStatsLRURegionEntryHeap.java |   21 +-
 .../VersionedStatsLRURegionEntryHeapIntKey.java |   21 +-
 ...VersionedStatsLRURegionEntryHeapLongKey.java |   21 +-
 ...rsionedStatsLRURegionEntryHeapObjectKey.java |   21 +-
 ...sionedStatsLRURegionEntryHeapStringKey1.java |   21 +-
 ...sionedStatsLRURegionEntryHeapStringKey2.java |   21 +-
 ...VersionedStatsLRURegionEntryHeapUUIDKey.java |   21 +-
 .../VersionedStatsLRURegionEntryOffHeap.java    |   21 +-
 ...rsionedStatsLRURegionEntryOffHeapIntKey.java |   21 +-
 ...sionedStatsLRURegionEntryOffHeapLongKey.java |   21 +-
 ...onedStatsLRURegionEntryOffHeapObjectKey.java |   21 +-
 ...nedStatsLRURegionEntryOffHeapStringKey1.java |   21 +-
 ...nedStatsLRURegionEntryOffHeapStringKey2.java |   21 +-
 ...sionedStatsLRURegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VersionedStatsRegionEntry.java        |   21 +-
 .../cache/VersionedStatsRegionEntryHeap.java    |   21 +-
 .../VersionedStatsRegionEntryHeapIntKey.java    |   21 +-
 .../VersionedStatsRegionEntryHeapLongKey.java   |   21 +-
 .../VersionedStatsRegionEntryHeapObjectKey.java |   21 +-
 ...VersionedStatsRegionEntryHeapStringKey1.java |   21 +-
 ...VersionedStatsRegionEntryHeapStringKey2.java |   21 +-
 .../VersionedStatsRegionEntryHeapUUIDKey.java   |   21 +-
 .../cache/VersionedStatsRegionEntryOffHeap.java |   21 +-
 .../VersionedStatsRegionEntryOffHeapIntKey.java |   21 +-
 ...VersionedStatsRegionEntryOffHeapLongKey.java |   21 +-
 ...rsionedStatsRegionEntryOffHeapObjectKey.java |   21 +-
 ...sionedStatsRegionEntryOffHeapStringKey1.java |   21 +-
 ...sionedStatsRegionEntryOffHeapStringKey2.java |   21 +-
 ...VersionedStatsRegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VersionedThinDiskLRURegionEntry.java  |   21 +-
 .../VersionedThinDiskLRURegionEntryHeap.java    |   21 +-
 ...rsionedThinDiskLRURegionEntryHeapIntKey.java |   21 +-
 ...sionedThinDiskLRURegionEntryHeapLongKey.java |   21 +-
 ...onedThinDiskLRURegionEntryHeapObjectKey.java |   21 +-
 ...nedThinDiskLRURegionEntryHeapStringKey1.java |   21 +-
 ...nedThinDiskLRURegionEntryHeapStringKey2.java |   21 +-
 ...sionedThinDiskLRURegionEntryHeapUUIDKey.java |   21 +-
 .../VersionedThinDiskLRURegionEntryOffHeap.java |   21 +-
 ...onedThinDiskLRURegionEntryOffHeapIntKey.java |   21 +-
 ...nedThinDiskLRURegionEntryOffHeapLongKey.java |   21 +-
 ...dThinDiskLRURegionEntryOffHeapObjectKey.java |   21 +-
 ...ThinDiskLRURegionEntryOffHeapStringKey1.java |   21 +-
 ...ThinDiskLRURegionEntryOffHeapStringKey2.java |   21 +-
 ...nedThinDiskLRURegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VersionedThinDiskRegionEntry.java     |   21 +-
 .../cache/VersionedThinDiskRegionEntryHeap.java |   21 +-
 .../VersionedThinDiskRegionEntryHeapIntKey.java |   21 +-
 ...VersionedThinDiskRegionEntryHeapLongKey.java |   21 +-
 ...rsionedThinDiskRegionEntryHeapObjectKey.java |   21 +-
 ...sionedThinDiskRegionEntryHeapStringKey1.java |   21 +-
 ...sionedThinDiskRegionEntryHeapStringKey2.java |   21 +-
 ...VersionedThinDiskRegionEntryHeapUUIDKey.java |   21 +-
 .../VersionedThinDiskRegionEntryOffHeap.java    |   21 +-
 ...rsionedThinDiskRegionEntryOffHeapIntKey.java |   21 +-
 ...sionedThinDiskRegionEntryOffHeapLongKey.java |   21 +-
 ...onedThinDiskRegionEntryOffHeapObjectKey.java |   21 +-
 ...nedThinDiskRegionEntryOffHeapStringKey1.java |   21 +-
 ...nedThinDiskRegionEntryOffHeapStringKey2.java |   21 +-
 ...sionedThinDiskRegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VersionedThinLRURegionEntry.java      |   21 +-
 .../cache/VersionedThinLRURegionEntryHeap.java  |   21 +-
 .../VersionedThinLRURegionEntryHeapIntKey.java  |   21 +-
 .../VersionedThinLRURegionEntryHeapLongKey.java |   21 +-
 ...ersionedThinLRURegionEntryHeapObjectKey.java |   21 +-
 ...rsionedThinLRURegionEntryHeapStringKey1.java |   21 +-
 ...rsionedThinLRURegionEntryHeapStringKey2.java |   21 +-
 .../VersionedThinLRURegionEntryHeapUUIDKey.java |   21 +-
 .../VersionedThinLRURegionEntryOffHeap.java     |   21 +-
 ...ersionedThinLRURegionEntryOffHeapIntKey.java |   21 +-
 ...rsionedThinLRURegionEntryOffHeapLongKey.java |   21 +-
 ...ionedThinLRURegionEntryOffHeapObjectKey.java |   21 +-
 ...onedThinLRURegionEntryOffHeapStringKey1.java |   21 +-
 ...onedThinLRURegionEntryOffHeapStringKey2.java |   21 +-
 ...rsionedThinLRURegionEntryOffHeapUUIDKey.java |   21 +-
 .../cache/VersionedThinRegionEntry.java         |   21 +-
 .../cache/VersionedThinRegionEntryHeap.java     |   21 +-
 .../VersionedThinRegionEntryHeapIntKey.java     |   21 +-
 .../VersionedThinRegionEntryHeapLongKey.java    |   21 +-
 .../VersionedThinRegionEntryHeapObjectKey.java  |   21 +-
 .../VersionedThinRegionEntryHeapStringKey1.java |   21 +-
 .../VersionedThinRegionEntryHeapStringKey2.java |   21 +-
 .../VersionedThinRegionEntryHeapUUIDKey.java    |   21 +-
 .../cache/VersionedThinRegionEntryOffHeap.java  |   21 +-
 .../VersionedThinRegionEntryOffHeapIntKey.java  |   21 +-
 .../VersionedThinRegionEntryOffHeapLongKey.java |   21 +-
 ...ersionedThinRegionEntryOffHeapObjectKey.java |   21 +-
 ...rsionedThinRegionEntryOffHeapStringKey1.java |   21 +-
 ...rsionedThinRegionEntryOffHeapStringKey2.java |   21 +-
 .../VersionedThinRegionEntryOffHeapUUIDKey.java |   21 +-
 .../internal/cache/WrappedCallbackArgument.java |   21 +-
 .../cache/WrappedRegionMembershipListener.java  |   21 +-
 .../CompressedCachedDeserializable.java         |   23 +-
 .../SnappyCompressedCachedDeserializable.java   |   23 +-
 .../internal/cache/control/FilterByPath.java    |   21 +-
 .../cache/control/HeapMemoryMonitor.java        |   21 +-
 .../cache/control/InternalResourceManager.java  |   34 +-
 .../internal/cache/control/MemoryEvent.java     |   20 +-
 .../cache/control/MemoryThresholds.java         |   16 +
 .../cache/control/OffHeapMemoryMonitor.java     |  212 +-
 .../control/PartitionRebalanceDetailsImpl.java  |   21 +-
 .../cache/control/RebalanceOperationImpl.java   |   21 +-
 .../cache/control/RebalanceResultsImpl.java     |   21 +-
 .../internal/cache/control/RegionFilter.java    |   21 +-
 .../internal/cache/control/ResourceAdvisor.java |   21 +-
 .../internal/cache/control/ResourceEvent.java   |   20 +-
 .../cache/control/ResourceListener.java         |   21 +-
 .../cache/control/ResourceManagerStats.java     |   21 +-
 .../internal/cache/control/ResourceMonitor.java |   16 +
 .../gemfire/internal/cache/delta/Delta.java     |   21 +-
 .../internal/cache/doc-files/properties.html    |   42 +-
 .../cache/execute/AbstractExecution.java        |   21 +-
 .../cache/execute/BucketMovedException.java     |   21 +-
 .../cache/execute/DefaultResultCollector.java   |   20 +-
 .../DistributedRegionFunctionExecutor.java      |   20 +-
 .../DistributedRegionFunctionResultSender.java  |   21 +-
 .../DistributedRegionFunctionResultWaiter.java  |   21 +-
 .../cache/execute/FunctionContextImpl.java      |   21 +-
 .../execute/FunctionExecutionNodePruner.java    |   21 +-
 .../cache/execute/FunctionRemoteContext.java    |   21 +-
 .../cache/execute/FunctionServiceStats.java     |   24 +-
 .../internal/cache/execute/FunctionStats.java   |   21 +-
 .../FunctionStreamingResultCollector.java       |   21 +-
 .../cache/execute/InternalExecution.java        |   21 +-
 .../execute/InternalFunctionException.java      |   21 +-
 ...ternalFunctionInvocationTargetException.java |   21 +-
 .../cache/execute/InternalFunctionService.java  |   24 +-
 .../execute/InternalRegionFunctionContext.java  |   21 +-
 .../cache/execute/InternalResultSender.java     |   21 +-
 .../cache/execute/LocalResultCollector.java     |   20 +-
 .../cache/execute/LocalResultCollectorImpl.java |   21 +-
 .../cache/execute/MemberFunctionExecutor.java   |   21 +-
 .../execute/MemberFunctionResultSender.java     |   20 +-
 .../execute/MemberFunctionResultWaiter.java     |   21 +-
 .../cache/execute/MemberMappedArgument.java     |   20 +-
 .../execute/MultiRegionFunctionContext.java     |   21 +-
 .../execute/MultiRegionFunctionContextImpl.java |   21 +-
 .../execute/MultiRegionFunctionExecutor.java    |   21 +-
 .../MultiRegionFunctionResultWaiter.java        |   21 +-
 .../internal/cache/execute/NoResult.java        |   20 +-
 .../PartitionedRegionFunctionExecutor.java      |   21 +-
 .../PartitionedRegionFunctionResultSender.java  |   20 +-
 .../PartitionedRegionFunctionResultWaiter.java  |   21 +-
 .../execute/RegionFunctionContextImpl.java      |   21 +-
 .../cache/execute/ServerFunctionExecutor.java   |   39 +-
 .../execute/ServerRegionFunctionExecutor.java   |   23 +-
 .../ServerToClientFunctionResultSender.java     |   20 +-
 .../ServerToClientFunctionResultSender65.java   |   20 +-
 .../execute/StreamingFunctionOperation.java     |   21 +-
 .../execute/TransactionFunctionService.java     |  184 -
 .../cache/execute/util/CommitFunction.java      |   22 +-
 .../util/FindRestEnabledServersFunction.java    |   23 +-
 .../execute/util/NestedTransactionFunction.java |   21 +-
 .../cache/execute/util/RollbackFunction.java    |   22 +-
 .../internal/cache/extension/Extensible.java    |   21 +-
 .../internal/cache/extension/Extension.java     |   21 +-
 .../cache/extension/ExtensionPoint.java         |   21 +-
 .../cache/extension/SimpleExtensionPoint.java   |   23 +-
 .../internal/cache/ha/HAContainerMap.java       |   21 +-
 .../internal/cache/ha/HAContainerRegion.java    |   21 +-
 .../internal/cache/ha/HAContainerWrapper.java   |   21 +-
 .../internal/cache/ha/HARegionQueue.java        |   28 +-
 .../cache/ha/HARegionQueueAttributes.java       |   21 +-
 .../internal/cache/ha/HARegionQueueStats.java   |   21 +-
 .../internal/cache/ha/QueueRemovalMessage.java  |   21 +-
 .../internal/cache/ha/ThreadIdentifier.java     |   21 +-
 .../locks/GFEAbstractQueuedSynchronizer.java    |   21 +-
 .../locks/ReentrantReadWriteWriteShareLock.java |   21 +-
 .../cache/locks/TXLessorDepartureHandler.java   |   21 +-
 .../internal/cache/locks/TXLockBatch.java       |   21 +-
 .../gemfire/internal/cache/locks/TXLockId.java  |   21 +-
 .../internal/cache/locks/TXLockIdImpl.java      |   21 +-
 .../internal/cache/locks/TXLockService.java     |   21 +-
 .../internal/cache/locks/TXLockServiceImpl.java |   21 +-
 .../internal/cache/locks/TXLockToken.java       |   21 +-
 .../locks/TXLockUpdateParticipantsMessage.java  |   21 +-
 .../locks/TXOriginatorRecoveryProcessor.java    |   21 +-
 .../locks/TXRecoverGrantorMessageProcessor.java |   21 +-
 .../cache/locks/TXRegionLockRequest.java        |   21 +-
 .../gemfire/internal/cache/lru/EnableLRU.java   |   21 +-
 .../gemfire/internal/cache/lru/HeapEvictor.java |   21 +-
 .../cache/lru/HeapLRUCapacityController.java    |   21 +-
 .../internal/cache/lru/HeapLRUStatistics.java   |   21 +-
 .../internal/cache/lru/LRUAlgorithm.java        |   21 +-
 .../cache/lru/LRUCapacityController.java        |   21 +-
 .../internal/cache/lru/LRUClockNode.java        |   21 +-
 .../gemfire/internal/cache/lru/LRUEntry.java    |   21 +-
 .../internal/cache/lru/LRUMapCallbacks.java     |   21 +-
 .../internal/cache/lru/LRUStatistics.java       |   21 +-
 .../cache/lru/MemLRUCapacityController.java     |   21 +-
 .../internal/cache/lru/NewLIFOClockHand.java    |   21 +-
 .../internal/cache/lru/NewLRUClockHand.java     |   21 +-
 .../internal/cache/lru/OffHeapEvictor.java      |   21 +-
 .../gemfire/internal/cache/lru/Sizeable.java    |   21 +-
 .../operations/ContainsKeyOperationContext.java |   21 +-
 .../gemfire/internal/cache/package.html         |   16 +
 .../AllBucketProfilesUpdateMessage.java         |   21 +-
 .../partitioned/BecomePrimaryBucketMessage.java |   21 +-
 .../internal/cache/partitioned/Bucket.java      |   21 +-
 .../cache/partitioned/BucketBackupMessage.java  |   20 +-
 .../cache/partitioned/BucketCountLoadProbe.java |   75 +
 .../partitioned/BucketProfileUpdateMessage.java |   23 +-
 .../cache/partitioned/BucketSizeMessage.java    |   21 +-
 .../partitioned/ContainsKeyValueMessage.java    |   20 +-
 .../cache/partitioned/CreateBucketMessage.java  |   21 +-
 .../partitioned/CreateMissingBucketsTask.java   |   23 +-
 .../partitioned/DeposePrimaryBucketMessage.java |   21 +-
 .../cache/partitioned/DestroyMessage.java       |   21 +-
 .../DestroyRegionOnDataStoreMessage.java        |   20 +-
 .../partitioned/DumpAllPRConfigMessage.java     |   20 +-
 .../cache/partitioned/DumpB2NRegion.java        |   20 +-
 .../cache/partitioned/DumpBucketsMessage.java   |   21 +-
 .../partitioned/EndBucketCreationMessage.java   |   21 +-
 .../partitioned/FetchBulkEntriesMessage.java    |   21 +-
 .../cache/partitioned/FetchEntriesMessage.java  |   32 +-
 .../cache/partitioned/FetchEntryMessage.java    |   20 +-
 .../cache/partitioned/FetchKeysMessage.java     |   21 +-
 .../FetchPartitionDetailsMessage.java           |   21 +-
 .../cache/partitioned/FlushMessage.java         |   21 +-
 .../internal/cache/partitioned/GetMessage.java  |   21 +-
 .../partitioned/IdentityRequestMessage.java     |   20 +-
 .../partitioned/IdentityUpdateMessage.java      |   21 +-
 .../cache/partitioned/IndexCreationMsg.java     |   21 +-
 .../cache/partitioned/InterestEventMessage.java |   21 +-
 .../cache/partitioned/InternalPRInfo.java       |   21 +-
 .../partitioned/InternalPartitionDetails.java   |   21 +-
 .../cache/partitioned/InvalidateMessage.java    |   20 +-
 .../internal/cache/partitioned/LoadProbe.java   |   21 +-
 .../internal/cache/partitioned/LockObject.java  |   21 +-
 .../partitioned/ManageBackupBucketMessage.java  |   21 +-
 .../cache/partitioned/ManageBucketMessage.java  |   21 +-
 .../cache/partitioned/MoveBucketMessage.java    |   21 +-
 .../cache/partitioned/OfflineMemberDetails.java |   23 +-
 .../partitioned/OfflineMemberDetailsImpl.java   |   21 +-
 .../cache/partitioned/PREntriesIterator.java    |   21 +-
 .../PRFunctionStreamingResultCollector.java     |   21 +-
 .../internal/cache/partitioned/PRLoad.java      |   21 +-
 .../PRLocallyDestroyedException.java            |   21 +-
 .../cache/partitioned/PRSanityCheckMessage.java |   21 +-
 .../cache/partitioned/PRTombstoneMessage.java   |   24 +-
 .../PRUpdateEntryVersionMessage.java            |   22 +-
 .../partitioned/PartitionMemberInfoImpl.java    |   21 +-
 .../cache/partitioned/PartitionMessage.java     |   21 +-
 .../PartitionMessageWithDirectReply.java        |   21 +-
 .../partitioned/PartitionRegionInfoImpl.java    |   21 +-
 ...rtitionedRegionFunctionStreamingMessage.java |   21 +-
 .../partitioned/PartitionedRegionObserver.java  |   21 +-
 .../PartitionedRegionObserverAdapter.java       |   21 +-
 .../PartitionedRegionObserverHolder.java        |   23 +-
 .../PartitionedRegionRebalanceOp.java           |   73 +-
 .../partitioned/PrimaryRequestMessage.java      |   21 +-
 .../cache/partitioned/PutAllPRMessage.java      |   21 +-
 .../internal/cache/partitioned/PutMessage.java  |   42 +-
 .../cache/partitioned/QueryMessage.java         |   21 +-
 .../cache/partitioned/RecoveryRunnable.java     |   23 +-
 .../RedundancyAlreadyMetException.java          |   21 +-
 .../cache/partitioned/RedundancyLogger.java     |   21 +-
 .../cache/partitioned/RegionAdvisor.java        |   20 +-
 .../partitioned/RemoteFetchKeysMessage.java     |   21 +-
 .../cache/partitioned/RemoteSizeMessage.java    |   21 +-
 .../cache/partitioned/RemoveAllPRMessage.java   |   21 +-
 .../cache/partitioned/RemoveBucketMessage.java  |   21 +-
 .../cache/partitioned/RemoveIndexesMessage.java |   21 +-
 .../internal/cache/partitioned/SizeMessage.java |   21 +-
 .../cache/partitioned/SizedBasedLoadProbe.java  |   21 +-
 .../StreamingPartitionOperation.java            |   24 +-
 .../partitioned/rebalance/BucketOperator.java   |   21 +-
 .../rebalance/CompositeDirector.java            |   21 +-
 .../rebalance/ExplicitMoveDirector.java         |   21 +-
 .../partitioned/rebalance/FPRDirector.java      |   21 +-
 .../partitioned/rebalance/MoveBuckets.java      |   21 +-
 .../partitioned/rebalance/MovePrimaries.java    |   21 +-
 .../partitioned/rebalance/MovePrimariesFPR.java |   21 +-
 .../rebalance/ParallelBucketOperator.java       |   16 +
 .../rebalance/PartitionedRegionLoadModel.java   |   21 +-
 .../rebalance/PercentageMoveDirector.java       |   21 +-
 .../rebalance/RebalanceDirector.java            |   21 +-
 .../rebalance/RebalanceDirectorAdapter.java     |   21 +-
 .../rebalance/RemoveOverRedundancy.java         |   21 +-
 .../rebalance/SatisfyRedundancy.java            |   21 +-
 .../rebalance/SatisfyRedundancyFPR.java         |   21 +-
 .../rebalance/SimulatedBucketOperator.java      |   21 +-
 .../cache/persistence/BackupInspector.java      |   21 +-
 .../cache/persistence/BackupManager.java        |   21 +-
 .../cache/persistence/BytesAndBits.java         |   21 +-
 .../cache/persistence/CanonicalIdHolder.java    |   21 +-
 .../CreatePersistentRegionProcessor.java        |   21 +-
 .../cache/persistence/DiskExceptionHandler.java |   21 +-
 .../persistence/DiskInitFileInterpreter.java    |   21 +-
 .../cache/persistence/DiskInitFileParser.java   |   21 +-
 .../cache/persistence/DiskRecoveryStore.java    |   23 +-
 .../cache/persistence/DiskRegionView.java       |   21 +-
 .../cache/persistence/DiskStoreFilter.java      |   23 +-
 .../internal/cache/persistence/DiskStoreID.java |   21 +-
 .../persistence/MembershipFlushRequest.java     |   21 +-
 .../persistence/MembershipViewRequest.java      |   21 +-
 .../internal/cache/persistence/OplogType.java   |   18 +-
 .../cache/persistence/PRPersistentConfig.java   |   21 +-
 .../cache/persistence/PersistenceAdvisor.java   |   21 +-
 .../persistence/PersistenceAdvisorImpl.java     |   21 +-
 .../persistence/PersistenceObserverHolder.java  |   21 +-
 .../cache/persistence/PersistentMemberID.java   |   21 +-
 .../persistence/PersistentMemberManager.java    |   21 +-
 .../persistence/PersistentMemberPattern.java    |   23 +-
 .../persistence/PersistentMemberState.java      |   21 +-
 .../cache/persistence/PersistentMemberView.java |   21 +-
 .../persistence/PersistentMembershipView.java   |   23 +-
 .../persistence/PersistentStateListener.java    |   23 +-
 .../PersistentStateQueryMessage.java            |   21 +-
 .../PersistentStateQueryResults.java            |   21 +-
 .../PrepareNewPersistentMemberMessage.java      |   21 +-
 .../RemovePersistentMemberMessage.java          |   21 +-
 .../cache/persistence/RestoreScript.java        |   21 +-
 .../persistence/UninterruptibleFileChannel.java |   18 +-
 .../UninterruptibleRandomAccessFile.java        |   16 +
 .../persistence/query/CloseableIterator.java    |   18 +-
 .../persistence/query/IdentityExtractor.java    |   16 +
 .../cache/persistence/query/IndexMap.java       |   21 +-
 .../cache/persistence/query/ResultBag.java      |   21 +-
 .../cache/persistence/query/ResultList.java     |   21 +-
 .../cache/persistence/query/ResultMap.java      |   21 +-
 .../cache/persistence/query/ResultSet.java      |   21 +-
 .../persistence/query/SortKeyExtractor.java     |   16 +
 .../query/TemporaryResultSetFactory.java        |   21 +-
 .../persistence/query/mock/ByteComparator.java  |   21 +-
 .../mock/CachedDeserializableComparator.java    |   23 +-
 .../persistence/query/mock/IndexMapImpl.java    |   21 +-
 .../persistence/query/mock/ItrAdapter.java      |   23 +-
 .../query/mock/NaturalComparator.java           |   16 +
 .../cache/persistence/query/mock/Pair.java      |   21 +-
 .../persistence/query/mock/PairComparator.java  |   21 +-
 .../persistence/query/mock/ResultListImpl.java  |   21 +-
 .../query/mock/ReverseComparator.java           |   21 +-
 .../query/mock/SortedResultBagImpl.java         |   21 +-
 .../query/mock/SortedResultMapImpl.java         |   21 +-
 .../query/mock/SortedResultSetImpl.java         |   21 +-
 .../persistence/soplog/AbstractCompactor.java   |  524 --
 .../soplog/AbstractKeyValueIterator.java        |   67 -
 .../soplog/AbstractSortedReader.java            |  126 -
 .../soplog/ArraySerializedComparator.java       |  135 -
 .../persistence/soplog/ByteComparator.java      |   21 +-
 .../cache/persistence/soplog/Compactor.java     |  165 -
 .../soplog/CompositeSerializedComparator.java   |   48 -
 .../persistence/soplog/CursorIterator.java      |   21 +-
 .../soplog/DelegatingSerializedComparator.java  |   21 +-
 .../soplog/HFileStoreStatistics.java            |   21 +-
 .../soplog/IndexSerializedComparator.java       |  118 -
 .../persistence/soplog/KeyValueIterator.java    |   21 +-
 .../cache/persistence/soplog/LevelTracker.java  |  111 -
 .../soplog/LexicographicalComparator.java       |  451 --
 .../cache/persistence/soplog/NonCompactor.java  |  101 -
 .../soplog/ReversingSerializedComparator.java   |   58 -
 .../persistence/soplog/SizeTieredCompactor.java |  189 -
 .../cache/persistence/soplog/SoplogToken.java   |  107 -
 .../cache/persistence/soplog/SortedBuffer.java  |  358 --
 .../cache/persistence/soplog/SortedOplog.java   |  149 -
 .../persistence/soplog/SortedOplogFactory.java  |  269 -
 .../persistence/soplog/SortedOplogSet.java      |  109 -
 .../persistence/soplog/SortedOplogSetImpl.java  |  771 ---
 .../soplog/SortedOplogStatistics.java           |   21 +-
 .../cache/persistence/soplog/SortedReader.java  |   21 +-
 .../persistence/soplog/TrackedReference.java    |   21 +-
 .../soplog/hfile/BlockCacheHolder.java          |   30 -
 .../soplog/hfile/HFileSortedOplog.java          |  685 ---
 .../soplog/hfile/HFileSortedOplogFactory.java   |   71 -
 .../soplog/nofile/NoFileSortedOplog.java        |  235 -
 .../soplog/nofile/NoFileSortedOplogFactory.java |   32 -
 .../snapshot/CacheSnapshotServiceImpl.java      |   21 +-
 .../internal/cache/snapshot/ClientExporter.java |   21 +-
 .../cache/snapshot/ExportedRegistry.java        |   21 +-
 .../internal/cache/snapshot/FlowController.java |   21 +-
 .../internal/cache/snapshot/GFSnapshot.java     |   21 +-
 .../internal/cache/snapshot/LocalExporter.java  |   21 +-
 .../snapshot/RegionSnapshotServiceImpl.java     |   21 +-
 .../cache/snapshot/SnapshotFileMapper.java      |   21 +-
 .../cache/snapshot/SnapshotOptionsImpl.java     |   21 +-
 .../internal/cache/snapshot/SnapshotPacket.java |   21 +-
 .../cache/snapshot/WindowedExporter.java        |   21 +-
 .../gemfire/internal/cache/tier/Acceptor.java   |   21 +-
 .../internal/cache/tier/BatchException.java     |   21 +-
 .../internal/cache/tier/CachedRegionHelper.java |   21 +-
 .../internal/cache/tier/ClientHandShake.java    |   21 +-
 .../gemfire/internal/cache/tier/Command.java    |   21 +-
 .../internal/cache/tier/ConnectionProxy.java    |  181 +-
 .../internal/cache/tier/InterestType.java       |   21 +-
 .../cache/tier/InternalBridgeMembership.java    |  715 ---
 .../cache/tier/InternalClientMembership.java    |  626 +++
 .../internal/cache/tier/MessageType.java        |   21 +-
 .../gemfire/internal/cache/tier/package.html    |   16 +
 .../cache/tier/sockets/AcceptorImpl.java        |   81 +-
 .../cache/tier/sockets/BaseCommand.java         |   40 +-
 .../cache/tier/sockets/BaseCommandQuery.java    |   16 +
 .../cache/tier/sockets/CacheClientNotifier.java |   55 +-
 .../tier/sockets/CacheClientNotifierStats.java  |   21 +-
 .../cache/tier/sockets/CacheClientProxy.java    |   60 +-
 .../tier/sockets/CacheClientProxyStats.java     |   21 +-
 .../cache/tier/sockets/CacheClientUpdater.java  |   43 +-
 .../cache/tier/sockets/CacheServerHelper.java   |   21 +-
 .../cache/tier/sockets/CacheServerStats.java    |   21 +-
 .../cache/tier/sockets/ChunkedMessage.java      |   21 +-
 .../tier/sockets/ClientBlacklistProcessor.java  |   25 +-
 .../sockets/ClientDataSerializerMessage.java    |   21 +-
 .../cache/tier/sockets/ClientHealthMonitor.java |   21 +-
 .../tier/sockets/ClientInstantiatorMessage.java |   20 +-
 .../tier/sockets/ClientInterestMessageImpl.java |   21 +-
 .../tier/sockets/ClientMarkerMessageImpl.java   |   21 +-
 .../cache/tier/sockets/ClientMessage.java       |   21 +-
 .../tier/sockets/ClientPingMessageImpl.java     |   21 +-
 .../tier/sockets/ClientProxyMembershipID.java   |   32 +-
 .../tier/sockets/ClientTombstoneMessage.java    |   21 +-
 .../cache/tier/sockets/ClientUpdateMessage.java |   21 +-
 .../tier/sockets/ClientUpdateMessageImpl.java   |   21 +-
 .../cache/tier/sockets/ClientUserAuths.java     |   21 +-
 .../cache/tier/sockets/CommandInitializer.java  |   25 +-
 .../cache/tier/sockets/ConnectionListener.java  |   21 +-
 .../tier/sockets/ConnectionListenerAdapter.java |   21 +-
 .../cache/tier/sockets/HAEventWrapper.java      |   21 +-
 .../internal/cache/tier/sockets/HandShake.java  |   39 +-
 .../tier/sockets/InterestResultPolicyImpl.java  |   21 +-
 .../internal/cache/tier/sockets/Message.java    |   44 +-
 .../cache/tier/sockets/MessageStats.java        |   21 +-
 .../cache/tier/sockets/ObjectPartList.java      |   21 +-
 .../cache/tier/sockets/ObjectPartList651.java   |   21 +-
 .../internal/cache/tier/sockets/Part.java       |   25 +-
 .../RemoveClientFromBlacklistMessage.java       |   27 +-
 .../tier/sockets/SerializedObjectPartList.java  |   21 +-
 .../cache/tier/sockets/ServerConnection.java    |   31 +-
 .../tier/sockets/ServerHandShakeProcessor.java  |   21 +-
 .../cache/tier/sockets/ServerQueueStatus.java   |   21 +-
 .../tier/sockets/ServerResponseMatrix.java      |   20 +-
 .../tier/sockets/UnregisterAllInterest.java     |   21 +-
 .../cache/tier/sockets/UserAuthAttributes.java  |   21 +-
 .../cache/tier/sockets/VersionedObjectList.java |   21 +-
 .../cache/tier/sockets/command/AddPdxEnum.java  |   21 +-
 .../cache/tier/sockets/command/AddPdxType.java  |   21 +-
 .../cache/tier/sockets/command/ClearRegion.java |   21 +-
 .../cache/tier/sockets/command/ClientReady.java |   21 +-
 .../tier/sockets/command/CloseConnection.java   |   21 +-
 .../tier/sockets/command/CommitCommand.java     |   25 +-
 .../cache/tier/sockets/command/ContainsKey.java |   21 +-
 .../tier/sockets/command/ContainsKey66.java     |   21 +-
 .../tier/sockets/command/CreateRegion.java      |   21 +-
 .../cache/tier/sockets/command/Default.java     |   21 +-
 .../cache/tier/sockets/command/Destroy.java     |   21 +-
 .../cache/tier/sockets/command/Destroy65.java   |   21 +-
 .../cache/tier/sockets/command/Destroy70.java   |   23 +-
 .../tier/sockets/command/DestroyRegion.java     |   21 +-
 .../tier/sockets/command/ExecuteFunction.java   |   21 +-
 .../tier/sockets/command/ExecuteFunction65.java |   20 +-
 .../tier/sockets/command/ExecuteFunction66.java |   22 +-
 .../tier/sockets/command/ExecuteFunction70.java |   21 +-
 .../sockets/command/ExecuteRegionFunction.java  |   20 +-
 .../command/ExecuteRegionFunction61.java        |   20 +-
 .../command/ExecuteRegionFunction65.java        |   20 +-
 .../command/ExecuteRegionFunction66.java        |   22 +-
 .../command/ExecuteRegionFunctionSingleHop.java |   23 +-
 .../sockets/command/GatewayReceiverCommand.java |   23 +-
 .../cache/tier/sockets/command/Get70.java       |   23 +-
 .../cache/tier/sockets/command/GetAll.java      |   21 +-
 .../cache/tier/sockets/command/GetAll651.java   |   21 +-
 .../cache/tier/sockets/command/GetAll70.java    |   23 +-
 .../cache/tier/sockets/command/GetAllForRI.java |   21 +-
 .../sockets/command/GetAllWithCallback.java     |   21 +-
 .../command/GetClientPRMetadataCommand.java     |   20 +-
 .../command/GetClientPRMetadataCommand66.java   |   20 +-
 .../GetClientPartitionAttributesCommand.java    |   20 +-
 .../GetClientPartitionAttributesCommand66.java  |   20 +-
 .../cache/tier/sockets/command/GetEntry70.java  |   23 +-
 .../tier/sockets/command/GetEntryCommand.java   |   21 +-
 .../sockets/command/GetFunctionAttribute.java   |   21 +-
 .../tier/sockets/command/GetPDXEnumById.java    |   21 +-
 .../tier/sockets/command/GetPDXIdForEnum.java   |   21 +-
 .../tier/sockets/command/GetPDXIdForType.java   |   21 +-
 .../tier/sockets/command/GetPDXTypeById.java    |   21 +-
 .../tier/sockets/command/GetPdxEnums70.java     |   21 +-
 .../tier/sockets/command/GetPdxTypes70.java     |   21 +-
 .../cache/tier/sockets/command/Invalid.java     |   21 +-
 .../cache/tier/sockets/command/Invalidate.java  |   21 +-
 .../tier/sockets/command/Invalidate70.java      |   23 +-
 .../cache/tier/sockets/command/KeySet.java      |   21 +-
 .../cache/tier/sockets/command/MakePrimary.java |   21 +-
 .../tier/sockets/command/ManagementCommand.java |   21 +-
 .../cache/tier/sockets/command/PeriodicAck.java |   21 +-
 .../cache/tier/sockets/command/Ping.java        |   36 +-
 .../cache/tier/sockets/command/Put.java         |   23 +-
 .../cache/tier/sockets/command/Put61.java       |   21 +-
 .../cache/tier/sockets/command/Put65.java       |   21 +-
 .../cache/tier/sockets/command/Put70.java       |   21 +-
 .../cache/tier/sockets/command/PutAll.java      |   21 +-
 .../cache/tier/sockets/command/PutAll70.java    |   21 +-
 .../cache/tier/sockets/command/PutAll80.java    |   21 +-
 .../sockets/command/PutAllWithCallback.java     |   21 +-
 .../sockets/command/PutUserCredentials.java     |   21 +-
 .../cache/tier/sockets/command/Query.java       |   21 +-
 .../cache/tier/sockets/command/Query651.java    |   21 +-
 .../command/RegisterDataSerializers.java        |   21 +-
 .../sockets/command/RegisterInstantiators.java  |   21 +-
 .../tier/sockets/command/RegisterInterest.java  |   23 +-
 .../sockets/command/RegisterInterest61.java     |   23 +-
 .../sockets/command/RegisterInterestList.java   |   23 +-
 .../sockets/command/RegisterInterestList61.java |   23 +-
 .../sockets/command/RegisterInterestList66.java |   23 +-
 .../cache/tier/sockets/command/RemoveAll.java   |   21 +-
 .../tier/sockets/command/RemoveUserAuth.java    |   21 +-
 .../cache/tier/sockets/command/Request.java     |   23 +-
 .../tier/sockets/command/RequestEventValue.java |   20 +-
 .../tier/sockets/command/RollbackCommand.java   |   21 +-
 .../cache/tier/sockets/command/Size.java        |   21 +-
 .../tier/sockets/command/TXFailoverCommand.java |   21 +-
 .../command/TXSynchronizationCommand.java       |   21 +-
 .../sockets/command/UnregisterInterest.java     |   23 +-
 .../sockets/command/UnregisterInterestList.java |   23 +-
 .../command/UpdateClientNotification.java       |   21 +-
 .../doc-files/communication-architecture.fig    |    4 +-
 .../internal/cache/tier/sockets/package.html    |   16 +
 .../cache/tx/AbstractPeerTXRegionStub.java      |   21 +-
 .../internal/cache/tx/ClientTXRegionStub.java   |   21 +-
 .../internal/cache/tx/ClientTXStateStub.java    |   21 +-
 .../cache/tx/DistClientTXStateStub.java         |   19 +-
 .../internal/cache/tx/DistTxEntryEvent.java     |   16 +
 .../internal/cache/tx/DistTxKeyInfo.java        |   18 +-
 .../cache/tx/DistributedTXRegionStub.java       |   21 +-
 .../cache/tx/PartitionedTXRegionStub.java       |   21 +-
 .../gemfire/internal/cache/tx/TXRegionStub.java |   21 +-
 .../cache/tx/TransactionalOperation.java        |   24 +-
 .../cache/versions/CompactVersionHolder.java    |   21 +-
 .../ConcurrentCacheModificationException.java   |   23 +-
 .../cache/versions/DiskRegionVersionVector.java |   21 +-
 .../internal/cache/versions/DiskVersionTag.java |   21 +-
 .../internal/cache/versions/RVVException.java   |   21 +-
 .../internal/cache/versions/RVVExceptionB.java  |   23 +-
 .../internal/cache/versions/RVVExceptionT.java  |   23 +-
 .../cache/versions/RegionVersionHolder.java     |   21 +-
 .../cache/versions/RegionVersionVector.java     |   27 +-
 .../cache/versions/VMRegionVersionVector.java   |   21 +-
 .../internal/cache/versions/VMVersionTag.java   |   21 +-
 .../internal/cache/versions/VersionHolder.java  |   21 +-
 .../internal/cache/versions/VersionSource.java  |   21 +-
 .../internal/cache/versions/VersionStamp.java   |   21 +-
 .../internal/cache/versions/VersionTag.java     |   21 +-
 .../internal/cache/vmotion/VMotionObserver.java |   20 +-
 .../cache/vmotion/VMotionObserverAdapter.java   |   20 +-
 .../cache/vmotion/VMotionObserverHolder.java    |   20 +-
 .../cache/wan/AbstractGatewaySender.java        |   50 +-
 .../AbstractGatewaySenderEventProcessor.java    |   21 +-
 .../AsyncEventQueueConfigurationException.java  |   21 +-
 .../internal/cache/wan/BatchException70.java    |   21 +-
 .../cache/wan/DistributedSystemListener.java    |   16 +
 .../cache/wan/GatewayEventFilterImpl.java       |   21 +-
 .../cache/wan/GatewayReceiverException.java     |   21 +-
 .../cache/wan/GatewayReceiverStats.java         |   21 +-
 .../cache/wan/GatewaySenderAdvisor.java         |   21 +-
 .../cache/wan/GatewaySenderAttributes.java      |   26 +-
 .../GatewaySenderConfigurationException.java    |   21 +-
 .../wan/GatewaySenderEventCallbackArgument.java |   20 +-
 .../GatewaySenderEventCallbackDispatcher.java   |   22 +-
 .../cache/wan/GatewaySenderEventDispatcher.java |   21 +-
 .../cache/wan/GatewaySenderEventImpl.java       |   30 +-
 .../cache/wan/GatewaySenderException.java       |   21 +-
 .../internal/cache/wan/GatewaySenderStats.java  |   21 +-
 .../cache/wan/InternalGatewaySenderFactory.java |   16 +
 .../cache/wan/TransportFilterServerSocket.java  |   21 +-
 .../cache/wan/TransportFilterSocket.java        |   21 +-
 .../cache/wan/TransportFilterSocketFactory.java |   21 +-
 .../internal/cache/wan/WANServiceProvider.java  |   16 +
 .../BucketRegionQueueUnavailableException.java  |   16 +
 ...rentParallelGatewaySenderEventProcessor.java |   23 +-
 .../ConcurrentParallelGatewaySenderQueue.java   |   21 +-
 .../ParallelGatewaySenderEventProcessor.java    |   23 +-
 .../parallel/ParallelGatewaySenderQueue.java    |   84 +-
 .../ParallelQueueBatchRemovalMessage.java       |   21 +-
 .../parallel/ParallelQueueRemovalMessage.java   |   21 +-
 .../cache/wan/parallel/RREventIDResolver.java   |   21 +-
 .../cache/wan/serial/BatchDestroyOperation.java |   21 +-
 ...urrentSerialGatewaySenderEventProcessor.java |   21 +-
 .../SerialGatewaySenderEventProcessor.java      |   24 +-
 .../wan/serial/SerialGatewaySenderQueue.java    |   23 +-
 .../serial/SerialSecondaryGatewayListener.java  |   21 +-
 .../internal/cache/wan/spi/WANFactory.java      |   16 +
 .../cache/xmlcache/AbstractXmlParser.java       |   21 +-
 .../cache/xmlcache/AsyncEventQueueCreation.java |   21 +-
 .../cache/xmlcache/BindingCreation.java         |   21 +-
 .../cache/xmlcache/BridgeServerCreation.java    |  249 -
 .../internal/cache/xmlcache/CacheCreation.java  |  168 +-
 .../cache/xmlcache/CacheServerCreation.java     |  257 +
 .../CacheTransactionManagerCreation.java        |   21 +-
 .../internal/cache/xmlcache/CacheXml.java       |   21 +-
 .../cache/xmlcache/CacheXmlGenerator.java       |   66 +-
 .../internal/cache/xmlcache/CacheXmlParser.java |   45 +-
 .../xmlcache/CacheXmlPropertyResolver.java      |   21 +-
 .../CacheXmlPropertyResolverHelper.java         |   21 +-
 .../cache/xmlcache/CacheXmlVersion.java         |   17 +-
 .../cache/xmlcache/ClientCacheCreation.java     |   26 +-
 .../cache/xmlcache/ClientHaQueueCreation.java   |   21 +-
 .../internal/cache/xmlcache/Declarable2.java    |   21 +-
 .../cache/xmlcache/DefaultEntityResolver2.java  |   23 +-
 .../xmlcache/DiskStoreAttributesCreation.java   |   21 +-
 .../cache/xmlcache/FunctionServiceCreation.java |   21 +-
 .../cache/xmlcache/GatewayReceiverCreation.java |   21 +-
 .../cache/xmlcache/GeodeEntityResolver.java     |   58 +
 .../cache/xmlcache/IndexCreationData.java       |   21 +-
 .../ParallelAsyncEventQueueCreation.java        |   21 +-
 .../xmlcache/ParallelGatewaySenderCreation.java |   21 +-
 .../cache/xmlcache/PivotalEntityResolver.java   |   23 +-
 .../cache/xmlcache/PropertyResolver.java        |   21 +-
 .../xmlcache/RegionAttributesCreation.java      |   30 +-
 .../internal/cache/xmlcache/RegionCreation.java |   21 +-
 .../cache/xmlcache/ResourceManagerCreation.java |   21 +-
 .../xmlcache/SerialAsyncEventQueueCreation.java |   21 +-
 .../xmlcache/SerialGatewaySenderCreation.java   |   21 +-
 .../cache/xmlcache/SerializerCreation.java      |   21 +-
 .../internal/cache/xmlcache/XmlGenerator.java   |   21 +-
 .../cache/xmlcache/XmlGeneratorUtils.java       |   21 +-
 .../internal/cache/xmlcache/XmlParser.java      |   21 +-
 .../internal/cache/xmlcache/package.html        |   16 +
 .../gemfire/internal/concurrent/AL.java         |   21 +-
 .../internal/concurrent/AtomicLong5.java        |   21 +-
 .../gemfire/internal/concurrent/Atomics.java    |   21 +-
 .../concurrent/CompactConcurrentHashSet2.java   |   16 +
 .../internal/concurrent/ConcurrentHashSet.java  |   21 +-
 .../gemfire/internal/concurrent/LI.java         |   21 +-
 .../internal/concurrent/MapCallback.java        |   21 +-
 .../internal/concurrent/MapCallbackAdapter.java |   21 +-
 .../gemfire/internal/concurrent/MapResult.java  |   21 +-
 .../internal/datasource/AbstractDataSource.java |   21 +-
 .../internal/datasource/AbstractPoolCache.java  |   25 +-
 .../ClientConnectionFactoryWrapper.java         |   21 +-
 .../internal/datasource/ConfigProperty.java     |   21 +-
 .../ConfiguredDataSourceProperties.java         |   21 +-
 .../ConnectionEventListenerAdaptor.java         |   21 +-
 .../datasource/ConnectionPoolCache.java         |   21 +-
 .../datasource/ConnectionPoolCacheImpl.java     |   21 +-
 .../internal/datasource/ConnectionProvider.java |   21 +-
 .../datasource/ConnectionProviderException.java |   21 +-
 .../datasource/DataSourceCreateException.java   |   21 +-
 .../internal/datasource/DataSourceFactory.java  |   21 +-
 .../datasource/DataSourceResources.java         |   21 +-
 .../FacetsJCAConnectionManagerImpl.java         |   21 +-
 .../datasource/GemFireBasicDataSource.java      |   23 +-
 .../datasource/GemFireConnPooledDataSource.java |   23 +-
 .../GemFireConnectionPoolManager.java           |   21 +-
 .../GemFireTransactionDataSource.java           |   21 +-
 .../datasource/JCAConnectionManagerImpl.java    |   21 +-
 .../datasource/ManagedPoolCacheImpl.java        |   21 +-
 .../internal/datasource/PoolException.java      |   21 +-
 .../internal/datasource/TranxPoolCacheImpl.java |   21 +-
 .../i18n/AbstractStringIdResourceBundle.java    |   26 +-
 .../gemfire/internal/i18n/LocalizedStrings.java | 4012 +++++++--------
 .../internal/i18n/ParentLocalizedStrings.java   | 4595 +++++++++---------
 .../gemfire/internal/i18n/StringId.java         |   58 +
 .../internal/io/CompositeOutputStream.java      |   21 +-
 .../internal/io/CompositePrintStream.java       |   21 +-
 .../gemfire/internal/io/TeeOutputStream.java    |   21 +-
 .../gemfire/internal/io/TeePrintStream.java     |   21 +-
 .../gemfire/internal/jndi/ContextImpl.java      |   21 +-
 .../jndi/InitialContextFactoryImpl.java         |   21 +-
 .../gemfire/internal/jndi/JNDIInvoker.java      |   21 +-
 .../gemfire/internal/jndi/NameParserImpl.java   |   21 +-
 .../gemfire/internal/jta/GlobalTransaction.java |   21 +-
 .../gemfire/internal/jta/TransactionImpl.java   |   21 +-
 .../internal/jta/TransactionManagerImpl.java    |   21 +-
 .../gemfire/internal/jta/TransactionUtils.java  |   21 +-
 .../internal/jta/UserTransactionImpl.java       |   21 +-
 .../gemstone/gemfire/internal/jta/XidImpl.java  |   21 +-
 .../gemfire/internal/lang/ClassUtils.java       |   20 +-
 .../gemstone/gemfire/internal/lang/Filter.java  |   18 +-
 .../gemfire/internal/lang/InOutParameter.java   |   20 +-
 .../gemfire/internal/lang/Initable.java         |   20 +-
 .../gemfire/internal/lang/Initializer.java      |   21 +-
 .../internal/lang/MutableIdentifiable.java      |   24 +-
 .../gemfire/internal/lang/ObjectUtils.java      |   20 +-
 .../gemfire/internal/lang/Orderable.java        |   20 +-
 .../gemstone/gemfire/internal/lang/Ordered.java |   20 +-
 .../gemfire/internal/lang/StringUtils.java      |   20 +-
 .../gemfire/internal/lang/SystemUtils.java      |   20 +-
 .../gemfire/internal/lang/ThreadUtils.java      |   20 +-
 .../gemfire/internal/logging/DateFormatter.java |   16 +
 .../internal/logging/DebugLogWriter.java        |   25 +-
 .../internal/logging/GemFireFormatter.java      |   21 +-
 .../internal/logging/GemFireHandler.java        |   21 +-
 .../gemfire/internal/logging/GemFireLevel.java  |   21 +-
 .../internal/logging/InternalLogWriter.java     |   21 +-
 .../internal/logging/LocalLogWriter.java        |   21 +-
 .../gemfire/internal/logging/LogConfig.java     |   16 +
 .../gemfire/internal/logging/LogFileParser.java |   29 +-
 .../gemfire/internal/logging/LogService.java    |  149 +-
 .../internal/logging/LogWriterFactory.java      |   16 +
 .../gemfire/internal/logging/LogWriterImpl.java |   23 +-
 .../internal/logging/LoggingThreadGroup.java    |   18 +-
 .../internal/logging/ManagerLogWriter.java      |   21 +-
 .../gemfire/internal/logging/MergeLogFiles.java |   21 +-
 .../gemfire/internal/logging/PureLogWriter.java |   23 +-
 .../logging/SecurityLocalLogWriter.java         |   23 +-
 .../internal/logging/SecurityLogConfig.java     |   16 +
 .../internal/logging/SecurityLogWriter.java     |   23 +-
 .../logging/SecurityManagerLogWriter.java       |   23 +-
 .../gemfire/internal/logging/SortLogFile.java   |   21 +-
 .../internal/logging/StandardErrorPrinter.java  |   16 +
 .../internal/logging/StandardOutputPrinter.java |   16 +
 .../internal/logging/log4j/AlertAppender.java   |   31 +-
 .../internal/logging/log4j/AppenderContext.java |   16 +
 .../internal/logging/log4j/ConfigLocator.java   |   16 +
 .../internal/logging/log4j/Configurator.java    |   21 +
 .../internal/logging/log4j/FastLogger.java      |   16 +
 .../internal/logging/log4j/GemFireLogger.java   |   16 +
 .../logging/log4j/LocalizedMessage.java         |   19 +-
 .../internal/logging/log4j/LogMarker.java       |   17 +-
 .../logging/log4j/LogWriterAppender.java        |   18 +-
 .../logging/log4j/LogWriterAppenders.java       |   16 +
 .../internal/logging/log4j/LogWriterLogger.java |   18 +-
 .../logging/log4j/ThreadIdPatternConverter.java |   16 +
 .../gemfire/internal/memcached/Command.java     |   21 +-
 .../internal/memcached/CommandProcessor.java    |   21 +-
 .../internal/memcached/ConnectionHandler.java   |   21 +-
 .../gemfire/internal/memcached/KeyWrapper.java  |   21 +-
 .../gemfire/internal/memcached/Reply.java       |   21 +-
 .../internal/memcached/RequestReader.java       |   21 +-
 .../internal/memcached/ResponseStatus.java      |   21 +-
 .../internal/memcached/ValueWrapper.java        |   21 +-
 .../memcached/commands/AbstractCommand.java     |   21 +-
 .../internal/memcached/commands/AddCommand.java |   21 +-
 .../memcached/commands/AddQCommand.java         |   16 +
 .../memcached/commands/AppendCommand.java       |   21 +-
 .../memcached/commands/AppendQCommand.java      |   16 +
 .../internal/memcached/commands/CASCommand.java |   21 +-
 .../memcached/commands/ClientError.java         |   21 +-
 .../memcached/commands/DecrementCommand.java    |   21 +-
 .../memcached/commands/DecrementQCommand.java   |   16 +
 .../memcached/commands/DeleteCommand.java       |   21 +-
 .../memcached/commands/DeleteQCommand.java      |   16 +
 .../memcached/commands/FlushAllCommand.java     |   21 +-
 .../memcached/commands/FlushAllQCommand.java    |   16 +
 .../internal/memcached/commands/GATCommand.java |   16 +
 .../memcached/commands/GATQCommand.java         |   16 +
 .../internal/memcached/commands/GetCommand.java |   28 +-
 .../memcached/commands/GetKCommand.java         |   16 +
 .../memcached/commands/GetKQCommand.java        |   16 +
 .../memcached/commands/GetQCommand.java         |   21 +-
 .../memcached/commands/IncrementCommand.java    |   21 +-
 .../memcached/commands/IncrementQCommand.java   |   16 +
 .../memcached/commands/NoOpCommand.java         |   21 +-
 .../memcached/commands/NotSupportedCommand.java |   21 +-
 .../memcached/commands/PrependCommand.java      |   21 +-
 .../memcached/commands/PrependQCommand.java     |   16 +
 .../memcached/commands/QuitCommand.java         |   21 +-
 .../memcached/commands/QuitQCommand.java        |   16 +
 .../memcached/commands/ReplaceCommand.java      |   21 +-
 .../memcached/commands/ReplaceQCommand.java     |   16 +
 .../internal/memcached/commands/SetCommand.java |   21 +-
 .../memcached/commands/SetQCommand.java         |   16 +
 .../memcached/commands/StatsCommand.java        |   21 +-
 .../memcached/commands/StorageCommand.java      |   21 +-
 .../memcached/commands/TouchCommand.java        |   21 +-
 .../memcached/commands/VerbosityCommand.java    |   21 +-
 .../memcached/commands/VersionCommand.java      |   21 +-
 .../modules/util/RegionConfiguration.java       |   21 +-
 .../gemfire/internal/net/SocketUtils.java       |   20 +-
 .../internal/offheap/AbstractStoredObject.java  |  107 +
 .../internal/offheap/ByteArrayMemoryChunk.java  |   16 +
 .../internal/offheap/ByteBufferMemoryChunk.java |   16 +
 .../gemfire/internal/offheap/Chunk.java         |  792 +++
 .../gemfire/internal/offheap/ChunkFactory.java  |   51 +
 .../gemfire/internal/offheap/ChunkType.java     |   30 +
 .../internal/offheap/ChunkWithHeapForm.java     |   40 +
 .../gemfire/internal/offheap/DataAsAddress.java |  120 +
 .../gemfire/internal/offheap/DataType.java      |   16 +
 .../gemfire/internal/offheap/Fragment.java      |  139 +
 .../internal/offheap/FreeListManager.java       |  821 ++++
 .../gemfire/internal/offheap/GemFireChunk.java  |   47 +
 .../internal/offheap/GemFireChunkFactory.java   |   52 +
 .../internal/offheap/GemFireChunkSlice.java     |   44 +
 .../internal/offheap/LifecycleListener.java     |   98 +
 .../internal/offheap/MemoryAllocator.java       |   19 +-
 .../gemfire/internal/offheap/MemoryBlock.java   |   17 +-
 .../internal/offheap/MemoryBlockNode.java       |  170 +
 .../gemfire/internal/offheap/MemoryChunk.java   |   16 +
 .../offheap/MemoryChunkWithRefCount.java        |   16 +
 .../internal/offheap/MemoryInspector.java       |   22 +-
 .../internal/offheap/MemoryUsageListener.java   |   16 +
 .../offheap/OffHeapCachedDeserializable.java    |   82 +-
 .../gemfire/internal/offheap/OffHeapHelper.java |   28 +-
 .../internal/offheap/OffHeapMemoryStats.java    |   16 +
 .../internal/offheap/OffHeapReference.java      |   56 -
 .../offheap/OffHeapRegionEntryHelper.java       |   24 +-
 .../internal/offheap/OffHeapStorage.java        |   17 +-
 .../offheap/OutOfOffHeapMemoryListener.java     |   16 +
 .../internal/offheap/RefCountChangeInfo.java    |  112 +
 .../internal/offheap/ReferenceCountHelper.java  |  252 +
 .../gemfire/internal/offheap/Releasable.java    |   16 +
 .../offheap/SimpleMemoryAllocatorImpl.java      | 3590 +-------------
 .../gemfire/internal/offheap/StoredObject.java  |   82 +-
 .../internal/offheap/SyncChunkStack.java        |  130 +
 .../internal/offheap/UnsafeMemoryChunk.java     |   26 +
 .../offheap/annotations/OffHeapIdentifier.java  |   16 +
 .../internal/offheap/annotations/Released.java  |   16 +
 .../internal/offheap/annotations/Retained.java  |   16 +
 .../offheap/annotations/Unretained.java         |   16 +
 .../com/gemstone/gemfire/internal/package.html  |   16 +
 .../internal/process/AttachProcessUtils.java    |   16 +
 .../process/BlockingProcessStreamReader.java    |   16 +
 ...usterConfigurationNotAvailableException.java |   16 +
 .../process/ConnectionFailedException.java      |   21 +-
 .../internal/process/ControlFileWatchdog.java   |   16 +
 .../process/ControlNotificationHandler.java     |   16 +
 .../internal/process/ControllableProcess.java   |   16 +
 .../process/FileAlreadyExistsException.java     |   21 +-
 .../process/FileControllerParameters.java       |   16 +
 .../internal/process/FileProcessController.java |   16 +
 .../process/LocalProcessController.java         |   21 +-
 .../internal/process/LocalProcessLauncher.java  |   21 +-
 .../process/MBeanControllerParameters.java      |   16 +
 .../process/MBeanInvocationFailedException.java |   21 +-
 .../process/MBeanProcessController.java         |   16 +
 .../internal/process/NativeProcessUtils.java    |   16 +
 .../process/NonBlockingProcessStreamReader.java |   16 +
 .../gemfire/internal/process/PidFile.java       |   16 +
 .../process/PidUnavailableException.java        |   21 +-
 .../internal/process/ProcessController.java     |   16 +
 .../process/ProcessControllerFactory.java       |   16 +
 .../process/ProcessControllerParameters.java    |   16 +
 .../process/ProcessLauncherContext.java         |   21 +-
 .../internal/process/ProcessStreamReader.java   |   21 +-
 .../ProcessTerminatedAbnormallyException.java   |   20 +-
 .../gemfire/internal/process/ProcessType.java   |   16 +
 .../gemfire/internal/process/ProcessUtils.java  |   21 +-
 .../gemfire/internal/process/StartupStatus.java |   18 +-
 .../internal/process/StartupStatusListener.java |   16 +
 .../UnableToControlProcessException.java        |   16 +
 .../AbstractSignalNotificationHandler.java      |   20 +-
 .../gemfire/internal/process/signal/Signal.java |   20 +-
 .../internal/process/signal/SignalEvent.java    |   20 +-
 .../internal/process/signal/SignalListener.java |   20 +-
 .../internal/process/signal/SignalType.java     |   20 +-
 .../internal/redis/ByteArrayWrapper.java        |   16 +
 .../internal/redis/ByteToCommandDecoder.java    |   16 +
 .../gemstone/gemfire/internal/redis/Coder.java  |   16 +
 .../gemfire/internal/redis/Command.java         |   16 +
 .../gemfire/internal/redis/DoubleWrapper.java   |   16 +
 .../internal/redis/ExecutionHandlerContext.java |   16 +
 .../gemfire/internal/redis/Executor.java        |   16 +
 .../gemfire/internal/redis/Extendable.java      |   16 +
 .../redis/RedisCommandParserException.java      |   16 +
 .../internal/redis/RedisCommandType.java        |   16 +
 .../gemfire/internal/redis/RedisConstants.java  |   16 +
 .../gemfire/internal/redis/RedisDataType.java   |   18 +-
 .../redis/RedisDataTypeMismatchException.java   |   16 +
 .../internal/redis/RegionCreationException.java |   16 +
 .../gemfire/internal/redis/RegionProvider.java  |   62 +-
 .../redis/executor/AbstractExecutor.java        |   16 +
 .../redis/executor/AbstractScanExecutor.java    |   16 +
 .../internal/redis/executor/AuthExecutor.java   |   16 +
 .../internal/redis/executor/DBSizeExecutor.java |   16 +
 .../internal/redis/executor/DelExecutor.java    |   16 +
 .../internal/redis/executor/EchoExecutor.java   |   16 +
 .../internal/redis/executor/ExistsExecutor.java |   16 +
 .../redis/executor/ExpirationExecutor.java      |   16 +
 .../redis/executor/ExpireAtExecutor.java        |   16 +
 .../internal/redis/executor/ExpireExecutor.java |   16 +
 .../redis/executor/FlushAllExecutor.java        |   16 +
 .../internal/redis/executor/KeysExecutor.java   |   16 +
 .../internal/redis/executor/ListQuery.java      |   16 +
 .../redis/executor/PExpireAtExecutor.java       |   16 +
 .../redis/executor/PExpireExecutor.java         |   16 +
 .../internal/redis/executor/PTTLExecutor.java   |   16 +
 .../redis/executor/PersistExecutor.java         |   16 +
 .../internal/redis/executor/PingExecutor.java   |   16 +
 .../internal/redis/executor/QuitExecutor.java   |   16 +
 .../internal/redis/executor/ScanExecutor.java   |   16 +
 .../redis/executor/ShutDownExecutor.java        |   16 +
 .../internal/redis/executor/SortedSetQuery.java |   16 +
 .../internal/redis/executor/TTLExecutor.java    |   16 +
 .../internal/redis/executor/TimeExecutor.java   |   16 +
 .../internal/redis/executor/TypeExecutor.java   |   16 +
 .../internal/redis/executor/UnkownExecutor.java |   16 +
 .../redis/executor/hash/HDelExecutor.java       |   16 +
 .../redis/executor/hash/HExistsExecutor.java    |   16 +
 .../redis/executor/hash/HGetAllExecutor.java    |   16 +
 .../redis/executor/hash/HGetExecutor.java       |   16 +
 .../redis/executor/hash/HIncrByExecutor.java    |   16 +
 .../executor/hash/HIncrByFloatExecutor.java     |   16 +
 .../redis/executor/hash/HKeysExecutor.java      |   16 +
 .../redis/executor/hash/HLenExecutor.java       |   16 +
 .../redis/executor/hash/HMGetExecutor.java      |   16 +
 .../redis/executor/hash/HMSetExecutor.java      |   16 +
 .../redis/executor/hash/HScanExecutor.java      |   16 +
 .../redis/executor/hash/HSetExecutor.java       |   16 +
 .../redis/executor/hash/HSetNXExecutor.java     |   16 +
 .../redis/executor/hash/HValsExecutor.java      |   16 +
 .../redis/executor/hash/HashExecutor.java       |   18 +-
 .../internal/redis/executor/hll/Bits.java       |   16 +
 .../executor/hll/CardinalityMergeException.java |   18 +-
 .../redis/executor/hll/HllExecutor.java         |   16 +
 .../redis/executor/hll/HyperLogLog.java         |   16 +
 .../redis/executor/hll/HyperLogLogPlus.java     |   18 +-
 .../internal/redis/executor/hll/IBuilder.java   |   18 +-
 .../redis/executor/hll/ICardinality.java        |   16 +
 .../internal/redis/executor/hll/MurmurHash.java |   18 +-
 .../redis/executor/hll/PFAddExecutor.java       |   16 +
 .../redis/executor/hll/PFCountExecutor.java     |   16 +
 .../redis/executor/hll/PFMergeExecutor.java     |   16 +
 .../redis/executor/hll/RegisterSet.java         |   18 +-
 .../internal/redis/executor/hll/Varint.java     |   18 +-
 .../redis/executor/list/LIndexExecutor.java     |   16 +
 .../redis/executor/list/LInsertExecutor.java    |   16 +
 .../redis/executor/list/LLenExecutor.java       |   16 +
 .../redis/executor/list/LPopExecutor.java       |   16 +
 .../redis/executor/list/LPushExecutor.java      |   16 +
 .../redis/executor/list/LPushXExecutor.java     |   16 +
 .../redis/executor/list/LRangeExecutor.java     |   16 +
 .../redis/executor/list/LRemExecutor.java       |   16 +
 .../redis/executor/list/LSetExecutor.java       |   16 +
 .../redis/executor/list/LTrimExecutor.java      |   16 +
 .../redis/executor/list/ListExecutor.java       |   16 +
 .../redis/executor/list/PopExecutor.java        |   16 +
 .../redis/executor/list/PushExecutor.java       |   16 +
 .../redis/executor/list/PushXExecutor.java      |   16 +
 .../redis/executor/list/RPopExecutor.java       |   16 +
 .../redis/executor/list/RPushExecutor.java      |   16 +
 .../redis/executor/list/RPushXExecutor.java     |   16 +
 .../redis/executor/set/SAddExecutor.java        |   16 +
 .../redis/executor/set/SCardExecutor.java       |   16 +
 .../redis/executor/set/SDiffExecutor.java       |   16 +
 .../redis/executor/set/SDiffStoreExecutor.java  |   16 +
 .../redis/executor/set/SInterExecutor.java      |   16 +
 .../redis/executor/set/SInterStoreExecutor.java |   16 +
 .../redis/executor/set/SIsMemberExecutor.java   |   16 +
 .../redis/executor/set/SMembersExecutor.java    |   16 +
 .../redis/executor/set/SMoveExecutor.java       |   16 +
 .../redis/executor/set/SPopExecutor.java        |   16 +
 .../redis/executor/set/SRandMemberExecutor.java |   16 +
 .../redis/executor/set/SRemExecutor.java        |   16 +
 .../redis/executor/set/SScanExecutor.java       |   16 +
 .../redis/executor/set/SUnionExecutor.java      |   16 +
 .../redis/executor/set/SUnionStoreExecutor.java |   16 +
 .../redis/executor/set/SetExecutor.java         |   16 +
 .../redis/executor/set/SetOpExecutor.java       |   16 +
 .../executor/sortedset/SortedSetExecutor.java   |   16 +
 .../redis/executor/sortedset/ZAddExecutor.java  |   16 +
 .../redis/executor/sortedset/ZCardExecutor.java |   16 +
 .../executor/sortedset/ZCountExecutor.java      |   16 +
 .../executor/sortedset/ZIncrByExecutor.java     |   16 +
 .../executor/sortedset/ZLexCountExecutor.java   |   16 +
 .../executor/sortedset/ZRangeByLexExecutor.java |   16 +
 .../sortedset/ZRangeByScoreExecutor.java        |   16 +
 .../executor/sortedset/ZRangeExecutor.java      |   16 +
 .../redis/executor/sortedset/ZRankExecutor.java |   16 +
 .../redis/executor/sortedset/ZRemExecutor.java  |   16 +
 .../sortedset/ZRemRangeByLexExecutor.java       |   16 +
 .../sortedset/ZRemRangeByRankExecutor.java      |   16 +
 .../sortedset/ZRemRangeByScoreExecutor.java     |   16 +
 .../sortedset/ZRevRangeByScoreExecutor.java     |   16 +
 .../executor/sortedset/ZRevRangeExecutor.java   |   16 +
 .../executor/sortedset/ZRevRankExecutor.java    |   16 +
 .../redis/executor/sortedset/ZScanExecutor.java |   16 +
 .../executor/sortedset/ZScoreExecutor.java      |   16 +
 .../redis/executor/string/AppendExecutor.java   |   16 +
 .../redis/executor/string/BitCountExecutor.java |   16 +
 .../redis/executor/string/BitOpExecutor.java    |   16 +
 .../redis/executor/string/BitPosExecutor.java   |   16 +
 .../redis/executor/string/DecrByExecutor.java   |   16 +
 .../redis/executor/string/DecrExecutor.java     |   16 +
 .../redis/executor/string/GetBitExecutor.java   |   16 +
 .../redis/executor/string/GetExecutor.java      |   16 +
 .../redis/executor/string/GetRangeExecutor.java |   16 +
 .../redis/executor/string/GetSetExecutor.java   |   16 +
 .../redis/executor/string/IncrByExecutor.java   |   16 +
 .../executor/string/IncrByFloatExecutor.java    |   16 +
 .../redis/executor/string/IncrExecutor.java     |   16 +
 .../redis/executor/string/MGetExecutor.java     |   16 +
 .../redis/executor/string/MSetExecutor.java     |   16 +
 .../redis/executor/string/MSetNXExecutor.java   |   16 +
 .../redis/executor/string/PSetEXExecutor.java   |   16 +
 .../redis/executor/string/SetBitExecutor.java   |   16 +
 .../redis/executor/string/SetEXExecutor.java    |   16 +
 .../redis/executor/string/SetExecutor.java      |   16 +
 .../redis/executor/string/SetNXExecutor.java    |   16 +
 .../redis/executor/string/SetRangeExecutor.java |   16 +
 .../redis/executor/string/StringExecutor.java   |   18 +-
 .../redis/executor/string/StrlenExecutor.java   |   16 +
 .../executor/transactions/DiscardExecutor.java  |   16 +
 .../executor/transactions/ExecExecutor.java     |   16 +
 .../executor/transactions/MultiExecutor.java    |   16 +
 .../transactions/TransactionExecutor.java       |   16 +
 .../executor/transactions/UnwatchExecutor.java  |   16 +
 .../executor/transactions/WatchExecutor.java    |   16 +
 .../internal/security/AuthorizeRequest.java     |   21 +-
 .../internal/security/AuthorizeRequestPP.java   |   21 +-
 .../security/FilterPostAuthorization.java       |   21 +-
 .../security/FilterPreAuthorization.java        |   21 +-
 .../internal/security/ObjectWithAuthz.java      |   21 +-
 .../gemfire/internal/security/package.html      |   16 +
 .../internal/sequencelog/EntryLogger.java       |   23 +-
 .../gemfire/internal/sequencelog/GraphType.java |   21 +-
 .../internal/sequencelog/MembershipLogger.java  |   21 +-
 .../internal/sequencelog/MessageLogger.java     |   21 +-
 .../internal/sequencelog/RegionLogger.java      |   21 +-
 .../internal/sequencelog/SequenceLogger.java    |   21 +-
 .../sequencelog/SequenceLoggerImpl.java         |   21 +-
 .../internal/sequencelog/Transition.java        |   21 +-
 .../gemfire/internal/sequencelog/io/Filter.java |   21 +-
 .../sequencelog/io/GemfireLogConverter.java     |   21 +-
 .../internal/sequencelog/io/GraphReader.java    |   21 +-
 .../sequencelog/io/InputStreamReader.java       |   21 +-
 .../sequencelog/io/OutputStreamAppender.java    |   21 +-
 .../internal/sequencelog/model/Edge.java        |   23 +-
 .../internal/sequencelog/model/Graph.java       |   21 +-
 .../internal/sequencelog/model/GraphID.java     |   21 +-
 .../sequencelog/model/GraphReaderCallback.java  |   23 +-
 .../internal/sequencelog/model/GraphSet.java    |   21 +-
 .../internal/sequencelog/model/Vertex.java      |   21 +-
 .../visualization/text/TextDisplay.java         |   21 +-
 .../gemfire/internal/shared/NativeCalls.java    |   21 +-
 .../internal/shared/NativeCallsJNAImpl.java     |   21 +-
 .../internal/shared/NativeErrorException.java   |   21 +-
 .../gemfire/internal/shared/OSType.java         |   21 +-
 .../internal/shared/StringPrintWriter.java      |   21 +-
 .../internal/shared/TCPSocketOptions.java       |   21 +-
 .../internal/size/CachingSingleObjectSizer.java |   21 +-
 .../size/InstrumentationSingleObjectSizer.java  |   21 +-
 .../gemfire/internal/size/ObjectGraphSizer.java |   28 +-
 .../gemfire/internal/size/ObjectTraverser.java  |   28 +-
 .../internal/size/ReflectionObjectSizer.java    |   21 +-
 .../size/ReflectionSingleObjectSizer.java       |   21 +-
 .../internal/size/SingleObjectSizer.java        |   16 +
 .../internal/size/SizeClassOnceObjectSizer.java |   21 +-
 .../gemfire/internal/size/SizeOfUtil0.java      |   21 +-
 .../internal/size/WellKnownClassSizer.java      |   21 +-
 .../internal/statistics/CounterMonitor.java     |   21 +-
 .../internal/statistics/GaugeMonitor.java       |   21 +-
 .../statistics/IgnoreResourceException.java     |   21 +-
 .../MapBasedStatisticsNotification.java         |   21 +-
 .../internal/statistics/ResourceInstance.java   |   21 +-
 .../internal/statistics/ResourceType.java       |   21 +-
 .../internal/statistics/SampleCollector.java    |   25 +-
 .../internal/statistics/SampleHandler.java      |   21 +-
 .../internal/statistics/SimpleStatisticId.java  |   21 +-
 .../statistics/StatArchiveDescriptor.java       |   21 +-
 .../internal/statistics/StatArchiveHandler.java |   21 +-
 .../statistics/StatArchiveHandlerConfig.java    |   21 +-
 .../internal/statistics/StatMonitorHandler.java |   21 +-
 .../internal/statistics/StatisticId.java        |   21 +-
 .../statistics/StatisticNotFoundException.java  |   21 +-
 .../internal/statistics/StatisticsListener.java |   23 +-
 .../internal/statistics/StatisticsMonitor.java  |   21 +-
 .../statistics/StatisticsNotification.java      |   21 +-
 .../internal/statistics/StatisticsSampler.java  |   21 +-
 .../internal/statistics/ValueMonitor.java       |   21 +-
 .../gemfire/internal/statistics/package.html    |   16 +
 .../stats50/Atomic50StatisticsImpl.java         |   21 +-
 .../gemfire/internal/stats50/VMStats50.java     |   21 +-
 .../gemfire/internal/tcp/BaseMsgStreamer.java   |   21 +-
 .../gemstone/gemfire/internal/tcp/Buffers.java  |   21 +-
 .../internal/tcp/ByteBufferInputStream.java     |   23 +-
 .../gemfire/internal/tcp/ConnectExceptions.java |   21 +-
 .../gemfire/internal/tcp/Connection.java        |  211 +-
 .../internal/tcp/ConnectionException.java       |   21 +-
 .../gemfire/internal/tcp/ConnectionTable.java   |  127 +-
 .../gemfire/internal/tcp/DirectReplySender.java |   21 +-
 .../tcp/ImmutableByteBufferInputStream.java     |   23 +-
 .../internal/tcp/MemberShunnedException.java    |   21 +-
 .../gemfire/internal/tcp/MsgDestreamer.java     |   21 +-
 .../gemfire/internal/tcp/MsgIdGenerator.java    |   21 +-
 .../gemfire/internal/tcp/MsgOutputStream.java   |   21 +-
 .../gemfire/internal/tcp/MsgReader.java         |   21 +-
 .../gemfire/internal/tcp/MsgStreamer.java       |   21 +-
 .../gemfire/internal/tcp/MsgStreamerList.java   |   21 +-
 .../gemfire/internal/tcp/NIOMsgReader.java      |   21 +-
 .../gemfire/internal/tcp/OioMsgReader.java      |   21 +-
 .../internal/tcp/ReenteredConnectException.java |   21 +-
 .../gemfire/internal/tcp/ServerDelegate.java    |   21 +-
 .../com/gemstone/gemfire/internal/tcp/Stub.java |   21 +-
 .../gemfire/internal/tcp/TCPConduit.java        |   31 +-
 .../tcp/VersionedByteBufferInputStream.java     |   21 +-
 .../internal/tcp/VersionedMsgStreamer.java      |   21 +-
 .../gemstone/gemfire/internal/tcp/package.html  |   16 +
 .../internal/util/AbortableTaskService.java     |   21 +-
 .../gemfire/internal/util/ArrayUtils.java       |   21 +-
 .../gemfire/internal/util/BlobHelper.java       |   23 +-
 .../gemfire/internal/util/Breadcrumbs.java      |   23 +-
 .../gemstone/gemfire/internal/util/Bytes.java   |   21 +-
 .../gemfire/internal/util/Callable.java         |   21 +-
 .../gemfire/internal/util/CollectionUtils.java  |   21 +-
 .../gemfire/internal/util/DebuggerSupport.java  |   25 +-
 .../gemfire/internal/util/DelayedAction.java    |   21 +-
 .../com/gemstone/gemfire/internal/util/Hex.java |   21 +-
 .../gemstone/gemfire/internal/util/IOUtils.java |   21 +-
 .../internal/util/JavaCommandBuilder.java       |   21 +-
 .../gemfire/internal/util/LogFileUtils.java     |   21 +-
 .../internal/util/ObjectIntProcedure.java       |   16 +
 .../gemfire/internal/util/ObjectProcedure.java  |   14 -
 .../gemfire/internal/util/PasswordUtil.java     |   20 +-
 .../gemfire/internal/util/PluckStacks.java      |   95 +-
 .../gemfire/internal/util/PrimeFinder.java      |  159 -
 .../internal/util/SingletonCallable.java        |   16 +
 .../gemfire/internal/util/SingletonValue.java   |   24 +-
 .../internal/util/StackTraceCollector.java      |   21 +-
 .../gemfire/internal/util/StopWatch.java        |   21 +-
 .../internal/util/SunAPINotFoundException.java  |   20 +-
 .../gemfire/internal/util/TransformUtils.java   |   21 +-
 .../gemfire/internal/util/Transformer.java      |   21 +-
 .../gemfire/internal/util/Versionable.java      |   21 +-
 .../internal/util/VersionedArrayList.java       |   20 +-
 .../util/concurrent/CopyOnWriteHashMap.java     |   67 +-
 .../util/concurrent/CopyOnWriteWeakHashMap.java |   33 +-
 .../CustomEntryConcurrentHashMap.java           |   29 +-
 .../internal/util/concurrent/FutureResult.java  |   21 +-
 .../util/concurrent/ReentrantSemaphore.java     |   21 +-
 .../util/concurrent/SemaphoreReadWriteLock.java |   21 +-
 .../util/concurrent/StoppableCondition.java     |   21 +-
 .../concurrent/StoppableCountDownLatch.java     |   21 +-
 .../concurrent/StoppableCountDownOrUpLatch.java |   21 +-
 .../concurrent/StoppableNonReentrantLock.java   |   21 +-
 .../util/concurrent/StoppableReadWriteLock.java |   16 +
 .../util/concurrent/StoppableReentrantLock.java |   21 +-
 .../StoppableReentrantReadWriteLock.java        |   21 +-
 .../lang/AttachAPINotFoundException.java        |   20 +-
 .../com/gemstone/gemfire/lang/Identifiable.java |   20 +-
 .../management/AlreadyRunningException.java     |   21 +-
 .../management/AsyncEventQueueMXBean.java       |   20 +-
 .../gemfire/management/CacheServerMXBean.java   |   16 +
 .../gemfire/management/ClientHealthStatus.java  |   20 +-
 .../gemfire/management/ClientQueueDetail.java   |   21 +-
 .../DependenciesNotFoundException.java          |   20 +-
 .../gemfire/management/DiskBackupResult.java    |   20 +-
 .../gemfire/management/DiskBackupStatus.java    |   20 +-
 .../gemfire/management/DiskMetrics.java         |   20 +-
 .../gemfire/management/DiskStoreMXBean.java     |   16 +
 .../DistributedLockServiceMXBean.java           |   20 +-
 .../management/DistributedRegionMXBean.java     |   20 +-
 .../management/DistributedSystemMXBean.java     |   20 +-
 .../management/EvictionAttributesData.java      |   20 +-
 .../FixedPartitionAttributesData.java           |   21 +-
 .../management/GatewayReceiverMXBean.java       |   20 +-
 .../gemfire/management/GatewaySenderMXBean.java |   20 +-
 .../gemfire/management/GemFireProperties.java   |   20 +-
 .../gemfire/management/JMXNotificationType.java |   28 +-
 .../management/JMXNotificationUserData.java     |   28 +-
 .../gemstone/gemfire/management/JVMMetrics.java |   20 +-
 .../gemfire/management/LocatorMXBean.java       |   20 +-
 .../gemfire/management/LockServiceMXBean.java   |   20 +-
 .../gemfire/management/ManagementException.java |   20 +-
 .../gemfire/management/ManagementService.java   |   21 +-
 .../gemfire/management/ManagerMXBean.java       |   20 +-
 .../gemfire/management/MemberMXBean.java        |   20 +-
 .../management/MembershipAttributesData.java    |   20 +-
 .../gemfire/management/NetworkMetrics.java      |   20 +-
 .../gemstone/gemfire/management/OSMetrics.java  |   20 +-
 .../management/PartitionAttributesData.java     |   20 +-
 .../management/PersistentMemberDetails.java     |   20 +-
 .../management/RegionAttributesData.java        |   20 +-
 .../gemfire/management/RegionMXBean.java        |   20 +-
 .../gemfire/management/ServerLoadData.java      |   20 +-
 .../gemfire/management/cli/CliMetaData.java     |   20 +-
 .../cli/CommandProcessingException.java         |   20 +-
 .../gemfire/management/cli/CommandService.java  |   20 +-
 .../management/cli/CommandServiceException.java |   20 +-
 .../management/cli/CommandStatement.java        |   20 +-
 .../gemfire/management/cli/ConverterHint.java   |   21 +-
 .../gemstone/gemfire/management/cli/Result.java |   21 +-
 .../gemfire/management/cli/package.html         |   16 +
 .../gemfire/management/internal/AgentUtil.java  |   56 +-
 .../management/internal/AlertDetails.java       |   21 +-
 .../management/internal/ArrayConverter.java     |   20 +-
 .../internal/BaseManagementService.java         |   21 +-
 .../internal/CollectionConverter.java           |   22 +-
 .../management/internal/CompositeConverter.java |   20 +-
 .../management/internal/EnumConverter.java      |   20 +-
 .../management/internal/FederatingManager.java  |   21 +-
 .../internal/FederationComponent.java           |   20 +-
 .../management/internal/FilterChain.java        |   20 +-
 .../management/internal/FilterParam.java        |   22 +-
 .../management/internal/IdentityConverter.java  |   20 +-
 .../management/internal/JettyHelper.java        |   21 +-
 .../management/internal/JmxManagerAdvisee.java  |   21 +-
 .../management/internal/JmxManagerAdvisor.java  |   23 +-
 .../management/internal/JmxManagerLocator.java  |   21 +-
 .../internal/JmxManagerLocatorRequest.java      |   31 +-
 .../internal/JmxManagerLocatorResponse.java     |   20 +-
 .../management/internal/LocalFilterChain.java   |   20 +-
 .../management/internal/LocalManager.java       |   20 +-
 .../management/internal/MBeanJMXAdapter.java    |   22 +-
 .../management/internal/MBeanProxyFactory.java  |   22 +-
 .../internal/MBeanProxyInfoRepository.java      |   22 +-
 .../internal/MBeanProxyInvocationHandler.java   |   23 +-
 .../internal/MXBeanProxyInvocationHandler.java  |   20 +-
 .../management/internal/ManagementAgent.java    |   21 +-
 .../internal/ManagementCacheListener.java       |   22 +-
 .../internal/ManagementConstants.java           |   20 +-
 .../management/internal/ManagementFunction.java |   20 +-
 .../internal/ManagementMembershipListener.java  |   20 +-
 .../internal/ManagementResourceRepo.java        |   20 +-
 .../management/internal/ManagementStrings.java  |  133 +-
 .../gemfire/management/internal/Manager.java    |   21 +-
 .../internal/ManagerStartupMessage.java         |   21 +-
 .../management/internal/MemberMessenger.java    |   20 +-
 .../internal/MonitoringRegionCacheListener.java |   20 +-
 .../internal/NotificationBroadCasterProxy.java  |   20 +-
 .../internal/NotificationCacheListener.java     |   20 +-
 .../management/internal/NotificationHub.java    |   22 +-
 .../internal/NotificationHubClient.java         |   20 +-
 .../management/internal/NotificationKey.java    |   20 +-
 .../gemfire/management/internal/OpenMethod.java |   22 +-
 .../management/internal/OpenTypeConverter.java  |   20 +-
 .../management/internal/OpenTypeUtil.java       |   20 +-
 .../gemfire/management/internal/ProxyInfo.java  |   20 +-
 .../management/internal/ProxyInterface.java     |   20 +-
 .../management/internal/ProxyListener.java      |   20 +-
 .../management/internal/RemoteFilterChain.java  |   20 +-
 .../gemfire/management/internal/RestAgent.java  |   21 +-
 .../gemfire/management/internal/SSLUtil.java    |   16 +
 .../management/internal/StringBasedFilter.java  |   20 +-
 .../internal/SystemManagementService.java       |   21 +-
 .../management/internal/TableConverter.java     |   22 +-
 .../internal/beans/AggregateHandler.java        |   20 +-
 .../internal/beans/AsyncEventQueueMBean.java    |   20 +-
 .../beans/AsyncEventQueueMBeanBridge.java       |   20 +-
 .../internal/beans/BeanUtilFuncs.java           |   20 +-
 .../internal/beans/CacheServerBridge.java       |   40 +-
 .../internal/beans/CacheServerMBean.java        |   20 +-
 .../internal/beans/DiskRegionBridge.java        |   22 +-
 .../internal/beans/DiskStoreMBean.java          |   20 +-
 .../internal/beans/DiskStoreMBeanBridge.java    |   20 +-
 .../beans/DistributedLockServiceBridge.java     |   20 +-
 .../beans/DistributedLockServiceMBean.java      |   20 +-
 .../internal/beans/DistributedRegionBridge.java |   20 +-
 .../internal/beans/DistributedRegionMBean.java  |   20 +-
 .../internal/beans/DistributedSystemBridge.java |   20 +-
 .../internal/beans/DistributedSystemMBean.java  |   20 +-
 .../internal/beans/GatewayReceiverMBean.java    |   20 +-
 .../beans/GatewayReceiverMBeanBridge.java       |   24 +-
 .../internal/beans/GatewaySenderMBean.java      |   20 +-
 .../beans/GatewaySenderMBeanBridge.java         |   20 +-
 .../internal/beans/HDFSRegionBridge.java        |   20 +-
 .../management/internal/beans/LocatorMBean.java |   20 +-
 .../internal/beans/LocatorMBeanBridge.java      |   20 +-
 .../internal/beans/LockServiceMBean.java        |   20 +-
 .../internal/beans/LockServiceMBeanBridge.java  |   22 +-
 .../internal/beans/MBeanAggregator.java         |   20 +-
 .../internal/beans/ManagementAdapter.java       |   64 +-
 .../internal/beans/ManagementListener.java      |   20 +-
 .../management/internal/beans/ManagerMBean.java |   20 +-
 .../internal/beans/ManagerMBeanBridge.java      |   20 +-
 .../management/internal/beans/MemberMBean.java  |   20 +-
 .../internal/beans/MemberMBeanBridge.java       |   25 +-
 .../internal/beans/MetricsCalculator.java       |   20 +-
 .../internal/beans/PartitionedRegionBridge.java |   20 +-
 .../internal/beans/QueryDataFunction.java       |   20 +-
 .../management/internal/beans/RegionMBean.java  |   20 +-
 .../internal/beans/RegionMBeanBridge.java       |   20 +-
 .../beans/RegionMBeanCompositeDataFactory.java  |   20 +-
 .../internal/beans/SequenceNumber.java          |   20 +-
 .../management/internal/beans/ServerBridge.java |   27 +-
 .../stats/AggregateRegionStatsMonitor.java      |   20 +-
 .../internal/beans/stats/GCStatsMonitor.java    |   20 +-
 .../GatewayReceiverClusterStatsMonitor.java     |   20 +-
 .../stats/GatewaySenderClusterStatsMonitor.java |   20 +-
 .../stats/IntegerStatsDeltaAggregator.java      |   23 +-
 .../beans/stats/LongStatsDeltaAggregator.java   |   23 +-
 .../internal/beans/stats/MBeanStatsMonitor.java |   20 +-
 .../beans/stats/MemberClusterStatsMonitor.java  |   20 +-
 .../beans/stats/MemberLevelDiskMonitor.java     |   20 +-
 .../beans/stats/RegionClusterStatsMonitor.java  |   20 +-
 .../beans/stats/ServerClusterStatsMonitor.java  |   20 +-
 .../internal/beans/stats/StatType.java          |   20 +-
 .../internal/beans/stats/StatsAggregator.java   |   20 +-
 .../beans/stats/StatsAverageLatency.java        |   20 +-
 .../internal/beans/stats/StatsKey.java          |   20 +-
 .../internal/beans/stats/StatsLatency.java      |   20 +-
 .../internal/beans/stats/StatsRate.java         |   20 +-
 .../internal/beans/stats/VMStatsMonitor.java    |   20 +-
 .../cli/AbstractCliAroundInterceptor.java       |   20 +-
 .../internal/cli/CliAroundInterceptor.java      |   20 +-
 .../management/internal/cli/CliUtil.java        |   20 +-
 .../management/internal/cli/CommandManager.java |   20 +-
 .../management/internal/cli/CommandRequest.java |   21 +-
 .../internal/cli/CommandResponse.java           |   22 +-
 .../internal/cli/CommandResponseBuilder.java    |   20 +-
 .../internal/cli/CommandResponseWriter.java     |   20 +-
 .../internal/cli/GfshParseResult.java           |   20 +-
 .../management/internal/cli/GfshParser.java     |   37 +-
 .../management/internal/cli/Launcher.java       |   20 +-
 .../management/internal/cli/LogWrapper.java     |   20 +-
 .../internal/cli/MultipleValueAdapter.java      |   21 +-
 .../internal/cli/MultipleValueConverter.java    |   21 +-
 .../internal/cli/annotation/CliArgument.java    |   20 +-
 .../cli/commands/AbstractCommandsSupport.java   |   20 +-
 .../internal/cli/commands/ClientCommands.java   |   64 +-
 .../internal/cli/commands/ConfigCommands.java   |   20 +-
 .../CreateAlterDestroyRegionCommands.java       |   41 +-
 .../internal/cli/commands/DataCommands.java     |   20 +-
 .../internal/cli/commands/DeployCommands.java   |   20 +-
 .../cli/commands/DiskStoreCommands.java         |   46 +-
 .../cli/commands/DurableClientCommands.java     |   20 +-
 ...ExportImportSharedConfigurationCommands.java |   21 +-
 .../internal/cli/commands/FunctionCommands.java |   20 +-
 .../internal/cli/commands/GfshHelpCommands.java |   20 +-
 .../cli/commands/HDFSStoreCommands.java         |  703 ---
 .../internal/cli/commands/IndexCommands.java    |   20 +-
 .../cli/commands/LauncherLifecycleCommands.java |   20 +-
 .../internal/cli/commands/MemberCommands.java   |   20 +-
 .../cli/commands/MiscellaneousCommands.java     |   58 +-
 .../internal/cli/commands/PDXCommands.java      |   16 +
 .../internal/cli/commands/QueueCommands.java    |   20 +-
 .../internal/cli/commands/RegionCommands.java   |   20 +-
 .../internal/cli/commands/ShellCommands.java    |   33 +-
 .../internal/cli/commands/StatusCommands.java   |   21 +-
 .../internal/cli/commands/WanCommands.java      |   21 +-
 .../cli/commands/dto/RegionAttributesInfo.java  |   21 +-
 .../cli/commands/dto/RegionDetails.java         |   21 +-
 .../cli/commands/dto/RegionMemberDetails.java   |   21 +-
 .../cli/converters/BooleanConverter.java        |   22 +-
 .../ClusterMemberIdNameConverter.java           |   20 +-
 .../converters/ConnectionEndpointConverter.java |   21 +-
 .../internal/cli/converters/DirConverter.java   |   22 +-
 .../cli/converters/DirPathConverter.java        |   20 +-
 .../cli/converters/DiskStoreNameConverter.java  |   20 +-
 .../internal/cli/converters/EnumConverter.java  |   20 +-
 .../cli/converters/FilePathConverter.java       |   20 +-
 .../cli/converters/FilePathStringConverter.java |   20 +-
 .../converters/GatewayReceiverIdsConverter.java |   21 +-
 .../converters/GatewaySenderIdConverter.java    |   20 +-
 .../cli/converters/HdfsStoreNameConverter.java  |   88 -
 .../internal/cli/converters/HelpConverter.java  |   20 +-
 .../cli/converters/HintTopicConverter.java      |   20 +-
 .../cli/converters/IndexTypeConverter.java      |   21 +-
 .../LocatorDiscoveryConfigConverter.java        |   20 +-
 .../cli/converters/LocatorIdNameConverter.java  |   20 +-
 .../cli/converters/LogLevelConverter.java       |   20 +-
 .../cli/converters/MemberGroupConverter.java    |   20 +-
 .../cli/converters/MemberIdNameConverter.java   |   20 +-
 .../cli/converters/RegionPathConverter.java     |   20 +-
 .../cli/converters/StringArrayConverter.java    |   20 +-
 .../cli/converters/StringListConverter.java     |   20 +-
 .../cli/domain/AsyncEventQueueDetails.java      |   21 +-
 .../internal/cli/domain/CacheServerInfo.java    |   21 +-
 .../cli/domain/ConnectToLocatorResult.java      |   20 +-
 .../internal/cli/domain/DataCommandRequest.java |   21 +-
 .../internal/cli/domain/DataCommandResult.java  |   21 +-
 .../internal/cli/domain/DiskStoreDetails.java   |   18 +-
 .../cli/domain/DurableCqNamesResult.java        |   21 +-
 .../cli/domain/EvictionAttributesInfo.java      |   21 +-
 .../domain/FixedPartitionAttributesInfo.java    |   21 +-
 .../internal/cli/domain/IndexDetails.java       |   20 +-
 .../internal/cli/domain/IndexInfo.java          |   21 +-
 .../cli/domain/MemberConfigurationInfo.java     |   21 +-
 .../internal/cli/domain/MemberInformation.java  |   20 +-
 .../internal/cli/domain/MemberResult.java       |   21 +-
 .../cli/domain/PartitionAttributesInfo.java     |   21 +-
 .../cli/domain/RegionAttributesInfo.java        |   21 +-
 .../internal/cli/domain/RegionDescription.java  |   21 +-
 .../cli/domain/RegionDescriptionPerMember.java  |   21 +-
 .../internal/cli/domain/RegionInformation.java  |   20 +-
 .../cli/domain/StackTracesPerMember.java        |   21 +-
 .../cli/domain/SubscriptionQueueSizeResult.java |   21 +-
 .../cli/exceptions/CliCommandException.java     |   20 +-
 .../exceptions/CliCommandInvalidException.java  |   20 +-
 .../CliCommandMultiModeOptionException.java     |   16 +
 .../CliCommandNotAvailableException.java        |   20 +-
 .../exceptions/CliCommandOptionException.java   |   20 +-
 ...CommandOptionHasMultipleValuesException.java |   20 +-
 .../CliCommandOptionInvalidException.java       |   20 +-
 .../CliCommandOptionMissingException.java       |   20 +-
 .../CliCommandOptionNotApplicableException.java |   20 +-
 ...liCommandOptionValueConversionException.java |   20 +-
 .../CliCommandOptionValueException.java         |   20 +-
 .../CliCommandOptionValueMissingException.java  |   20 +-
 .../internal/cli/exceptions/CliException.java   |   20 +-
 .../exceptions/CreateSubregionException.java    |   20 +-
 .../cli/exceptions/ExceptionGenerator.java      |   20 +-
 .../cli/exceptions/ExceptionHandler.java        |   20 +-
 .../cli/exceptions/IndexNotFoundException.java  |   16 +
 .../cli/functions/AlterHDFSStoreFunction.java   |  228 -
 .../functions/AlterRuntimeConfigFunction.java   |   21 +-
 .../cli/functions/ChangeLogLevelFunction.java   |   20 +-
 .../cli/functions/CliFunctionResult.java        |   21 +-
 .../functions/CloseDurableClientFunction.java   |   21 +-
 .../cli/functions/CloseDurableCqFunction.java   |   21 +-
 .../cli/functions/ContunuousQueryFunction.java  |   24 +-
 .../CreateAsyncEventQueueFunction.java          |   21 +-
 .../functions/CreateDefinedIndexesFunction.java |   16 +
 .../cli/functions/CreateDiskStoreFunction.java  |   21 +-
 .../cli/functions/CreateHDFSStoreFunction.java  |  122 -
 .../cli/functions/CreateIndexFunction.java      |   21 +-
 .../cli/functions/DataCommandFunction.java      |   27 +-
 .../internal/cli/functions/DeployFunction.java  |   21 +-
 .../functions/DescribeDiskStoreFunction.java    |   18 +-
 .../functions/DescribeHDFSStoreFunction.java    |   16 +
 .../cli/functions/DestroyDiskStoreFunction.java |   21 +-
 .../cli/functions/DestroyHDFSStoreFunction.java |  100 -
 .../cli/functions/DestroyIndexFunction.java     |   21 +-
 .../cli/functions/ExportConfigFunction.java     |   23 +-
 .../cli/functions/ExportDataFunction.java       |   21 +-
 .../ExportSharedConfigurationFunction.java      |   21 +-
 .../FetchRegionAttributesFunction.java          |   20 +-
 .../FetchSharedConfigurationStatusFunction.java |   21 +-
 .../functions/GarbageCollectionFunction.java    |   21 +-
 .../GatewayReceiverCreateFunction.java          |   21 +-
 .../functions/GatewayReceiverFunctionArgs.java  |   21 +-
 .../functions/GatewaySenderCreateFunction.java  |   21 +-
 .../functions/GatewaySenderFunctionArgs.java    |   21 +-
 .../GetMemberConfigInformationFunction.java     |   21 +-
 .../functions/GetMemberInformationFunction.java |   25 +-
 .../functions/GetRegionDescriptionFunction.java |   20 +-
 .../cli/functions/GetRegionsFunction.java       |   20 +-
 .../cli/functions/GetStackTracesFunction.java   |   21 +-
 .../GetSubscriptionQueueSizeFunction.java       |   21 +-
 .../cli/functions/ImportDataFunction.java       |   21 +-
 ...ortSharedConfigurationArtifactsFunction.java |   21 +-
 .../functions/ListAsyncEventQueuesFunction.java |   18 +-
 .../cli/functions/ListDeployedFunction.java     |   21 +-
 .../cli/functions/ListDiskStoresFunction.java   |   18 +-
 .../functions/ListDurableCqNamesFunction.java   |   20 +-
 .../cli/functions/ListFunctionFunction.java     |   21 +-
 .../cli/functions/ListHDFSStoresFunction.java   |  102 -
 .../cli/functions/ListIndexFunction.java        |   20 +-
 .../LoadSharedConfigurationFunction.java        |   21 +-
 .../internal/cli/functions/LogFileFunction.java |   23 +-
 .../cli/functions/MemberRegionFunction.java     |   23 +-
 .../cli/functions/MembersForRegionFunction.java |   20 +-
 .../internal/cli/functions/NetstatFunction.java |   20 +-
 .../cli/functions/RebalanceFunction.java        |   23 +-
 .../cli/functions/RegionAlterFunction.java      |   20 +-
 .../cli/functions/RegionCreateFunction.java     |   33 +-
 .../cli/functions/RegionDestroyFunction.java    |   20 +-
 .../cli/functions/RegionFunctionArgs.java       |  109 +-
 .../cli/functions/ShutDownFunction.java         |   23 +-
 .../cli/functions/UndeployFunction.java         |   21 +-
 .../cli/functions/UnregisterFunction.java       |   23 +-
 .../cli/functions/UserFunctionExecution.java    |   24 +-
 .../management/internal/cli/help/CliTopic.java  |   20 +-
 .../internal/cli/help/format/Block.java         |   20 +-
 .../internal/cli/help/format/DataNode.java      |   20 +-
 .../internal/cli/help/format/Help.java          |   20 +-
 .../internal/cli/help/format/NewHelp.java       |   20 +-
 .../internal/cli/help/format/Row.java           |   20 +-
 .../internal/cli/help/utils/FormatOutput.java   |   16 +
 .../internal/cli/help/utils/HelpUtils.java      |   20 +-
 .../internal/cli/i18n/CliStrings.java           |  195 +-
 .../internal/cli/json/GfJsonArray.java          |   20 +-
 .../internal/cli/json/GfJsonException.java      |   22 +-
 .../internal/cli/json/GfJsonObject.java         |   20 +-
 .../management/internal/cli/json/TypedJson.java |   20 +-
 .../internal/cli/modes/CommandModes.java        |   18 +-
 .../cli/multistep/CLIMultiStepHelper.java       |   27 +-
 .../internal/cli/multistep/CLIRemoteStep.java   |   16 +
 .../internal/cli/multistep/CLIStep.java         |   16 +
 .../cli/multistep/CLIStepExecption.java         |   21 +-
 .../cli/multistep/MultiStepCommand.java         |   16 +
 .../internal/cli/parser/Argument.java           |   20 +-
 .../internal/cli/parser/AvailabilityTarget.java |   20 +-
 .../internal/cli/parser/CommandTarget.java      |   22 +-
 .../internal/cli/parser/GfshMethodTarget.java   |   30 +-
 .../internal/cli/parser/GfshOptionParser.java   |   22 +-
 .../internal/cli/parser/MethodParameter.java    |   20 +-
 .../management/internal/cli/parser/Option.java  |   20 +-
 .../internal/cli/parser/OptionSet.java          |   20 +-
 .../internal/cli/parser/Parameter.java          |   20 +-
 .../internal/cli/parser/ParserUtils.java        |   20 +-
 .../internal/cli/parser/SyntaxConstants.java    |   22 +-
 .../cli/parser/jopt/JoptOptionParser.java       |   40 +-
 .../preprocessor/EnclosingCharacters.java       |   20 +-
 .../cli/parser/preprocessor/Preprocessor.java   |   20 +-
 .../parser/preprocessor/PreprocessorUtils.java  |   31 +-
 .../internal/cli/parser/preprocessor/Stack.java |   20 +-
 .../cli/parser/preprocessor/TrimmedInput.java   |   20 +-
 .../cli/remote/CommandExecutionContext.java     |   20 +-
 .../internal/cli/remote/CommandProcessor.java   |   20 +-
 .../cli/remote/CommandStatementImpl.java        |   20 +-
 .../cli/remote/MemberCommandService.java        |   20 +-
 .../cli/remote/RemoteExecutionStrategy.java     |   24 +-
 .../internal/cli/remote/WrapperThreadLocal.java |   20 +-
 .../internal/cli/result/AbstractResultData.java |   20 +-
 .../cli/result/CliJsonSerializable.java         |   20 +-
 .../cli/result/CliJsonSerializableFactory.java  |   21 +-
 .../cli/result/CliJsonSerializableIds.java      |   20 +-
 .../internal/cli/result/CommandResult.java      |   20 +-
 .../cli/result/CommandResultException.java      |   21 +-
 .../cli/result/CompositeResultData.java         |   20 +-
 .../internal/cli/result/ErrorResultData.java    |   20 +-
 .../internal/cli/result/FileResult.java         |   20 +-
 .../internal/cli/result/InfoResultData.java     |   20 +-
 .../internal/cli/result/ObjectResultData.java   |   20 +-
 .../internal/cli/result/ResultBuilder.java      |   20 +-
 .../internal/cli/result/ResultData.java         |   20 +-
 .../cli/result/ResultDataException.java         |   20 +-
 .../internal/cli/result/TableBuilder.java       |   20 +-
 .../internal/cli/result/TableBuilderHelper.java |   21 +-
 .../internal/cli/result/TabularResultData.java  |   20 +-
 .../management/internal/cli/shell/Gfsh.java     |   20 +-
 .../internal/cli/shell/GfshConfig.java          |   20 +-
 .../cli/shell/GfshExecutionStrategy.java        |   24 +-
 .../cli/shell/JMXConnectionException.java       |   20 +-
 .../cli/shell/JMXInvocationException.java       |   20 +-
 .../internal/cli/shell/JmxOperationInvoker.java |   20 +-
 .../internal/cli/shell/MultiCommandHelper.java  |   16 +
 .../internal/cli/shell/OperationInvoker.java    |   20 +-
 .../internal/cli/shell/jline/ANSIHandler.java   |   20 +-
 .../cli/shell/jline/CygwinMinttyTerminal.java   |   21 +-
 .../internal/cli/shell/jline/GfshHistory.java   |   20 +-
 .../shell/jline/GfshUnsupportedTerminal.java    |   20 +-
 .../cli/shell/unsafe/GfshSignalHandler.java     |   21 +-
 .../internal/cli/util/CLIConsoleBufferUtil.java |   21 +-
 .../internal/cli/util/CauseFinder.java          |   20 +-
 .../cli/util/ClasspathScanLoadHelper.java       |   20 +-
 .../internal/cli/util/CommandStringBuilder.java |   20 +-
 .../internal/cli/util/CommentSkipHelper.java    |   22 +-
 .../internal/cli/util/ConnectionEndpoint.java   |   21 +-
 .../internal/cli/util/DiskStoreCompacter.java   |   20 +-
 .../cli/util/DiskStoreNotFoundException.java    |   18 +-
 .../internal/cli/util/DiskStoreUpgrader.java    |   21 +-
 .../internal/cli/util/DiskStoreValidater.java   |   21 +-
 .../cli/util/EvictionAttributesInfo.java        |   21 +-
 .../cli/util/FixedPartitionAttributesInfo.java  |   21 +-
 .../internal/cli/util/GfshConsoleReader.java    |   22 +-
 .../cli/util/HDFSStoreNotFoundException.java    |   18 +-
 .../cli/util/JConsoleNotFoundException.java     |   20 +-
 .../management/internal/cli/util/JsonUtil.java  |   20 +-
 .../internal/cli/util/MemberInformation.java    |   20 +-
 .../cli/util/MemberNotFoundException.java       |   18 +-
 .../management/internal/cli/util/MergeLogs.java |   21 +-
 .../internal/cli/util/ReadWriteFile.java        |   21 +-
 .../cli/util/RegionAttributesDefault.java       |   21 +-
 .../cli/util/RegionAttributesNames.java         |   21 +-
 .../internal/cli/util/RegionPath.java           |   20 +-
 .../cli/util/VisualVmNotFoundException.java     |   20 +-
 .../internal/cli/util/spring/Assert.java        |   27 -
 .../internal/cli/util/spring/ObjectUtils.java   |  291 --
 .../cli/util/spring/ReflectionUtils.java        |  123 -
 .../internal/cli/util/spring/StringUtils.java   |  220 -
 .../SharedConfigurationWriter.java              |   21 +-
 .../callbacks/ConfigurationChangeListener.java  |   21 +-
 .../configuration/domain/CacheElement.java      |   21 +-
 .../configuration/domain/Configuration.java     |   21 +-
 .../domain/ConfigurationChangeResult.java       |   21 +-
 .../domain/SharedConfigurationStatus.java       |   16 +
 .../configuration/domain/XmlEntity.java         |   21 +-
 .../configuration/functions/AddJarFunction.java |   21 +-
 .../functions/AddXmlEntityFunction.java         |   21 +-
 .../functions/DeleteJarFunction.java            |   21 +-
 .../functions/DeleteXmlEntityFunction.java      |   21 +-
 .../functions/GetAllJarsFunction.java           |   21 +-
 .../functions/ModifyPropertiesFunction.java     |   21 +-
 .../handlers/ConfigurationRequestHandler.java   |   21 +-
 ...SharedConfigurationStatusRequestHandler.java |   21 +-
 .../messages/ConfigurationRequest.java          |   21 +-
 .../messages/ConfigurationResponse.java         |   21 +-
 .../SharedConfigurationStatusRequest.java       |   21 +-
 .../SharedConfigurationStatusResponse.java      |   21 +-
 .../configuration/utils/DtdResolver.java        |   16 +
 .../configuration/utils/XmlConstants.java       |   21 +-
 .../internal/configuration/utils/XmlUtils.java  |   21 +-
 .../internal/configuration/utils/ZipUtils.java  |   21 +-
 .../internal/messages/CompactRequest.java       |   20 +-
 .../internal/messages/CompactResponse.java      |   20 +-
 .../internal/security/AccessControl.java        |   16 +
 .../internal/security/AccessControlContext.java |   16 +
 .../internal/security/AccessControlMXBean.java  |   16 +
 .../internal/security/CLIOperationContext.java  |   16 +
 .../internal/security/JMXOperationContext.java  |   16 +
 .../internal/security/MBeanServerWrapper.java   |   16 +
 .../security/ManagementInterceptor.java         |   16 +
 .../management/internal/security/Resource.java  |   16 +
 .../internal/security/ResourceConstants.java    |   16 +
 .../internal/security/ResourceOperation.java    |   16 +
 .../security/ResourceOperationContext.java      |   16 +
 .../unsafe/ReadOpFileAccessController.java      |   21 +-
 .../controllers/AbstractCommandsController.java |   28 +-
 .../AbstractMultiPartCommandsController.java    |   21 +-
 .../controllers/ClientCommandsController.java   |   21 +-
 .../controllers/ClusterCommandsController.java  |   21 +-
 .../controllers/ConfigCommandsController.java   |   21 +-
 .../web/controllers/DataCommandsController.java |   21 +-
 .../controllers/DeployCommandsController.java   |   21 +-
 .../DiskStoreCommandsController.java            |   21 +-
 .../DurableClientCommandsController.java        |   21 +-
 .../controllers/FunctionCommandsController.java |   21 +-
 .../HDFSStoreCommandsController.java            |  229 -
 .../controllers/IndexCommandsController.java    |   21 +-
 .../LauncherLifecycleCommandsController.java    |   21 +-
 .../controllers/MemberCommandsController.java   |   21 +-
 .../MiscellaneousCommandsController.java        |   21 +-
 .../web/controllers/PdxCommandsController.java  |   16 +
 .../controllers/QueueCommandsController.java    |   21 +-
 .../controllers/RegionCommandsController.java   |   21 +-
 .../controllers/ShellCommandsController.java    |  225 +-
 .../web/controllers/WanCommandsController.java  |   21 +-
 .../EnvironmentVariablesHandlerInterceptor.java |   21 +-
 .../support/MemberMXBeanAdapter.java            |   21 +-
 .../management/internal/web/domain/Link.java    |   21 +-
 .../internal/web/domain/LinkIndex.java          |   21 +-
 .../web/domain/QueryParameterSource.java        |   21 +-
 .../internal/web/http/ClientHttpRequest.java    |   21 +-
 .../internal/web/http/HttpHeader.java           |   21 +-
 .../internal/web/http/HttpMethod.java           |   21 +-
 .../SerializableObjectHttpMessageConverter.java |   21 +-
 .../web/http/support/SimpleHttpRequester.java   |   21 +-
 .../internal/web/io/MultipartFileAdapter.java   |   21 +-
 .../web/io/MultipartFileResourceAdapter.java    |   21 +-
 .../web/shell/AbstractHttpOperationInvoker.java |   21 +-
 .../web/shell/HttpOperationInvoker.java         |   16 +
 .../web/shell/MBeanAccessException.java         |   21 +-
 .../RestApiCallForCommandNotFoundException.java |   21 +-
 .../web/shell/RestHttpOperationInvoker.java     |   21 +-
 .../web/shell/SimpleHttpOperationInvoker.java   |   21 +-
 .../shell/support/HttpInvocationHandler.java    |   21 +-
 .../shell/support/HttpMBeanProxyFactory.java    |   21 +-
 .../internal/web/util/ConvertUtils.java         |   21 +-
 .../management/internal/web/util/UriUtils.java  |   21 +-
 .../management/membership/ClientMembership.java |   29 +-
 .../membership/ClientMembershipEvent.java       |   21 +-
 .../membership/ClientMembershipListener.java    |   21 +-
 .../ClientMembershipListenerAdapter.java        |   21 +-
 .../management/membership/MembershipEvent.java  |   21 +-
 .../membership/MembershipListener.java          |   21 +-
 .../UniversalMembershipListenerAdapter.java     |   21 +-
 .../gemstone/gemfire/management/package.html    |   16 +
 .../memcached/GemFireMemcachedServer.java       |   21 +-
 .../main/java/com/gemstone/gemfire/package.html |   16 +
 .../com/gemstone/gemfire/pdx/FieldType.java     |   21 +-
 .../com/gemstone/gemfire/pdx/JSONFormatter.java |   16 +
 .../gemfire/pdx/JSONFormatterException.java     |   23 +-
 .../gemfire/pdx/NonPortableClassException.java  |   16 +
 .../gemfire/pdx/PdxConfigurationException.java  |   21 +-
 .../pdx/PdxFieldAlreadyExistsException.java     |   21 +-
 .../pdx/PdxFieldDoesNotExistException.java      |   21 +-
 .../pdx/PdxFieldTypeMismatchException.java      |   21 +-
 .../gemfire/pdx/PdxInitializationException.java |   21 +-
 .../com/gemstone/gemfire/pdx/PdxInstance.java   |   21 +-
 .../gemfire/pdx/PdxInstanceFactory.java         |   21 +-
 .../com/gemstone/gemfire/pdx/PdxReader.java     |   21 +-
 .../pdx/PdxRegistryMismatchException.java       |   24 +-
 .../gemstone/gemfire/pdx/PdxSerializable.java   |   21 +-
 .../gemfire/pdx/PdxSerializationException.java  |   21 +-
 .../com/gemstone/gemfire/pdx/PdxSerializer.java |   21 +-
 .../gemstone/gemfire/pdx/PdxUnreadFields.java   |   21 +-
 .../com/gemstone/gemfire/pdx/PdxWriter.java     |   21 +-
 .../pdx/ReflectionBasedAutoSerializer.java      |   21 +-
 .../gemfire/pdx/WritablePdxInstance.java        |   21 +-
 .../pdx/internal/AutoSerializableManager.java   |   21 +-
 .../pdx/internal/CheckTypeRegistryState.java    |   21 +-
 .../pdx/internal/ClientTypeRegistration.java    |   21 +-
 .../gemfire/pdx/internal/ComparableEnum.java    |   16 +
 .../pdx/internal/ConvertableToBytes.java        |   16 +
 .../gemstone/gemfire/pdx/internal/DataSize.java |   21 +-
 .../gemfire/pdx/internal/DefaultPdxField.java   |   21 +-
 .../gemstone/gemfire/pdx/internal/EnumId.java   |   21 +-
 .../gemstone/gemfire/pdx/internal/EnumInfo.java |   21 +-
 .../pdx/internal/FieldNotFoundInPdxVersion.java |   16 +
 .../gemfire/pdx/internal/InternalPdxReader.java |   21 +-
 .../pdx/internal/LonerTypeRegistration.java     |   21 +-
 .../pdx/internal/NullTypeRegistration.java      |   21 +-
 .../gemstone/gemfire/pdx/internal/PdxField.java |   21 +-
 .../gemfire/pdx/internal/PdxInputStream.java    |   23 +-
 .../gemfire/pdx/internal/PdxInstanceEnum.java   |   21 +-
 .../pdx/internal/PdxInstanceFactoryImpl.java    |   21 +-
 .../gemfire/pdx/internal/PdxInstanceImpl.java   |   21 +-
 .../pdx/internal/PdxInstanceInputStream.java    |   21 +-
 .../gemfire/pdx/internal/PdxOutputStream.java   |   21 +-
 .../gemfire/pdx/internal/PdxReaderImpl.java     |   21 +-
 .../gemfire/pdx/internal/PdxString.java         |   23 +-
 .../gemstone/gemfire/pdx/internal/PdxType.java  |   21 +-
 .../gemfire/pdx/internal/PdxUnreadData.java     |   21 +-
 .../gemfire/pdx/internal/PdxWriterImpl.java     |   21 +-
 .../pdx/internal/PeerTypeRegistration.java      |   21 +-
 .../pdx/internal/TrackingPdxReaderImpl.java     |   21 +-
 .../gemfire/pdx/internal/TypeRegistration.java  |   21 +-
 .../gemfire/pdx/internal/TypeRegistry.java      |   21 +-
 .../gemfire/pdx/internal/UnreadPdxType.java     |   21 +-
 .../internal/WeakConcurrentIdentityHashMap.java |   21 +-
 .../pdx/internal/WritablePdxInstanceImpl.java   |   21 +-
 .../gemfire/pdx/internal/json/JsonHelper.java   |   21 +-
 .../pdx/internal/json/PdxInstanceHelper.java    |   23 +-
 .../pdx/internal/json/PdxListHelper.java        |   23 +-
 .../gemfire/pdx/internal/json/PdxToJSON.java    |   23 +-
 .../pdx/internal/unsafe/UnsafeWrapper.java      |   21 +-
 .../java/com/gemstone/gemfire/pdx/package.html  |   15 +
 .../com/gemstone/gemfire/ra/GFConnection.java   |   16 +
 .../gemfire/ra/GFConnectionFactory.java         |   16 +
 .../gemfire/redis/GemFireRedisServer.java       |   18 +-
 .../gemfire/security/AccessControl.java         |   21 +-
 .../gemfire/security/AuthInitialize.java        |   21 +-
 .../security/AuthenticationFailedException.java |   21 +-
 .../AuthenticationRequiredException.java        |   21 +-
 .../gemfire/security/Authenticator.java         |   21 +-
 .../security/GemFireSecurityException.java      |   21 +-
 .../security/NotAuthorizedException.java        |   21 +-
 .../com/gemstone/gemfire/security/package.html  |   16 +
 .../util/concurrent/SynchronousQueueNoSpin.java | 1144 -----
 .../src/main/java/external-overview.html        |   16 +
 .../src/main/java/internal-overview.html        |   16 +
 .../gemfire/cache/cache-8.1.xsd                 |   16 +
 .../gemfire/cache/cache-9.0.xsd                 |   42 +-
 .../services/org.xml.sax.ext.EntityResolver2    |    1 +
 .../gemstone/gemfire/admin/doc-files/ds4_0.dtd  |   15 +
 .../gemstone/gemfire/admin/doc-files/ds5_0.dtd  |   15 +
 .../gemfire/cache/doc-files/cache3_0.dtd        |   15 +
 .../gemfire/cache/doc-files/cache4_0.dtd        |   15 +
 .../gemfire/cache/doc-files/cache4_1.dtd        |   15 +
 .../gemfire/cache/doc-files/cache5_0.dtd        |   15 +
 .../gemfire/cache/doc-files/cache5_1.dtd        |   15 +
 .../gemfire/cache/doc-files/cache5_5.dtd        |   15 +
 .../gemfire/cache/doc-files/cache5_7.dtd        |   15 +
 .../gemfire/cache/doc-files/cache5_8.dtd        |   15 +
 .../gemfire/cache/doc-files/cache6_0.dtd        |   15 +
 .../gemfire/cache/doc-files/cache6_1.dtd        |   15 +
 .../gemfire/cache/doc-files/cache6_5.dtd        |   15 +
 .../gemfire/cache/doc-files/cache6_6.dtd        |   15 +
 .../gemfire/cache/doc-files/cache7_0.dtd        |   15 +
 .../gemfire/cache/doc-files/cache8_0.dtd        |   15 +
 .../distributed/internal/javagroups-config.txt  |  101 -
 .../distributed/internal/javagroups-mcast.txt   |   97 -
 .../membership/gms/messenger/jgroups-config.xml |   72 +
 .../membership/gms/messenger/jgroups-mcast.xml  |   98 +
 .../internal/logging/log4j/log4j2-cli.xml       |   17 -
 .../internal/logging/log4j/log4j2-default.xml   |   21 -
 .../internal/cli/commands/support/gfmon.html    |   20 +-
 .../com/gemstone/gemfire/statisticsType.dtd     |   17 +-
 gemfire-core/src/main/resources/log4j2-cli.xml  |   17 +
 gemfire-core/src/main/resources/log4j2.xml      |   23 +
 .../batterytest/greplogs/ExpectedStrings.java   |   25 +-
 .../java/batterytest/greplogs/LogConsumer.java  |   66 +-
 .../src/test/java/cacheRunner/Portfolio.java    |   16 +
 .../src/test/java/cacheRunner/Position.java     |   16 +
 .../src/test/java/com/company/app/Customer.java |   21 +-
 .../src/test/java/com/company/app/DBLoader.java |   21 +-
 .../com/company/app/OrdersCacheListener.java    |   21 +-
 .../java/com/company/data/DatabaseLoader.java   |   21 +-
 .../java/com/company/data/MyDeclarable.java     |   16 +
 .../src/test/java/com/company/data/MySizer.java |   21 +-
 .../com/company/data/MyTransactionListener.java |   21 +-
 .../src/test/java/com/examples/LinkNode.java    |   21 +-
 .../src/test/java/com/examples/SuperClass.java  |   21 +-
 .../src/test/java/com/examples/TestObject.java  |   21 +-
 .../src/test/java/com/examples/ds/Address.java  |   16 +
 .../src/test/java/com/examples/ds/Company.java  |   21 +-
 .../java/com/examples/ds/CompanySerializer.java |   21 +-
 .../src/test/java/com/examples/ds/Employee.java |   21 +-
 .../com/examples/ds/PutDataSerializables.java   |   21 +-
 .../src/test/java/com/examples/ds/User.java     |   21 +-
 .../com/examples/snapshot/MyDataSerializer.java |   21 +-
 .../java/com/examples/snapshot/MyObject.java    |   23 +-
 .../snapshot/MyObjectDataSerializable.java      |   23 +-
 .../java/com/examples/snapshot/MyObjectPdx.java |   16 +
 .../snapshot/MyObjectPdxSerializable.java       |   21 +-
 .../com/examples/snapshot/MyPdxSerializer.java  |   21 +-
 .../java/com/gemstone/gemfire/AppObject.java    |   18 +-
 .../test/java/com/gemstone/gemfire/BadTest.java |   21 +-
 .../com/gemstone/gemfire/CopyJUnitTest.java     |   21 +-
 .../com/gemstone/gemfire/DeltaTestImpl.java     |   21 +-
 .../gemfire/DiskInstantiatorsJUnitTest.java     |   21 +-
 .../com/gemstone/gemfire/GemFireTestCase.java   |   21 +-
 .../java/com/gemstone/gemfire/Invariant.java    |   22 +-
 .../com/gemstone/gemfire/InvariantResult.java   |   22 +-
 .../com/gemstone/gemfire/JUnitTestSetup.java    |   21 +-
 .../gemfire/JtaNoninvolvementJUnitTest.java     |   21 +-
 .../gemfire/LocalStatisticsJUnitTest.java       |   21 +-
 .../com/gemstone/gemfire/LonerDMJUnitTest.java  |   21 +-
 .../gemstone/gemfire/StatisticsTestCase.java    |   21 +-
 .../gemfire/StatisticsTypeJUnitTest.java        |   21 +-
 .../com/gemstone/gemfire/TXExpiryJUnitTest.java |  569 ++-
 .../java/com/gemstone/gemfire/TXJUnitTest.java  |   21 +-
 .../com/gemstone/gemfire/TXWriterJUnitTest.java |   21 +-
 .../gemstone/gemfire/TXWriterOOMEJUnitTest.java |   21 +-
 .../com/gemstone/gemfire/TXWriterTestCase.java  |   16 +
 .../gemstone/gemfire/TestDataSerializer.java    |   21 +-
 .../com/gemstone/gemfire/TimingTestCase.java    |   22 +-
 .../com/gemstone/gemfire/UnitTestDoclet.java    |   21 +-
 .../gemstone/gemfire/admin/AdminTestHelper.java |   16 +
 .../BindDistributedSystemJUnitTest.java         |  177 +-
 .../internal/CacheHealthEvaluatorJUnitTest.java |   21 +-
 .../internal/DistributedSystemTestCase.java     |   21 +-
 .../admin/internal/HealthEvaluatorTestCase.java |   21 +-
 .../MemberHealthEvaluatorJUnitTest.java         |   21 +-
 .../cache/AttributesFactoryJUnitTest.java       |   39 +-
 .../gemfire/cache/Bug36619JUnitTest.java        |   21 +-
 .../gemfire/cache/Bug42039JUnitTest.java        |   44 +-
 .../gemfire/cache/Bug52289JUnitTest.java        |   89 +
 .../gemfire/cache/CacheListenerJUnitTest.java   |   21 +-
 .../cache/CacheRegionClearStatsDUnitTest.java   |   21 +-
 .../gemstone/gemfire/cache/ClientHelper.java    |   22 +-
 .../cache/ClientServerTimeSyncDUnitTest.java    |   25 +-
 .../cache/ConnectionPoolAndLoaderDUnitTest.java |   25 +-
 .../cache/ConnectionPoolFactoryJUnitTest.java   |   21 +-
 .../gemfire/cache/OperationJUnitTest.java       |   21 +-
 .../gemfire/cache/PoolManagerJUnitTest.java     |   21 +-
 .../gemstone/gemfire/cache/ProxyJUnitTest.java  |   21 +-
 .../gemfire/cache/RegionFactoryJUnitTest.java   |   21 +-
 .../gemfire/cache/RoleExceptionJUnitTest.java   |   21 +-
 .../SerialAsyncEventQueueImplJUnitTest.java     |   62 +
 .../client/ClientCacheFactoryJUnitTest.java     |   21 +-
 .../client/ClientRegionFactoryJUnitTest.java    |   21 +-
 .../ClientServerRegisterInterestsDUnitTest.java |   21 +-
 .../internal/AutoConnectionSourceDUnitTest.java |   50 +-
 .../AutoConnectionSourceImplJUnitTest.java      |   21 +-
 .../AutoConnectionSourceWithUDPDUnitTest.java   |  140 -
 .../internal/CacheServerSSLConnectionDUnit.java |  648 ---
 .../CacheServerSSLConnectionDUnitTest.java      |  426 ++
 .../internal/ConnectionPoolImplJUnitTest.java   |   32 +-
 .../internal/LocatorLoadBalancingDUnitTest.java |   31 +-
 .../cache/client/internal/LocatorTestBase.java  |   33 +-
 .../internal/OpExecutorImplJUnitTest.java       |   21 +-
 .../client/internal/QueueManagerJUnitTest.java  |   21 +-
 .../internal/SSLNoClientAuthDUnitTest.java      |  280 ++
 .../internal/ServerBlackListJUnitTest.java      |   21 +-
 .../locator/LocatorStatusResponseJUnitTest.java |   20 +-
 .../pooling/ConnectionManagerJUnitTest.java     |   21 +-
 .../ColocatedRegionWithHDFSDUnitTest.java       |  189 -
 .../hdfs/internal/HDFSConfigJUnitTest.java      |  520 --
 .../hdfs/internal/HDFSEntriesSetJUnitTest.java  |  227 -
 .../internal/HdfsStoreMutatorJUnitTest.java     |  191 -
 .../hdfs/internal/RegionRecoveryDUnitTest.java  |  415 --
 .../internal/RegionWithHDFSBasicDUnitTest.java  | 1594 ------
 .../RegionWithHDFSOffHeapBasicDUnitTest.java    |  114 -
 ...RegionWithHDFSPersistenceBasicDUnitTest.java |   77 -
 .../hdfs/internal/RegionWithHDFSTestBase.java   |  715 ---
 .../SignalledFlushObserverJUnitTest.java        |   23 +-
 .../SortedListForAsyncQueueJUnitTest.java       |   31 +-
 .../internal/hoplog/BaseHoplogTestCase.java     |  389 --
 .../hoplog/CardinalityEstimatorJUnitTest.java   |  188 -
 .../hoplog/HDFSCacheLoaderJUnitTest.java        |  106 -
 .../hoplog/HDFSCompactionManagerJUnitTest.java  |  449 --
 .../hoplog/HDFSRegionDirectorJUnitTest.java     |   97 -
 .../internal/hoplog/HDFSStatsJUnitTest.java     |  250 -
 .../HDFSUnsortedHoplogOrganizerJUnitTest.java   |  297 --
 .../HdfsSortedOplogOrganizerJUnitTest.java      | 1045 ----
 .../hoplog/HfileSortedOplogJUnitTest.java       |  540 --
 .../hoplog/SortedOplogListIterJUnitTest.java    |  178 -
 .../hoplog/TieredCompactionJUnitTest.java       |  904 ----
 .../hoplog/mapreduce/GFKeyJUnitTest.java        |   50 -
 .../mapreduce/HDFSSplitIteratorJUnitTest.java   |  265 -
 .../hoplog/mapreduce/HoplogUtilJUnitTest.java   |  305 --
 .../management/MXMemoryPoolListenerExample.java |   21 +-
 .../management/MemoryThresholdsDUnitTest.java   |  186 +-
 .../MemoryThresholdsOffHeapDUnitTest.java       |  267 +-
 .../management/ResourceManagerDUnitTest.java    |   21 +-
 .../ExceptionHandlingJUnitTest.java             |   21 +-
 .../mapInterface/MapFunctionalJUnitTest.java    |   21 +-
 .../mapInterface/PutAllGlobalLockJUnitTest.java |   21 +-
 .../PutOperationContextJUnitTest.java           |   16 +
 .../GetOperationContextImplJUnitTest.java       |   16 +
 .../partition/PartitionManagerDUnitTest.java    |   96 +-
 .../PartitionRegionHelperDUnitTest.java         |   21 +-
 .../BaseLineAndCompareQueryPerfJUnitTest.java   |   21 +-
 .../query/Bug32947ValueConstraintJUnitTest.java |   21 +-
 .../gemfire/cache/query/BugJUnitTest.java       |   21 +-
 .../gemfire/cache/query/CacheUtils.java         |   21 +-
 .../cache/query/PdxStringQueryJUnitTest.java    |   21 +-
 .../gemstone/gemfire/cache/query/PerfQuery.java |   22 +-
 .../gemfire/cache/query/QueryJUnitTest.java     |  112 +-
 .../cache/query/QueryServiceJUnitTest.java      |   21 +-
 .../gemfire/cache/query/QueryTestUtils.java     |   21 +-
 .../cache/query/QueryTestUtilsJUnitTest.java    |   21 +-
 .../gemfire/cache/query/RegionJUnitTest.java    |   21 +-
 .../cache/query/TypedIteratorJUnitTest.java     |   21 +-
 .../com/gemstone/gemfire/cache/query/Utils.java |   21 +-
 .../query/cq/dunit/CqQueryTestListener.java     |   21 +-
 .../gemfire/cache/query/data/Address.java       |   21 +-
 .../gemstone/gemfire/cache/query/data/City.java |   22 +-
 .../cache/query/data/CollectionHolder.java      |   22 +-
 .../cache/query/data/ComparableWrapper.java     |   22 +-
 .../gemfire/cache/query/data/Country.java       |   21 +-
 .../gemstone/gemfire/cache/query/data/Data.java |   22 +-
 .../gemfire/cache/query/data/District.java      |   22 +-
 .../gemfire/cache/query/data/Employee.java      |   21 +-
 .../gemfire/cache/query/data/Inventory.java     |   21 +-
 .../gemfire/cache/query/data/Keywords.java      |   21 +-
 .../gemfire/cache/query/data/Manager.java       |   21 +-
 .../gemfire/cache/query/data/Numbers.java       |   21 +-
 .../gemfire/cache/query/data/PhoneNo.java       |   21 +-
 .../gemfire/cache/query/data/Portfolio.java     |   22 +-
 .../gemfire/cache/query/data/PortfolioData.java |   21 +-
 .../gemfire/cache/query/data/PortfolioNoDS.java |   16 +
 .../gemfire/cache/query/data/PortfolioPdx.java  |   25 +-
 .../gemfire/cache/query/data/Position.java      |   21 +-
 .../gemfire/cache/query/data/PositionNoDS.java  |   16 +
 .../gemfire/cache/query/data/PositionPdx.java   |   21 +-
 .../query/data/ProhibitedSecurityQuote.java     |   21 +-
 .../gemfire/cache/query/data/Quote.java         |   21 +-
 .../gemfire/cache/query/data/Restricted.java    |   21 +-
 .../cache/query/data/SecurityMaster.java        |   21 +-
 .../gemfire/cache/query/data/State.java         |   21 +-
 .../gemfire/cache/query/data/Street.java        |   21 +-
 .../gemfire/cache/query/data/Student.java       |   23 +-
 .../gemfire/cache/query/data/Vehicle.java       |   21 +-
 .../gemfire/cache/query/data/Village.java       |   21 +-
 .../query/dunit/CloseCacheAuthorization.java    |   16 +
 .../query/dunit/CompactRangeIndexDUnitTest.java |   21 +-
 .../cache/query/dunit/CqTimeTestListener.java   |   21 +-
 .../cache/query/dunit/GroupByDUnitImpl.java     |   16 +
 .../dunit/GroupByPartitionedQueryDUnitTest.java |   16 +
 .../query/dunit/GroupByQueryDUnitTest.java      |   16 +
 .../cache/query/dunit/HashIndexDUnitTest.java   |   21 +-
 .../cache/query/dunit/HelperTestCase.java       |   16 +
 .../dunit/NonDistinctOrderByDUnitImpl.java      |   16 +
 .../NonDistinctOrderByPartitionedDUnitTest.java |   16 +
 .../query/dunit/PdxStringQueryDUnitTest.java    |   37 +-
 .../dunit/QueryAPITestPartitionResolver.java    |   22 +-
 .../cache/query/dunit/QueryAuthorization.java   |   21 +-
 .../dunit/QueryDataInconsistencyDUnitTest.java  |   24 +-
 .../dunit/QueryIndexUsingXMLDUnitTest.java      |   21 +-
 .../QueryParamsAuthorizationDUnitTest.java      |   21 +-
 .../QueryUsingFunctionContextDUnitTest.java     |   47 +-
 .../query/dunit/QueryUsingPoolDUnitTest.java    |   63 +-
 .../cache/query/dunit/RemoteQueryDUnitTest.java |  138 +-
 ...esourceManagerWithQueryMonitorDUnitTest.java |   62 +-
 .../query/dunit/SelectStarQueryDUnitTest.java   |   21 +-
 .../cache/query/facets/lang/Address.java        |   23 +-
 .../gemfire/cache/query/facets/lang/Course.java |   23 +-
 .../cache/query/facets/lang/Department.java     |   23 +-
 .../query/facets/lang/DerivedEmployee.java      |   22 +-
 .../cache/query/facets/lang/Employee.java       |   21 +-
 .../cache/query/facets/lang/Faculty.java        |   21 +-
 .../cache/query/facets/lang/G_Student.java      |   23 +-
 .../gemfire/cache/query/facets/lang/Person.java |   23 +-
 .../cache/query/facets/lang/Student.java        |   23 +-
 .../cache/query/facets/lang/UG_Student.java     |   23 +-
 .../gemfire/cache/query/facets/lang/Utils.java  |   20 +-
 .../ComparisonOperatorsJUnitTest.java           |   21 +-
 .../query/functional/ConstantsJUnitTest.java    |   21 +-
 .../query/functional/CountStarJUnitTest.java    |   21 +-
 .../CustomerOptimizationsJUnitTest.java         |   21 +-
 .../DistinctAndNonDistinctQueryJUnitTest.java   |   29 +-
 ...ctResultsWithDupValuesInRegionJUnitTest.java |   21 +-
 .../query/functional/FunctionJUnitTest.java     |   21 +-
 .../functional/GroupByPartitionedJUnitTest.java |   16 +
 .../functional/GroupByReplicatedJUnitTest.java  |   16 +
 .../cache/query/functional/GroupByTestImpl.java |   23 +-
 .../query/functional/GroupByTestInterface.java  |   16 +
 .../query/functional/INOperatorJUnitTest.java   |   21 +-
 .../functional/IUM6Bug32345ReJUnitTest.java     |   21 +-
 .../cache/query/functional/IUMJUnitTest.java    |   21 +-
 .../IUMRCompositeIteratorJUnitTest.java         |   21 +-
 .../IUMRMultiIndexesMultiRegionJUnitTest.java   |   21 +-
 .../IUMRShuffleIteratorsJUnitTest.java          |   21 +-
 .../functional/IUMRSingleRegionJUnitTest.java   |   21 +-
 ...ependentOperandsInWhereClause2JUnitTest.java |   21 +-
 .../IndexCreationDeadLockJUnitTest.java         |   21 +-
 .../functional/IndexCreationJUnitTest.java      |   23 +-
 .../IndexMaintenanceAsynchJUnitTest.java        |   21 +-
 .../functional/IndexOperatorJUnitTest.java      |   21 +-
 .../IndexPrimaryKeyUsageJUnitTest.java          |   21 +-
 .../IndexUsageInNestedQueryJUnitTest.java       |   21 +-
 .../IndexUsageWithAliasAsProjAtrbt.java         |   21 +-
 ...IndexUsageWithAliasAsProjAtrbtJUnitTest.java |   21 +-
 .../IndexUseMultFrmSnglCondJUnitTest.java       |   21 +-
 ...ndexWithSngleFrmAndMultCondQryJUnitTest.java |   21 +-
 .../functional/IteratorTypeDefEmpJUnitTest.java |   21 +-
 .../functional/IteratorTypeDefJUnitTest.java    |   21 +-
 .../IteratorTypeDefaultTypesJUnitTest.java      |   21 +-
 .../functional/IumMultConditionJUnitTest.java   |   21 +-
 .../functional/JavaSerializationJUnitTest.java  |   21 +-
 .../functional/LikePredicateJUnitTest.java      |   21 +-
 .../query/functional/LimitClauseJUnitTest.java  |   21 +-
 .../functional/LogicalOperatorsJUnitTest.java   |   21 +-
 .../cache/query/functional/MiscJUnitTest.java   |   21 +-
 .../functional/MultiIndexCreationJUnitTest.java |   16 +
 .../MultiRegionIndexUsageJUnitTest.java         |   21 +-
 .../functional/MultipleRegionsJUnitTest.java    |   21 +-
 .../NegativeNumberQueriesJUnitTest.java         |   21 +-
 .../query/functional/NestedQueryJUnitTest.java  |   21 +-
 .../NonDistinctOrderByPartitionedJUnitTest.java |   16 +
 .../NonDistinctOrderByReplicatedJUnitTest.java  |   16 +
 .../NonDistinctOrderByTestImplementation.java   |   21 +-
 .../query/functional/NumericQueryJUnitTest.java |   21 +-
 .../functional/OrderByPartitionedJUnitTest.java |   16 +
 .../functional/OrderByReplicatedJUnitTest.java  |   16 +
 .../functional/OrderByTestImplementation.java   |   21 +-
 .../functional/ParameterBindingJUnitTest.java   |   21 +-
 .../PdxGroupByPartitionedJUnitTest.java         |   16 +
 .../PdxGroupByReplicatedJUnitTest.java          |   16 +
 .../query/functional/PdxGroupByTestImpl.java    |   16 +
 .../query/functional/PdxOrderByJUnitTest.java   |   16 +
 .../functional/QRegionInterfaceJUnitTest.java   |   21 +-
 .../QueryREUpdateInProgressJUnitTest.java       |   21 +-
 .../functional/QueryUndefinedJUnitTest.java     |   21 +-
 .../functional/ReservedKeywordsJUnitTest.java   |   21 +-
 .../ResultsDataSerializabilityJUnitTest.java    |   21 +-
 .../query/functional/SelectToDateJUnitTest.java |   21 +-
 .../functional/StructMemberAccessJUnitTest.java |   21 +-
 .../query/functional/StructSetOrResultsSet.java |  281 +-
 .../query/functional/TestNewFunctionSSorRS.java |   21 +-
 .../CompiledAggregateFunctionJUnitTest.java     |   16 +
 .../CompiledGroupBySelectJUnitTest.java         |   16 +
 .../CompiledJunctionInternalsJUnitTest.java     |   21 +-
 .../internal/CopyOnReadQueryJUnitTest.java      |   21 +-
 .../internal/ExecutionContextJUnitTest.java     |   21 +-
 .../query/internal/IndexManagerJUnitTest.java   |   21 +-
 .../internal/NWayMergeResultsJUnitTest.java     |   16 +
 .../internal/OrderByComparatorJUnitTest.java    |   16 +
 .../internal/ProjectionAttributeJUnitTest.java  |   21 +-
 .../query/internal/QCompilerJUnitTest.java      |   21 +-
 ...ueryFromClauseCanonicalizationJUnitTest.java |   21 +-
 .../QueryObjectSerializationJUnitTest.java      |   21 +-
 .../QueryObserverCallbackJUnitTest.java         |   21 +-
 .../query/internal/QueryTraceJUnitTest.java     |   21 +-
 .../query/internal/QueryUtilsJUnitTest.java     |   21 +-
 .../query/internal/ResultsBagJUnitTest.java     |   21 +-
 .../ResultsBagLimitBehaviourJUnitTest.java      |   21 +-
 .../ResultsCollectionWrapperLimitJUnitTest.java |   21 +-
 .../SelectResultsComparatorJUnitTest.java       |   21 +-
 .../StructBagLimitBehaviourJUnitTest.java       |   21 +-
 .../query/internal/StructSetJUnitTest.java      |   21 +-
 .../internal/aggregate/AggregatorJUnitTest.java |   16 +
 ...syncIndexUpdaterThreadShutdownJUnitTest.java |   21 +-
 .../index/AsynchIndexMaintenanceJUnitTest.java  |   21 +-
 .../CompactRangeIndexIndexMapJUnitTest.java     |   21 +-
 .../index/CompactRangeIndexJUnitTest.java       |   21 +-
 ...rrentIndexInitOnOverflowRegionDUnitTest.java |   25 +-
 ...ndexOperationsOnOverflowRegionDUnitTest.java |   21 +-
 ...pdateWithInplaceObjectModFalseDUnitTest.java |   21 +-
 ...ConcurrentIndexUpdateWithoutWLDUnitTest.java |   21 +-
 .../index/CopyOnReadIndexDUnitTest.java         |   96 +-
 .../index/CopyOnReadIndexJUnitTest.java         |   21 +-
 .../DeclarativeIndexCreationJUnitTest.java      |   21 +-
 .../internal/index/HashIndexJUnitTest.java      |   44 +-
 .../internal/index/HashIndexSetJUnitTest.java   |  504 ++
 .../index/IndexCreationInternalsJUnitTest.java  |   21 +-
 .../internal/index/IndexElemArrayJUnitTest.java |   21 +-
 .../internal/index/IndexHintJUnitTest.java      |   16 +
 .../query/internal/index/IndexJUnitTest.java    |   21 +-
 .../index/IndexMaintainceJUnitTest.java         |   21 +-
 .../index/IndexMaintenanceJUnitTest.java        |   21 +-
 .../index/IndexStatisticsJUnitTest.java         |   21 +-
 .../IndexTrackingQueryObserverDUnitTest.java    |   21 +-
 .../IndexTrackingQueryObserverJUnitTest.java    |   21 +-
 .../query/internal/index/IndexUseJUnitTest.java |   73 +-
 .../IndexedMergeEquiJoinScenariosJUnitTest.java |   21 +-
 ...itializeIndexEntryDestroyQueryDUnitTest.java |   21 +-
 .../internal/index/MapIndexStoreJUnitTest.java  |   21 +-
 .../MapRangeIndexMaintenanceJUnitTest.java      |   21 +-
 .../index/MultiIndexCreationDUnitTest.java      |   23 +-
 .../NewDeclarativeIndexCreationJUnitTest.java   |   21 +-
 .../index/PdxCopyOnReadQueryJUnitTest.java      |   17 +
 ...gRegionCreationIndexUpdateTypeJUnitTest.java |   21 +-
 .../PutAllWithIndexPerfDUnitDisabledTest.java   |   24 +-
 .../internal/index/RangeIndexAPIJUnitTest.java  |   23 +-
 .../PRBasicIndexCreationDUnitTest.java          |   20 +-
 .../PRBasicIndexCreationDeadlockDUnitTest.java  |   20 +-
 .../PRBasicMultiIndexCreationDUnitTest.java     |   20 +-
 .../partitioned/PRBasicQueryDUnitTest.java      |   20 +-
 .../PRBasicRemoveIndexDUnitTest.java            |   21 +-
 .../PRColocatedEquiJoinDUnitTest.java           |   21 +-
 .../partitioned/PRIndexStatisticsJUnitTest.java |   21 +-
 .../partitioned/PRInvalidQueryDUnitTest.java    |   20 +-
 .../partitioned/PRInvalidQueryJUnitTest.java    |   21 +-
 .../partitioned/PRQueryCacheCloseDUnitTest.java |   20 +-
 .../PRQueryCacheClosedJUnitTest.java            |   21 +-
 .../query/partitioned/PRQueryDUnitHelper.java   |   20 +-
 .../query/partitioned/PRQueryDUnitTest.java     |   20 +-
 .../query/partitioned/PRQueryJUnitTest.java     |   21 +-
 .../partitioned/PRQueryNumThreadsJUnitTest.java |   21 +-
 .../query/partitioned/PRQueryPerfDUnitTest.java |   20 +-
 .../PRQueryRegionCloseDUnitTest.java            |   20 +-
 .../PRQueryRegionClosedJUnitTest.java           |   21 +-
 .../PRQueryRegionDestroyedDUnitTest.java        |   20 +-
 .../PRQueryRegionDestroyedJUnitTest.java        |   21 +-
 .../PRQueryRemoteNodeExceptionDUnitTest.java    |   21 +-
 .../gemfire/cache/query/transaction/Person.java |   21 +-
 .../query/transaction/QueryAndJtaJUnitTest.java |   21 +-
 .../internal/ConnectionCountProbeJUnitTest.java |   21 +-
 .../cache/snapshot/CacheSnapshotJUnitTest.java  |   21 +-
 .../snapshot/ParallelSnapshotDUnitTest.java     |   21 +-
 .../gemfire/cache/snapshot/RegionGenerator.java |   21 +-
 .../cache/snapshot/RegionSnapshotJUnitTest.java |   21 +-
 .../snapshot/SnapshotByteArrayDUnitTest.java    |   21 +-
 .../cache/snapshot/SnapshotDUnitTest.java       |   21 +-
 .../snapshot/SnapshotPerformanceDUnitTest.java  |   21 +-
 .../cache/snapshot/SnapshotTestCase.java        |   21 +-
 .../cache/snapshot/WanSnapshotJUnitTest.java    |   21 +-
 .../cache/util/PasswordUtilJUnitTest.java       |   21 +-
 .../cache30/BridgeMembershipDUnitTest.java      | 1642 -------
 .../BridgeMembershipSelectorDUnitTest.java      |   16 -
 .../gemfire/cache30/BridgeTestCase.java         |  376 --
 .../gemfire/cache30/BridgeWriterDUnitTest.java  |  418 --
 .../cache30/BridgeWriterSelectorDUnitTest.java  |   16 -
 .../gemfire/cache30/Bug34387DUnitTest.java      |   21 +-
 .../gemfire/cache30/Bug34948DUnitTest.java      |   21 +-
 .../gemfire/cache30/Bug35214DUnitTest.java      |   21 +-
 .../gemfire/cache30/Bug38013DUnitTest.java      |   21 +-
 .../gemfire/cache30/Bug38741DUnitTest.java      |   31 +-
 .../cache30/Bug40255JUnitDisabledTest.java      |   22 +-
 .../cache30/Bug40662JUnitDisabledTest.java      |   21 +-
 .../gemfire/cache30/Bug44418JUnitTest.java      |   21 +-
 .../gemfire/cache30/CacheCloseDUnitTest.java    |   21 +-
 .../gemfire/cache30/CacheListenerTestCase.java  |   21 +-
 .../gemfire/cache30/CacheLoaderTestCase.java    |   21 +-
 .../gemfire/cache30/CacheLogRollDUnitTest.java  |   21 +-
 .../gemfire/cache30/CacheMapTxnDUnitTest.java   |   22 +-
 ...cheRegionsReliablityStatsCheckDUnitTest.java |   21 +-
 .../cache30/CacheSerializableRunnable.java      |   21 +-
 .../cache30/CacheStatisticsDUnitTest.java       |   21 +-
 .../gemstone/gemfire/cache30/CacheTestCase.java |  148 +-
 .../gemfire/cache30/CacheWriterTestCase.java    |   21 +-
 .../cache30/CacheXMLPartitionResolver.java      |   21 +-
 .../gemfire/cache30/CacheXml30DUnitTest.java    |  148 +-
 .../gemfire/cache30/CacheXml40DUnitTest.java    |   45 +-
 .../gemfire/cache30/CacheXml41DUnitTest.java    |   49 +-
 .../gemfire/cache30/CacheXml45DUnitTest.java    |   25 +-
 .../gemfire/cache30/CacheXml51DUnitTest.java    |   29 +-
 .../gemfire/cache30/CacheXml55DUnitTest.java    |   21 +-
 .../gemfire/cache30/CacheXml57DUnitTest.java    |   22 +-
 .../gemfire/cache30/CacheXml58DUnitTest.java    |   21 +-
 .../gemfire/cache30/CacheXml60DUnitTest.java    |   21 +-
 .../gemfire/cache30/CacheXml61DUnitTest.java    |   21 +-
 .../gemfire/cache30/CacheXml65DUnitTest.java    |   22 +-
 .../gemfire/cache30/CacheXml66DUnitTest.java    |   21 +-
 .../gemfire/cache30/CacheXml70DUnitTest.java    |   22 +-
 .../gemfire/cache30/CacheXml80DUnitTest.java    |   22 +-
 .../gemfire/cache30/CacheXml81DUnitTest.java    |   22 +-
 .../gemfire/cache30/CacheXml90DUnitTest.java    |   22 +-
 .../gemfire/cache30/CacheXmlTestCase.java       |   16 +
 .../cache30/CachedAllEventsDUnitTest.java       |   21 +-
 .../gemfire/cache30/CallbackArgDUnitTest.java   |   21 +-
 .../cache30/CertifiableTestCacheListener.java   |   24 +-
 .../cache30/ClearMultiVmCallBkDUnitTest.java    |   22 +-
 .../gemfire/cache30/ClearMultiVmDUnitTest.java  |   22 +-
 .../cache30/ClientMembershipDUnitTest.java      | 1660 +++++++
 .../ClientMembershipSelectorDUnitTest.java      |   32 +
 .../ClientRegisterInterestDUnitTest.java        |  427 ++
 ...ClientRegisterInterestSelectorDUnitTest.java |   32 +
 .../cache30/ClientServerCCEDUnitTest.java       |   23 +-
 .../gemfire/cache30/ClientServerTestCase.java   |  385 ++
 .../ConcurrentLeaveDuringGIIDUnitTest.java      |   21 +-
 ...ibutedNoAckAsyncOverflowRegionDUnitTest.java |   22 +-
 ...iskDistributedNoAckAsyncRegionDUnitTest.java |   22 +-
 .../DiskDistributedNoAckRegionTestCase.java     |   22 +-
 ...ributedNoAckSyncOverflowRegionDUnitTest.java |   22 +-
 .../gemfire/cache30/DiskRegionDUnitTest.java    |   21 +-
 .../gemfire/cache30/DiskRegionTestImpl.java     |   22 +-
 .../cache30/DistAckMapMethodsDUnitTest.java     |   22 +-
 ...ckOverflowRegionCCECompressionDUnitTest.java |   61 -
 ...istributedAckOverflowRegionCCEDUnitTest.java |   21 +-
 ...tedAckOverflowRegionCCEOffHeapDUnitTest.java |   16 +
 ...PersistentRegionCCECompressionDUnitTest.java |   62 -
 ...tributedAckPersistentRegionCCEDUnitTest.java |   40 +-
 ...dAckPersistentRegionCCEOffHeapDUnitTest.java |   16 +
 .../DistributedAckRegionCCEDUnitTest.java       |   30 +-
 ...DistributedAckRegionCCEOffHeapDUnitTest.java |   16 +
 ...istributedAckRegionCompressionDUnitTest.java |   21 +-
 .../cache30/DistributedAckRegionDUnitTest.java  |   23 +-
 .../DistributedAckRegionOffHeapDUnitTest.java   |   16 +
 .../DistributedNoAckRegionCCEDUnitTest.java     |   39 +-
 ...stributedNoAckRegionCCEOffHeapDUnitTest.java |   16 +
 ...tributedNoAckRegionCompressionDUnitTest.java |   62 -
 .../DistributedNoAckRegionDUnitTest.java        |   21 +-
 .../DistributedNoAckRegionOffHeapDUnitTest.java |   16 +
 .../gemfire/cache30/DynamicRegionDUnitTest.java |   21 +-
 .../gemfire/cache30/GlobalLockingDUnitTest.java |   21 +-
 .../cache30/GlobalRegionCCEDUnitTest.java       |   25 +-
 .../GlobalRegionCCEOffHeapDUnitTest.java        |   16 +
 .../GlobalRegionCompressionDUnitTest.java       |   61 -
 .../gemfire/cache30/GlobalRegionDUnitTest.java  |   21 +-
 .../cache30/GlobalRegionOffHeapDUnitTest.java   |   16 +
 .../cache30/LRUEvictionControllerDUnitTest.java |   21 +-
 .../gemfire/cache30/LocalRegionDUnitTest.java   |   21 +-
 .../MemLRUEvictionControllerDUnitTest.java      |   21 +-
 .../gemfire/cache30/MultiVMRegionTestCase.java  |  340 +-
 .../gemfire/cache30/MyGatewayEventFilter1.java  |   21 +-
 .../gemfire/cache30/MyGatewayEventFilter2.java  |   23 +-
 .../cache30/MyGatewayTransportFilter1.java      |   21 +-
 .../cache30/MyGatewayTransportFilter2.java      |   21 +-
 .../OffHeapLRUEvictionControllerDUnitTest.java  |   21 +-
 .../PRBucketSynchronizationDUnitTest.java       |   26 +-
 .../PartitionedRegionCompressionDUnitTest.java  |   21 +-
 .../cache30/PartitionedRegionDUnitTest.java     |   21 +-
 ...tionedRegionMembershipListenerDUnitTest.java |   22 +-
 .../PartitionedRegionOffHeapDUnitTest.java      |   16 +
 .../cache30/PreloadedRegionTestCase.java        |   21 +-
 .../gemfire/cache30/ProxyDUnitTest.java         |   21 +-
 .../cache30/PutAllCallBkRemoteVMDUnitTest.java  |   22 +-
 .../cache30/PutAllCallBkSingleVMDUnitTest.java  |   22 +-
 .../gemfire/cache30/PutAllMultiVmDUnitTest.java |   22 +-
 .../gemfire/cache30/QueueMsgDUnitTest.java      |   21 +-
 .../cache30/RRSynchronizationDUnitTest.java     |   21 +-
 .../gemfire/cache30/ReconnectDUnitTest.java     |  171 +-
 .../ReconnectedCacheServerDUnitTest.java        |   31 +-
 .../cache30/RegionAttributesTestCase.java       |   21 +-
 .../cache30/RegionExpirationDUnitTest.java      |   21 +-
 .../RegionMembershipListenerDUnitTest.java      |   42 +-
 .../RegionReliabilityDistAckDUnitTest.java      |   21 +-
 .../RegionReliabilityDistNoAckDUnitTest.java    |   21 +-
 .../RegionReliabilityGlobalDUnitTest.java       |   21 +-
 .../RegionReliabilityListenerDUnitTest.java     |   21 +-
 .../cache30/RegionReliabilityTestCase.java      |  105 +-
 .../gemfire/cache30/RegionTestCase.java         |  106 +-
 .../gemfire/cache30/ReliabilityTestCase.java    |   21 +-
 .../cache30/RemoveAllMultiVmDUnitTest.java      |   22 +-
 .../gemfire/cache30/RequiredRolesDUnitTest.java |   21 +-
 .../cache30/RolePerformanceDUnitTest.java       |   21 +-
 .../gemfire/cache30/SearchAndLoadDUnitTest.java |   21 +-
 .../cache30/SlowRecDUnitDisabledTest.java       |   21 +-
 .../gemfire/cache30/TXDistributedDUnitTest.java |  119 +-
 .../gemfire/cache30/TXOrderDUnitTest.java       |   21 +-
 .../cache30/TXRestrictionsDUnitTest.java        |   21 +-
 .../gemfire/cache30/TestCacheCallback.java      |   21 +-
 .../gemfire/cache30/TestCacheListener.java      |   21 +-
 .../gemfire/cache30/TestCacheLoader.java        |   21 +-
 .../gemfire/cache30/TestCacheWriter.java        |   21 +-
 .../gemfire/cache30/TestDiskRegion.java         |   21 +-
 .../gemstone/gemfire/cache30/TestHeapLRU.java   |   21 +-
 .../gemfire/cache30/TestPdxSerializer.java      |   21 +-
 .../cache30/TestTransactionListener.java        |   21 +-
 .../gemfire/cache30/TestTransactionWriter.java  |   21 +-
 .../AnalyzeSerializablesJUnitTest.java          |   76 +-
 .../codeAnalysis/ClassAndMethodDetails.java     |   23 +-
 .../gemfire/codeAnalysis/ClassAndMethods.java   |   23 +-
 .../codeAnalysis/ClassAndVariableDetails.java   |   23 +-
 .../gemfire/codeAnalysis/ClassAndVariables.java |   23 +-
 .../codeAnalysis/CompiledClassUtils.java        |   23 +-
 .../codeAnalysis/decode/CompiledAttribute.java  |   21 +-
 .../codeAnalysis/decode/CompiledClass.java      |   25 +-
 .../codeAnalysis/decode/CompiledCode.java       |   21 +-
 .../codeAnalysis/decode/CompiledField.java      |   21 +-
 .../codeAnalysis/decode/CompiledMethod.java     |   21 +-
 .../gemfire/codeAnalysis/decode/cp/Cp.java      |   21 +-
 .../gemfire/codeAnalysis/decode/cp/CpClass.java |   21 +-
 .../codeAnalysis/decode/cp/CpDouble.java        |   21 +-
 .../codeAnalysis/decode/cp/CpFieldref.java      |   18 +-
 .../gemfire/codeAnalysis/decode/cp/CpFloat.java |   18 +-
 .../codeAnalysis/decode/cp/CpInteger.java       |   18 +-
 .../decode/cp/CpInterfaceMethodref.java         |   18 +-
 .../gemfire/codeAnalysis/decode/cp/CpLong.java  |   21 +-
 .../codeAnalysis/decode/cp/CpMethodref.java     |   18 +-
 .../codeAnalysis/decode/cp/CpNameAndType.java   |   18 +-
 .../codeAnalysis/decode/cp/CpString.java        |   18 +-
 .../gemfire/codeAnalysis/decode/cp/CpUtf8.java  |   21 +-
 .../distributed/AbstractLauncherJUnitTest.java  |   20 +-
 .../AbstractLauncherJUnitTestCase.java          |   16 +
 .../AbstractLauncherServiceStatusJUnitTest.java |   21 +-
 .../AbstractLocatorLauncherJUnitTestCase.java   |   16 +
 .../AbstractServerLauncherJUnitTestCase.java    |   20 +-
 .../gemfire/distributed/AuthInitializer.java    |   23 +-
 .../distributed/CommonLauncherTestSuite.java    |   20 +-
 .../distributed/DistributedMemberDUnitTest.java |   21 +-
 .../DistributedSystemConnectPerf.java           |   21 +-
 .../distributed/DistributedSystemDUnitTest.java |  139 +-
 .../distributed/DistributedTestSuite.java       |   16 +
 .../distributed/HostedLocatorsDUnitTest.java    |   16 +
 .../gemfire/distributed/JGroupsJUnitTest.java   |  171 -
 .../LauncherMemberMXBeanJUnitTest.java          |   16 +
 .../gemfire/distributed/LauncherTestSuite.java  |   16 +
 .../gemfire/distributed/LocatorDUnitTest.java   |  560 +--
 .../gemfire/distributed/LocatorJUnitTest.java   |  117 +-
 .../distributed/LocatorLauncherJUnitTest.java   |   45 +-
 .../LocatorLauncherLocalFileJUnitTest.java      |   16 +
 .../LocatorLauncherLocalJUnitTest.java          |  108 +-
 .../LocatorLauncherRemoteFileJUnitTest.java     |   20 +-
 .../LocatorLauncherRemoteJUnitTest.java         |   20 +-
 .../gemfire/distributed/MyAuthenticator.java    |   23 +-
 .../gemfire/distributed/MyPrincipal.java        |   18 +-
 .../gemfire/distributed/RoleDUnitTest.java      |   21 +-
 .../distributed/ServerLauncherJUnitTest.java    |   78 +-
 .../ServerLauncherLocalFileJUnitTest.java       |   20 +-
 .../ServerLauncherLocalJUnitTest.java           |  140 +-
 .../ServerLauncherRemoteFileJUnitTest.java      |   16 +
 .../ServerLauncherRemoteJUnitTest.java          |   40 +-
 .../ServerLauncherWithSpringJUnitTest.java      |   16 +
 .../distributed/SystemAdminDUnitTest.java       |   21 +-
 .../AtomicLongWithTerminalStateJUnitTest.java   |   21 +-
 .../distributed/internal/Bug40751DUnitTest.java |   21 +-
 .../ConsoleDistributionManagerDUnitTest.java    |   23 +-
 .../distributed/internal/DateMessage.java       |   21 +-
 .../internal/DistributionAdvisorDUnitTest.java  |   21 +-
 .../internal/DistributionManagerDUnitTest.java  |  116 +-
 ...istributionManagerTimeDUnitDisabledTest.java |  211 -
 .../GemFireTimeSyncServiceDUnitTest.java        |  260 -
 .../InternalDistributedSystemJUnitTest.java     |   52 +-
 .../gemfire/distributed/internal/LDM.java       |   21 +-
 .../internal/LocalDistributionManagerTest.java  |  475 --
 .../internal/LocatorLoadSnapshotJUnitTest.java  |   21 +-
 .../internal/ProduceDateMessages.java           |   21 +-
 .../internal/ProductUseLogDUnitTest.java        |   28 +-
 .../internal/ProductUseLogJUnitTest.java        |   21 +-
 .../internal/ServerLocatorJUnitTest.java        |   20 +-
 .../internal/SharedConfigurationJUnitTest.java  |   21 +-
 .../internal/StartupMessageDataJUnitTest.java   |   21 +-
 .../deadlock/DeadlockDetectorJUnitTest.java     |   21 +-
 .../deadlock/DependencyGraphJUnitTest.java      |   21 +-
 .../GemFireDeadlockDetectorDUnitTest.java       |   68 +-
 .../deadlock/UnsafeThreadLocalJUnitTest.java    |   21 +-
 .../locks/CollaborationJUnitDisabledTest.java   |   21 +-
 .../internal/locks/DLockGrantorHelper.java      |   21 +-
 ...entrantReadWriteWriteShareLockJUnitTest.java |   21 +-
 .../membership/MembershipJUnitTest.java         |  281 +-
 .../internal/membership/NetViewJUnitTest.java   |  194 +
 .../membership/gms/GMSMemberJUnitTest.java      |  148 +
 .../membership/gms/MembershipManagerHelper.java |  171 +
 .../gms/auth/GMSAuthenticatorJUnitTest.java     |  316 ++
 .../gms/fd/GMSHealthMonitorJUnitTest.java       |  576 +++
 .../locator/GMSLocatorRecoveryJUnitTest.java    |  186 +
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  975 ++++
 .../gms/membership/StatRecorderJUnitTest.java   |  227 +
 .../messenger/GMSQuorumCheckerJUnitTest.java    |  361 ++
 .../membership/gms/messenger/InterceptUDP.java  |  109 +
 .../messenger/JGroupsMessengerJUnitTest.java    |  449 ++
 .../gms/mgr/GMSMembershipManagerJUnitTest.java  |  370 ++
 .../jgroup/MembershipManagerHelper.java         |  180 -
 .../StreamingOperationManyDUnitTest.java        |   29 +-
 .../StreamingOperationOneDUnitTest.java         |   29 +-
 .../tcpserver/LocatorVersioningJUnitTest.java   |  205 -
 ...cpServerBackwardCompatDUnitDisabledTest.java |   80 +-
 .../tcpserver/TcpServerJUnitDisabledTest.java   |  203 -
 .../internal/tcpserver/TcpServerJUnitTest.java  |  221 +
 .../support/DistributedSystemAdapter.java       |   21 +-
 .../gemfire/disttx/CacheMapDistTXDUnitTest.java |   16 +
 .../gemfire/disttx/DistTXDebugDUnitTest.java    |   29 +-
 .../disttx/DistTXDistributedTestSuite.java      |   16 +
 .../gemfire/disttx/DistTXExpiryJUnitTest.java   |   16 +
 .../gemfire/disttx/DistTXJUnitTest.java         |   16 +
 .../disttx/DistTXManagerImplJUnitTest.java      |   16 +
 .../gemfire/disttx/DistTXOrderDUnitTest.java    |   16 +
 .../disttx/DistTXPersistentDebugDUnitTest.java  |   19 +-
 .../DistTXReleasesOffHeapOnCloseJUnitTest.java  |   16 +
 .../disttx/DistTXRestrictionsDUnitTest.java     |   16 +
 .../disttx/DistTXWithDeltaDUnitTest.java        |   16 +
 .../gemfire/disttx/DistTXWriterJUnitTest.java   |   16 +
 .../disttx/DistTXWriterOOMEJUnitTest.java       |   16 +
 .../disttx/DistributedTransactionDUnitTest.java |   22 +-
 .../gemfire/disttx/PRDistTXDUnitTest.java       |   16 +
 .../gemfire/disttx/PRDistTXJUnitTest.java       |   16 +
 .../disttx/PRDistTXWithVersionsDUnitTest.java   |   16 +
 ...entPartitionedRegionWithDistTXDUnitTest.java |   16 +
 .../gemfire/internal/ArrayEqualsJUnitTest.java  |   21 +-
 .../gemfire/internal/AvailablePortHelper.java   |   23 +-
 .../internal/AvailablePortJUnitTest.java        |   21 +-
 ...wardCompatibilitySerializationDUnitTest.java |  300 ++
 ...wardCompatibilitySerializationJUnitTest.java |  306 --
 .../gemfire/internal/Bug49856JUnitTest.java     |   21 +-
 .../gemfire/internal/Bug51616JUnitTest.java     |   16 +
 .../gemfire/internal/ByteArrayData.java         |   21 +-
 .../gemstone/gemfire/internal/ClassBuilder.java |   21 +-
 .../ClassNotFoundExceptionDUnitTest.java        |   21 +-
 .../internal/ClassPathLoaderJUnitTest.java      |   21 +-
 .../internal/CopyOnWriteHashSetJUnitTest.java   |   21 +-
 .../internal/DataSerializableJUnitTest.java     |   21 +-
 .../gemstone/gemfire/internal/FDDUnitTest.java  |   53 +-
 .../gemfire/internal/FileUtilJUnitTest.java     |   21 +-
 .../internal/GemFireStatSamplerJUnitTest.java   |   21 +-
 .../GemFireVersionIntegrationJUnitTest.java     |   21 +-
 .../internal/GemFireVersionJUnitTest.java       |   21 +-
 .../internal/HeapDataOutputStreamJUnitTest.java |   21 +-
 .../gemfire/internal/InlineKeyJUnitTest.java    |   21 +-
 .../gemfire/internal/JSSESocketJUnitTest.java   |   23 +-
 .../internal/JarClassLoaderJUnitTest.java       |   22 +-
 .../gemfire/internal/JarDeployerDUnitTest.java  |   22 +-
 .../com/gemstone/gemfire/internal/JavaExec.java |   21 +-
 .../gemfire/internal/LineWrapUnitJUnitTest.java |   21 +-
 .../gemstone/gemfire/internal/LongBuffer.java   |   21 +-
 .../gemfire/internal/NanoTimerJUnitTest.java    |   21 +-
 .../gemfire/internal/ObjIdMapJUnitTest.java     |   21 +-
 .../internal/OneTaskOnlyDecoratorJUnitTest.java |   21 +-
 .../internal/PdxDeleteFieldDUnitTest.java       |   29 +-
 .../internal/PdxDeleteFieldJUnitTest.java       |   16 +
 .../gemfire/internal/PdxRenameDUnitTest.java    |   31 +-
 .../gemfire/internal/PdxRenameJUnitTest.java    |   16 +
 .../PutAllOperationContextJUnitTest.java        |   21 +-
 .../internal/SSLConfigIntegrationJUnitTest.java |   16 +
 .../gemfire/internal/SSLConfigJUnitTest.java    |   20 +-
 ...hreadPoolExecutorWithKeepAliveJUnitTest.java |   21 +-
 .../internal/SimpleStatSamplerJUnitTest.java    |   21 +-
 .../gemfire/internal/SocketCloserJUnitTest.java |  196 +
 .../internal/SocketCloserWithWaitJUnitTest.java |   38 +
 .../StatArchiveWriterReaderJUnitTest.java       |   21 +-
 .../gemfire/internal/StatSamplerJUnitTest.java  |   21 +-
 .../gemfire/internal/StatSamplerTestCase.java   |   21 +-
 .../internal/UniqueIdGeneratorJUnitTest.java    |   21 +-
 .../internal/cache/AbstractRegionJUnitTest.java |   21 +-
 .../gemfire/internal/cache/BackupDUnitTest.java |   21 +-
 .../gemfire/internal/cache/BackupJUnitTest.java |   21 +-
 .../internal/cache/Bug33359DUnitTest.java       |   21 +-
 .../internal/cache/Bug33726DUnitTest.java       |   21 +-
 .../internal/cache/Bug33726JUnitTest.java       |   23 +-
 .../Bug34179TooManyFilesOpenJUnitTest.java      |   21 +-
 .../internal/cache/Bug34583JUnitTest.java       |   21 +-
 .../internal/cache/Bug37241DUnitTest.java       |   21 +-
 .../internal/cache/Bug37244JUnitTest.java       |   21 +-
 .../internal/cache/Bug37377DUnitTest.java       |   21 +-
 .../internal/cache/Bug37500JUnitTest.java       |   21 +-
 .../internal/cache/Bug39079DUnitTest.java       |   27 +-
 .../internal/cache/Bug40299DUnitTest.java       |   21 +-
 .../internal/cache/Bug40632DUnitTest.java       |   21 +-
 .../internal/cache/Bug41091DUnitTest.java       |   21 +-
 .../internal/cache/Bug41733DUnitTest.java       |   21 +-
 .../internal/cache/Bug41957DUnitTest.java       |   35 +-
 .../internal/cache/Bug42010StatsDUnitTest.java  |   21 +-
 .../internal/cache/Bug42055DUnitTest.java       |   21 +-
 .../internal/cache/Bug45164DUnitTest.java       |   21 +-
 .../internal/cache/Bug45934DUnitTest.java       |   21 +-
 .../internal/cache/Bug47667DUnitTest.java       |   21 +-
 .../internal/cache/Bug48182JUnitTest.java       |   16 +
 .../internal/cache/CacheAdvisorDUnitTest.java   |   21 +-
 .../cache/CacheLifecycleListenerJUnitTest.java  |   21 +-
 .../internal/cache/CacheServiceJUnitTest.java   |   59 +
 .../cache/ChunkValueWrapperJUnitTest.java       |   18 +-
 .../internal/cache/ClearDAckDUnitTest.java      |   21 +-
 .../internal/cache/ClearGlobalDUnitTest.java    |   21 +-
 ...ssagesRegionCreationAndDestroyJUnitTest.java |   35 +-
 .../cache/ClientServerGetAllDUnitTest.java      |  100 +-
 ...ServerInvalidAndDestroyedEntryDUnitTest.java |   21 +-
 .../ClientServerTransactionCCEDUnitTest.java    |   21 +-
 .../cache/ClientServerTransactionDUnitTest.java |  233 +-
 .../cache/ComplexDiskRegionJUnitTest.java       |   21 +-
 .../ConcurrentDestroySubRegionDUnitTest.java    |   21 +-
 ...entFlushingAndRegionOperationsJUnitTest.java |   21 +-
 .../cache/ConcurrentMapLocalJUnitTest.java      |   21 +-
 .../cache/ConcurrentMapOpsDUnitTest.java        |   98 +-
 .../ConcurrentRegionOperationsJUnitTest.java    |   21 +-
 ...rentRollingAndRegionOperationsJUnitTest.java |   21 +-
 .../internal/cache/ConflationJUnitTest.java     |   21 +-
 .../cache/ConnectDisconnectDUnitTest.java       |   57 +-
 .../cache/CustomerIDPartitionResolver.java      |   21 +-
 .../internal/cache/DeltaFaultInDUnitTest.java   |   21 +-
 .../cache/DeltaPropagationDUnitTest.java        |   29 +-
 .../cache/DeltaPropagationStatsDUnitTest.java   |   23 +-
 .../internal/cache/DeltaSizingDUnitTest.java    |   21 +-
 .../gemfire/internal/cache/DiskIFJUnitTest.java |   21 +-
 .../gemfire/internal/cache/DiskIdJUnitTest.java |   21 +-
 .../internal/cache/DiskInitFileJUnitTest.java   |   21 +-
 .../cache/DiskOfflineCompactionJUnitTest.java   |   21 +-
 .../internal/cache/DiskOldAPIsJUnitTest.java    |   21 +-
 ...iskRandomOperationsAndRecoveryJUnitTest.java |   21 +-
 .../cache/DiskRegByteArrayDUnitTest.java        |   21 +-
 .../cache/DiskRegCacheXmlJUnitTest.java         |   21 +-
 .../DiskRegCachexmlGeneratorJUnitTest.java      |   21 +-
 .../internal/cache/DiskRegCbkChkJUnitTest.java  |   21 +-
 .../DiskRegOplogSwtchingAndRollerJUnitTest.java |   21 +-
 .../cache/DiskRegRecoveryJUnitTest.java         |   21 +-
 .../cache/DiskRegionAsyncRecoveryJUnitTest.java |   21 +-
 ...RegionChangingRegionAttributesJUnitTest.java |   21 +-
 .../cache/DiskRegionClearJUnitTest.java         |   21 +-
 .../internal/cache/DiskRegionHelperFactory.java |   21 +-
 .../DiskRegionIllegalArguementsJUnitTest.java   |   21 +-
 ...iskRegionIllegalCacheXMLvaluesJUnitTest.java |   21 +-
 .../internal/cache/DiskRegionJUnitTest.java     |   30 +-
 .../internal/cache/DiskRegionProperties.java    |   21 +-
 .../internal/cache/DiskRegionTestingBase.java   |   21 +-
 .../cache/DiskStoreFactoryJUnitTest.java        |   21 +-
 .../cache/DiskWriteAttributesJUnitTest.java     |   21 +-
 ...DistrbutedRegionProfileOffHeapDUnitTest.java |   16 +
 .../cache/DistributedCacheTestCase.java         |   21 +-
 .../cache/EnumListenerEventJUnitTest.java       |   21 +-
 .../internal/cache/EventTrackerDUnitTest.java   |   29 +-
 .../cache/EvictionDUnitDisabledTest.java        |   21 +-
 .../cache/EvictionObjectSizerDUnitTest.java     |   21 +-
 .../internal/cache/EvictionStatsDUnitTest.java  |   21 +-
 .../internal/cache/EvictionTestBase.java        |   21 +-
 .../internal/cache/FaultingInJUnitTest.java     |   21 +-
 .../cache/FixedPRSinglehopDUnitTest.java        |   21 +-
 .../internal/cache/GIIDeltaDUnitTest.java       |   23 +-
 .../internal/cache/GIIFlowControlDUnitTest.java |   21 +-
 .../internal/cache/GridAdvisorDUnitTest.java    |  127 +-
 .../internal/cache/HABug36773DUnitTest.java     |   29 +-
 .../HAOverflowMemObjectSizerDUnitTest.java      |   33 +-
 .../HDFSQueueRegionOperationsJUnitTest.java     |   33 -
 ...FSQueueRegionOperationsOffHeapJUnitTest.java |   54 -
 .../cache/HDFSRegionOperationsJUnitTest.java    |  542 ---
 .../HDFSRegionOperationsOffHeapJUnitTest.java   |   78 -
 .../cache/IncrementalBackupDUnitTest.java       |   21 +-
 .../cache/InterruptClientServerDUnitTest.java   |   21 +-
 .../internal/cache/InterruptDiskJUnitTest.java  |   21 +-
 ...InterruptsConserveSocketsFalseDUnitTest.java |   16 +
 .../internal/cache/InterruptsDUnitTest.java     |   21 +-
 .../internal/cache/IteratorDUnitTest.java       |   21 +-
 .../LIFOEvictionAlgoEnabledRegionJUnitTest.java |   21 +-
 ...victionAlgoMemoryEnabledRegionJUnitTest.java |   21 +-
 .../internal/cache/MapClearGIIDUnitTest.java    |   21 +-
 .../internal/cache/MapInterface2JUnitTest.java  |   21 +-
 .../internal/cache/MapInterfaceJUnitTest.java   |   21 +-
 .../internal/cache/MockCacheService.java        |   24 +
 .../internal/cache/MockCacheServiceImpl.java    |   39 +
 .../MultipleOplogsRollingFeatureJUnitTest.java  |   21 +-
 .../cache/NetSearchMessagingDUnitTest.java      |   51 +-
 .../cache/OffHeapEvictionDUnitTest.java         |   23 +-
 .../cache/OffHeapEvictionStatsDUnitTest.java    |   21 +-
 .../gemfire/internal/cache/OffHeapTestUtil.java |   26 +-
 .../cache/OfflineSnapshotJUnitTest.java         |   21 +-
 .../gemfire/internal/cache/OldVLJUnitTest.java  |   21 +-
 .../cache/OldValueImporterTestBase.java         |  181 +
 .../cache/OplogEntryIdMapJUnitTest.java         |   21 +-
 .../cache/OplogEntryIdSetJUnitTest.java         |   21 +-
 .../gemfire/internal/cache/OplogJUnitTest.java  |   67 +-
 .../internal/cache/OplogRVVJUnitTest.java       |   21 +-
 .../cache/OrderedTombstoneMapJUnitTest.java     |   21 +-
 .../cache/P2PDeltaPropagationDUnitTest.java     |   21 +-
 .../internal/cache/PRBadToDataDUnitTest.java    |   21 +-
 .../cache/PRConcurrentMapOpsJUnitTest.java      |   21 +-
 .../cache/PRDataStoreMemoryJUnitTest.java       |   21 +-
 .../PRDataStoreMemoryOffHeapJUnitTest.java      |   16 +
 .../gemfire/internal/cache/PRTXJUnitTest.java   |   21 +-
 .../cache/PartitionAttributesImplJUnitTest.java |   16 +
 .../cache/PartitionListenerDUnitTest.java       |   21 +-
 ...dRegionAPIConserveSocketsFalseDUnitTest.java |   21 +-
 .../cache/PartitionedRegionAPIDUnitTest.java    |   20 +-
 .../PartitionedRegionAsSubRegionDUnitTest.java  |   20 +-
 ...gionBucketCreationDistributionDUnitTest.java |   20 +-
 .../PartitionedRegionCacheCloseDUnitTest.java   |   20 +-
 ...rtitionedRegionCacheLoaderForRootRegion.java |   21 +-
 ...artitionedRegionCacheLoaderForSubRegion.java |   21 +-
 ...rtitionedRegionCacheXMLExampleDUnitTest.java |   21 +-
 .../PartitionedRegionCreationDUnitTest.java     |   20 +-
 .../PartitionedRegionCreationJUnitTest.java     |   20 +-
 .../cache/PartitionedRegionDUnitTestCase.java   |   20 +-
 .../PartitionedRegionDataStoreJUnitTest.java    |   20 +-
 ...rtitionedRegionDelayedRecoveryDUnitTest.java |   21 +-
 .../PartitionedRegionDestroyDUnitTest.java      |   20 +-
 .../PartitionedRegionEntryCountDUnitTest.java   |   21 +-
 .../PartitionedRegionEvictionDUnitTest.java     |   21 +-
 .../cache/PartitionedRegionHADUnitTest.java     |   20 +-
 ...onedRegionHAFailureAndRecoveryDUnitTest.java |   20 +-
 .../cache/PartitionedRegionHelperJUnitTest.java |   21 +-
 .../PartitionedRegionInvalidateDUnitTest.java   |   21 +-
 ...artitionedRegionLocalMaxMemoryDUnitTest.java |   20 +-
 ...nedRegionLocalMaxMemoryOffHeapDUnitTest.java |   16 +
 .../PartitionedRegionMultipleDUnitTest.java     |   20 +-
 ...rtitionedRegionOffHeapEvictionDUnitTest.java |   22 +-
 .../cache/PartitionedRegionPRIDDUnitTest.java   |   21 +-
 .../cache/PartitionedRegionQueryDUnitTest.java  |   21 +-
 ...artitionedRegionQueryEvaluatorJUnitTest.java |   21 +-
 ...artitionedRegionRedundancyZoneDUnitTest.java |   25 +-
 ...tionedRegionSerializableObjectJUnitTest.java |   21 +-
 .../PartitionedRegionSingleHopDUnitTest.java    |   80 +-
 ...RegionSingleHopWithServerGroupDUnitTest.java |   21 +-
 ...onedRegionSingleNodeOperationsJUnitTest.java |   20 +-
 .../cache/PartitionedRegionSizeDUnitTest.java   |   20 +-
 .../cache/PartitionedRegionStatsDUnitTest.java  |   20 +-
 .../cache/PartitionedRegionStatsJUnitTest.java  |   21 +-
 .../cache/PartitionedRegionTestHelper.java      |   20 +-
 .../PartitionedRegionTestUtilsDUnitTest.java    |   20 +-
 .../PartitionedRegionWithSameNameDUnitTest.java |   21 +-
 .../PersistentPartitionedRegionJUnitTest.java   |   16 +
 .../internal/cache/PutAllDAckDUnitTest.java     |   21 +-
 .../internal/cache/PutAllGlobalDUnitTest.java   |   21 +-
 .../cache/RegionEntryFlagsJUnitTest.java        |   21 +-
 .../internal/cache/RegionListenerJUnitTest.java |   63 +
 .../cache/RemotePutReplyMessageJUnitTest.java   |   53 +
 .../cache/RemoteTransactionCCEDUnitTest.java    |   16 +
 .../cache/RemoteTransactionDUnitTest.java       |   27 +-
 .../internal/cache/RemoveAllDAckDUnitTest.java  |   21 +-
 .../internal/cache/RemoveDAckDUnitTest.java     |   21 +-
 .../internal/cache/RemoveGlobalDUnitTest.java   |   21 +-
 .../internal/cache/RunCacheInOldGemfire.java    |   21 +-
 .../cache/SimpleDiskRegionJUnitTest.java        |   21 +-
 .../internal/cache/SizingFlagDUnitTest.java     |   21 +-
 .../internal/cache/SnapshotTestUtil.java        |   16 +
 .../internal/cache/SystemFailureDUnitTest.java  |   21 +-
 .../internal/cache/TXManagerImplJUnitTest.java  |   21 +-
 .../cache/TXReservationMgrJUnitTest.java        |   21 +-
 .../gemfire/internal/cache/TestDelta.java       |   21 +-
 .../internal/cache/TestHelperForHydraTests.java |   16 +
 .../internal/cache/TestNonSizerObject.java      |   21 +-
 .../internal/cache/TestObjectSizerImpl.java     |   21 +-
 .../gemfire/internal/cache/TestUtils.java       |   21 +-
 .../cache/TombstoneCreationJUnitTest.java       |   21 +-
 .../cache/TransactionsWithDeltaDUnitTest.java   |   21 +-
 .../internal/cache/UnitTestValueHolder.java     |   18 +-
 .../gemfire/internal/cache/UnzipUtil.java       |   21 +-
 .../internal/cache/UpdateVersionJUnitTest.java  |   21 +-
 .../gemfire/internal/cache/VLJUnitTest.java     |   21 +-
 .../cache/control/FilterByPathJUnitTest.java    |   21 +-
 .../cache/control/MemoryMonitorJUnitTest.java   |   21 +-
 .../control/MemoryMonitorOffHeapJUnitTest.java  |   23 +-
 .../control/MemoryThresholdsJUnitTest.java      |   16 +
 .../control/RebalanceOperationDUnitTest.java    |  204 +-
 .../control/TestMemoryThresholdListener.java    |   34 +-
 ...skRegOverflowAsyncGetInMemPerfJUnitTest.java |   21 +-
 ...iskRegOverflowAsyncJUnitPerformanceTest.java |   21 +-
 ...lowSyncGetInMemPerfJUnitPerformanceTest.java |   21 +-
 ...DiskRegOverflowSyncJUnitPerformanceTest.java |   21 +-
 ...egionOverflowAsyncRollingOpLogJUnitTest.java |   21 +-
 ...RegionOverflowSyncRollingOpLogJUnitTest.java |   21 +-
 .../DiskRegionPerfJUnitPerformanceTest.java     |   21 +-
 .../DiskRegionPersistOnlySyncJUnitTest.java     |   21 +-
 ...DiskRegionRollOpLogJUnitPerformanceTest.java |   21 +-
 ...ltiThreadedOplogPerJUnitPerformanceTest.java |   21 +-
 .../cache/execute/Bug51193DUnitTest.java        |   28 +-
 .../ClientServerFunctionExecutionDUnitTest.java |   21 +-
 .../execute/ColocationFailoverDUnitTest.java    |   21 +-
 .../cache/execute/CustomResultCollector.java    |   21 +-
 .../execute/CustomerIDPartitionResolver.java    |   21 +-
 ...ributedRegionFunctionExecutionDUnitTest.java |   21 +-
 .../FunctionExecution_ExceptionDUnitTest.java   |   21 +-
 .../execute/FunctionServiceStatsDUnitTest.java  |   64 +-
 .../cache/execute/LocalDataSetDUnitTest.java    |   21 +-
 .../cache/execute/LocalDataSetFunction.java     |   21 +-
 .../execute/LocalDataSetIndexingDUnitTest.java  |   21 +-
 .../LocalFunctionExecutionDUnitTest.java        |   21 +-
 .../MemberFunctionExecutionDUnitTest.java       |   70 +-
 .../MultiRegionFunctionExecutionDUnitTest.java  |   21 +-
 .../execute/MyFunctionExecutionException.java   |   21 +-
 .../cache/execute/MyTransactionFunction.java    |   21 +-
 .../OnGroupsFunctionExecutionDUnitTest.java     |   51 +-
 ...ntServerFunctionExecutionNoAckDUnitTest.java |   21 +-
 ...tServerRegionFunctionExecutionDUnitTest.java |   21 +-
 ...egionFunctionExecutionFailoverDUnitTest.java |   21 +-
 ...onFunctionExecutionNoSingleHopDUnitTest.java |   21 +-
 ...onExecutionSelectorNoSingleHopDUnitTest.java |   21 +-
 ...gionFunctionExecutionSingleHopDUnitTest.java |   23 +-
 .../cache/execute/PRClientServerTestBase.java   |   21 +-
 .../cache/execute/PRColocationDUnitTest.java    |   21 +-
 .../execute/PRCustomPartitioningDUnitTest.java  |   21 +-
 .../execute/PRFunctionExecutionDUnitTest.java   |   21 +-
 .../PRFunctionExecutionTimeOutDUnitTest.java    |   22 +-
 ...ctionExecutionWithResultSenderDUnitTest.java |   21 +-
 .../execute/PRPerformanceTestDUnitTest.java     |   21 +-
 .../cache/execute/PRTransactionDUnitTest.java   |   21 +-
 .../PRTransactionWithVersionsDUnitTest.java     |   16 +
 .../internal/cache/execute/PerfFunction.java    |   21 +-
 .../internal/cache/execute/PerfTxFunction.java  |   21 +-
 .../cache/execute/PerformanceTestFunction.java  |   21 +-
 .../execute/SingleHopGetAllPutAllDUnitTest.java |   21 +-
 .../internal/cache/execute/TestFunction.java    |   21 +-
 .../internal/cache/execute/data/CustId.java     |   21 +-
 .../internal/cache/execute/data/Customer.java   |   21 +-
 .../internal/cache/execute/data/Order.java      |   21 +-
 .../internal/cache/execute/data/OrderId.java    |   21 +-
 .../internal/cache/execute/data/Shipment.java   |   21 +-
 .../internal/cache/execute/data/ShipmentId.java |   21 +-
 .../SimpleExtensionPointJUnitTest.java          |   21 +-
 .../extension/mock/AbstractMockExtension.java   |   21 +-
 .../mock/AbstractMockExtensionXmlGenerator.java |   21 +-
 .../mock/AlterMockCacheExtensionFunction.java   |   21 +-
 .../mock/AlterMockRegionExtensionFunction.java  |   21 +-
 .../mock/CreateMockCacheExtensionFunction.java  |   21 +-
 .../mock/CreateMockRegionExtensionFunction.java |   21 +-
 .../mock/DestroyMockCacheExtensionFunction.java |   23 +-
 .../DestroyMockRegionExtensionFunction.java     |   21 +-
 .../extension/mock/MockCacheExtension.java      |   21 +-
 .../mock/MockCacheExtensionXmlGenerator.java    |   21 +-
 .../extension/mock/MockExtensionCommands.java   |   21 +-
 .../extension/mock/MockExtensionXmlParser.java  |   21 +-
 .../extension/mock/MockRegionExtension.java     |   21 +-
 .../mock/MockRegionExtensionXmlGenerator.java   |   21 +-
 ...gionFunctionFunctionInvocationException.java |   21 +-
 .../functions/DistributedRegionFunction.java    |   21 +-
 .../cache/functions/LocalDataSetFunction.java   |   21 +-
 .../internal/cache/functions/TestFunction.java  |   31 +-
 .../ha/BlockingHARQAddOperationJUnitTest.java   |   21 +-
 .../cache/ha/BlockingHARQStatsJUnitTest.java    |   21 +-
 .../cache/ha/BlockingHARegionJUnitTest.java     |   21 +-
 .../ha/BlockingHARegionQueueJUnitTest.java      |   21 +-
 .../cache/ha/Bug36853EventsExpiryDUnitTest.java |   29 +-
 .../internal/cache/ha/Bug48571DUnitTest.java    |   27 +-
 .../internal/cache/ha/Bug48879DUnitTest.java    |   23 +-
 .../internal/cache/ha/ConflatableObject.java    |   21 +-
 .../cache/ha/EventIdOptimizationDUnitTest.java  |   33 +-
 .../cache/ha/EventIdOptimizationJUnitTest.java  |   20 +-
 .../internal/cache/ha/FailoverDUnitTest.java    |   43 +-
 .../internal/cache/ha/HABugInPutDUnitTest.java  |   29 +-
 .../internal/cache/ha/HAClearDUnitTest.java     |   31 +-
 .../cache/ha/HAConflationDUnitTest.java         |   29 +-
 .../internal/cache/ha/HADuplicateDUnitTest.java |   31 +-
 .../cache/ha/HAEventIdPropagationDUnitTest.java |   31 +-
 .../internal/cache/ha/HAExpiryDUnitTest.java    |   21 +-
 .../internal/cache/ha/HAGIIBugDUnitTest.java    |   21 +-
 .../internal/cache/ha/HAGIIDUnitTest.java       |   39 +-
 .../gemfire/internal/cache/ha/HAHelper.java     |   21 +-
 .../cache/ha/HARQAddOperationJUnitTest.java     |   21 +-
 .../cache/ha/HARQueueNewImplDUnitTest.java      |   87 +-
 .../internal/cache/ha/HARegionDUnitTest.java    |   21 +-
 .../internal/cache/ha/HARegionJUnitTest.java    |   20 +-
 .../cache/ha/HARegionQueueDUnitTest.java        |   21 +-
 .../cache/ha/HARegionQueueJUnitTest.java        |   20 +-
 ...HARegionQueueStartStopJUnitDisabledTest.java |   21 +-
 .../ha/HARegionQueueStartStopJUnitTest.java     |   21 +-
 .../cache/ha/HARegionQueueStatsJUnitTest.java   |   20 +-
 .../cache/ha/HASlowReceiverDUnitTest.java       |   31 +-
 .../ha/OperationsPropagationDUnitTest.java      |   29 +-
 .../internal/cache/ha/PutAllDUnitTest.java      |   33 +-
 .../cache/ha/StatsBugDUnitDisabledTest.java     |   35 +-
 .../cache/ha/TestBlockingHARegionQueue.java     |   21 +-
 .../cache/ha/ThreadIdentifierJUnitTest.java     |   21 +-
 .../cache/locks/TXLockServiceDUnitTest.java     |   23 +-
 .../internal/cache/lru/LRUClockJUnitTest.java   |   21 +-
 .../cache/partitioned/Bug39356DUnitTest.java    |   21 +-
 .../cache/partitioned/Bug43684DUnitTest.java    |   57 +-
 .../cache/partitioned/Bug47388DUnitTest.java    |   21 +-
 .../cache/partitioned/Bug51400DUnitTest.java    |   27 +-
 .../partitioned/ElidedPutAllDUnitTest.java      |   21 +-
 .../OfflineMembersDetailsJUnitTest.java         |   21 +-
 .../partitioned/PartitionResolverDUnitTest.java |   21 +-
 .../PartitionedRegionLoadModelJUnitTest.java    |   29 +-
 .../PartitionedRegionLoaderWriterDUnitTest.java |   21 +-
 ...rtitionedRegionMetaDataCleanupDUnitTest.java |   21 +-
 .../partitioned/PersistPRKRFDUnitTest.java      |   21 +-
 ...tentColocatedPartitionedRegionDUnitTest.java |   23 +-
 .../PersistentPartitionedRegionDUnitTest.java   |   27 +-
 ...tentPartitionedRegionOldConfigDUnitTest.java |   21 +-
 .../PersistentPartitionedRegionTestBase.java    |   21 +-
 ...rtitionedRegionWithTransactionDUnitTest.java |   21 +-
 .../PutPutReplyMessageJUnitTest.java            |   54 +
 .../cache/partitioned/ShutdownAllDUnitTest.java |   33 +-
 ...treamingPartitionOperationManyDUnitTest.java |   28 +-
 ...StreamingPartitionOperationOneDUnitTest.java |   29 +-
 .../fixed/CustomerFixedPartitionResolver.java   |   21 +-
 .../fixed/FixedPartitioningDUnitTest.java       |   21 +-
 .../fixed/FixedPartitioningTestBase.java        |   27 +-
 ...ngWithColocationAndPersistenceDUnitTest.java |   21 +-
 .../cache/partitioned/fixed/MyDate1.java        |   21 +-
 .../cache/partitioned/fixed/MyDate2.java        |   21 +-
 .../cache/partitioned/fixed/MyDate3.java        |   21 +-
 .../fixed/QuarterPartitionResolver.java         |   21 +-
 .../SingleHopQuarterPartitionResolver.java      |   21 +-
 .../persistence/BackupInspectorJUnitTest.java   |   21 +-
 .../PersistentRVVRecoveryDUnitTest.java         |   21 +-
 .../PersistentRecoveryOrderDUnitTest.java       |   21 +-
 ...rsistentRecoveryOrderOldConfigDUnitTest.java |   21 +-
 .../PersistentReplicatedTestBase.java           |   21 +-
 .../TemporaryResultSetFactoryJUnitTest.java     |   21 +-
 .../cache/persistence/soplog/AppendLog.java     |   56 -
 .../ArraySerializedComparatorJUnitTest.java     |   86 -
 .../CompactionSortedOplogSetTestCase.java       |  125 -
 .../persistence/soplog/CompactionTestCase.java  |  197 -
 .../persistence/soplog/ComparisonTestCase.java  |   68 -
 .../soplog/IndexComparatorJUnitTest.java        |   70 -
 .../LexicographicalComparatorJUnitTest.java     |  195 -
 .../soplog/RecoverableSortedOplogSet.java       |  212 -
 .../soplog/SizeTieredCompactorJUnitTest.java    |  101 -
 .../SizeTieredSortedOplogSetJUnitTest.java      |   27 -
 .../soplog/SortedBufferJUnitTest.java           |   23 -
 .../soplog/SortedOplogSetJUnitTest.java         |  264 -
 .../soplog/SortedReaderTestCase.java            |  286 --
 .../nofile/NoFileSortedOplogJUnitTest.java      |   39 -
 .../GFSnapshotJUnitPerformanceTest.java         |   21 +-
 .../internal/cache/tier/Bug40396DUnitTest.java  |   21 +-
 .../tier/sockets/AcceptorImplJUnitTest.java     |   83 +-
 ...rdCompatibilityCommandDUnitDisabledTest.java |  235 -
 ...CompatibilityHandshakeDUnitDisabledTest.java |  218 -
 ...mpatibilityHigherVersionClientDUnitTest.java |   25 +-
 ...rdCompatibilityMessageDUnitDisabledTest.java |  299 --
 .../BridgeServerMaxConnectionsJUnitTest.java    |  221 -
 ...geServerSelectorMaxConnectionsJUnitTest.java |   19 -
 .../tier/sockets/BridgeWriterMiscDUnitTest.java | 1384 ------
 .../BridgeWriterMiscSelectorDUnitTest.java      |   27 -
 .../cache/tier/sockets/Bug36269DUnitTest.java   |   25 +-
 .../cache/tier/sockets/Bug36457DUnitTest.java   |   39 +-
 .../cache/tier/sockets/Bug36805DUnitTest.java   |   27 +-
 .../cache/tier/sockets/Bug36829DUnitTest.java   |   26 +-
 .../cache/tier/sockets/Bug36995DUnitTest.java   |   34 +-
 .../cache/tier/sockets/Bug37210DUnitTest.java   |   53 +-
 .../cache/tier/sockets/Bug37805DUnitTest.java   |   24 +-
 .../CacheServerMaxConnectionsJUnitTest.java     |  229 +
 ...heServerSelectorMaxConnectionsJUnitTest.java |   35 +
 .../cache/tier/sockets/CacheServerTestUtil.java |   82 +-
 .../CacheServerTransactionsDUnitTest.java       |   25 +-
 ...acheServerTransactionsSelectorDUnitTest.java |   16 +
 .../tier/sockets/ClearPropagationDUnitTest.java |   25 +-
 .../tier/sockets/ClientConflationDUnitTest.java |   41 +-
 .../sockets/ClientHealthMonitorJUnitTest.java   |   27 +-
 .../ClientHealthMonitorSelectorJUnitTest.java   |   16 +
 .../sockets/ClientInterestNotifyDUnitTest.java  |   35 +-
 .../tier/sockets/ClientServerMiscDUnitTest.java | 1392 ++++++
 .../ClientServerMiscSelectorDUnitTest.java      |   36 +
 .../cache/tier/sockets/ConflationDUnitTest.java |   45 +-
 .../tier/sockets/ConnectionProxyJUnitTest.java  |  278 +-
 .../DataSerializerPropogationDUnitTest.java     |   57 +-
 .../cache/tier/sockets/DeltaEOFException.java   |   21 +-
 .../DestroyEntryPropagationDUnitTest.java       |   33 +-
 .../sockets/DurableClientBug39997DUnitTest.java |   21 +-
 .../DurableClientQueueSizeDUnitTest.java        |   37 +-
 .../DurableClientReconnectAutoDUnitTest.java    |   21 +-
 .../DurableClientReconnectDUnitTest.java        |   33 +-
 .../sockets/DurableClientStatsDUnitTest.java    |   43 +-
 .../sockets/DurableRegistrationDUnitTest.java   |   63 +-
 .../sockets/DurableResponseMatrixDUnitTest.java |   31 +-
 .../sockets/EventIDVerificationDUnitTest.java   |   31 +-
 .../EventIDVerificationInP2PDUnitTest.java      |   20 +-
 .../cache/tier/sockets/FaultyDelta.java         |   21 +-
 .../tier/sockets/FilterProfileJUnitTest.java    |   21 +-
 .../ForceInvalidateEvictionDUnitTest.java       |   31 +-
 ...ForceInvalidateOffHeapEvictionDUnitTest.java |   21 +-
 .../cache/tier/sockets/HABug36738DUnitTest.java |   21 +-
 .../cache/tier/sockets/HAInterestBaseTest.java  |   85 +-
 .../sockets/HAInterestDistributedTestCase.java  |   16 +
 .../tier/sockets/HAInterestPart1DUnitTest.java  |   22 +-
 .../tier/sockets/HAInterestPart2DUnitTest.java  |   57 +-
 .../sockets/HAStartupAndFailoverDUnitTest.java  |  102 +-
 .../internal/cache/tier/sockets/HaHelper.java   |   16 +
 .../tier/sockets/InterestListDUnitTest.java     |   25 +-
 .../sockets/InterestListEndpointDUnitTest.java  |   39 +-
 .../InterestListEndpointPRDUnitTest.java        |   21 +-
 .../InterestListEndpointSelectorDUnitTest.java  |   16 +
 .../sockets/InterestListFailoverDUnitTest.java  |   32 +-
 .../sockets/InterestListRecoveryDUnitTest.java  |   31 +-
 .../sockets/InterestRegrListenerDUnitTest.java  |   21 +-
 .../sockets/InterestResultPolicyDUnitTest.java  |   25 +-
 .../sockets/NewRegionAttributesDUnitTest.java   |   21 +-
 .../tier/sockets/ObjectPartListJUnitTest.java   |   21 +-
 .../tier/sockets/RedundancyLevelJUnitTest.java  |   34 +-
 .../sockets/RedundancyLevelPart1DUnitTest.java  |   25 +-
 .../sockets/RedundancyLevelPart2DUnitTest.java  |   21 +-
 .../sockets/RedundancyLevelPart3DUnitTest.java  |   27 +-
 .../tier/sockets/RedundancyLevelTestBase.java   |   72 +-
 .../tier/sockets/RegionCloseDUnitTest.java      |   35 +-
 ...erInterestBeforeRegionCreationDUnitTest.java |   27 +-
 .../sockets/RegisterInterestKeysDUnitTest.java  |   25 +-
 .../RegisterInterestKeysPRDUnitTest.java        |   21 +-
 .../sockets/ReliableMessagingDUnitTest.java     |   45 +-
 .../internal/cache/tier/sockets/TestPut.java    |   53 -
 .../sockets/UnregisterInterestDUnitTest.java    |   24 +-
 .../sockets/UpdatePropagationDUnitTest.java     |   31 +-
 .../sockets/UpdatePropagationPRDUnitTest.java   |   21 +-
 .../VerifyEventIDGenerationInP2PDUnitTest.java  |   20 +-
 ...UpdatesFromNonInterestEndPointDUnitTest.java |   25 +-
 .../tier/sockets/command/CommitCommandTest.java |   55 +
 .../cache/versions/RVVExceptionJUnitTest.java   |   21 +-
 .../versions/RegionVersionHolderJUnitTest.java  |   21 +-
 .../RegionVersionHolderRandomJUnitTest.java     |   21 +-
 ...RegionVersionHolderSmallBitSetJUnitTest.java |   21 +-
 .../versions/RegionVersionVectorJUnitTest.java  |  252 +-
 .../cache/wan/CompressionConstants.java         |   21 +-
 .../cache/wan/CompressionInputStream.java       |   21 +-
 .../cache/wan/CompressionOutputStream.java      |   21 +-
 .../cache/wan/CustomAsyncEventListener.java     |   21 +-
 .../gemfire/internal/cache/wan/Filter70.java    |   21 +-
 .../cache/wan/MyAsyncEventListener.java         |   21 +-
 .../cache/wan/MyAsyncEventListener2.java        |   21 +-
 .../cache/wan/MyDistributedSystemListener.java  |   21 +-
 .../cache/wan/MyGatewaySenderEventListener.java |   21 +-
 .../wan/MyGatewaySenderEventListener2.java      |   21 +-
 .../cache/wan/MyGatewayTransportFilter1.java    |   21 +-
 .../cache/wan/MyGatewayTransportFilter2.java    |   21 +-
 .../cache/wan/MyGatewayTransportFilter3.java    |   21 +-
 .../cache/wan/MyGatewayTransportFilter4.java    |   21 +-
 .../internal/cache/wan/QueueListener.java       |   21 +-
 .../AsyncEventQueueValidationsJUnitTest.java    |   21 +-
 .../xmlcache/AbstractXmlParserJUnitTest.java    |   21 +-
 .../cache/xmlcache/CacheCreationJUnitTest.java  |  209 +
 .../cache/xmlcache/CacheXmlParserJUnitTest.java |   21 +-
 .../xmlcache/CacheXmlVersionJUnitTest.java      |   17 +-
 .../PivotalEntityResolverJUnitTest.java         |   21 +-
 .../cache/xmlcache/RegionCreationJUnitTest.java |   21 +-
 .../xmlcache/XmlGeneratorUtilsJUnitTest.java    |   21 +-
 .../classpathloaderjunittest/DoesExist.java     |   16 +
 .../CompressionCacheConfigDUnitTest.java        |   21 +-
 .../CompressionCacheListenerDUnitTest.java      |   21 +-
 ...ompressionCacheListenerOffHeapDUnitTest.java |   16 +
 .../CompressionRegionConfigDUnitTest.java       |   22 +-
 .../CompressionRegionFactoryDUnitTest.java      |   21 +-
 .../CompressionRegionOperationsDUnitTest.java   |   21 +-
 ...ressionRegionOperationsOffHeapDUnitTest.java |   16 +
 .../compression/CompressionStatsDUnitTest.java  |   21 +-
 .../compression/SnappyCompressorJUnitTest.java  |   23 +-
 .../datasource/AbstractPoolCacheJUnitTest.java  |   21 +-
 .../internal/datasource/CleanUpJUnitTest.java   |   21 +-
 .../ConnectionPoolCacheImplJUnitTest.java       |   21 +-
 .../datasource/ConnectionPoolingJUnitTest.java  |   21 +-
 .../datasource/DataSourceFactoryJUnitTest.java  |   21 +-
 .../internal/datasource/RestartJUnitTest.java   |   21 +-
 .../internal/i18n/BasicI18nJUnitTest.java       |   82 +-
 .../io/CompositeOutputStreamJUnitTest.java      |   21 +-
 .../gemfire/internal/jndi/ContextJUnitTest.java |   21 +-
 .../internal/jta/BlockingTimeOutJUnitTest.java  |   21 +-
 .../gemfire/internal/jta/CacheUtils.java        |   21 +-
 .../internal/jta/DataSourceJTAJUnitTest.java    |   21 +-
 .../internal/jta/ExceptionJUnitTest.java        |   21 +-
 .../jta/GlobalTransactionJUnitTest.java         |   21 +-
 .../gemstone/gemfire/internal/jta/JTAUtils.java |   21 +-
 .../internal/jta/JtaIntegrationJUnitTest.java   |   16 +
 .../gemstone/gemfire/internal/jta/SyncImpl.java |   21 +-
 .../internal/jta/TransactionImplJUnitTest.java  |   21 +-
 .../jta/TransactionManagerImplJUnitTest.java    |   21 +-
 .../jta/TransactionTimeOutJUnitTest.java        |   21 +-
 .../jta/UserTransactionImplJUnitTest.java       |   21 +-
 .../internal/jta/dunit/CommitThread.java        |   21 +-
 .../internal/jta/dunit/ExceptionsDUnitTest.java |   21 +-
 .../jta/dunit/IdleTimeOutDUnitTest.java         |   21 +-
 .../jta/dunit/LoginTimeOutDUnitTest.java        |   21 +-
 .../jta/dunit/MaxPoolSizeDUnitTest.java         |   21 +-
 .../internal/jta/dunit/RollbackThread.java      |   21 +-
 .../jta/dunit/TransactionTimeOutDUnitTest.java  |   21 +-
 .../dunit/TxnManagerMultiThreadDUnitTest.java   |   21 +-
 .../internal/jta/dunit/TxnTimeOutDUnitTest.java |   21 +-
 .../internal/jta/functional/CacheJUnitTest.java |   21 +-
 .../jta/functional/TestXACacheLoader.java       |   21 +-
 .../internal/lang/ClassUtilsJUnitTest.java      |   21 +-
 .../internal/lang/InOutParameterJUnitTest.java  |   21 +-
 .../internal/lang/InitializerJUnitTest.java     |   21 +-
 .../internal/lang/ObjectUtilsJUnitTest.java     |   21 +-
 .../internal/lang/StringUtilsJUnitTest.java     |   21 +-
 .../internal/lang/SystemUtilsJUnitTest.java     |   21 +-
 .../internal/lang/ThreadUtilsJUnitTest.java     |   58 +-
 .../DistributedSystemLogFileJUnitTest.java      |   16 +
 .../logging/LocatorLogFileJUnitTest.java        |   16 +
 .../logging/LogServiceIntegrationJUnitTest.java |  114 +-
 .../LogServiceIntegrationTestSupport.java       |   16 +
 .../internal/logging/LogServiceJUnitTest.java   |   74 +-
 .../LogServiceUserDirIntegrationJUnitTest.java  |   70 -
 .../LogWriterDisabledPerformanceTest.java       |   16 +
 .../logging/LogWriterImplJUnitTest.java         |   16 +
 .../logging/LogWriterPerformanceTest.java       |   16 +
 .../logging/LoggingIntegrationTestSuite.java    |   22 +-
 .../logging/LoggingPerformanceTestCase.java     |   16 +
 .../internal/logging/LoggingUnitTestSuite.java  |   31 +-
 .../logging/MergeLogFilesJUnitTest.java         |   25 +-
 .../gemfire/internal/logging/NullLogWriter.java |   16 +
 .../internal/logging/SortLogFileJUnitTest.java  |   21 +-
 .../internal/logging/TestLogWriterFactory.java  |   16 +
 .../logging/log4j/AlertAppenderJUnitTest.java   |   16 +
 .../logging/log4j/ConfigLocatorJUnitTest.java   |   16 +
 .../log4j/FastLoggerIntegrationJUnitTest.java   |   20 +-
 .../logging/log4j/FastLoggerJUnitTest.java      |   16 +
 .../FastLoggerWithDefaultConfigJUnitTest.java   |   20 +-
 .../log4j/LocalizedMessageJUnitTest.java        |   25 +-
 .../log4j/Log4J2DisabledPerformanceTest.java    |   16 +
 .../logging/log4j/Log4J2PerformanceTest.java    |   16 +
 .../log4j/Log4jIntegrationTestSuite.java        |   16 +
 .../logging/log4j/Log4jUnitTestSuite.java       |   16 +
 .../log4j/LogWriterAppenderJUnitTest.java       |   16 +
 .../LogWriterLoggerDisabledPerformanceTest.java |   16 +
 .../log4j/LogWriterLoggerPerformanceTest.java   |   16 +
 .../internal/net/SocketUtilsJUnitTest.java      |   21 +-
 .../offheap/ByteArrayMemoryChunkJUnitTest.java  |   16 +
 .../offheap/ConcurrentBagJUnitTest.java         |  114 -
 .../internal/offheap/DataTypeJUnitTest.java     |   16 +
 .../DirectByteBufferMemoryChunkJUnitTest.java   |   16 +
 .../offheap/FreeListOffHeapRegionJUnitTest.java |   18 +-
 .../HeapByteBufferMemoryChunkJUnitTest.java     |   16 +
 .../internal/offheap/InlineKeyJUnitTest.java    |   16 +
 .../offheap/MemoryChunkJUnitTestBase.java       |   16 +
 .../offheap/NullOffHeapMemoryStats.java         |   22 +
 .../offheap/NullOutOfOffHeapMemoryListener.java |   22 +
 .../internal/offheap/OffHeapIndexJUnitTest.java |   16 +
 .../internal/offheap/OffHeapRegionBase.java     |   17 +-
 .../offheap/OffHeapStorageJUnitTest.java        |   16 +
 .../offheap/OffHeapValidationJUnitTest.java     |   17 +-
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |  115 +
 .../OldFreeListOffHeapRegionJUnitTest.java      |   18 +-
 .../offheap/OutOfOffHeapMemoryDUnitTest.java    |   43 +-
 ...mpleMemoryAllocatorFillPatternJUnitTest.java |   18 +-
 .../offheap/SimpleMemoryAllocatorJUnitTest.java |  394 +-
 ...moryAllocatorLifecycleListenerJUnitTest.java |   25 +-
 .../TxReleasesOffHeapOnCloseJUnitTest.java      |   16 +
 .../offheap/UnsafeMemoryChunkJUnitTest.java     |   16 +
 .../BlockingProcessStreamReaderJUnitTest.java   |   16 +
 .../LocalProcessControllerJUnitTest.java        |   21 +-
 .../process/LocalProcessLauncherDUnitTest.java  |   21 +-
 .../process/LocalProcessLauncherJUnitTest.java  |   21 +-
 ...NonBlockingProcessStreamReaderJUnitTest.java |   16 +
 .../internal/process/PidFileJUnitTest.java      |   16 +
 .../ProcessControllerFactoryJUnitTest.java      |   16 +
 .../process/ProcessStreamReaderTestCase.java    |   22 +-
 .../gemfire/internal/process/mbean/Process.java |   16 +
 .../internal/process/mbean/ProcessMBean.java    |   16 +
 ...tractSignalNotificationHandlerJUnitTest.java |   21 +-
 .../internal/size/ObjectSizerJUnitTest.java     |   21 +-
 .../internal/size/ObjectTraverserJUnitTest.java |   21 +-
 .../internal/size/ObjectTraverserPerf.java      |   21 +-
 .../size/SizeClassOnceObjectSizerJUnitTest.java |   21 +-
 .../gemfire/internal/size/SizeTestUtil.java     |   16 +
 .../size/WellKnownClassSizerJUnitTest.java      |   21 +-
 .../internal/statistics/DummyStatistics.java    |   21 +-
 .../statistics/SampleCollectorJUnitTest.java    |   21 +-
 .../statistics/StatMonitorHandlerJUnitTest.java |   21 +-
 .../statistics/StatisticsDUnitTest.java         |   21 +-
 .../statistics/StatisticsMonitorJUnitTest.java  |   21 +-
 .../internal/statistics/TestSampleHandler.java  |   21 +-
 .../statistics/TestStatArchiveWriter.java       |   21 +-
 .../statistics/TestStatisticsManager.java       |   21 +-
 .../statistics/TestStatisticsSampler.java       |   21 +-
 .../statistics/ValueMonitorJUnitTest.java       |   21 +-
 .../internal/stats50/AtomicStatsJUnitTest.java  |   37 +-
 .../internal/tcp/ConnectionJUnitTest.java       |   87 +
 .../util/AbortableTaskServiceJUnitTest.java     |   21 +-
 .../internal/util/ArrayUtilsJUnitTest.java      |   18 +-
 .../gemfire/internal/util/BytesJUnitTest.java   |   21 +-
 .../internal/util/CollectionUtilsJUnitTest.java |   18 +-
 .../internal/util/DelayedActionJUnitTest.java   |   21 +-
 .../gemfire/internal/util/IOUtilsJUnitTest.java |   21 +-
 .../gemfire/internal/util/SerializableImpl.java |   21 +-
 .../util/SerializableImplWithValue.java         |   21 +-
 .../gemfire/internal/util/Valuable.java         |   21 +-
 .../CompactConcurrentHashSetJUnitTest.java      |   16 +
 .../ConcurrentHashMapIteratorJUnitTest.java     |   21 +-
 .../concurrent/CopyOnWriteHashMapJUnitTest.java |  505 ++
 .../concurrent/ReentrantSemaphoreJUnitTest.java |   22 +-
 .../SemaphoreReadWriteLockJUnitTest.java        |   21 +-
 .../cm/ConcurrentHashMapJUnitTest.java          |   21 +-
 .../concurrent/cm/CountedMapLoopsJUnitTest.java |   21 +-
 .../concurrent/cm/IntMapCheckJUnitTest.java     |   21 +-
 .../util/concurrent/cm/LoopHelpers.java         |   21 +-
 .../util/concurrent/cm/MapCheckJUnitTest.java   |   21 +-
 .../util/concurrent/cm/MapLoopsJUnitTest.java   |   21 +-
 .../util/concurrent/cm/RLJBarJUnitTest.java     |   21 +-
 .../concurrent/cm/StringMapLoopsJUnitTest.java  |   21 +-
 .../management/CacheManagementDUnitTest.java    |   22 +-
 .../management/ClientHealthStatsDUnitTest.java  |   23 +-
 .../gemfire/management/CompositeStats.java      |   21 +-
 .../gemfire/management/CompositeTestMBean.java  |   21 +-
 .../gemfire/management/CompositeTestMXBean.java |   16 +
 .../management/CompositeTypeTestDUnitTest.java  |   21 +-
 .../gemfire/management/CustomMBean.java         |   22 +-
 .../gemfire/management/CustomMXBean.java        |   20 +-
 .../management/DLockManagementDUnitTest.java    |   20 +-
 .../DataBrowserJSONValidationJUnitTest.java     |   21 +-
 .../management/DiskManagementDUnitTest.java     |   20 +-
 .../management/DistributedSystemDUnitTest.java  |   81 +-
 .../management/LocatorManagementDUnitTest.java  |   25 +-
 .../gemstone/gemfire/management/MBeanUtil.java  |   20 +-
 .../gemfire/management/ManagementTestBase.java  |   21 +-
 .../MemberMBeanAttributesDUnitTest.java         |   20 +-
 .../management/OffHeapManagementDUnitTest.java  |   32 +-
 .../gemfire/management/QueryDataDUnitTest.java  |   21 +-
 .../management/RegionManagementDUnitTest.java   |   20 +-
 .../gemfire/management/TypedJsonJUnitTest.java  |   21 +-
 ...ersalMembershipListenerAdapterDUnitTest.java |   53 +-
 .../stats/AsyncEventQueueStatsJUnitTest.java    |   21 +-
 .../bean/stats/CacheServerStatsJUnitTest.java   |   21 +-
 .../bean/stats/DiskStatsJUnitTest.java          |   21 +-
 .../stats/DistributedSystemStatsDUnitTest.java  |   21 +-
 .../stats/DistributedSystemStatsJUnitTest.java  |   21 +-
 .../stats/GatewayReceiverStatsJUnitTest.java    |   21 +-
 .../bean/stats/GatewaySenderStatsJUnitTest.java |   21 +-
 .../HDFSRegionMBeanAttributeJUnitTest.java      |  169 -
 .../bean/stats/MBeanStatsTestCase.java          |   21 +-
 .../bean/stats/MemberLevelStatsJUnitTest.java   |   21 +-
 .../bean/stats/RegionStatsJUnitTest.java        |   21 +-
 .../bean/stats/StatsRateJUnitTest.java          |   21 +-
 .../internal/JettyHelperJUnitTest.java          |   21 +-
 .../cli/ClasspathScanLoadHelperJUnitTest.java   |   21 +-
 .../internal/cli/CliUtilDUnitTest.java          |   21 +-
 .../internal/cli/CommandManagerJUnitTest.java   |   21 +-
 .../cli/CommandSeparatorEscapeJUnitTest.java    |   16 +
 .../internal/cli/DataCommandJsonJUnitTest.java  |   16 +
 .../internal/cli/GfshParserJUnitTest.java       |   21 +-
 .../cli/annotations/CliArgumentJUnitTest.java   |   21 +-
 .../AbstractCommandsSupportJUnitTest.java       |   21 +-
 .../commands/DiskStoreCommandsJUnitTest.java    |   21 +-
 .../commands/HDFSStoreCommandsJUnitTest.java    |  838 ----
 .../HTTPServiceSSLSupportJUnitTest.java         |   20 +-
 .../cli/commands/IndexCommandsJUnitTest.java    |   21 +-
 .../RegionPathConverterJUnitTest.java           |   21 +-
 .../internal/cli/domain/AbstractImpl.java       |   16 +
 .../management/internal/cli/domain/Impl1.java   |   16 +
 .../management/internal/cli/domain/Impl12.java  |   16 +
 .../internal/cli/domain/Interface1.java         |   16 +
 .../internal/cli/domain/Interface2.java         |   16 +
 .../management/internal/cli/domain/Stock.java   |   21 +-
 .../management/internal/cli/dto/Car.java        |   16 +
 .../management/internal/cli/dto/Key1.java       |   21 +-
 .../management/internal/cli/dto/Key2.java       |   21 +-
 .../internal/cli/dto/ObjectWithCharAttr.java    |   21 +-
 .../management/internal/cli/dto/Value1.java     |   21 +-
 .../management/internal/cli/dto/Value2.java     |   21 +-
 .../AlterHDFSStoreFunctionJUnitTest.java        |  324 --
 .../CreateHDFSStoreFunctionJUnitTest.java       |  307 --
 .../functions/DataCommandFunctionJUnitTest.java |  132 +
 .../DescribeDiskStoreFunctionJUnitTest.java     |   21 +-
 .../DescribeHDFSStoreFunctionJUnitTest.java     |  364 --
 .../DestroyHDFSStoreFunctionJUnitTest.java      |  305 --
 .../ListDiskStoresFunctionJUnitTest.java        |   21 +-
 .../ListHDFSStoresFunctionJUnitTest.java        |  319 --
 .../functions/ListIndexFunctionJUnitTest.java   |   21 +-
 .../cli/parser/ParserUtilsJUnitTest.java        |   21 +-
 .../preprocessor/PreprocessorJUnitTest.java     |   21 +-
 .../PreprocessorUtilsJUnitTest.java             |   21 +-
 .../cli/shell/GfshConfigInitFileJUnitTest.java  |   16 +
 .../shell/GfshExecutionStrategyJUnitTest.java   |   21 +-
 .../cli/shell/GfshInitFileJUnitTest.java        |   16 +
 .../SharedConfigurationDUnitTest.java           |   21 +-
 .../configuration/ZipUtilsJUnitTest.java        |   21 +-
 .../domain/CacheElementJUnitTest.java           |   21 +-
 .../utils/XmlUtilsAddNewNodeJUnitTest.java      |   21 +-
 .../configuration/utils/XmlUtilsJUnitTest.java  |   21 +-
 .../internal/pulse/TestClientIdsDUnitTest.java  |   22 +-
 .../internal/pulse/TestFunctionsDUnitTest.java  |   22 +-
 .../internal/pulse/TestHeapDUnitTest.java       |   23 +-
 .../internal/pulse/TestLocatorsDUnitTest.java   |   22 +-
 .../pulse/TestSubscriptionsDUnitTest.java       |   20 +-
 .../security/ResourceOperationJUnit.java        |   16 +
 .../ReadOpFileAccessControllerJUnitTest.java    |   21 +-
 .../WanCommandsControllerJUnitTest.java         |   16 +
 .../gemfire/management/model/EmptyObject.java   |   21 +-
 .../gemstone/gemfire/management/model/Item.java |   21 +-
 .../gemfire/management/model/Order.java         |   21 +-
 .../gemfire/management/model/SubOrder.java      |   21 +-
 .../DomainObjectsAsValuesJUnitTest.java         |   21 +-
 .../GemcachedBinaryClientJUnitTest.java         |   21 +-
 .../GemcachedDevelopmentJUnitTest.java          |   21 +-
 .../gemfire/memcached/IntegrationJUnitTest.java |   24 +-
 .../gemfire/pdx/AutoSerializableJUnitTest.java  |   21 +-
 .../gemfire/pdx/ByteSourceJUnitTest.java        |   20 +-
 .../ClientsWithVersioningRetryDUnitTest.java    |   21 +-
 .../com/gemstone/gemfire/pdx/DSInsidePdx.java   |   23 +-
 .../pdx/DistributedSystemIdDUnitTest.java       |   21 +-
 .../com/gemstone/gemfire/pdx/DomainObject.java  |   21 +-
 .../gemstone/gemfire/pdx/DomainObjectBad.java   |   16 +
 .../gemfire/pdx/DomainObjectClassLoadable.java  |   16 +
 .../gemfire/pdx/DomainObjectPdxAuto.java        |   21 +-
 ...DomainObjectPdxAutoNoDefaultConstructor.java |   21 +-
 .../java/com/gemstone/gemfire/pdx/Employee.java |   23 +-
 .../pdx/JSONPdxClientServerDUnitTest.java       |   23 +-
 .../com/gemstone/gemfire/pdx/NestedPdx.java     |   21 +-
 .../gemfire/pdx/NonDelegatingLoader.java        |   23 +-
 .../OffHeapByteBufferByteSourceJUnitTest.java   |   18 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |   18 +-
 .../pdx/PDXAsyncEventQueueDUnitTest.java        |   22 +-
 .../gemfire/pdx/PdxAttributesJUnitTest.java     |   21 +-
 .../gemfire/pdx/PdxClientServerDUnitTest.java   |   21 +-
 .../pdx/PdxDeserializationDUnitTest.java        |   21 +-
 .../pdx/PdxFormatterPutGetJUnitTest.java        |   25 +-
 .../com/gemstone/gemfire/pdx/PdxInsideDS.java   |   23 +-
 .../pdx/PdxInstanceFactoryJUnitTest.java        |   21 +-
 .../gemfire/pdx/PdxInstanceJUnitTest.java       |   21 +-
 .../gemfire/pdx/PdxSerializableDUnitTest.java   |   21 +-
 .../gemfire/pdx/PdxSerializableJUnitTest.java   |   21 +-
 .../gemfire/pdx/PdxStringJUnitTest.java         |   21 +-
 .../gemfire/pdx/PdxTypeExportDUnitTest.java     |   21 +-
 .../gemfire/pdx/SeparateClassloaderPdx.java     |   23 +-
 .../com/gemstone/gemfire/pdx/SimpleClass.java   |   23 +-
 .../com/gemstone/gemfire/pdx/SimpleClass1.java  |   21 +-
 .../com/gemstone/gemfire/pdx/SimpleClass2.java  |   21 +-
 .../gemfire/pdx/TestObjectForPdxFormatter.java  |   21 +-
 .../gemfire/pdx/VersionClassLoader.java         |   22 +-
 .../gemstone/gemfire/redis/AuthJUnitTest.java   |   18 +-
 .../gemfire/redis/ConcurrentStartTest.java      |   16 +
 .../gemstone/gemfire/redis/HashesJUnitTest.java |   16 +
 .../gemstone/gemfire/redis/ListsJUnitTest.java  |   16 +
 .../gemfire/redis/RedisDistDUnitTest.java       |   45 +-
 .../gemstone/gemfire/redis/SetsJUnitTest.java   |   16 +
 .../gemfire/redis/SortedSetsJUnitTest.java      |   20 +-
 .../gemfire/redis/StringsJunitTest.java         |   16 +
 .../web/controllers/AddFreeItemToOrders.java    |   21 +-
 .../rest/internal/web/controllers/Customer.java |   21 +-
 .../internal/web/controllers/DateTimeUtils.java |   16 +
 .../rest/internal/web/controllers/Gender.java   |   16 +
 .../internal/web/controllers/GetAllEntries.java |   21 +-
 .../web/controllers/GetDeliveredOrders.java     |   21 +-
 .../internal/web/controllers/GetRegions.java    |   21 +-
 .../web/controllers/GetValueForKey.java         |   21 +-
 .../rest/internal/web/controllers/Item.java     |   21 +-
 .../rest/internal/web/controllers/Order.java    |   21 +-
 .../rest/internal/web/controllers/Person.java   |   21 +-
 .../web/controllers/PutKeyFunction.java         |   21 +-
 .../web/controllers/RestAPITestBase.java        |   16 +
 .../internal/web/controllers/RestTestUtils.java |   21 +-
 .../gemfire/test/golden/ExecutableProcess.java  |   16 +
 .../gemfire/test/golden/FailOutputTestCase.java |   16 +
 .../golden/FailWithErrorInOutputJUnitTest.java  |   16 +
 .../FailWithExtraLineInOutputJUnitTest.java     |   16 +
 ...WithLineMissingFromEndOfOutputJUnitTest.java |   16 +
 ...hLineMissingFromMiddleOfOutputJUnitTest.java |   16 +
 .../FailWithLoggerErrorInOutputJUnitTest.java   |   16 +
 .../FailWithLoggerFatalInOutputJUnitTest.java   |   16 +
 .../FailWithLoggerWarnInOutputJUnitTest.java    |   16 +
 .../golden/FailWithProblemInOutputTestCase.java |   16 +
 .../golden/FailWithSevereInOutputJUnitTest.java |   16 +
 ...hTimeoutOfWaitForOutputToMatchJUnitTest.java |   16 +
 .../FailWithWarningInOutputJUnitTest.java       |   16 +
 .../gemfire/test/golden/GoldenComparator.java   |   16 +
 .../test/golden/GoldenStringComparator.java     |   16 +
 .../gemfire/test/golden/GoldenTestCase.java     |   16 +
 .../golden/GoldenTestFrameworkTestSuite.java    |   16 +
 .../gemfire/test/golden/PassJUnitTest.java      |   16 +
 .../golden/PassWithExpectedErrorJUnitTest.java  |   16 +
 .../golden/PassWithExpectedProblemTestCase.java |   16 +
 .../golden/PassWithExpectedSevereJUnitTest.java |   16 +
 .../PassWithExpectedWarningJUnitTest.java       |   16 +
 .../test/golden/RegexGoldenComparator.java      |   16 +
 .../test/golden/StringGoldenComparator.java     |   16 +
 .../gemfire/test/process/MainLauncher.java      |   16 +
 .../test/process/MainLauncherJUnitTest.java     |   16 +
 .../gemfire/test/process/OutputFormatter.java   |   16 +
 .../test/process/ProcessOutputReader.java       |   16 +
 .../test/process/ProcessStreamReader.java       |   16 +
 .../process/ProcessTestFrameworkTestSuite.java  |   16 +
 .../gemfire/test/process/ProcessWrapper.java    |   16 +
 .../test/process/ProcessWrapperJUnitTest.java   |   16 +
 .../gemstone/gemfire/util/JSR166TestCase.java   |   22 +-
 .../gemstone/gemfire/util/test/TestUtil.java    |   16 +
 .../protocols/CacheTimeSlowDownDUnitTest.java   |  204 -
 .../GemFireTimeSyncProtocolDUnitTest.java       |  477 --
 .../JGroupsFailureDetectionJUnitTest.java       |  488 --
 .../protocols/JGroupsVersioningJUnitTest.java   |  343 --
 .../com/gemstone/persistence/admin/Logger.java  |   21 +-
 .../gemstone/persistence/logging/Formatter.java |   21 +-
 .../gemstone/persistence/logging/Handler.java   |   21 +-
 .../com/gemstone/persistence/logging/Level.java |   21 +-
 .../gemstone/persistence/logging/LogRecord.java |   21 +-
 .../gemstone/persistence/logging/Logger.java    |   21 +-
 .../persistence/logging/SimpleFormatter.java    |   21 +-
 .../persistence/logging/StreamHandler.java      |   21 +-
 .../test/java/com/gemstone/sequence/Arrow.java  |   21 +-
 .../java/com/gemstone/sequence/Lifeline.java    |   21 +-
 .../com/gemstone/sequence/LifelineState.java    |   21 +-
 .../java/com/gemstone/sequence/LineMapper.java  |   21 +-
 .../com/gemstone/sequence/SequenceDiagram.java  |   21 +-
 .../com/gemstone/sequence/SequencePanel.java    |   21 +-
 .../com/gemstone/sequence/StateColorMap.java    |   21 +-
 .../java/com/gemstone/sequence/TimeAxis.java    |   21 +-
 .../com/gemstone/sequence/ZoomingPanel.java     |   21 +-
 .../sequence/gemfire/DefaultLineMapper.java     |   21 +-
 .../gemfire/GemfireSequenceDisplay.java         |   21 +-
 .../sequence/gemfire/HydraLineMapper.java       |   21 +-
 .../sequence/gemfire/SelectGraphDialog.java     |   21 +-
 .../com/main/MyDistributedSystemListener.java   |   21 +-
 .../com/main/WANBootStrapping_Site1_Add.java    |   21 +-
 .../com/main/WANBootStrapping_Site1_Remove.java |   21 +-
 .../com/main/WANBootStrapping_Site2_Add.java    |   21 +-
 .../com/main/WANBootStrapping_Site2_Remove.java |   21 +-
 .../src/test/java/dunit/AsyncInvocation.java    |   21 +-
 .../src/test/java/dunit/BounceResult.java       |   16 +
 gemfire-core/src/test/java/dunit/DUnitEnv.java  |   21 +-
 .../test/java/dunit/DistributedTestCase.java    |  150 +-
 gemfire-core/src/test/java/dunit/Host.java      |   21 +-
 .../src/test/java/dunit/RMIException.java       |   21 +-
 .../src/test/java/dunit/RemoteDUnitVMIF.java    |   16 +
 .../src/test/java/dunit/RepeatableRunnable.java |   16 +
 .../test/java/dunit/SerializableCallable.java   |   21 +-
 .../test/java/dunit/SerializableRunnable.java   |   21 +-
 gemfire-core/src/test/java/dunit/VM.java        |   21 +-
 .../src/test/java/dunit/standalone/ChildVM.java |   25 +-
 .../java/dunit/standalone/DUnitLauncher.java    |   41 +-
 .../java/dunit/standalone/ProcessManager.java   |   48 +-
 .../java/dunit/standalone/RemoteDUnitVM.java    |   21 +-
 .../dunit/standalone/StandAloneDUnitEnv.java    |   21 +-
 .../test/java/dunit/tests/BasicDUnitTest.java   |   21 +-
 .../src/test/java/dunit/tests/TestFailure.java  |   21 +-
 .../src/test/java/dunit/tests/VMDUnitTest.java  |   21 +-
 gemfire-core/src/test/java/hydra/GsRandom.java  |   21 +-
 .../test/java/hydra/HydraRuntimeException.java  |   21 +-
 gemfire-core/src/test/java/hydra/Log.java       |   21 +-
 .../src/test/java/hydra/LogVersionHelper.java   |   21 +-
 .../src/test/java/hydra/MethExecutor.java       |   21 +-
 .../src/test/java/hydra/MethExecutorResult.java |   21 +-
 .../src/test/java/hydra/SchedulingOrder.java    |   21 +-
 .../src/test/java/hydra/log/AnyLogWriter.java   |   23 +-
 .../java/hydra/log/CircularOutputStream.java    |   21 +-
 .../parReg/query/unittest/NewPortfolio.java     |   21 +-
 .../java/parReg/query/unittest/Position.java    |   22 +-
 .../src/test/java/perffmwk/Formatter.java       |   22 +-
 .../templates/security/DummyAuthenticator.java  |   21 +-
 .../templates/security/DummyAuthorization.java  |   21 +-
 .../security/FunctionSecurityPrmsHolder.java    |   21 +-
 .../security/LdapUserAuthenticator.java         |   21 +-
 .../java/templates/security/PKCSAuthInit.java   |   21 +-
 .../templates/security/PKCSAuthenticator.java   |   21 +-
 .../java/templates/security/PKCSPrincipal.java  |   21 +-
 .../security/UserPasswordAuthInit.java          |   21 +-
 .../templates/security/UsernamePrincipal.java   |   21 +-
 .../templates/security/XmlAuthorization.java    |   21 +-
 .../templates/security/XmlErrorHandler.java     |   21 +-
 .../src/test/java/util/TestException.java       |   21 +-
 ...gemstone.gemfire.internal.cache.CacheService |    1 +
 .../cache/client/internal/cacheserver.cer       |  Bin 0 -> 782 bytes
 .../cache/client/internal/cacheserver.keystore  |  Bin 0 -> 1253 bytes
 .../client/internal/cacheserver.truststore      |  Bin 0 -> 844 bytes
 .../gemfire/cache/client/internal/client.cer    |  Bin 0 -> 782 bytes
 .../cache/client/internal/client.keystore       |  Bin 0 -> 1251 bytes
 .../cache/client/internal/client.truststore     |  Bin 0 -> 846 bytes
 .../cache/client/internal/default.keystore      |  Bin 0 -> 1115 bytes
 .../cache/client/internal/trusted.keystore      |  Bin 0 -> 1078 bytes
 .../gemfire/codeAnalysis/excludedClasses.txt    |    3 +-
 .../sanctionedDataSerializables.txt             | 1835 ++++---
 .../codeAnalysis/sanctionedSerializables.txt    |  158 +-
 .../tier/sockets/RedundancyLevelJUnitTest.xml   |   21 +-
 .../resources/templates/security/authz5_5.dtd   |   16 +
 .../resources/templates/security/authz6_0.dtd   |   16 +
 gemfire-jgroups/build.gradle                    |   39 -
 .../java/com/gemstone/org/jgroups/Address.java  |   46 -
 .../com/gemstone/org/jgroups/BlockEvent.java    |   15 -
 .../java/com/gemstone/org/jgroups/Channel.java  |  508 --
 .../org/jgroups/ChannelClosedException.java     |   27 -
 .../gemstone/org/jgroups/ChannelException.java  |   28 -
 .../gemstone/org/jgroups/ChannelFactory.java    |   38 -
 .../gemstone/org/jgroups/ChannelListener.java   |   20 -
 .../jgroups/ChannelNotConnectedException.java   |   26 -
 .../java/com/gemstone/org/jgroups/Event.java    |  225 -
 .../com/gemstone/org/jgroups/ExitEvent.java     |   14 -
 .../com/gemstone/org/jgroups/GetStateEvent.java |   22 -
 .../java/com/gemstone/org/jgroups/Global.java   |   44 -
 .../java/com/gemstone/org/jgroups/Header.java   |   51 -
 .../java/com/gemstone/org/jgroups/JChannel.java | 1725 -------
 .../gemstone/org/jgroups/JChannelFactory.java   |  129 -
 .../gemstone/org/jgroups/JGroupsVersion.java    |   95 -
 .../com/gemstone/org/jgroups/Membership.java    |  358 --
 .../org/jgroups/MembershipListener.java         |   53 -
 .../com/gemstone/org/jgroups/MergeView.java     |  166 -
 .../java/com/gemstone/org/jgroups/Message.java  |  784 ---
 .../com/gemstone/org/jgroups/Message.java.old   |  711 ---
 .../gemstone/org/jgroups/MessageListener.java   |   34 -
 .../java/com/gemstone/org/jgroups/Receiver.java |   13 -
 .../gemstone/org/jgroups/ReceiverAdapter.java   |   35 -
 .../com/gemstone/org/jgroups/SetStateEvent.java |   37 -
 .../org/jgroups/ShunnedAddressException.java    |   14 -
 .../com/gemstone/org/jgroups/SuspectEvent.java  |   26 -
 .../com/gemstone/org/jgroups/SuspectMember.java |   42 -
 .../org/jgroups/SuspectedException.java         |   21 -
 .../gemstone/org/jgroups/TimeoutException.java  |   43 -
 .../com/gemstone/org/jgroups/Transport.java     |   22 -
 .../com/gemstone/org/jgroups/UpHandler.java     |   18 -
 .../java/com/gemstone/org/jgroups/View.java     |  528 --
 .../java/com/gemstone/org/jgroups/ViewId.java   |  174 -
 .../org/jgroups/blocks/ConnectionTable.java     | 1051 ----
 .../org/jgroups/blocks/ConnectionTableNIO.java  | 1519 ------
 .../jgroups/blocks/DistributedHashtable.java    |  656 ---
 .../jgroups/blocks/DistributedLockManager.java  |  742 ---
 .../org/jgroups/blocks/DistributedQueue.java    |  758 ---
 .../org/jgroups/blocks/DistributedTree.java     |  756 ---
 .../org/jgroups/blocks/GroupRequest.java        |  636 ---
 .../org/jgroups/blocks/GroupRequest.java.old    |  641 ---
 .../com/gemstone/org/jgroups/blocks/Link.java   |  680 ---
 .../com/gemstone/org/jgroups/blocks/Link.txt    |   48 -
 .../org/jgroups/blocks/LockManager.java         |   87 -
 .../blocks/LockMultiLockedException.java        |   26 -
 .../jgroups/blocks/LockNotGrantedException.java |   24 -
 .../blocks/LockNotReleasedException.java        |   24 -
 .../org/jgroups/blocks/LockingException.java    |   38 -
 .../org/jgroups/blocks/LogicalLink.java         |  340 --
 .../blocks/MembershipListenerAdapter.java       |   91 -
 .../org/jgroups/blocks/MessageDispatcher.java   |  845 ----
 .../jgroups/blocks/MessageListenerAdapter.java  |  123 -
 .../gemstone/org/jgroups/blocks/MethodCall.java |  529 --
 .../org/jgroups/blocks/MethodLookup.java        |   15 -
 .../org/jgroups/blocks/NBMessageForm_NIO.java   |   94 -
 .../org/jgroups/blocks/NotificationBus.java     |  458 --
 .../org/jgroups/blocks/PullPushAdapter.java     |  434 --
 .../org/jgroups/blocks/ReplicatedHashtable.java |  530 --
 .../org/jgroups/blocks/ReplicatedTree.java      | 1121 -----
 .../org/jgroups/blocks/ReplicationData.java     |  148 -
 .../org/jgroups/blocks/ReplicationManager.java  |  345 --
 .../org/jgroups/blocks/ReplicationReceiver.java |   69 -
 .../org/jgroups/blocks/RequestCorrelator.java   |  911 ----
 .../org/jgroups/blocks/RequestHandler.java      |   15 -
 .../org/jgroups/blocks/RpcDispatcher.java       |  392 --
 .../org/jgroups/blocks/RspCollector.java        |   18 -
 .../jgroups/blocks/TwoPhaseVotingAdapter.java   |  173 -
 .../jgroups/blocks/TwoPhaseVotingListener.java  |   35 -
 .../org/jgroups/blocks/UpdateException.java     |   19 -
 .../org/jgroups/blocks/VoteException.java       |   19 -
 .../jgroups/blocks/VoteResponseProcessor.java   |   31 -
 .../org/jgroups/blocks/VotingAdapter.java       |  472 --
 .../org/jgroups/blocks/VotingListener.java      |   26 -
 .../com/gemstone/org/jgroups/blocks/Xid.java    |  164 -
 .../gemstone/org/jgroups/blocks/package.html    |   13 -
 .../org/jgroups/conf/ClassConfigurator.java     |  228 -
 .../com/gemstone/org/jgroups/conf/ClassMap.java |   75 -
 .../jgroups/conf/ClassPathEntityResolver.java   |   63 -
 .../org/jgroups/conf/ConfiguratorFactory.java   |  449 --
 .../org/jgroups/conf/MagicNumberReader.java     |  402 --
 .../org/jgroups/conf/PlainConfigurator.java     |   48 -
 .../gemstone/org/jgroups/conf/ProtocolData.java |  130 -
 .../org/jgroups/conf/ProtocolParameter.java     |   64 -
 .../jgroups/conf/ProtocolStackConfigurator.java |   18 -
 .../org/jgroups/conf/XmlConfigurator.java       |  463 --
 .../gemstone/org/jgroups/conf/XmlValidator.java |  146 -
 .../com/gemstone/org/jgroups/conf/package.html  |    5 -
 .../gemstone/org/jgroups/debug/Debugger.java    |  133 -
 .../org/jgroups/debug/JChannelTestHook.java     |   14 -
 .../gemstone/org/jgroups/debug/Profiler.java    |  160 -
 .../org/jgroups/debug/ProtocolSpecificView.java |   24 -
 .../org/jgroups/debug/ProtocolTester.java       |  142 -
 .../org/jgroups/debug/ProtocolView.java         |   90 -
 .../gemstone/org/jgroups/debug/QUEUEView.java   |   28 -
 .../gemstone/org/jgroups/debug/Simulator.java   |  249 -
 .../com/gemstone/org/jgroups/debug/package.html |    5 -
 .../com/gemstone/org/jgroups/gemstonizing.txt   |   28 -
 .../org/jgroups/oswego/concurrent/Barrier.java  |   65 -
 .../oswego/concurrent/BoundedBuffer.java        |  190 -
 .../oswego/concurrent/BoundedChannel.java       |   37 -
 .../oswego/concurrent/BoundedLinkedQueue.java   |  384 --
 .../oswego/concurrent/BoundedPriorityQueue.java |  123 -
 .../concurrent/BrokenBarrierException.java      |   48 -
 .../org/jgroups/oswego/concurrent/Callable.java |   39 -
 .../org/jgroups/oswego/concurrent/Channel.java  |  309 --
 .../jgroups/oswego/concurrent/ClockDaemon.java  |  403 --
 .../org/jgroups/oswego/concurrent/CondVar.java  |  277 --
 .../jgroups/oswego/concurrent/CountDown.java    |  126 -
 .../oswego/concurrent/CyclicBarrier.java        |  299 --
 .../concurrent/DefaultChannelCapacity.java      |   58 -
 .../oswego/concurrent/DirectExecutor.java       |   36 -
 .../org/jgroups/oswego/concurrent/Executor.java |   70 -
 .../oswego/concurrent/FIFOReadWriteLock.java    |  198 -
 .../oswego/concurrent/FIFOSemaphore.java        |   84 -
 .../org/jgroups/oswego/concurrent/FJTask.java   |  535 --
 .../jgroups/oswego/concurrent/FJTaskRunner.java |  979 ----
 .../oswego/concurrent/FJTaskRunnerGroup.java    |  625 ---
 .../jgroups/oswego/concurrent/FutureResult.java |  209 -
 .../org/jgroups/oswego/concurrent/Heap.java     |  151 -
 .../org/jgroups/oswego/concurrent/Latch.java    |  103 -
 .../jgroups/oswego/concurrent/LayeredSync.java  |   96 -
 .../jgroups/oswego/concurrent/LinkedNode.java   |   29 -
 .../jgroups/oswego/concurrent/LinkedQueue.java  |  192 -
 .../oswego/concurrent/LockedExecutor.java       |   62 -
 .../org/jgroups/oswego/concurrent/Mutex.java    |  173 -
 .../org/jgroups/oswego/concurrent/NullSync.java |   51 -
 .../oswego/concurrent/PooledExecutor.java       |  924 ----
 .../oswego/concurrent/PrioritySemaphore.java    |   96 -
 .../concurrent/PropertyChangeMulticaster.java   |  466 --
 .../org/jgroups/oswego/concurrent/Puttable.java |   68 -
 .../oswego/concurrent/QueuedExecutor.java       |  220 -
 .../oswego/concurrent/QueuedSemaphore.java      |  181 -
 .../oswego/concurrent/ReadWriteLock.java        |   86 -
 .../ReaderPreferenceReadWriteLock.java          |   35 -
 .../oswego/concurrent/ReentrantLock.java        |  151 -
 .../ReentrantWriterPreferenceReadWriteLock.java |  169 -
 .../jgroups/oswego/concurrent/Rendezvous.java   |  422 --
 .../jgroups/oswego/concurrent/Semaphore.java    |  193 -
 .../concurrent/SemaphoreControlledChannel.java  |  164 -
 .../org/jgroups/oswego/concurrent/Slot.java     |   88 -
 .../org/jgroups/oswego/concurrent/Sync.java     |  344 --
 .../oswego/concurrent/SyncCollection.java       |  514 --
 .../org/jgroups/oswego/concurrent/SyncList.java |  327 --
 .../org/jgroups/oswego/concurrent/SyncMap.java  |  314 --
 .../org/jgroups/oswego/concurrent/SyncSet.java  |   82 -
 .../oswego/concurrent/SyncSortedMap.java        |  129 -
 .../oswego/concurrent/SyncSortedSet.java        |  129 -
 .../oswego/concurrent/SynchronizedBoolean.java  |  182 -
 .../oswego/concurrent/SynchronizedByte.java     |  253 -
 .../oswego/concurrent/SynchronizedChar.java     |  176 -
 .../oswego/concurrent/SynchronizedDouble.java   |  181 -
 .../oswego/concurrent/SynchronizedFloat.java    |  181 -
 .../oswego/concurrent/SynchronizedInt.java      |  250 -
 .../oswego/concurrent/SynchronizedLong.java     |  252 -
 .../oswego/concurrent/SynchronizedRef.java      |  107 -
 .../oswego/concurrent/SynchronizedShort.java    |  254 -
 .../oswego/concurrent/SynchronizedVariable.java |  209 -
 .../oswego/concurrent/SynchronousChannel.java   |  379 --
 .../org/jgroups/oswego/concurrent/Takable.java  |   67 -
 .../oswego/concurrent/ThreadFactory.java        |   35 -
 .../oswego/concurrent/ThreadFactoryUser.java    |   62 -
 .../oswego/concurrent/ThreadedExecutor.java     |   40 -
 .../oswego/concurrent/TimedCallable.java        |   68 -
 .../oswego/concurrent/TimeoutException.java     |   53 -
 .../jgroups/oswego/concurrent/TimeoutSync.java  |   75 -
 .../concurrent/VetoableChangeMulticaster.java   |  577 ---
 .../oswego/concurrent/WaitFreeQueue.java        |  208 -
 .../oswego/concurrent/WaitableBoolean.java      |  141 -
 .../jgroups/oswego/concurrent/WaitableByte.java |  238 -
 .../jgroups/oswego/concurrent/WaitableChar.java |  170 -
 .../oswego/concurrent/WaitableDouble.java       |  173 -
 .../oswego/concurrent/WaitableFloat.java        |  173 -
 .../jgroups/oswego/concurrent/WaitableInt.java  |  239 -
 .../jgroups/oswego/concurrent/WaitableLong.java |  239 -
 .../jgroups/oswego/concurrent/WaitableRef.java  |  112 -
 .../oswego/concurrent/WaitableShort.java        |  238 -
 .../concurrent/WaiterPreferenceSemaphore.java   |  155 -
 .../WriterPreferenceReadWriteLock.java          |  337 --
 .../org/jgroups/oswego/concurrent/package.html  |  998 ----
 .../java/com/gemstone/org/jgroups/overview.html |   15 -
 .../java/com/gemstone/org/jgroups/package.html  |    5 -
 .../persistence/CannotConnectException.java     |   55 -
 .../CannotCreateSchemaException.java            |   45 -
 .../persistence/CannotPersistException.java     |   44 -
 .../persistence/CannotRemoveException.java      |   45 -
 .../persistence/CannotRetrieveException.java    |   44 -
 .../persistence/DBPersistenceManager.java       |  877 ----
 .../persistence/FilePersistenceManager.java     |  173 -
 .../jgroups/persistence/PersistenceFactory.java |  207 -
 .../jgroups/persistence/PersistenceManager.java |   69 -
 .../org/jgroups/persistence/package.html        |    5 -
 .../com/gemstone/org/jgroups/primarychanges.txt |   80 -
 .../gemstone/org/jgroups/protocols/AUTH.java    |  438 --
 .../org/jgroups/protocols/AUTOCONF.java         |  249 -
 .../org/jgroups/protocols/AuthHeader.java       |  108 -
 .../gemstone/org/jgroups/protocols/CAUSAL.java  |  296 --
 .../org/jgroups/protocols/COMPRESS.java         |  188 -
 .../org/jgroups/protocols/DEADLOCK.java         |  250 -
 .../gemstone/org/jgroups/protocols/DELAY.java   |  116 -
 .../com/gemstone/org/jgroups/protocols/DESIGN   |  283 --
 .../gemstone/org/jgroups/protocols/DISCARD.java |  150 -
 .../gemstone/org/jgroups/protocols/DUMMY.java   |   85 -
 .../org/jgroups/protocols/DUMMY_TP.java         |   84 -
 .../gemstone/org/jgroups/protocols/Digest.java  |   38 -
 .../org/jgroups/protocols/Discovery.java        |  484 --
 .../gemstone/org/jgroups/protocols/ENCRYPT.java | 1390 ------
 .../org/jgroups/protocols/ENCRYPT1_4.java       |  566 ---
 .../gemstone/org/jgroups/protocols/EXAMPLE.java |  104 -
 .../com/gemstone/org/jgroups/protocols/FC.java  | 1025 ----
 .../com/gemstone/org/jgroups/protocols/FD.java  | 1100 -----
 .../gemstone/org/jgroups/protocols/FD_PID.java  |  640 ---
 .../gemstone/org/jgroups/protocols/FD_PROB.java |  628 ---
 .../org/jgroups/protocols/FD_SIMPLE.java        |  357 --
 .../gemstone/org/jgroups/protocols/FD_SOCK.java | 2654 ----------
 .../org/jgroups/protocols/FD_SOCK.java.new      | 1153 -----
 .../org/jgroups/protocols/FLOWCONTROL.java      |   89 -
 .../org/jgroups/protocols/FLOW_CONTROL.java     |  317 --
 .../gemstone/org/jgroups/protocols/FLUSH.java   |  466 --
 .../gemstone/org/jgroups/protocols/FRAG.java    |  572 ---
 .../gemstone/org/jgroups/protocols/FRAG2.java   |  773 ---
 .../gemstone/org/jgroups/protocols/FRAG3.java   |   35 -
 .../org/jgroups/protocols/FlushRsp.java         |   31 -
 .../org/jgroups/protocols/FragHeader.java       |   80 -
 .../gemstone/org/jgroups/protocols/GMS.java.rmi |  219 -
 .../org/jgroups/protocols/GemFireTimeSync.java  |  720 ---
 .../gemstone/org/jgroups/protocols/HDRS.java    |   53 -
 .../gemstone/org/jgroups/protocols/HTOTAL.java  |  207 -
 .../org/jgroups/protocols/LOOPBACK.java         |  115 -
 .../gemstone/org/jgroups/protocols/LOSS.java    |  118 -
 .../gemstone/org/jgroups/protocols/MERGE.java   |  376 --
 .../gemstone/org/jgroups/protocols/MERGE2.java  |  362 --
 .../gemstone/org/jgroups/protocols/MERGE3.java  |  312 --
 .../org/jgroups/protocols/MERGEFAST.java        |  118 -
 .../protocols/MessageProtocolEXAMPLE.java       |   64 -
 .../protocols/NAKACK.java.MessageProtocol       |  422 --
 .../org/jgroups/protocols/NAKACK.java.separate  |  484 --
 .../org/jgroups/protocols/NakAckHeader.java     |  113 -
 .../org/jgroups/protocols/PARTITIONER.java      |  185 -
 .../gemstone/org/jgroups/protocols/PERF.java    |  284 --
 .../gemstone/org/jgroups/protocols/PERF_TP.java |  172 -
 .../org/jgroups/protocols/PIGGYBACK.java        |  271 --
 .../gemstone/org/jgroups/protocols/PING.java    |  297 --
 .../org/jgroups/protocols/PRINTMETHODS.java     |   64 -
 .../org/jgroups/protocols/PRINTOBJS.java        |  120 -
 .../org/jgroups/protocols/PerfHeader.java       |  451 --
 .../org/jgroups/protocols/PingHeader.java       |   79 -
 .../gemstone/org/jgroups/protocols/PingRsp.java |  107 -
 .../org/jgroups/protocols/PingSender.java       |  109 -
 .../org/jgroups/protocols/PingWaiter.java       |  301 --
 .../gemstone/org/jgroups/protocols/QUEUE.java   |  184 -
 .../jgroups/protocols/RpcProtocolEXAMPLE.java   |   64 -
 .../gemstone/org/jgroups/protocols/SHUFFLE.java |  146 -
 .../gemstone/org/jgroups/protocols/SIZE.java    |  186 -
 .../gemstone/org/jgroups/protocols/SMACK.java   |  392 --
 .../org/jgroups/protocols/STATE_TRANSFER.java   |  448 --
 .../gemstone/org/jgroups/protocols/STATS.java   |  211 -
 .../com/gemstone/org/jgroups/protocols/TCP.java |  308 --
 .../org/jgroups/protocols/TCPGOSSIP.java        |  429 --
 .../gemstone/org/jgroups/protocols/TCPPING.java |  144 -
 .../gemstone/org/jgroups/protocols/TCP_NIO.java |  118 -
 .../gemstone/org/jgroups/protocols/TOTAL.java   | 1055 ----
 .../com/gemstone/org/jgroups/protocols/TP.java  | 2012 --------
 .../gemstone/org/jgroups/protocols/TP.java.mt   | 1522 ------
 .../gemstone/org/jgroups/protocols/TRACE.java   |   47 -
 .../gemstone/org/jgroups/protocols/TUNNEL.java  |  459 --
 .../org/jgroups/protocols/TcpHeader.java        |   55 -
 .../org/jgroups/protocols/TpHeader.java         |   64 -
 .../protocols/TransportedVectorTime.java        |  185 -
 .../org/jgroups/protocols/TunnelHeader.java     |   47 -
 .../com/gemstone/org/jgroups/protocols/UDP.java | 1462 ------
 .../gemstone/org/jgroups/protocols/UDP.java.mt  | 1005 ----
 .../jgroups/protocols/UDP.java.packethandler    |  592 ---
 .../gemstone/org/jgroups/protocols/UDP_NIO.java | 1567 ------
 .../gemstone/org/jgroups/protocols/UNICAST.java |  977 ----
 .../org/jgroups/protocols/UdpHeader.java        |   62 -
 .../org/jgroups/protocols/VERIFY_SUSPECT.java   |  470 --
 .../org/jgroups/protocols/VIEW_ENFORCER.java    |   81 -
 .../org/jgroups/protocols/VIEW_SYNC.java        |  499 --
 .../org/jgroups/protocols/VectorTime.java       |  270 -
 .../gemstone/org/jgroups/protocols/WANPING.java |  106 -
 .../gemstone/org/jgroups/protocols/WANPIPE.java |  441 --
 .../org/jgroups/protocols/WanPipeAddress.java   |  140 -
 .../gemstone/org/jgroups/protocols/dump2.log    |    0
 .../jgroups/protocols/obsolete/ENCRYPT.java.txt |  408 --
 .../org/jgroups/protocols/obsolete/FC.java.txt  |  643 ---
 .../jgroups/protocols/obsolete/FD_RAND.java.txt |  287 --
 .../jgroups/protocols/obsolete/FD_SHUN.java.txt |  323 --
 .../org/jgroups/protocols/obsolete/TCP.java.txt |  493 --
 .../org/jgroups/protocols/obsolete/UDP.java.txt | 1921 --------
 .../jgroups/protocols/obsolete/UNIFORM.java.txt |  349 --
 .../gemstone/org/jgroups/protocols/package.html |    6 -
 .../jgroups/protocols/pbcast/ClientGmsImpl.java |  907 ----
 .../jgroups/protocols/pbcast/CoordGmsImpl.java  | 1103 -----
 .../org/jgroups/protocols/pbcast/DESIGN         |  478 --
 .../org/jgroups/protocols/pbcast/Digest.java    |  534 --
 .../jgroups/protocols/pbcast/Digest.java.old    |  558 ---
 .../org/jgroups/protocols/pbcast/FD.java        |  273 --
 .../org/jgroups/protocols/pbcast/GMS.java       | 2732 -----------
 .../org/jgroups/protocols/pbcast/GmsImpl.java   |  111 -
 .../org/jgroups/protocols/pbcast/Gossip.java    |  134 -
 .../org/jgroups/protocols/pbcast/JoinRsp.java   |  126 -
 .../org/jgroups/protocols/pbcast/MergeData.java |  118 -
 .../org/jgroups/protocols/pbcast/NAKACK.java    | 1631 -------
 .../jgroups/protocols/pbcast/NakAckHeader.java  |  148 -
 .../org/jgroups/protocols/pbcast/PBCAST.java    | 1043 ----
 .../protocols/pbcast/ParticipantGmsImpl.java    |  371 --
 .../jgroups/protocols/pbcast/PbcastHeader.java  |  110 -
 .../org/jgroups/protocols/pbcast/README         |  140 -
 .../org/jgroups/protocols/pbcast/STABLE.java    |  907 ----
 .../jgroups/protocols/pbcast/STABLE.java.latest |  897 ----
 .../jgroups/protocols/pbcast/STABLE.java.new    |  890 ----
 .../jgroups/protocols/pbcast/STABLE.java.old    |  855 ----
 .../protocols/pbcast/STATE_TRANSFER.java        |  461 --
 .../org/jgroups/protocols/pbcast/package.html   |    5 -
 .../org/jgroups/protocols/ring/RingNode.java    |   26 -
 .../protocols/ring/RingNodeFlowControl.java     |  135 -
 .../org/jgroups/protocols/ring/RingToken.java   |  245 -
 .../org/jgroups/protocols/ring/TcpRingNode.java |  205 -
 .../protocols/ring/TokenLostException.java      |   63 -
 .../org/jgroups/protocols/ring/package.html     |    5 -
 .../org/jgroups/spi/GFBasicAdapter.java         |   96 -
 .../gemstone/org/jgroups/spi/GFPeerAdapter.java |  169 -
 .../jgroups/stack/AckMcastReceiverWindow.java   |  169 -
 .../org/jgroups/stack/AckMcastSenderWindow.java |  601 ---
 .../org/jgroups/stack/AckReceiverWindow.java    |  184 -
 .../org/jgroups/stack/AckSenderWindow.java      |  354 --
 .../org/jgroups/stack/BoundedLinkedHashMap.java |   82 -
 .../org/jgroups/stack/Configurator.java         |  764 ---
 .../org/jgroups/stack/GFBasicAdapterImpl.java   |  580 ---
 .../org/jgroups/stack/GFPeerAdapterImpl.java    |  322 --
 .../org/jgroups/stack/GossipClient.java         |  819 ----
 .../gemstone/org/jgroups/stack/GossipData.java  |  232 -
 .../org/jgroups/stack/GossipServer.java         |  633 ---
 .../gemstone/org/jgroups/stack/Interval.java    |   40 -
 .../gemstone/org/jgroups/stack/IpAddress.java   |  780 ---
 .../org/jgroups/stack/LogicalAddress.java       |  370 --
 .../org/jgroups/stack/MessageProtocol.java      |  243 -
 .../org/jgroups/stack/NakReceiverWindow.java    |  914 ----
 .../gemstone/org/jgroups/stack/Protocol.java    |  837 ----
 .../org/jgroups/stack/ProtocolObserver.java     |   81 -
 .../org/jgroups/stack/ProtocolStack.java        |  506 --
 .../org/jgroups/stack/Retransmitter.java        |  480 --
 .../com/gemstone/org/jgroups/stack/Router.java  |  577 ---
 .../gemstone/org/jgroups/stack/RouterStub.java  |  419 --
 .../gemstone/org/jgroups/stack/RpcProtocol.java |  166 -
 .../org/jgroups/stack/SockCreatorImpl.java      |   48 -
 .../org/jgroups/stack/StateTransferInfo.java    |   64 -
 .../com/gemstone/org/jgroups/stack/package.html |    5 -
 .../gemstone/org/jgroups/util/AckCollector.java |  149 -
 .../gemstone/org/jgroups/util/BoundedList.java  |   53 -
 .../com/gemstone/org/jgroups/util/Buffer.java   |   64 -
 .../com/gemstone/org/jgroups/util/Command.java  |   16 -
 .../com/gemstone/org/jgroups/util/CondVar.java  |  139 -
 .../org/jgroups/util/ConnectionWatcher.java     |   25 -
 .../jgroups/util/ContextObjectInputStream.java  |   91 -
 .../util/ExposedBufferedInputStream.java        |   61 -
 .../util/ExposedBufferedOutputStream.java       |   44 -
 .../util/ExposedByteArrayInputStream.java       |   58 -
 .../util/ExposedByteArrayOutputStream.java      |   31 -
 .../jgroups/util/ExposedDataOutputStream.java   |   31 -
 .../org/jgroups/util/ExternalStrings.java       |  823 ----
 .../gemstone/org/jgroups/util/GFLogWriter.java  |   57 -
 .../org/jgroups/util/GFStringIdImpl.java        |   68 -
 .../org/jgroups/util/GemFireTracer.java         |  473 --
 .../org/jgroups/util/GetNetworkInterfaces.java  |   34 -
 .../org/jgroups/util/LinkedListQueue.java       |  422 --
 .../com/gemstone/org/jgroups/util/List.java     |  462 --
 .../jgroups/util/MagicObjectInputStream.java    |   55 -
 .../jgroups/util/MagicObjectOutputStream.java   |   60 -
 .../gemstone/org/jgroups/util/Marshaller.java   |  152 -
 .../org/jgroups/util/NullReadWriteLock.java     |   25 -
 .../com/gemstone/org/jgroups/util/NullSync.java |   26 -
 .../gemstone/org/jgroups/util/PrintXMLTree.java |  168 -
 .../com/gemstone/org/jgroups/util/Promise.java  |  162 -
 .../com/gemstone/org/jgroups/util/Proxy.java    |  870 ----
 .../com/gemstone/org/jgroups/util/Queue.java    |  653 ---
 .../org/jgroups/util/Queue.java.concurrent      |  113 -
 .../com/gemstone/org/jgroups/util/Queue2.java   |  715 ---
 .../org/jgroups/util/QueueClosedException.java  |   29 -
 .../com/gemstone/org/jgroups/util/Range.java    |   58 -
 .../org/jgroups/util/ReentrantLatch.java        |   65 -
 .../org/jgroups/util/ReusableThread.java        |  295 --
 .../java/com/gemstone/org/jgroups/util/Rsp.java |   82 -
 .../com/gemstone/org/jgroups/util/RspList.java  |  193 -
 .../gemstone/org/jgroups/util/Scheduler.java    |  270 -
 .../org/jgroups/util/SchedulerListener.java     |   29 -
 .../gemstone/org/jgroups/util/SockCreator.java  |   20 -
 .../com/gemstone/org/jgroups/util/Stack.java    |  108 -
 .../gemstone/org/jgroups/util/Streamable.java   |   26 -
 .../org/jgroups/util/StreamableFixedID.java     |   19 -
 .../com/gemstone/org/jgroups/util/StringId.java |   49 -
 .../gemstone/org/jgroups/util/ThreadPool.java   |  105 -
 .../org/jgroups/util/TimeScheduler.java         |  720 ---
 .../gemstone/org/jgroups/util/TimedWriter.java  |  295 --
 .../com/gemstone/org/jgroups/util/Util.java     | 1869 -------
 .../org/jgroups/util/VersionedStreamable.java   |   18 -
 .../com/gemstone/org/jgroups/util/package.html  |    5 -
 .../java/com/gemstone/org/jgroups/util/todo.txt |   80 -
 .../gemstone/org/jgroups/conf/jg-magic-map.dtd  |   55 -
 .../gemstone/org/jgroups/conf/jg-magic-map.xml  |  269 -
 .../com/gemstone/org/jgroups/log4j2-default.xml |   21 -
 .../org/jgroups/stack/jboss-service.xml         |  146 -
 .../gemstone/org/jgroups/JChannelJUnitTest.java |  271 --
 .../src/main/java/org/json/JSONObject.java      |    2 +
 .../test/junit/categories/DistributedTest.java  |   16 +
 .../categories/DistributedTransactionsTest.java |   16 +
 .../test/junit/categories/HoplogTest.java       |    7 -
 .../test/junit/categories/IntegrationTest.java  |   16 +
 .../test/junit/categories/PerformanceTest.java  |   16 +
 .../gemfire/test/junit/categories/UnitTest.java |   16 +
 .../gemfire/test/junit/categories/WanTest.java  |   16 +
 .../test/junit/rules/ExpectedTimeout.java       |   16 +
 .../junit/rules/ExpectedTimeoutJUnitTest.java   |   16 +
 gemfire-lucene/build.gradle                     |   29 +
 .../gemfire/cache/lucene/LuceneIndex.java       |   60 +
 .../gemfire/cache/lucene/LuceneQuery.java       |   48 +
 .../cache/lucene/LuceneQueryFactory.java        |  101 +
 .../cache/lucene/LuceneQueryProvider.java       |   45 +
 .../cache/lucene/LuceneQueryResults.java        |   58 +
 .../cache/lucene/LuceneResultStruct.java        |   62 +
 .../gemfire/cache/lucene/LuceneService.java     |  125 +
 .../cache/lucene/LuceneServiceProvider.java     |   46 +
 .../lucene/internal/InternalLuceneIndex.java    |   29 +
 .../lucene/internal/InternalLuceneService.java  |   29 +
 .../lucene/internal/LuceneEventListener.java    |   99 +
 .../LuceneIndexForPartitionedRegion.java        |  136 +
 .../LuceneIndexForReplicatedRegion.java         |   48 +
 .../cache/lucene/internal/LuceneIndexImpl.java  |  107 +
 .../lucene/internal/LuceneQueryFactoryImpl.java |   67 +
 .../cache/lucene/internal/LuceneQueryImpl.java  |   87 +
 .../lucene/internal/LuceneQueryResultsImpl.java |  120 +
 .../lucene/internal/LuceneResultStructImpl.java |   94 +
 .../lucene/internal/LuceneServiceImpl.java      |  273 ++
 .../internal/PartitionedRepositoryManager.java  |  163 +
 .../lucene/internal/StringQueryProvider.java    |  106 +
 .../internal/directory/FileIndexInput.java      |  131 +
 .../internal/directory/RegionDirectory.java     |  119 +
 .../internal/distributed/CollectorManager.java  |   55 +
 .../lucene/internal/distributed/EntryScore.java |   82 +
 .../internal/distributed/LuceneFunction.java    |  137 +
 .../distributed/LuceneFunctionContext.java      |  115 +
 .../lucene/internal/distributed/TopEntries.java |  133 +
 .../distributed/TopEntriesCollector.java        |  102 +
 .../distributed/TopEntriesCollectorManager.java |  178 +
 .../TopEntriesFunctionCollector.java            |  163 +
 .../lucene/internal/filesystem/ChunkKey.java    |  123 +
 .../cache/lucene/internal/filesystem/File.java  |  155 +
 .../internal/filesystem/FileInputStream.java    |  166 +
 .../internal/filesystem/FileOutputStream.java   |  103 +
 .../lucene/internal/filesystem/FileSystem.java  |  156 +
 .../filesystem/SeekableInputStream.java         |   43 +
 .../internal/repository/IndexRepository.java    |   74 +
 .../repository/IndexRepositoryImpl.java         |  113 +
 .../repository/IndexResultCollector.java        |   47 +
 .../internal/repository/RepositoryManager.java  |   45 +
 .../HeterogenousLuceneSerializer.java           |   83 +
 .../repository/serializer/LuceneSerializer.java |   35 +
 .../serializer/PdxLuceneSerializer.java         |   47 +
 .../serializer/ReflectionLuceneSerializer.java  |   74 +
 .../repository/serializer/SerializerUtil.java   |  168 +
 .../internal/xml/LuceneIndexCreation.java       |  111 +
 .../internal/xml/LuceneIndexXmlGenerator.java   |   65 +
 .../internal/xml/LuceneServiceXmlGenerator.java |   39 +
 .../lucene/internal/xml/LuceneXmlConstants.java |   31 +
 .../lucene/internal/xml/LuceneXmlParser.java    |   97 +
 .../lucene/lucene-1.0.xsd                       |   58 +
 ...gemstone.gemfire.internal.cache.CacheService |    1 +
 ...ne.gemfire.internal.cache.xmlcache.XmlParser |    1 +
 .../internal/LuceneEventListenerJUnitTest.java  |  109 +
 .../LuceneIndexRecoveryHAJUnitTest.java         |  201 +
 .../LuceneQueryFactoryImplJUnitTest.java        |   50 +
 .../internal/LuceneQueryImplJUnitTest.java      |  123 +
 .../LuceneQueryResultsImplJUnitTest.java        |  126 +
 .../LuceneResultStructImpJUnitTest.java         |   51 +
 .../internal/LuceneServiceImplJUnitTest.java    |  226 +
 .../PartitionedRepositoryManagerJUnitTest.java  |  230 +
 .../internal/StringQueryProviderJUnitTest.java  |   90 +
 .../directory/RegionDirectoryJUnitTest.java     |   56 +
 .../DistributedScoringJUnitTest.java            |  155 +
 .../distributed/EntryScoreJUnitTest.java        |   40 +
 .../LuceneFunctionContextJUnitTest.java         |   64 +
 .../distributed/LuceneFunctionJUnitTest.java    |  423 ++
 .../LuceneFunctionReadPathDUnitTest.java        |  241 +
 .../TopEntriesCollectorJUnitTest.java           |  139 +
 .../TopEntriesFunctionCollectorJUnitTest.java   |  323 ++
 .../distributed/TopEntriesJUnitTest.java        |  146 +
 .../internal/filesystem/ChunkKeyJUnitTest.java  |   48 +
 .../internal/filesystem/FileJUnitTest.java      |   53 +
 .../filesystem/FileSystemJUnitTest.java         |  578 +++
 ...IndexRepositoryImplJUnitPerformanceTest.java |  437 ++
 .../IndexRepositoryImplJUnitTest.java           |  208 +
 .../HeterogenousLuceneSerializerJUnitTest.java  |   90 +
 .../serializer/PdxFieldMapperJUnitTest.java     |   85 +
 .../ReflectionFieldMapperJUnitTest.java         |   85 +
 .../internal/repository/serializer/Type1.java   |   48 +
 .../internal/repository/serializer/Type2.java   |   34 +
 ...neIndexXmlGeneratorIntegrationJUnitTest.java |   78 +
 .../xml/LuceneIndexXmlGeneratorJUnitTest.java   |   80 +
 ...uceneIndexXmlParserIntegrationJUnitTest.java |  107 +
 .../xml/LuceneIndexXmlParserJUnitTest.java      |   72 +
 ...erIntegrationJUnitTest.createIndex.cache.xml |   24 +
 ...serIntegrationJUnitTest.parseIndex.cache.xml |   24 +
 gemfire-rebalancer/build.gradle                 |   11 +-
 .../gemfire/cache/util/AutoBalancer.java        |  190 +-
 .../util/AutoBalancerIntegrationJUnitTest.java  |  206 +
 .../cache/util/AutoBalancerJUnitTest.java       |  447 +-
 gemfire-spark-connector/doc/1_building.md       |    2 +
 gemfire-spark-connector/doc/5_rdd_join.md       |    2 +-
 .../connector/internal/RegionMetadata.java      |   16 +
 .../gemfirefunctions/QueryFunction.java         |   18 +-
 .../RetrieveRegionFunction.java                 |   16 +
 .../RetrieveRegionMetadataFunction.java         |   16 +
 .../StructStreamingResultSender.java            |   16 +
 .../gemfire/spark/connector/Employee.java       |   16 +
 .../spark/connector/JavaApiIntegrationTest.java |   16 +
 .../gemfire/spark/connector/Portfolio.java      |   16 +
 .../gemfire/spark/connector/Position.java       |   16 +
 .../spark/connector/BasicIntegrationTest.scala  |   16 +
 .../RDDJoinRegionIntegrationTest.scala          |   16 +
 .../RetrieveRegionIntegrationTest.scala         |   16 +
 .../gemfire/spark/connector/package.scala       |   16 +
 .../connector/testkit/GemFireCluster.scala      |   16 +
 .../spark/connector/testkit/GemFireRunner.scala |   16 +
 .../spark/connector/testkit/IOUtils.scala       |   16 +
 .../spark/streaming/ManualClockHelper.scala     |   16 +
 .../spark/streaming/TestInputDStream.scala      |   16 +
 .../javaapi/GemFireJavaDStreamFunctions.java    |   16 +
 .../GemFireJavaPairDStreamFunctions.java        |   16 +
 .../javaapi/GemFireJavaPairRDDFunctions.java    |   16 +
 .../javaapi/GemFireJavaRDDFunctions.java        |   16 +
 .../javaapi/GemFireJavaSQLContextFunctions.java |   16 +
 .../GemFireJavaSparkContextFunctions.java       |   16 +
 .../connector/javaapi/GemFireJavaUtil.java      |   16 +
 .../spark/connector/GemFireConnection.scala     |   16 +
 .../spark/connector/GemFireConnectionConf.scala |   16 +
 .../connector/GemFireConnectionManager.scala    |   16 +
 .../connector/GemFireFunctionDeployer.scala     |   16 +
 .../connector/GemFireKryoRegistrator.scala      |   16 +
 .../connector/GemFirePairRDDFunctions.scala     |   16 +
 .../spark/connector/GemFireRDDFunctions.scala   |   16 +
 .../connector/GemFireSQLContextFunctions.scala  |   16 +
 .../GemFireSparkContextFunctions.scala          |   16 +
 .../internal/DefaultGemFireConnection.scala     |   16 +
 .../DefaultGemFireConnectionManager.scala       |   16 +
 .../connector/internal/LocatorHelper.scala      |   16 +
 .../StructStreamingResultCollector.scala        |   16 +
 .../connector/internal/oql/QueryParser.scala    |   16 +
 .../spark/connector/internal/oql/QueryRDD.scala |   18 +-
 .../internal/oql/QueryResultCollector.scala     |   18 +-
 .../connector/internal/oql/RDDConverter.scala   |   18 +-
 .../connector/internal/oql/RowBuilder.scala     |   16 +
 .../connector/internal/oql/SchemaBuilder.scala  |   16 +
 .../internal/oql/UndefinedSerializer.scala      |   16 +
 .../connector/internal/rdd/GemFireJoinRDD.scala |   16 +
 .../internal/rdd/GemFireOuterJoinRDD.scala      |   16 +
 .../internal/rdd/GemFireRDDPartition.scala      |   16 +
 .../internal/rdd/GemFireRDDPartitioner.scala    |   16 +
 .../rdd/GemFireRDDPartitionerImpl.scala         |   16 +
 .../internal/rdd/GemFireRDDWriter.scala         |   16 +
 .../internal/rdd/GemFireRegionRDD.scala         |   16 +
 .../javaapi/GemFireJavaRegionRDD.scala          |   16 +
 .../spark/connector/javaapi/JavaAPIHelper.scala |   16 +
 .../gemfire/spark/connector/package.scala       |   16 +
 .../streaming/GemFireDStreamFunctions.scala     |   18 +-
 .../spark/connector/streaming/package.scala     |   16 +
 .../gemfire/spark/connector/JavaAPITest.java    |   18 +-
 .../connector/GemFireFunctionDeployerTest.scala |   16 +
 .../DefaultGemFireConnectionManagerTest.scala   |   16 +
 ...tStreamingResultSenderAndCollectorTest.scala |   16 +
 .../internal/oql/QueryParserTest.scala          |   18 +-
 .../connector/ConnectorImplicitsTest.scala      |   16 +
 .../connector/GemFireConnectionConfTest.scala   |   16 +
 .../connector/GemFireDStreamFunctionsTest.scala |   16 +
 .../connector/GemFireRDDFunctionsTest.scala     |   16 +
 .../spark/connector/LocatorHelperTest.scala     |   16 +
 .../rdd/GemFireRDDPartitionerTest.scala         |   16 +
 .../connector/rdd/GemFireRegionRDDTest.scala    |   16 +
 .../basic-demos/src/main/java/demo/Emp.java     |   16 +
 .../src/main/java/demo/OQLJavaDemo.java         |   16 +
 .../src/main/java/demo/PairRDDSaveJavaDemo.java |   16 +
 .../src/main/java/demo/RDDSaveJavaDemo.java     |   16 +
 .../src/main/java/demo/RegionToRDDJavaDemo.java |   16 +
 .../src/main/scala/demo/NetworkWordCount.scala  |   16 +
 .../project/Dependencies.scala                  |   16 +
 .../project/GemFireSparkBuild.scala             |   16 +
 gemfire-spark-connector/project/Settings.scala  |   16 +
 gemfire-web-api/build.gradle                    |   48 +-
 .../web/controllers/AbstractBaseController.java |   21 +-
 .../web/controllers/BaseControllerAdvice.java   |   21 +-
 .../web/controllers/CommonCrudController.java   |   21 +-
 .../controllers/FunctionAccessController.java   |   21 +-
 .../web/controllers/PdxBasedCrudController.java |   21 +-
 .../web/controllers/QueryAccessController.java  |   21 +-
 .../web/controllers/support/JSONTypes.java      |   16 +
 .../controllers/support/QueryResultTypes.java   |   21 +-
 .../web/controllers/support/RegionData.java     |   21 +-
 .../controllers/support/RegionEntryData.java    |   21 +-
 .../support/RestServersResultCollector.java     |   16 +
 .../web/controllers/support/UpdateOp.java       |   21 +-
 .../DataTypeNotSupportedException.java          |   21 +-
 .../web/exception/GemfireRestException.java     |   21 +-
 .../web/exception/MalformedJsonException.java   |   21 +-
 .../web/exception/RegionNotFoundException.java  |   21 +-
 .../exception/ResourceNotFoundException.java    |   21 +-
 ...stomMappingJackson2HttpMessageConverter.java |   16 +
 .../web/swagger/config/RestApiPathProvider.java |   29 +-
 .../web/swagger/config/SwaggerConfig.java       |   16 +
 .../rest/internal/web/util/ArrayUtils.java      |   21 +-
 .../rest/internal/web/util/DateTimeUtils.java   |   21 +-
 .../internal/web/util/IdentifiableUtils.java    |   21 +-
 .../rest/internal/web/util/JSONUtils.java       |   21 +-
 .../rest/internal/web/util/JsonWriter.java      |   21 +-
 .../rest/internal/web/util/NumberUtils.java     |   21 +-
 .../rest/internal/web/util/ValidationUtils.java |   21 +-
 .../main/webapp/WEB-INF/gemfire-api-servlet.xml |   16 +
 gemfire-web-api/src/main/webapp/WEB-INF/web.xml |   16 +
 .../RestAPIsAndInterOpISDUnitTest.java          |   10 +-
 gemfire-web/build.gradle                        |   32 +-
 .../src/main/webapp/WEB-INF/gemfire-servlet.xml |   16 +
 gemfire-web/src/main/webapp/WEB-INF/web.xml     |   16 +
 .../internal/web/AbstractWebTestCase.java       |   21 +-
 .../ShellCommandsControllerJUnitTest.java       |   68 +-
 ...entVariablesHandlerInterceptorJUnitTest.java |   21 +-
 .../internal/web/domain/LinkIndexJUnitTest.java |   21 +-
 .../internal/web/domain/LinkJUnitTest.java      |   21 +-
 .../domain/QueryParameterSourceJUnitTest.java   |   21 +-
 .../web/http/ClientHttpRequestJUnitTest.java    |   21 +-
 ...ableObjectHttpMessageConverterJUnitTest.java |   21 +-
 .../RestHttpOperationInvokerJUnitTest.java      |   21 +-
 .../SimpleHttpOperationInvokerJUnitTest.java    |   21 +-
 .../web/util/ConvertUtilsJUnitTest.java         |   21 +-
 .../internal/web/util/UriUtilsJUnitTest.java    |   21 +-
 gradle/dependency-versions.properties           |   65 +
 gradle/wrapper/gradle-wrapper.jar               |  Bin 51018 -> 53637 bytes
 gradle/wrapper/gradle-wrapper.properties        |    4 +-
 gradlew                                         |   12 +-
 settings.gradle                                 |    3 +-
 5712 files changed, 130473 insertions(+), 212881 deletions(-)
----------------------------------------------------------------------




[29/50] [abbrv] incubator-geode git commit: GEODE-578: Add test category to unit test

Posted by je...@apache.org.
GEODE-578: Add test category to unit test


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

Branch: refs/heads/feature/GEODE-17
Commit: 2803a105e02b03da534abe643fdaec66e236e33c
Parents: b8fb18a
Author: Anthony Baker <ab...@pivotal.io>
Authored: Sat Nov 28 08:17:46 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Sat Nov 28 08:17:46 2015 -0800

----------------------------------------------------------------------
 .../cache/xmlcache/CacheCreationJUnitTest.java  | 28 +++++++++++---------
 1 file changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2803a105/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
index 2cdf80c..f159b3b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
@@ -16,27 +16,29 @@
  */
 package com.gemstone.gemfire.internal.cache.xmlcache;
 
-import com.gemstone.gemfire.cache.server.CacheServer;
-import com.gemstone.gemfire.internal.cache.CacheServerImpl;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
-import org.mockito.MockitoAnnotations;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
 
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-import static org.mockito.Mockito.*;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
 
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
-/**
- * Created by pivotal on 11/19/15.
- */
+@Category(UnitTest.class)
 public class CacheCreationJUnitTest {
 
   @Mock


[42/50] [abbrv] incubator-geode git commit: GEODE-607: improve SimpleMemoryAllocatorImpl unit test coverage

Posted by je...@apache.org.
GEODE-607: improve SimpleMemoryAllocatorImpl unit test coverage

Also changed ChunkType to an interface and removed dead code.
Refactored duplicate code into AbstractStoredObject.
Removed some more sqlf dead code.


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

Branch: refs/heads/feature/GEODE-17
Commit: f9744623ddb03b2920e85be5a68c4d4c2b4a3243
Parents: e19fa40
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Wed Nov 25 11:43:15 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Wed Dec 2 11:34:34 2015 -0800

----------------------------------------------------------------------
 .../internal/offheap/AbstractStoredObject.java  | 107 ++++++
 .../gemfire/internal/offheap/Chunk.java         |   1 -
 .../gemfire/internal/offheap/ChunkType.java     |  14 +-
 .../gemfire/internal/offheap/DataAsAddress.java |  87 +----
 .../gemfire/internal/offheap/Fragment.java      |  14 +
 .../internal/offheap/FreeListManager.java       |  14 +
 .../gemfire/internal/offheap/GemFireChunk.java  |   8 -
 .../internal/offheap/MemoryAllocator.java       |   2 -
 .../internal/offheap/MemoryBlockNode.java       |  14 +-
 .../internal/offheap/MemoryInspector.java       |   6 -
 .../offheap/OffHeapCachedDeserializable.java    |  85 +----
 .../internal/offheap/OffHeapStorage.java        |   1 -
 .../offheap/SimpleMemoryAllocatorImpl.java      | 284 +++++++-------
 .../internal/offheap/UnsafeMemoryChunk.java     |  10 +
 .../offheap/NullOffHeapMemoryStats.java         |   6 +
 .../offheap/NullOutOfOffHeapMemoryListener.java |   6 +
 .../offheap/SimpleMemoryAllocatorJUnitTest.java | 369 +++++++++++++++++--
 17 files changed, 643 insertions(+), 385 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java
new file mode 100644
index 0000000..6dad277
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/AbstractStoredObject.java
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.internal.DataSerializableFixedID;
+import com.gemstone.gemfire.internal.InternalDataSerializer;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.internal.lang.StringUtils;
+
+public abstract class AbstractStoredObject implements StoredObject {
+  @Override
+  public Object getValueAsDeserializedHeapObject() {
+    return getDeserializedValue(null,null);
+  }
+  
+  @Override
+  public byte[] getValueAsHeapByteArray() {
+    if (isSerialized()) {
+      return getSerializedValue();
+    } else {
+      return (byte[])getDeserializedForReading();
+    }
+  }
+
+  @Override
+  public String getStringForm() {
+    try {
+      return StringUtils.forceToString(getDeserializedForReading());
+    } catch (RuntimeException ex) {
+      return "Could not convert object to string because " + ex;
+    }
+  }
+
+  @Override
+  public Object getDeserializedForReading() {
+    return getDeserializedValue(null,null);
+  }
+
+  @Override
+  public Object getDeserializedWritableCopy(Region r, RegionEntry re) {
+    return getDeserializedValue(null,null);
+  }
+
+  @Override
+  public Object getValue() {
+    if (isSerialized()) {
+      return getSerializedValue();
+    } else {
+      throw new IllegalStateException("Can not call getValue on StoredObject that is not serialized");
+    }
+  }
+
+  @Override
+  public void writeValueAsByteArray(DataOutput out) throws IOException {
+    DataSerializer.writeByteArray(getSerializedValue(), out);
+  }
+
+  @Override
+  public void sendTo(DataOutput out) throws IOException {
+    if (isSerialized()) {
+      out.write(getSerializedValue());
+    } else {
+      Object objToSend = (byte[]) getDeserializedForReading(); // deserialized as a byte[]
+      DataSerializer.writeObject(objToSend, out);
+    }
+  }
+
+  @Override
+  public void sendAsByteArray(DataOutput out) throws IOException {
+    byte[] bytes;
+    if (isSerialized()) {
+      bytes = getSerializedValue();
+    } else {
+      bytes = (byte[]) getDeserializedForReading();
+    }
+    DataSerializer.writeByteArray(bytes, out);
+    
+  }
+
+  @Override
+  public void sendAsCachedDeserializable(DataOutput out) throws IOException {
+    if (!isSerialized()) {
+      throw new IllegalStateException("sendAsCachedDeserializable can only be called on serialized StoredObjects");
+    }
+    InternalDataSerializer.writeDSFIDHeader(DataSerializableFixedID.VM_CACHED_DESERIALIZABLE, out);
+    sendAsByteArray(out);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java
index e32a1c6..ed4bc43 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java
@@ -389,7 +389,6 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
     @Override
     public void writeBytes(int offset, byte[] bytes, int bytesOffset, int size) {
       assert offset+size <= getDataSize();
-      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(getBaseDataAddress() + offset, size);
       UnsafeMemoryChunk.writeAbsoluteBytes(getBaseDataAddress() + offset, bytes, bytesOffset, size);
     }
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java
index 9841368..e48bb62 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java
@@ -17,10 +17,14 @@
 package com.gemstone.gemfire.internal.offheap;
 
 /**
- * Used to create new chunks of a certain type.
+ * Describes the type of data stored in a chunk.
  */
-public abstract class ChunkType {
-  public abstract int getSrcType();
-  public abstract Chunk newChunk(long memoryAddress);
-  public abstract Chunk newChunk(long memoryAddress, int chunkSize);
+public interface ChunkType {
+  /**
+   * Returns an int that describes that type of
+   * data stored in the chunk.
+   * Currently the only supported type is
+   * Chunk.SRC_TYPE_GFE.
+   */
+  public int getSrcType();
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
index 61204ba..5b14389 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
@@ -16,18 +16,11 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import java.io.DataOutput;
-import java.io.IOException;
-
-import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.cache.BytesAndBitsForCompactor;
 import com.gemstone.gemfire.internal.cache.EntryBits;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.RegionEntryContext;
-import com.gemstone.gemfire.internal.lang.StringUtils;
 
 /**
  * Used to represent offheap addresses whose
@@ -35,7 +28,7 @@ import com.gemstone.gemfire.internal.lang.StringUtils;
  * location.
  * Instances of this class have a very short lifetime.
  */
-public class DataAsAddress implements StoredObject {
+public class DataAsAddress extends AbstractStoredObject {
   private final long address;
   
   public DataAsAddress(long addr) {
@@ -88,53 +81,6 @@ public class DataAsAddress implements StoredObject {
   }
 
   @Override
-  public Object getDeserializedForReading() {
-    return getDeserializedValue(null,null);
-  }
-  
-  @Override
-  public Object getValueAsDeserializedHeapObject() {
-    return getDeserializedValue(null,null);
-  }
-  
-  @Override
-  public byte[] getValueAsHeapByteArray() {
-    if (isSerialized()) {
-      return getSerializedValue();
-    } else {
-      return (byte[])getDeserializedForReading();
-    }
-  }
-
-  @Override
-  public String getStringForm() {
-    try {
-      return StringUtils.forceToString(getDeserializedForReading());
-    } catch (RuntimeException ex) {
-      return "Could not convert object to string because " + ex;
-    }
-  }
-
-  @Override
-  public Object getDeserializedWritableCopy(Region r, RegionEntry re) {
-    return getDeserializedValue(null,null);
-  }
-
-  @Override
-  public Object getValue() {
-    if (isSerialized()) {
-      return getSerializedValue();
-    } else {
-      throw new IllegalStateException("Can not call getValue on StoredObject that is not serialized");
-    }
-  }
-
-  @Override
-  public void writeValueAsByteArray(DataOutput out) throws IOException {
-    DataSerializer.writeByteArray(getSerializedValue(), out);
-  }
-
-  @Override
   public void fillSerializedValue(BytesAndBitsForCompactor wrapper,
       byte userBits) {
     byte[] value;
@@ -153,37 +99,6 @@ public class DataAsAddress implements StoredObject {
   }
   
   @Override
-  public void sendTo(DataOutput out) throws IOException {
-    if (isSerialized()) {
-      out.write(getSerializedValue());
-    } else {
-      Object objToSend = (byte[]) getDeserializedForReading(); // deserialized as a byte[]
-      DataSerializer.writeObject(objToSend, out);
-    }
-  }
-
-  @Override
-  public void sendAsByteArray(DataOutput out) throws IOException {
-    byte[] bytes;
-    if (isSerialized()) {
-      bytes = getSerializedValue();
-    } else {
-      bytes = (byte[]) getDeserializedForReading();
-    }
-    DataSerializer.writeByteArray(bytes, out);
-    
-  }
-  
-  @Override
-  public void sendAsCachedDeserializable(DataOutput out) throws IOException {
-    if (!isSerialized()) {
-      throw new IllegalStateException("sendAsCachedDeserializable can only be called on serialized StoredObjects");
-    }
-    InternalDataSerializer.writeDSFIDHeader(DataSerializableFixedID.VM_CACHED_DESERIALIZABLE, out);
-    sendAsByteArray(out);
-  }
-
-  @Override
   public boolean isSerialized() {
     return OffHeapRegionEntryHelper.isSerialized(this.address);
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
index bd05ddb..ef56627 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
@@ -122,4 +122,18 @@ public class Fragment implements MemoryBlock {
   public ChunkType getChunkType() {
     return null;
   }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (o instanceof Fragment) {
+      return getMemoryAddress() == ((Fragment) o).getMemoryAddress();
+    }
+    return false;
+  }
+  
+  @Override
+  public int hashCode() {
+    long value = this.getMemoryAddress();
+    return (int)(value ^ (value >>> 32));
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
index 48a0756..10e4148 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -803,5 +803,19 @@ public class FreeListManager {
     public ChunkType getChunkType() {
       return null;
     }
+    
+    @Override
+    public boolean equals(Object o) {
+      if (o instanceof TinyMemoryBlock) {
+        return getMemoryAddress() == ((TinyMemoryBlock) o).getMemoryAddress();
+      }
+      return false;
+    }
+    
+    @Override
+    public int hashCode() {
+      long value = this.getMemoryAddress();
+      return (int)(value ^ (value >>> 32));
+    }
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java
index 3167613..20e4a2f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java
@@ -28,14 +28,6 @@ public class GemFireChunk extends Chunk {
     public int getSrcType() {
       return Chunk.SRC_TYPE_GFE;
     }
-    @Override
-    public Chunk newChunk(long memoryAddress) {
-      return new GemFireChunk(memoryAddress);
-    }
-    @Override
-    public Chunk newChunk(long memoryAddress, int chunkSize) {
-      return new GemFireChunk(memoryAddress, chunkSize);
-    }
   };
   public GemFireChunk(long memoryAddress, int chunkSize) {
     super(memoryAddress, chunkSize, TYPE);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
index 231ff3a..0a014de 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
@@ -16,8 +16,6 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import com.gemstone.gemfire.compression.Compressor;
-
 /**
  * Basic contract for a heap that manages off heap memory. Any MemoryChunks allocated from a heap
  * are returned to that heap when freed.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
index 3f5f4dc..546feee 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
@@ -21,7 +21,6 @@ import java.util.Arrays;
 
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.CacheClosedException;
-import com.gemstone.gemfire.internal.offheap.MemoryBlock.State;
 
 /**
  * Basic implementation of MemoryBlock for test validation only.
@@ -155,4 +154,17 @@ public class MemoryBlockNode implements MemoryBlock {
   public ChunkType getChunkType() {
     return this.block.getChunkType();
   }
+  
+  @Override
+  public boolean equals(Object o) {
+    if (o instanceof MemoryBlockNode) {
+      o = ((MemoryBlockNode)o).block;
+    }
+    return this.block.equals(o);
+  }
+  
+  @Override
+  public int hashCode() {
+    return this.block.hashCode();
+  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryInspector.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryInspector.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryInspector.java
index acf6d04..cde24bc 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryInspector.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryInspector.java
@@ -36,12 +36,6 @@ public interface MemoryInspector {
   
   public List<MemoryBlock> getAllocatedBlocks();
   
-  public List<MemoryBlock> getDeallocatedBlocks();
-  
-  public List<MemoryBlock> getUnusedBlocks();
-  
-  public MemoryBlock getBlockContaining(long memoryAddress);
-  
   public MemoryBlock getBlockAfter(MemoryBlock block);
   
   public List<MemoryBlock> getOrphans();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
index 143fb25..1ec722d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
@@ -16,20 +16,11 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import java.io.DataOutput;
-import java.io.IOException;
-import java.util.Arrays;
-
-import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.cache.Region;
 import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.cache.BytesAndBitsForCompactor;
-import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
 import com.gemstone.gemfire.internal.cache.EntryBits;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 
 /**
@@ -39,7 +30,7 @@ import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
  * @author darrel
  * @since 9.0
  */
-public abstract class OffHeapCachedDeserializable implements MemoryChunkWithRefCount {
+public abstract class OffHeapCachedDeserializable extends AbstractStoredObject implements MemoryChunkWithRefCount {
   public abstract void setSerializedValue(byte[] value);
   @Override
   public abstract byte[] getSerializedValue();
@@ -51,53 +42,6 @@ public abstract class OffHeapCachedDeserializable implements MemoryChunkWithRefC
   public abstract Object getDeserializedValue(Region r, RegionEntry re);
 
   @Override
-  public Object getValueAsDeserializedHeapObject() {
-    return getDeserializedValue(null, null);
-  }
-  
-  @Override
-  public byte[] getValueAsHeapByteArray() {
-    if (isSerialized()) {
-      return getSerializedValue();
-    } else {
-      return (byte[])getDeserializedForReading();
-    }
-  }
-  
-  @Override
-  public Object getDeserializedForReading() {
-    return getDeserializedValue(null, null);
-  }
-
-  @Override
-  public String getStringForm() {
-    try {
-      return StringUtils.forceToString(getDeserializedForReading());
-    } catch (RuntimeException ex) {
-      return "Could not convert object to string because " + ex;
-    }
-  }
-
-  @Override
-  public Object getDeserializedWritableCopy(Region r, RegionEntry re) {
-    return getDeserializedValue(null, null);
-  }
-
-  @Override
-  public Object getValue() {
-    if (isSerialized()) {
-      return getSerializedValue();
-    } else {
-      throw new IllegalStateException("Can not call getValue on StoredObject that is not serialized");
-    }
-  }
-
-  @Override
-  public void writeValueAsByteArray(DataOutput out) throws IOException {
-    DataSerializer.writeByteArray(getSerializedValue(), out);
-  }
-
-  @Override
   public void fillSerializedValue(BytesAndBitsForCompactor wrapper, byte userBits) {
     if (isSerialized()) {
       userBits = EntryBits.setSerialized(userBits, true);
@@ -114,33 +58,6 @@ public abstract class OffHeapCachedDeserializable implements MemoryChunkWithRefC
   public String toString() {
     return getShortClassName()+"@"+this.hashCode();
   }
-  @Override
-  public void sendTo(DataOutput out) throws IOException {
-    if (isSerialized()) {
-      out.write(getSerializedValue());
-    } else {
-      Object objToSend = (byte[]) getDeserializedForReading(); // deserialized as a byte[]
-      DataSerializer.writeObject(objToSend, out);
-    }
-  }
-  @Override
-  public void sendAsByteArray(DataOutput out) throws IOException {
-    byte[] bytes;
-    if (isSerialized()) {
-      bytes = getSerializedValue();
-    } else {
-      bytes = (byte[]) getDeserializedForReading();
-    }
-    DataSerializer.writeByteArray(bytes, out);
-  }
-  @Override
-  public void sendAsCachedDeserializable(DataOutput out) throws IOException {
-    if (!isSerialized()) {
-      throw new IllegalStateException("sendAsCachedDeserializable can only be called on serialized StoredObjects");
-    }
-    InternalDataSerializer.writeDSFIDHeader(DataSerializableFixedID.VM_CACHED_DESERIALIZABLE, out);
-    sendAsByteArray(out);
-  }
   public boolean checkDataEquals(@Unretained OffHeapCachedDeserializable other) {
     if (this == other) {
       return true;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
index 1a6cc8b..ef584f1 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapStorage.java
@@ -183,7 +183,6 @@ public class OffHeapStorage implements OffHeapMemoryStats {
       }
     }
     
-    //TODO:Asif: Fix it
     MemoryAllocator result;
     if (offHeapMemorySize == 0 || Boolean.getBoolean(InternalLocator.FORCE_LOCATOR_DM_TYPE)) {
       // Checking the FORCE_LOCATOR_DM_TYPE is a quick hack to keep our locator from allocating off heap memory.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
index f16253e..dfd05c6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
@@ -70,6 +70,8 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
    * Sizes are always rounded up to the next multiple of this constant
    * so internal fragmentation will be limited to TINY_MULTIPLE-1 bytes per allocation
    * and on average will be TINY_MULTIPLE/2 given a random distribution of size requests.
+   * This does not account for the additional internal fragmentation caused by the off-heap header
+   * which currently is always 8 bytes.
    */
   public final static int TINY_MULTIPLE = Integer.getInteger("gemfire.OFF_HEAP_ALIGNMENT", 8);
   /**
@@ -77,6 +79,9 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
    */
   public final static int TINY_FREE_LIST_COUNT = Integer.getInteger("gemfire.OFF_HEAP_FREE_LIST_COUNT", 16384);
   public final static int MAX_TINY = TINY_MULTIPLE*TINY_FREE_LIST_COUNT;
+  /**
+   * How many unused bytes are allowed in a huge memory allocation.
+   */
   public final static int HUGE_MULTIPLE = 256;
   
   volatile OffHeapMemoryStats stats;
@@ -95,7 +100,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   private volatile MemoryUsageListener[] memoryUsageListeners = new MemoryUsageListener[0];
   
   private static SimpleMemoryAllocatorImpl singleton = null;
-  private static final AtomicReference<Thread> asyncCleanupThread = new AtomicReference<Thread>();
+  private static final AtomicReference<Thread> asyncCleanupThread = new AtomicReference<>();
   final ChunkFactory chunkFactory;
   
   public static SimpleMemoryAllocatorImpl getAllocator() {
@@ -106,69 +111,116 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     return result;
   }
 
-  private static final boolean PRETOUCH = Boolean.getBoolean("gemfire.OFF_HEAP_PRETOUCH_PAGES");
-  static final int OFF_HEAP_PAGE_SIZE = Integer.getInteger("gemfire.OFF_HEAP_PAGE_SIZE", UnsafeMemoryChunk.getPageSize());
-  private static final boolean DO_EXPENSIVE_VALIDATION = Boolean.getBoolean("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION");;
-  
-  public static MemoryAllocator create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, LogWriter lw, int slabCount, long offHeapMemorySize, long maxSlabSize) {
+  private static final boolean DO_EXPENSIVE_VALIDATION = Boolean.getBoolean("gemfire.OFF_HEAP_DO_EXPENSIVE_VALIDATION");
+  
+  public static MemoryAllocator create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, LogWriter lw, 
+      int slabCount, long offHeapMemorySize, long maxSlabSize) {
+    return create(ooohml, stats, lw, slabCount, offHeapMemorySize, maxSlabSize,
+        null, TINY_MULTIPLE, BATCH_SIZE, TINY_FREE_LIST_COUNT, HUGE_MULTIPLE, 
+        new UnsafeMemoryChunk.Factory() {
+      @Override
+      public UnsafeMemoryChunk create(int size) {
+        return new UnsafeMemoryChunk(size);
+      }
+    });
+  }
+
+  private static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, LogWriter lw, 
+      int slabCount, long offHeapMemorySize, long maxSlabSize, 
+      UnsafeMemoryChunk[] slabs, int tinyMultiple, int batchSize, int tinyFreeListCount, int hugeMultiple,
+      UnsafeMemoryChunk.Factory memChunkFactory) {
     SimpleMemoryAllocatorImpl result = singleton;
     boolean created = false;
     try {
     if (result != null) {
-      result.reuse(ooohml, lw, stats, offHeapMemorySize);
-      lw.config("Reusing " + result.getTotalMemory() + " bytes of off-heap memory. The maximum size of a single off-heap object is " + result.largestSlab + " bytes.");
+      result.reuse(ooohml, lw, stats, offHeapMemorySize, slabs);
+      if (lw != null) {
+        lw.config("Reusing " + result.getTotalMemory() + " bytes of off-heap memory. The maximum size of a single off-heap object is " + result.largestSlab + " bytes.");
+      }
       created = true;
       LifecycleListener.invokeAfterReuse(result);
     } else {
-      // allocate memory chunks
-      //SimpleMemoryAllocatorImpl.cleanupPreviousAllocator();
-      lw.config("Allocating " + offHeapMemorySize + " bytes of off-heap memory. The maximum size of a single off-heap object is " + maxSlabSize + " bytes.");
-      UnsafeMemoryChunk[] slabs = new UnsafeMemoryChunk[slabCount];
-      long uncreatedMemory = offHeapMemorySize;
-      for (int i=0; i < slabCount; i++) {
-        try {
-        if (uncreatedMemory >= maxSlabSize) {
-          slabs[i] = new UnsafeMemoryChunk((int) maxSlabSize);
-          uncreatedMemory -= maxSlabSize;
-        } else {
-          // the last slab can be smaller then maxSlabSize
-          slabs[i] = new UnsafeMemoryChunk((int) uncreatedMemory);
+      if (slabs == null) {
+        // allocate memory chunks
+        //SimpleMemoryAllocatorImpl.cleanupPreviousAllocator();
+        if (lw != null) {
+          lw.config("Allocating " + offHeapMemorySize + " bytes of off-heap memory. The maximum size of a single off-heap object is " + maxSlabSize + " bytes.");
         }
-        } catch (OutOfMemoryError err) {
-          if (i > 0) {
-            lw.severe("Off-heap memory creation failed after successfully allocating " + (i*maxSlabSize) + " bytes of off-heap memory.");
-          }
-          for (int j=0; j < i; j++) {
-            if (slabs[j] != null) {
-              slabs[j].release();
+        slabs = new UnsafeMemoryChunk[slabCount];
+        long uncreatedMemory = offHeapMemorySize;
+        for (int i=0; i < slabCount; i++) {
+          try {
+            if (uncreatedMemory >= maxSlabSize) {
+              slabs[i] = memChunkFactory.create((int) maxSlabSize);
+              uncreatedMemory -= maxSlabSize;
+            } else {
+              // the last slab can be smaller then maxSlabSize
+              slabs[i] = memChunkFactory.create((int) uncreatedMemory);
+            }
+          } catch (OutOfMemoryError err) {
+            if (i > 0) {
+              if (lw != null) {
+                lw.severe("Off-heap memory creation failed after successfully allocating " + (i*maxSlabSize) + " bytes of off-heap memory.");
+              }
             }
+            for (int j=0; j < i; j++) {
+              if (slabs[j] != null) {
+                slabs[j].release();
+              }
+            }
+            throw err;
           }
-          throw err;
         }
       }
 
-      result = new SimpleMemoryAllocatorImpl(ooohml, stats, slabs);
-      created = true;
+      result = new SimpleMemoryAllocatorImpl(ooohml, stats, slabs, tinyMultiple, batchSize, tinyFreeListCount, hugeMultiple);
       singleton = result;
       LifecycleListener.invokeAfterCreate(result);
+      created = true;
     }
     } finally {
       if (!created) {
-        stats.close();
-        ooohml.close();
+        if (stats != null) {
+          stats.close();
+        }
+        if (ooohml != null) {
+          ooohml.close();
+        }
       }
     }
     return result;
   }
   // for unit tests
+  static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener ooohml, OffHeapMemoryStats stats, LogWriter lw, 
+      int slabCount, long offHeapMemorySize, long maxSlabSize, UnsafeMemoryChunk.Factory memChunkFactory) {
+    return create(ooohml, stats, lw, slabCount, offHeapMemorySize, maxSlabSize, 
+        null, TINY_MULTIPLE, BATCH_SIZE, TINY_FREE_LIST_COUNT, HUGE_MULTIPLE, memChunkFactory);
+  }
+  // for unit tests
   public static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats stats, UnsafeMemoryChunk[] slabs) {
-    SimpleMemoryAllocatorImpl result = new SimpleMemoryAllocatorImpl(oooml, stats, slabs);
-    singleton = result;
-    LifecycleListener.invokeAfterCreate(result);
-    return result;
+    return create(oooml, stats, slabs, TINY_MULTIPLE, BATCH_SIZE, TINY_FREE_LIST_COUNT, HUGE_MULTIPLE);
   }
+  // for unit tests
+  static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats stats, UnsafeMemoryChunk[] slabs,
+      int tinyMultiple, int batchSize, int tinyFreeListCount, int hugeMultiple) {
+    int slabCount = 0;
+    long offHeapMemorySize = 0;
+    long maxSlabSize = 0;
+    if (slabs != null) {
+      slabCount = slabs.length;
+      for (int i=0; i < slabCount; i++) {
+        int slabSize = slabs[i].getSize();
+        offHeapMemorySize += slabSize;
+        if (slabSize > maxSlabSize) {
+          maxSlabSize = slabSize;
+        }
+      }
+    }
+    return create(oooml, stats, null, slabCount, offHeapMemorySize, maxSlabSize, slabs, tinyMultiple, batchSize, tinyFreeListCount, hugeMultiple, null);
+  }
+  
   
-  private void reuse(OutOfOffHeapMemoryListener oooml, LogWriter lw, OffHeapMemoryStats newStats, long offHeapMemorySize) {
+  private void reuse(OutOfOffHeapMemoryListener oooml, LogWriter lw, OffHeapMemoryStats newStats, long offHeapMemorySize, UnsafeMemoryChunk[] slabs) {
     if (isClosed()) {
       throw new IllegalStateException("Can not reuse a closed off-heap memory manager.");
     }
@@ -176,100 +228,55 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
       throw new IllegalArgumentException("OutOfOffHeapMemoryListener is null");
     }
     if (getTotalMemory() != offHeapMemorySize) {
-      lw.warning("Using " + getTotalMemory() + " bytes of existing off-heap memory instead of the requested " + offHeapMemorySize);
+      if (lw != null) {
+        lw.warning("Using " + getTotalMemory() + " bytes of existing off-heap memory instead of the requested " + offHeapMemorySize);
+      }
+    }
+    if (slabs != null) {
+      // this will only happen in unit tests
+      if (slabs != this.slabs) {
+        // If the unit test gave us a different array
+        // of slabs then something is wrong because we
+        // are trying to reuse the old already allocated
+        // array which means that the new one will never
+        // be used. Note that this code does not bother
+        // comparing the contents of the arrays.
+        throw new IllegalStateException("attempted to reuse existing off-heap memory even though new off-heap memory was allocated");
+      }
     }
     this.ooohml = oooml;
     newStats.initialize(this.stats);
     this.stats = newStats;
   }
 
-  public static void cleanupPreviousAllocator() {
-    Thread t = asyncCleanupThread.getAndSet(null);
-    if (t != null) {
-//      try {
-//        // HACK to see if a delay fixes bug 47883
-//        Thread.sleep(3000);
-//      } catch (InterruptedException ignore) {
-//      }
-      t.interrupt();
-      try {
-        t.join(FREE_PAUSE_MILLIS);
-      } catch (InterruptedException ignore) {
-        Thread.currentThread().interrupt();
-      }
-    }
-  }
-  
-  private SimpleMemoryAllocatorImpl(final OutOfOffHeapMemoryListener oooml, final OffHeapMemoryStats stats, final UnsafeMemoryChunk[] slabs) {
+  private SimpleMemoryAllocatorImpl(final OutOfOffHeapMemoryListener oooml, final OffHeapMemoryStats stats, final UnsafeMemoryChunk[] slabs,
+      int tinyMultiple, int batchSize, int tinyFreeListCount, int hugeMultiple) {
     if (oooml == null) {
       throw new IllegalArgumentException("OutOfOffHeapMemoryListener is null");
     }
-    if (TINY_MULTIPLE <= 0 || (TINY_MULTIPLE & 3) != 0) {
+    if (tinyMultiple <= 0 || (tinyMultiple & 3) != 0) {
       throw new IllegalStateException("gemfire.OFF_HEAP_ALIGNMENT must be a multiple of 8.");
     }
-    if (TINY_MULTIPLE > 256) {
+    if (tinyMultiple > 256) {
       // this restriction exists because of the dataSize field in the object header.
       throw new IllegalStateException("gemfire.OFF_HEAP_ALIGNMENT must be <= 256 and a multiple of 8.");
     }
-    if (BATCH_SIZE <= 0) {
+    if (batchSize <= 0) {
       throw new IllegalStateException("gemfire.OFF_HEAP_BATCH_ALLOCATION_SIZE must be >= 1.");
     }
-    if (TINY_FREE_LIST_COUNT <= 0) {
+    if (tinyFreeListCount <= 0) {
       throw new IllegalStateException("gemfire.OFF_HEAP_FREE_LIST_COUNT must be >= 1.");
     }
-    assert HUGE_MULTIPLE <= 256;
+    if (hugeMultiple > 256 || hugeMultiple < 0) {
+      // this restriction exists because of the dataSize field in the object header.
+      throw new IllegalStateException("HUGE_MULTIPLE must be >= 0 and <= 256 but it was " + hugeMultiple);
+    }
     
     this.ooohml = oooml;
     this.stats = stats;
     this.slabs = slabs;
-    if(GemFireCacheImpl.sqlfSystem()) {
-      throw new IllegalStateException("offheap sqlf not supported");
-//       String provider = GemFireCacheImpl.SQLF_FACTORY_PROVIDER;
-//       try {
-//         Class<?> factoryProvider = Class.forName(provider);
-//         Method method = factoryProvider.getDeclaredMethod("getChunkFactory");        
-//         this.chunkFactory  = (ChunkFactory)method.invoke(null, (Object [])null);
-//       }catch (Exception e) {
-//         throw new IllegalStateException("Exception in obtaining ChunkFactory class",  e);
-//       }
-
-    }else {
-      
-      this.chunkFactory = new GemFireChunkFactory();
-    }
+    this.chunkFactory = new GemFireChunkFactory();
     
-    if (PRETOUCH) {
-      final int tc;
-      if (Runtime.getRuntime().availableProcessors() > 1) {
-        tc = Runtime.getRuntime().availableProcessors() / 2;
-      } else {
-        tc = 1;
-      }
-      Thread[] threads = new Thread[tc];
-      for (int i=0; i < tc; i++) {
-        final int threadId = i;
-        threads[i] = new Thread(new Runnable() {
-          @Override
-          public void run() {
-            for (int slabId=threadId; slabId < slabs.length; slabId+=tc) {
-              final int slabSize = slabs[slabId].getSize();
-              for (int pageId=0; pageId < slabSize; pageId+=OFF_HEAP_PAGE_SIZE) {
-                slabs[slabId].writeByte(pageId, (byte) 0);
-              }
-            }
-          }
-        });
-        threads[i].start();
-      }
-      for (int i=0; i < tc; i++) {
-        try {
-          threads[i].join();
-        } catch (InterruptedException e) {
-          Thread.currentThread().interrupt();
-          break;
-        }
-      }
-    }
     //OSProcess.printStacks(0, InternalDistributedSystem.getAnyInstance().getLogWriter(), false);
     this.stats.setFragments(slabs.length);
     largestSlab = slabs[0].getSize();
@@ -437,7 +444,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   private void realClose() {
     // Removing this memory immediately can lead to a SEGV. See 47885.
     if (setClosed()) {
-      freeSlabsAsync(this.slabs);
+      freeSlabs(this.slabs);
       this.stats.close();
       singleton = null;
     }
@@ -456,41 +463,11 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   }
   
 
-  private static final int FREE_PAUSE_MILLIS = Integer.getInteger("gemfire.OFF_HEAP_FREE_PAUSE_MILLIS", 90000);
-
-  
-  
-  private static void freeSlabsAsync(final UnsafeMemoryChunk[] slabs) {
-    //debugLog("called freeSlabsAsync", false);
-    // since we no longer free off-heap memory on every cache close
-    // and production code does not free it but instead reuses it
-    // we should be able to free it sync.
-    // If it turns out that it does need to be async then we need
-    // to make sure we call cleanupPreviousAllocator.
+  private static void freeSlabs(final UnsafeMemoryChunk[] slabs) {
+    //debugLog("called freeSlabs", false);
     for (int i=0; i < slabs.length; i++) {
       slabs[i].release();
     }
-//    Thread t = new Thread(new Runnable() {
-//      @Override
-//      public void run() {
-//        // pause this many millis before freeing the slabs.
-//        try {
-//          Thread.sleep(FREE_PAUSE_MILLIS);
-//        } catch (InterruptedException ignore) {
-//          // If we are interrupted we should wakeup
-//          // and free our slabs.
-//        }
-//        //debugLog("returning offheap memory to OS", false);
-//        for (int i=0; i < slabs.length; i++) {
-//          slabs[i].free();
-//        }
-//        //debugLog("returned offheap memory to OS", false);
-//        asyncCleanupThread.compareAndSet(Thread.currentThread(), null);
-//      }
-//    }, "asyncSlabDeallocator");
-//    t.setDaemon(true);
-//    t.start();
-//    asyncCleanupThread.set(t);    
   }
   
   void freeChunk(long addr) {
@@ -504,7 +481,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   /**
    * Return the slabId of the slab that contains the given addr.
    */
-  protected int findSlab(long addr) {
+  int findSlab(long addr) {
     for (int i=0; i < this.slabs.length; i++) {
       UnsafeMemoryChunk slab = this.slabs[i];
       long slabAddr = slab.getMemoryAddress();
@@ -591,11 +568,11 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     if (addr >= 0 && addr < 1024) {
       throw new IllegalStateException("addr was smaller than expected 0x" + addr);
     }
-    validateAddressAndSizeWithinSlab(addr, size);
+    validateAddressAndSizeWithinSlab(addr, size, DO_EXPENSIVE_VALIDATION);
   }
 
-  static void validateAddressAndSizeWithinSlab(long addr, int size) {
-    if (DO_EXPENSIVE_VALIDATION) {
+  static void validateAddressAndSizeWithinSlab(long addr, int size, boolean doExpensiveValidation) {
+    if (doExpensiveValidation) {
       SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.singleton;
       if (ma != null) {
         for (int i=0; i < ma.slabs.length; i++) {
@@ -686,21 +663,6 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   }
 
   @Override
-  public List<MemoryBlock> getDeallocatedBlocks() {
-    return null;
-  }
-
-  @Override
-  public List<MemoryBlock> getUnusedBlocks() {
-    return null;
-  }
-  
-  @Override
-  public MemoryBlock getBlockContaining(long memoryAddress) {
-    return null;
-  }
-  
-  @Override
   public MemoryBlock getBlockAfter(MemoryBlock block) {
     if (block == null) {
       return null;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/UnsafeMemoryChunk.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/UnsafeMemoryChunk.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/UnsafeMemoryChunk.java
index 06fee7b..4f0e86d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/UnsafeMemoryChunk.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/UnsafeMemoryChunk.java
@@ -265,4 +265,14 @@ public class UnsafeMemoryChunk implements MemoryChunk {
     sb.append("}");
     return sb.toString();
   }
+  
+  /**
+   * Used to create UnsafeMemoryChunk instances.
+   */
+  public interface Factory {
+    /** Create and return an UnsafeMemoryChunk.
+     * @throws OutOfMemoryError if the create fails
+     */
+    public UnsafeMemoryChunk create(int size);
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
index 7c668f1..88bab77 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOffHeapMemoryStats.java
@@ -24,6 +24,7 @@ import com.gemstone.gemfire.Statistics;
  * @author Kirk Lund
  */
 public class NullOffHeapMemoryStats implements OffHeapMemoryStats {
+  private boolean isClosed;
 
   public void incFreeMemory(long value) {
   }
@@ -100,9 +101,14 @@ public class NullOffHeapMemoryStats implements OffHeapMemoryStats {
   }
   @Override
   public void close() {
+    this.isClosed = true;
   }
   @Override
   public void initialize(OffHeapMemoryStats stats) {
     stats.close();
   }     
+  
+  public boolean isClosed() {
+    return this.isClosed;
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOutOfOffHeapMemoryListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOutOfOffHeapMemoryListener.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOutOfOffHeapMemoryListener.java
index caa913a..7d02c9f 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOutOfOffHeapMemoryListener.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/NullOutOfOffHeapMemoryListener.java
@@ -24,10 +24,16 @@ import com.gemstone.gemfire.OutOfOffHeapMemoryException;
  * @author Kirk Lund
  */
 public class NullOutOfOffHeapMemoryListener implements OutOfOffHeapMemoryListener {
+  private boolean isClosed;
   @Override
   public void outOfOffHeapMemory(OutOfOffHeapMemoryException cause) {
   }
   @Override
   public void close() {
+    this.isClosed = true;
+  }
+  
+  public boolean isClosed() {
+    return this.isClosed;
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/f9744623/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
index 19dfebb..1477764 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
@@ -16,21 +16,21 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
+import static org.junit.Assert.*;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Collections;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.OutOfOffHeapMemoryException;
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.internal.logging.NullLogWriter;
+import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk.Factory;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
@@ -40,15 +40,198 @@ public class SimpleMemoryAllocatorJUnitTest {
     return ((v+multiple-1)/multiple)*multiple;
   }
   @Test
+  public void testNullGetAllocator() {
+    try {
+      SimpleMemoryAllocatorImpl.getAllocator();
+      fail("expected CacheClosedException");
+    } catch (CacheClosedException expected) {
+    }
+  }
+  @Test
+  public void testConstructor() {
+    try {
+      SimpleMemoryAllocatorImpl.create(null, null, null);
+      fail("expected IllegalArgumentException");
+    } catch (IllegalArgumentException expected) {
+    }
+    try {
+      SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), null, null, -1, 0, 0, 0);
+      fail("expected IllegalStateException");
+    } catch (IllegalStateException expected) {
+      assertEquals(true, expected.getMessage().contains("gemfire.OFF_HEAP_ALIGNMENT must be a multiple of 8"));
+    }
+    try {
+      SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), null, null, 9, 0, 0, 0);
+      fail("expected IllegalStateException");
+    } catch (IllegalStateException expected) {
+      assertEquals(true, expected.getMessage().contains("gemfire.OFF_HEAP_ALIGNMENT must be a multiple of 8"));
+    }
+    try {
+      SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), null, null, 256+8, 0, 0, 0);
+      fail("expected IllegalStateException");
+    } catch (IllegalStateException expected) {
+      assertEquals(true, expected.getMessage().contains("gemfire.OFF_HEAP_ALIGNMENT must be <= 256"));
+    }
+    try {
+      SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), null, null, 8, 0, 0, 0);
+      fail("expected IllegalStateException");
+    } catch (IllegalStateException expected) {
+      assertEquals(true, expected.getMessage().contains("gemfire.OFF_HEAP_BATCH_ALLOCATION_SIZE must be >= 1."));
+    }
+    try {
+      SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), null, null, 8, 1, 0, 0);
+      fail("expected IllegalStateException");
+    } catch (IllegalStateException expected) {
+      assertEquals(true, expected.getMessage().contains("gemfire.OFF_HEAP_FREE_LIST_COUNT must be >= 1."));
+    }
+    try {
+      SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), null, null, 8, 1, 1, -1);
+      fail("expected IllegalStateException");
+    } catch (IllegalStateException expected) {
+      assertEquals(true, expected.getMessage().contains("HUGE_MULTIPLE must be >= 0 and <= 256 but it was -1"));
+    }
+    try {
+      SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), null, null, 8, 1, 1, 257);
+      fail("expected IllegalStateException");
+    } catch (IllegalStateException expected) {
+      assertEquals(true, expected.getMessage().contains("HUGE_MULTIPLE must be >= 0 and <= 256 but it was 257"));
+    }
+     
+  }
+  /**
+   * Logger that remembers the last severe message
+   */
+  private static class LastSevereLogger extends NullLogWriter {
+    private String lastSevereMessage;
+    private Throwable lastSevereThrowable;
+    
+    private void setLastSevere(String msg, Throwable ex) {
+      this.lastSevereMessage = msg;
+      this.lastSevereThrowable = ex;
+    }
+    public String getLastSevereMessage() {
+      return this.lastSevereMessage;
+    }
+    public Throwable getLastSevereThrowable() {
+      return this.lastSevereThrowable;
+    }
+    @Override
+    public void severe(String msg, Throwable ex) {
+      setLastSevere(msg, ex);
+    }
+    @Override
+    public void severe(String msg) {
+      setLastSevere(msg, null);
+    }
+    @Override
+    public void severe(Throwable ex) {
+      setLastSevere(null, ex);
+    }
+  }
+  @Test
+  public void testCreate() {
+    {
+      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
+      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
+      LastSevereLogger logger = new LastSevereLogger();
+      try {
+        SimpleMemoryAllocatorImpl.create(listener, stats, logger, 10, 950, 100,
+            new UnsafeMemoryChunk.Factory() {
+          @Override
+          public UnsafeMemoryChunk create(int size) {
+            throw new OutOfMemoryError("expected");
+          }
+        });
+      } catch (OutOfMemoryError expected) {
+      }
+      assertTrue(listener.isClosed());
+      assertTrue(stats.isClosed());
+      assertEquals(null, logger.getLastSevereThrowable());
+      assertEquals(null, logger.getLastSevereMessage());
+     }
+    {
+      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
+      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
+      LastSevereLogger logger = new LastSevereLogger();
+      int MAX_SLAB_SIZE = 100;
+      try {
+        Factory factory = new UnsafeMemoryChunk.Factory() {
+          private int createCount = 0;
+          @Override
+          public UnsafeMemoryChunk create(int size) {
+            createCount++;
+            if (createCount == 1) {
+              return new UnsafeMemoryChunk(size);
+            } else {
+              throw new OutOfMemoryError("expected");
+            }
+          }
+        };
+        SimpleMemoryAllocatorImpl.create(listener, stats, logger, 10, 950, MAX_SLAB_SIZE, factory);
+      } catch (OutOfMemoryError expected) {
+      }
+      assertTrue(listener.isClosed());
+      assertTrue(stats.isClosed());
+      assertEquals(null, logger.getLastSevereThrowable());
+      assertEquals("Off-heap memory creation failed after successfully allocating " + MAX_SLAB_SIZE + " bytes of off-heap memory.", logger.getLastSevereMessage());
+    }
+    {
+      NullOutOfOffHeapMemoryListener listener = new NullOutOfOffHeapMemoryListener();
+      NullOffHeapMemoryStats stats = new NullOffHeapMemoryStats();
+      Factory factory = new UnsafeMemoryChunk.Factory() {
+        @Override
+        public UnsafeMemoryChunk create(int size) {
+          return new UnsafeMemoryChunk(size);
+        }
+      };
+      MemoryAllocator ma = 
+        SimpleMemoryAllocatorImpl.create(listener, stats, new NullLogWriter(), 10, 950, 100, factory);
+      try {
+        assertFalse(listener.isClosed());
+        assertFalse(stats.isClosed());
+        ma.close();
+        assertTrue(listener.isClosed());
+        assertFalse(stats.isClosed());
+        listener = new NullOutOfOffHeapMemoryListener();
+        NullOffHeapMemoryStats stats2 = new NullOffHeapMemoryStats();
+        {
+          UnsafeMemoryChunk slab = new UnsafeMemoryChunk(1024);
+          try {
+            SimpleMemoryAllocatorImpl.create(listener, stats2, new UnsafeMemoryChunk[]{slab});
+          } catch (IllegalStateException expected) {
+            assertTrue("unexpected message: " + expected.getMessage(), 
+                expected.getMessage().equals("attempted to reuse existing off-heap memory even though new off-heap memory was allocated"));
+          } finally {
+            slab.release();
+          }
+          assertFalse(stats.isClosed());
+          assertTrue(listener.isClosed());
+          assertTrue(stats2.isClosed());
+        }
+        listener = new NullOutOfOffHeapMemoryListener();
+        stats2 = new NullOffHeapMemoryStats();
+        MemoryAllocator ma2 = SimpleMemoryAllocatorImpl.create(listener, stats2, new NullLogWriter(), 10, 950, 100, factory);
+        assertSame(ma, ma2);
+        assertTrue(stats.isClosed());
+        assertFalse(listener.isClosed());
+        assertFalse(stats2.isClosed());
+        stats = stats2;
+      } finally {
+        ma.close();
+        assertTrue(listener.isClosed());
+        assertFalse(stats.isClosed());
+        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+        assertTrue(stats.isClosed());
+      }
+    }
+  }
+  @Test
   public void testBasics() {
     int BATCH_SIZE = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.BATCH_SIZE;
     int TINY_MULTIPLE = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.TINY_MULTIPLE;
-//    int BIG_MULTIPLE = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.FreeListManager.BIG_MULTIPLE;
     int HUGE_MULTIPLE = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.HUGE_MULTIPLE;
     int perObjectOverhead = com.gemstone.gemfire.internal.offheap.Chunk.OFF_HEAP_HEADER_SIZE;
     int maxTiny = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.MAX_TINY-perObjectOverhead;
-//    int MIN_BIG_SIZE = round(BIG_MULTIPLE, maxTiny+perObjectOverhead+1)-perObjectOverhead;
-//    int maxBig = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.FreeListManager.MAX_BIG-perObjectOverhead;
     int minHuge = maxTiny+1;
     int TOTAL_MEM = (maxTiny+perObjectOverhead)*BATCH_SIZE /*+ (maxBig+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+1+perObjectOverhead)*BATCH_SIZE + (TINY_MULTIPLE+perObjectOverhead)*BATCH_SIZE /*+ (MIN_BIG_SIZE+perObjectOverhead)*BATCH_SIZE*/ + round(TINY_MULTIPLE, minHuge+perObjectOverhead+1);
     UnsafeMemoryChunk slab = new UnsafeMemoryChunk(TOTAL_MEM);
@@ -57,14 +240,10 @@ public class SimpleMemoryAllocatorJUnitTest {
       assertEquals(TOTAL_MEM, ma.getFreeMemory());
       assertEquals(TOTAL_MEM, ma.freeList.getFreeFragmentMemory());
       assertEquals(0, ma.freeList.getFreeTinyMemory());
-//      assertEquals(0, ma.freeList.getFreeBigMemory());
       assertEquals(0, ma.freeList.getFreeHugeMemory());
       MemoryChunk tinymc = ma.allocate(maxTiny, null);
       assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
       assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead)*(BATCH_SIZE-1), ma.freeList.getFreeTinyMemory());
-//      MemoryChunk bigmc = ma.allocate(maxBig);
-//      assertEquals(TOTAL_MEM-round(BIG_MULTIPLE, maxBig+perObjectOverhead)-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-//      assertEquals(round(BIG_MULTIPLE, maxBig+perObjectOverhead)*(BATCH_SIZE-1), ma.getFreeList().getFreeBigMemory());
       MemoryChunk hugemc = ma.allocate(minHuge, null);
       assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, minHuge+perObjectOverhead)/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
       long freeSlab = ma.freeList.getFreeFragmentMemory();
@@ -73,9 +252,6 @@ public class SimpleMemoryAllocatorJUnitTest {
       hugemc.release();
       assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead), ma.freeList.getFreeHugeMemory()-oldFreeHugeMemory);
       assertEquals(TOTAL_MEM/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-//      long oldFreeBigMemory = ma.freeList.getFreeBigMemory();
-//      bigmc.free();
-//      assertEquals(round(BIG_MULTIPLE, maxBig+perObjectOverhead), ma.freeList.getFreeBigMemory()-oldFreeBigMemory);
       assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
       long oldFreeTinyMemory = ma.freeList.getFreeTinyMemory();
       tinymc.release();
@@ -85,17 +261,12 @@ public class SimpleMemoryAllocatorJUnitTest {
       tinymc = ma.allocate(maxTiny, null);
       assertEquals(oldFreeTinyMemory, ma.freeList.getFreeTinyMemory());
       assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-//      bigmc = ma.allocate(maxBig);
-//      assertEquals(oldFreeBigMemory, ma.freeList.getFreeBigMemory());
-//      assertEquals(TOTAL_MEM-round(BIG_MULTIPLE, maxBig+perObjectOverhead)-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
       hugemc = ma.allocate(minHuge, null);
       assertEquals(oldFreeHugeMemory, ma.freeList.getFreeHugeMemory());
       assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, minHuge+perObjectOverhead)/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
       hugemc.release();
       assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead), ma.freeList.getFreeHugeMemory()-oldFreeHugeMemory);
       assertEquals(TOTAL_MEM/*-round(BIG_MULTIPLE, maxBig+perObjectOverhead)*/-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
-//      bigmc.free();
-//      assertEquals(round(BIG_MULTIPLE, maxBig+perObjectOverhead), ma.freeList.getFreeBigMemory()-oldFreeBigMemory);
       assertEquals(TOTAL_MEM-round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.getFreeMemory());
       tinymc.release();
       assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
@@ -108,9 +279,6 @@ public class SimpleMemoryAllocatorJUnitTest {
       freeSlab = ma.freeList.getFreeFragmentMemory();
       tinymc.release();
       assertEquals(round(TINY_MULTIPLE, maxTiny+perObjectOverhead)+(round(TINY_MULTIPLE, 1+perObjectOverhead)*BATCH_SIZE), ma.freeList.getFreeTinyMemory()-oldFreeTinyMemory);
-//      bigmc = ma.allocate(MIN_BIG_SIZE);
-//      assertEquals(MIN_BIG_SIZE+perObjectOverhead, bigmc.getSize());
-//      assertEquals(freeSlab-((MIN_BIG_SIZE+perObjectOverhead)*BATCH_SIZE), ma.freeList.getFreeFragmentMemory());
       
       hugemc = ma.allocate(minHuge+1, null);
       assertEquals(round(TINY_MULTIPLE, minHuge+1+perObjectOverhead), hugemc.getSize());
@@ -129,13 +297,6 @@ public class SimpleMemoryAllocatorJUnitTest {
       assertEquals(round(TINY_MULTIPLE, minHuge+perObjectOverhead)*BATCH_SIZE, ma.freeList.getFreeHugeMemory());
       // now that we do compaction the following allocate works.
       hugemc = ma.allocate(minHuge + HUGE_MULTIPLE + HUGE_MULTIPLE-1, null);
-
-      //      assertEquals(minHuge+minHuge+1, ma.freeList.getFreeHugeMemory());
-//      hugemc.free();
-//      assertEquals(minHuge+minHuge+1+minHuge + HUGE_MULTIPLE + HUGE_MULTIPLE-1, ma.freeList.getFreeHugeMemory());
-//      hugemc = ma.allocate(minHuge + HUGE_MULTIPLE);
-//      assertEquals(minHuge + HUGE_MULTIPLE + HUGE_MULTIPLE-1, hugemc.getSize());
-//      assertEquals(minHuge+minHuge+1, ma.freeList.getFreeHugeMemory());
     } finally {
       SimpleMemoryAllocatorImpl.freeOffHeapMemory();
     }
@@ -165,6 +326,144 @@ public class SimpleMemoryAllocatorJUnitTest {
   }
   
   @Test
+  public void testDebugLog() {
+    SimpleMemoryAllocatorImpl.debugLog("test debug log", false);
+    SimpleMemoryAllocatorImpl.debugLog("test debug log", true);
+  }
+  @Test
+  public void testGetLostChunks() {
+    UnsafeMemoryChunk slab = new UnsafeMemoryChunk(1024*1024);
+    try {
+      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new UnsafeMemoryChunk[]{slab});
+      assertEquals(Collections.emptyList(), ma.getLostChunks());
+    } finally {
+      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  @Test
+  public void testFindSlab() {
+    final int SLAB_SIZE = 1024*1024;
+    UnsafeMemoryChunk slab = new UnsafeMemoryChunk(SLAB_SIZE);
+    try {
+      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new UnsafeMemoryChunk[]{slab});
+      assertEquals(0, ma.findSlab(slab.getMemoryAddress()));
+      assertEquals(0, ma.findSlab(slab.getMemoryAddress()+SLAB_SIZE-1));
+      try {
+        ma.findSlab(slab.getMemoryAddress()-1);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+      }
+      try {
+        ma.findSlab(slab.getMemoryAddress()+SLAB_SIZE);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+      }
+    } finally {
+      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  @Test
+  public void testValidateAddressAndSize() {
+    final int SLAB_SIZE = 1024*1024;
+    UnsafeMemoryChunk slab = new UnsafeMemoryChunk(SLAB_SIZE);
+    try {
+      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new UnsafeMemoryChunk[]{slab});
+      try {
+        SimpleMemoryAllocatorImpl.validateAddress(0L);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().contains("addr was smaller than expected"));
+      }
+      try {
+        SimpleMemoryAllocatorImpl.validateAddress(1L);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().contains("Valid addresses must be in one of the following ranges:"));
+      }
+      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE, false);
+      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE, true);
+      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), -1, true);
+      try {
+        SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress()-1, SLAB_SIZE, true);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().equals(" address 0x" + Long.toString(slab.getMemoryAddress()-1, 16) + " does not address the original slab memory"));
+      }
+      try {
+        SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(slab.getMemoryAddress(), SLAB_SIZE+1, true);
+        fail("expected IllegalStateException");
+      } catch (IllegalStateException expected) {
+        assertEquals("Unexpected exception message: " + expected.getMessage(), true, expected.getMessage().equals(" address 0x" + Long.toString(slab.getMemoryAddress()+SLAB_SIZE, 16) + " does not address the original slab memory"));
+      }
+    } finally {
+      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+  @Test
+  public void testMemoryInspection() {
+    final int SLAB_SIZE = 1024*1024;
+    UnsafeMemoryChunk slab = new UnsafeMemoryChunk(SLAB_SIZE);
+    try {
+      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new UnsafeMemoryChunk[]{slab});
+      MemoryInspector inspector = ma.getMemoryInspector();
+      assertNotNull(inspector);
+      assertEquals(null, inspector.getFirstBlock());
+      assertEquals(Collections.emptyList(), ma.getInspectionSnapshot());
+      assertEquals(Collections.emptyList(), ma.getAllocatedBlocks());
+      assertEquals(null, ma.getBlockAfter(null));
+      inspector.createInspectionSnapshot();
+      // call this twice for code coverage
+      inspector.createInspectionSnapshot();
+      try {
+        assertEquals(ma.getAllBlocks(), ma.getInspectionSnapshot());
+        MemoryBlock firstBlock = inspector.getFirstBlock();
+        assertNotNull(firstBlock);
+        assertEquals(1024*1024, firstBlock.getBlockSize());
+        assertEquals("N/A", firstBlock.getDataType());
+        assertEquals(-1, firstBlock.getFreeListId());
+        assertTrue(firstBlock.getMemoryAddress() > 0);
+        assertNull(firstBlock.getNextBlock());
+        assertEquals(0, firstBlock.getRefCount());
+        assertEquals(0, firstBlock.getSlabId());
+        assertEquals(MemoryBlock.State.UNUSED, firstBlock.getState());
+        assertFalse(firstBlock.isCompressed());
+        assertFalse(firstBlock.isSerialized());
+        assertEquals(null, ma.getBlockAfter(firstBlock));
+      } finally {
+        inspector.clearInspectionSnapshot();
+      }
+    } finally {
+      SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+    }
+  }
+
+  @Test
+  public void testClose() {
+    UnsafeMemoryChunk slab = new UnsafeMemoryChunk(1024*1024);
+    boolean freeSlab = true;
+    UnsafeMemoryChunk[] slabs = new UnsafeMemoryChunk[]{slab};
+    try {
+      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), slabs);
+      ma.close();
+      ma.close();
+      System.setProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY, "true");
+      try {
+        ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), slabs);
+        ma.close();
+        freeSlab = false;
+        ma.close();
+      } finally {
+        System.clearProperty(SimpleMemoryAllocatorImpl.FREE_OFF_HEAP_MEMORY_PROPERTY);
+      }
+    } finally {
+      if (freeSlab) {
+        SimpleMemoryAllocatorImpl.freeOffHeapMemory();
+      }
+    }
+    
+  }
+  
+  @Test
   public void testCompaction() {
     final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.Chunk.OFF_HEAP_HEADER_SIZE;
     final int BIG_ALLOC_SIZE = 150000;
@@ -306,8 +605,18 @@ public class SimpleMemoryAllocatorJUnitTest {
       smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead, null);
       assertEquals(true, this.memoryUsageEventReceived);
       
+      MemoryUsageListener unaddedListener = new MemoryUsageListener() {
+        @Override
+        public void updateMemoryUsed(final long bytesUsed) {
+          throw new IllegalStateException("Should never be called");
+        }
+      };
+      ma.removeMemoryUsageListener(unaddedListener);
+      
       ma.removeMemoryUsageListener(listener);
       
+      ma.removeMemoryUsageListener(unaddedListener);
+
       this.expectedMemoryUsage = SMALL_ALLOC_SIZE * 2;
       this.memoryUsageEventReceived = false;
       smc = ma.allocate(SMALL_ALLOC_SIZE-perObjectOverhead, null);


[41/50] [abbrv] incubator-geode git commit: Fixing a find-bugs issue

Posted by je...@apache.org.
Fixing a find-bugs issue

GMSJoinLeave had a static variable that should have been final but
was not.


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

Branch: refs/heads/feature/GEODE-17
Commit: e19fa40ca5079e0ce6930d60b04245dbfa07d6dd
Parents: ae8c475
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Wed Dec 2 10:12:04 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Wed Dec 2 10:13:08 2015 -0800

----------------------------------------------------------------------
 .../internal/membership/gms/membership/GMSJoinLeave.java         | 4 ++--
 .../distributed/internal/membership/MembershipJUnitTest.java     | 4 ++--
 gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java   | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e19fa40c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 2f8d734..2f9c514 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -88,7 +88,7 @@ import com.gemstone.gemfire.security.AuthenticationFailedException;
  */
 public class GMSJoinLeave implements JoinLeave, MessageHandler {
   
-  public static String BYPASS_DISCOVERY = "gemfire.bypass-discovery";
+  public static final String BYPASS_DISCOVERY_PROPERTY = "gemfire.bypass-discovery";
 
   /** amount of time to wait for responses to FindCoordinatorRequests */
   private static final int DISCOVERY_TIMEOUT = Integer.getInteger("gemfire.discovery-timeout", 3000);
@@ -221,7 +221,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
   public boolean join() {
 
     try {
-      if (Boolean.getBoolean(BYPASS_DISCOVERY)) {
+      if (Boolean.getBoolean(BYPASS_DISCOVERY_PROPERTY)) {
         synchronized(viewInstallationLock) {
           becomeCoordinator();
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e19fa40c/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
index 91889df..2ce1ca7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
@@ -185,14 +185,14 @@ public class MembershipJUnitTest {
 
       // start the first membership manager
       try {
-        System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY, "true");
+        System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
         DistributedMembershipListener listener1 = mock(DistributedMembershipListener.class);
         DMStats stats1 = mock(DMStats.class);
         System.out.println("creating 1st membership manager");
         m1 = MemberFactory.newMembershipManager(listener1, config, transport, stats1);
         m1.startEventProcessing();
       } finally {
-        System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY);
+        System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY);
       }
       
       // start the second membership manager

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e19fa40c/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java b/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
index ad437c9..f3109f3 100644
--- a/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
+++ b/gemfire-core/src/test/java/dunit/standalone/DUnitLauncher.java
@@ -245,11 +245,11 @@ public class DUnitLauncher {
         //Tell the locator it's the first in the system for
         //faster boot-up
         
-        System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY, "true");
+        System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
         try {
           Locator.startLocatorAndDS(locatorPort, locatorLogFile, p);
         } finally {
-          System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY);
+          System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY);
         }
         
         return null;


[47/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-17

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/DiskStoreMXBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/DistributedSystemMXBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/GatewayReceiverMXBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/GatewaySenderMXBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/LockServiceMXBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/ManagerMXBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/MemberMXBean.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/ManagementAgent.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/RestAgent.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/SystemManagementService.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ClientCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ConfigCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/CreateAlterDestroyRegionCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DataCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DeployCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DiskStoreCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/DurableClientCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ExportImportSharedConfigurationCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/FunctionCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/GfshHelpCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/IndexCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/LauncherLifecycleCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/MemberCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/MiscellaneousCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/PDXCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/QueueCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/RegionCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
index d173c97,edab207..2dfac0a
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/ShellCommands.java
@@@ -214,24 -206,19 +222,25 @@@ public class ShellCommands implements C
              url = url.replace("http:", "https:");
            }
          }
-         
+ 
 +        Map<String,String> securityProperties = new HashMap<String, String>();
 +        
 +        Iterator<String> it = sslConfigProps.keySet().iterator();
 +        while(it.hasNext()){
 +          String secKey = it.next();
 +          securityProperties.put(secKey, sslConfigProps.get(secKey));
 +        }
-         
-         LogWrapper.getInstance().warning(String.format("Sending HTTP request for Link Index at (%1$s)...", url.concat("/index")));
 +
-         LinkIndex linkIndex = new SimpleHttpRequester(gemfireShell, CONNECT_LOCATOR_TIMEOUT_MS, securityProperties).exchange(url.concat("/index"), LinkIndex.class);
+         // This is so that SSL termination results in https URLs being returned
+         String query = (url.startsWith("https")) ? "?scheme=https" : "";
  
-         LogWrapper.getInstance().warning(String.format("Received Link Index (%1$s)", linkIndex.toString()));
 -        LogWrapper.getInstance().warning(String.format("Sending HTTP request for Link Index at (%1$s)...", url.concat("/index")));
++        LogWrapper.getInstance().warning(String.format("Sending HTTP request for Link Index at (%1$s)...", url.concat("/index").concat(query)));
  
-         
 -        LinkIndex linkIndex = new SimpleHttpRequester(CONNECT_LOCATOR_TIMEOUT_MS).get(url.concat("/index").concat(query), LinkIndex.class);
++        LinkIndex linkIndex = new SimpleHttpRequester(gemfireShell, CONNECT_LOCATOR_TIMEOUT_MS, securityProperties).exchange(url.concat("/index").concat(query), LinkIndex.class);
+ 
+         LogWrapper.getInstance().warning(String.format("Received Link Index (%1$s)", linkIndex.toString()));
  
 -        Gfsh gemfireShell = getGfsh();
 -
 -        HttpOperationInvoker operationInvoker = new RestHttpOperationInvoker(linkIndex, gemfireShell, url);
 +        HttpOperationInvoker operationInvoker = new RestHttpOperationInvoker(linkIndex, gemfireShell, url, securityProperties);
  
          Initializer.init(operationInvoker);
          gemfireShell.setOperationInvoker(operationInvoker);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/StatusCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/commands/WanCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/shell/JmxOperationInvoker.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControl.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlContext.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlContext.java
index e44dc18,225d766..8153149
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlContext.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlContext.java
@@@ -1,14 -1,21 +1,30 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
  package com.gemstone.gemfire.management.internal.security;
  
 +/**
 + * 
 + * ResourceOperationContext passed to AccessControlMBean for Authorization calls made
 + * from AccessControlMBean
 + * 
 + * @author tushark
 + * @since 9.0
 + *
 + */
  public class AccessControlContext extends ResourceOperationContext {
    
    private ResourceOperationCode code;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlMXBean.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlMXBean.java
index acd0ca3,68c3d64..144b90a
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlMXBean.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/AccessControlMXBean.java
@@@ -1,13 -1,23 +1,29 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
  package com.gemstone.gemfire.management.internal.security;
  
 +/**
 + * Interface for AccessControlMBean
 + * @author tushark
 + * @since 9.0
 + */
  public interface AccessControlMXBean {
  
 +  @ResourceOperation(resource=Resource.MEMBER, operation=ResourceConstants.LIST_DS)
    public boolean authorize(String role);
    
  }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/CLIOperationContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/JMXOperationContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/MBeanServerWrapper.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
index 9158ddd,c4e7dc5..aa972c5
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ManagementInterceptor.java
@@@ -1,19 -1,22 +1,35 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
  package com.gemstone.gemfire.management.internal.security;
  
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.ACCESS_DENIED_MESSAGE;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.GET_ATTRIBUTE;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.GET_ATTRIBUTES;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.GET_PREFIX;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.PASSWORD;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.PROCESS_COMMAND;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.SET_ATTRIBUTE;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.SET_ATTRIBUTES;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.SET_PREFIX;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.USER_NAME;
 +import static com.gemstone.gemfire.management.internal.security.ResourceConstants.WRONGE_CREDENTIALS_MESSAGE;
 +
  import java.lang.management.ManagementFactory;
 +import java.lang.reflect.Method;
  import java.security.AccessControlContext;
  import java.security.AccessController;
  import java.security.Principal;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
index 68b0468,5a47c07..d6252d5
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/Resource.java
@@@ -1,11 -1,21 +1,27 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
  package com.gemstone.gemfire.management.internal.security;
  
 +/**
 + * 
 + * @author tushark
 + *
 + * @since 9.0
 + */
  public enum Resource {
    DISTRIBUTED_SYSTEM,
    MEMBER,

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
index 01abb8c,3a8bbbf..14d4639
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceConstants.java
@@@ -1,32 -1,53 +1,48 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
  package com.gemstone.gemfire.management.internal.security;
  
 +/**
 + * 
 + * @author tushark
 + *
 + * @since 9.0
 + */
  public class ResourceConstants {
 -	
 -	//public static final String LIST_DS = "LIST_DS";
 -	public static final String READ_DS = "READ_DS";
 -	public static final String SET_DS = "SET_DS";
 -	public static final String CHANGE_ALERT_LEVEL_DS = "CHANGE_ALERT_LEVEL_DS";
 -	public static final String BACKUP_DS = "BACKUP_DS";
 -	public static final String REMOVE_DISKSTORE_DS = "REMOVE_DISKSTORE_DS";
 -	public static final String SHUTDOWN_DS = "SHUTDOWN_DS";
 -	public static final String QUERYDATA_DS = "QUERYDATA_DS";
 -	public static final String ADMIN_DS = "ADMIN_DS";
 -	
 -	/*
 -	public static final String REBALANCE = "REBALANCE";
 -	public static final String PUT = "PUT";
 -	public static final String EXPORT_DATA = "EXPORT_DATA";
 -	public static final String IMPORT_DATA = "IMPORT_DATA";
 -	public static final String LOCATE_ENTRY = "LOCATE_ENTRY";*/
 -	
 -	public static final String PULSE_DASHBOARD = "PULSE_DASHBOARD";
 -  public static final String PULSE_DATABROWSER = "PULSE_DATABROWSER";
 -  public static final String PULSE_ADMIN_V1 = "PULSE_ADMIN_V1";
 -  public static final String PULSE_WEBGFSH = "PULSE_WEBGFSH";  
 -	
 -	public static final String DEFAULT_LABEL="";
 -	
 -	public static final String RESORUCE_SEC_DESCRIPTOR = "resource.secDescriptor";
 -	public static final String RESORUCE_AUTH_ACCESSOR = "resource-auth-accessor";
 -	public static final String RESORUCE_AUTHENTICATOR = "resource-authenticator";
 -  public static final String RESORUCE_DEFAULT_SEC_DESCRIPTOR = "resourceSecDesc.json";
    
 -  //All ResourceOperation Codes
 +  public static final String DEFAULT_LABEL="";
 +  
 +  public static final String RESORUCE_SEC_DESCRIPTOR = "resource.secDescriptor";
 +  public static final String RESORUCE_AUTH_ACCESSOR = "resource-auth-accessor";
 +  public static final String RESORUCE_AUTHENTICATOR = "resource-authenticator";
 +  public static final String RESORUCE_DEFAULT_SEC_DESCRIPTOR = "resourceSecDesc.json";
 +  public static final String CREATE_MBEAN = "createMBean";
 +  public static final String UNREGISTER_MBEAN = "unregisterMBean";
 +  public static final String SET_PREFIX = "set";
 +  public static final String SET_ATTRIBUTE = "setAttribute";
 +  public static final String SET_ATTRIBUTES= "setAttributes";
 +  public static final String GET_ATTRIBUTES= "getAttributes";
 +  public static final String GET_ATTRIBUTE = "getAttribute";
 +  public static final String GET_PREFIX = "get";
 +  public static final String GET_IS_PREFIX = "is";
 +  public static final String REGISTER_MBEAN = "registerMBean";
 +  public static final String PROCESS_COMMAND ="processCommand";
 +  public static final String ACCESS_DENIED_MESSAGE = "Access Denied";
 +  public static final String WRONGE_CREDENTIALS_MESSAGE = "Wrong Credentials";
    
    public static final String ALTER_REGION = "ALTER_REGION";
    public static final String ALTER_RUNTIME = "ALTER_RUNTIME";

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperation.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
index c88e42c,50b22a3..dfbf926
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/security/ResourceOperationContext.java
@@@ -1,9 -1,22 +1,25 @@@
+ /*
+  * Licensed to the Apache Software Foundation (ASF) under one or more
+  * contributor license agreements.  See the NOTICE file distributed with
+  * this work for additional information regarding copyright ownership.
+  * The ASF licenses this file to You under the Apache License, Version 2.0
+  * (the "License"); you may not use this file except in compliance with
+  * the License.  You may obtain a copy of the License at
+  *
+  *      http://www.apache.org/licenses/LICENSE-2.0
+  *
+  * Unless required by applicable law or agreed to in writing, software
+  * distributed under the License is distributed on an "AS IS" BASIS,
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  * See the License for the specific language governing permissions and
+  * limitations under the License.
+  */
  package com.gemstone.gemfire.management.internal.security;
  
 +import java.util.ArrayList;
 +import java.util.Collections;
  import java.util.HashMap;
 +import java.util.List;
  import java.util.Map;
  
  import com.gemstone.gemfire.cache.operations.OperationContext;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
index 0aa614f,41a890a..47c6b17
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/AbstractCommandsController.java
@@@ -64,9 -55,9 +73,10 @@@ import org.springframework.web.bind.Web
  import org.springframework.web.bind.annotation.ExceptionHandler;
  import org.springframework.web.bind.annotation.InitBinder;
  import org.springframework.web.bind.annotation.ResponseBody;
 +import org.springframework.web.bind.annotation.ResponseStatus;
  import org.springframework.web.context.request.WebRequest;
  import org.springframework.web.servlet.support.ServletUriComponentsBuilder;
+ import org.springframework.web.util.UriComponentsBuilder;
  
  /**
   * The AbstractCommandsController class is the abstract base class encapsulating common functionality across all

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/ConfigCommandsController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DataCommandsController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/DiskStoreCommandsController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/FunctionCommandsController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/MiscellaneousCommandsController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/WanCommandsController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/controllers/support/EnvironmentVariablesHandlerInterceptor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/http/support/SimpleHttpRequester.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/shell/AbstractHttpOperationInvoker.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/shell/RestHttpOperationInvoker.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/web/shell/SimpleHttpOperationInvoker.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
index 5a9cd77,392b5dd..4534747
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ClientServerGetAllDUnitTest.java
@@@ -11,12 -20,12 +20,11 @@@ import com.gemstone.gemfire.cache.*
  import com.gemstone.gemfire.distributed.internal.DistributionConfig;
  import com.gemstone.gemfire.internal.AvailablePort;
  import com.gemstone.gemfire.internal.AvailablePortHelper;
--import com.gemstone.gemfire.internal.cache.PartitionedRegion;
  import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
- import com.gemstone.gemfire.cache30.BridgeTestCase;
+ import com.gemstone.gemfire.cache30.ClientServerTestCase;
  import com.gemstone.gemfire.cache30.CacheSerializableRunnable;
  import com.gemstone.gemfire.cache.client.*;
- import com.gemstone.gemfire.cache.util.BridgeServer;
+ import com.gemstone.gemfire.cache.server.CacheServer;
  
  import dunit.*;
  

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/extension/mock/MockExtensionCommands.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/CommandManagerJUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/GfshParserJUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/shell/GfshExecutionStrategyJUnitTest.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/security/ResourceOperationJUnit.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestTestUtils.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/test/java/dunit/DistributedTestCase.java
----------------------------------------------------------------------
diff --cc gemfire-core/src/test/java/dunit/DistributedTestCase.java
index 2e7ac03,a3d4785..81681b2
--- a/gemfire-core/src/test/java/dunit/DistributedTestCase.java
+++ b/gemfire-core/src/test/java/dunit/DistributedTestCase.java
@@@ -177,7 -191,7 +191,7 @@@ public abstract class DistributedTestCa
     * DUnit knows about.
     *
     * @return a Map of results, where the key is the VM and the value is the result
--   * @see VM#invoke(Callable)
++   * @see VM#invoke(java.util.concurrent.Callable)
     */
    protected static Map invokeInEveryVM(SerializableCallable work) {
      HashMap ret = new HashMap();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/build.gradle
----------------------------------------------------------------------
diff --cc gemfire-web-api/build.gradle
index 9552975,476872f..0669e0e
--- a/gemfire-web-api/build.gradle
+++ b/gemfire-web-api/build.gradle
@@@ -1,37 -1,31 +1,37 @@@
  apply plugin: 'war'
  
  dependencies {
-   compile 'commons-lang:commons-lang:2.4'
-   compile 'commons-fileupload:commons-fileupload:1.3.1'
-   compile 'com.fasterxml:classmate:0.9.0'
-   compile 'com.fasterxml.jackson.core:jackson-annotations:2.2.0'
-   compile 'com.fasterxml.jackson.core:jackson-core:2.2.0'
-   compile 'com.fasterxml.jackson.core:jackson-databind:2.2.0'
-   compile 'com.fasterxml.jackson.module:jackson-module-scala_2.10:2.1.5'
-   compile 'com.google.guava:guava:15.0'
-   compile 'com.mangofactory:swagger-springmvc:0.8.2'
-   compile 'org.json4s:json4s-ast_2.10:3.2.4'
-   compile 'org.json4s:json4s-ext_2.10:3.2.4'
-   compile 'org.json4s:json4s-core_2.10:3.2.4'
-   compile 'org.json4s:json4s-jackson_2.10:3.2.4'
-   compile 'org.json4s:json4s-native_2.10:3.2.4'
-   compile 'org.scala-lang:scala-reflect:2.10.0'
-   compile 'org.scala-lang:scala-library:2.10.0'
-   compile 'org.springframework.hateoas:spring-hateoas:0.16.0.RELEASE'
-   compile 'org.springframework:spring-aspects:3.2.12.RELEASE'
-   compile 'org.springframework:spring-oxm:3.2.12.RELEASE'
-   compile 'com.thoughtworks.paranamer:paranamer:2.3'
-   compile 'com.wordnik:swagger-annotations:1.3.2'
-   compile 'com.wordnik:swagger-core_2.10:1.3.2'
- 
-   provided 'javax.servlet:javax.servlet-api:3.1.0'
+   compile 'commons-lang:commons-lang:' + project.'commons-lang.version'
+   compile 'commons-fileupload:commons-fileupload:' + project.'commons-fileupload.version'
+   compile 'com.fasterxml:classmate:' + project.'classmate.version'
+   compile 'com.fasterxml.jackson.core:jackson-annotations:' + project.'jackson.version'
+   compile 'com.fasterxml.jackson.core:jackson-core:' + project.'jackson.version'
+   compile 'com.fasterxml.jackson.core:jackson-databind:' + project.'jackson.version'
+   compile 'com.fasterxml.jackson.module:jackson-module-scala_2.10:' + project.'jackson-module-scala_2.10.version'
+   compile 'com.google.guava:guava:' + project.'guava.version'
+   compile 'com.mangofactory:swagger-springmvc:' + project.'swagger-springmvc.version'
+   compile 'com.thoughtworks.paranamer:paranamer:' + project.'paranamer.version'
+   compile 'com.wordnik:swagger-annotations:' + project.'swagger.version'
+   compile 'com.wordnik:swagger-core_2.10:' + project.'swagger.version'
+   compile 'org.json4s:json4s-ast_2.10:' + project.'json4s.version'
+   compile 'org.json4s:json4s-ext_2.10:' + project.'json4s.version'
+   compile 'org.json4s:json4s-core_2.10:' + project.'json4s.version'
+   compile 'org.json4s:json4s-jackson_2.10:' + project.'json4s.version'
+   compile 'org.json4s:json4s-native_2.10:' + project.'json4s.version'
+   compile 'org.scala-lang:scala-library:' + project.'scala.version'
+   compile 'org.scala-lang:scala-reflect:' + project.'scala.version'
+   compile 'org.springframework.hateoas:spring-hateoas:' + project.'spring-hateos.version'
+   compile 'org.springframework:spring-aspects:' + project.'springframework.version'
+   compile 'org.springframework:spring-oxm:' + project.'springframework.version'
+ 
+   provided 'javax.servlet:javax.servlet-api:' + project.'javax.servlet-api.version'
    provided project(':gemfire-core')
 +  
 +  testCompile 'org.apache.httpcomponents:httpclient:4.3.3'
 +  testCompile 'org.apache.httpcomponents:httpcore:4.3.3'
 +    
 +  provided project(path: ':gemfire-junit', configuration: 'testOutput')
 +  provided project(path: ':gemfire-core', configuration: 'testOutput')
  }
  
  jar {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/AbstractBaseController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/BaseControllerAdvice.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/CommonCrudController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/FunctionAccessController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/PdxBasedCrudController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/controllers/QueryAccessController.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-web-api/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpISDUnitTest.java
----------------------------------------------------------------------
diff --cc gemfire-web-api/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpISDUnitTest.java
index 8e02a8f,0000000..460f81a
mode 100644,000000..100644
--- a/gemfire-web-api/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpISDUnitTest.java
+++ b/gemfire-web-api/src/test/java/com/gemstone/gemfire/rest/internal/web/controllers/RestAPIsAndInterOpISDUnitTest.java
@@@ -1,996 -1,0 +1,996 @@@
 +package com.gemstone.gemfire.rest.internal.web.controllers;
 +
 +import java.io.BufferedReader;
 +import java.io.IOException;
 +import java.io.InputStream;
 +import java.io.InputStreamReader;
 +import java.util.Arrays;
 +import java.util.Calendar;
 +import java.util.HashMap;
 +import java.util.Map;
 +import java.util.Properties;
 +
++import com.gemstone.gemfire.cache.server.CacheServer;
 +import org.apache.http.HttpEntity;
 +import org.apache.http.client.ClientProtocolException;
 +import org.apache.http.client.methods.CloseableHttpResponse;
 +import org.apache.http.client.methods.HttpDelete;
 +import org.apache.http.client.methods.HttpGet;
 +import org.apache.http.client.methods.HttpPost;
 +import org.apache.http.client.methods.HttpPut;
 +import org.apache.http.entity.StringEntity;
 +import org.apache.http.impl.client.CloseableHttpClient;
 +import org.apache.http.impl.client.HttpClients;
 +//import com.gemstone.gemfire.rest.internal.web.util.DateTimeUtils;
 +import org.json.JSONArray;
 +import org.json.JSONException;
 +import org.json.JSONObject;
 +
 +import util.TestException;
 +
 +import com.gemstone.gemfire.cache.AttributesFactory;
 +import com.gemstone.gemfire.cache.Cache;
 +import com.gemstone.gemfire.cache.CacheFactory;
 +import com.gemstone.gemfire.cache.DataPolicy;
 +import com.gemstone.gemfire.cache.Region;
 +import com.gemstone.gemfire.cache.RegionAttributes;
 +import com.gemstone.gemfire.cache.RegionFactory;
 +import com.gemstone.gemfire.cache.RegionShortcut;
 +import com.gemstone.gemfire.cache.client.ClientCache;
 +import com.gemstone.gemfire.cache.client.ClientCacheFactory;
 +import com.gemstone.gemfire.cache.client.ClientRegionFactory;
 +import com.gemstone.gemfire.cache.client.ClientRegionShortcut;
 +import com.gemstone.gemfire.cache.client.internal.LocatorTestBase;
 +import com.gemstone.gemfire.cache.server.ServerLoadProbe;
- import com.gemstone.gemfire.cache.util.BridgeServer;
 +import com.gemstone.gemfire.distributed.DistributedSystem;
 +import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 +import com.gemstone.gemfire.internal.AvailablePort;
 +import com.gemstone.gemfire.internal.AvailablePortHelper;
 +import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 +import com.gemstone.gemfire.management.ManagementTestBase;
 +import com.gemstone.gemfire.management.internal.security.CommandTestBase;
 +import com.gemstone.gemfire.pdx.PdxInstance;
 +
 +import dunit.Host;
 +import dunit.SerializableCallable;
 +import dunit.SerializableRunnable;
 +import dunit.VM;
 +
 +/**
 + * Dunit Test containing inter - operations between REST Client and Gemfire cache client
 + * @author Nilkanth Patel
 + * @since 8.0
 + */
 +
 +public class RestAPIsAndInterOpISDUnitTest extends LocatorTestBase {
 +  
 +  private static final long serialVersionUID = -254776154266339226L;
 +
 +  private ManagementTestBase helper;
 +
 +  public static final String PEOPLE_REGION_NAME = "People";
 +
 +  //private static RestTemplate restTemplate;
 +
 +  private static final String findAllPeopleQuery = "/queries?id=findAllPeople&q=SELECT%20*%20FROM%20/People";
 +  private static final String findPeopleByGenderQuery = "/queries?id=filterByGender&q=SELECT%20*%20from%20/People%20where%20gender=$1";
 +  private static final String findPeopleByLastNameQuery = "/queries?id=filterByLastName&q=SELECT%20*%20from%20/People%20where%20lastName=$1";
 +
 +  private static final String[] PARAM_QUERY_IDS_ARRAY = { "findAllPeople",
 +      "filterByGender", "filterByLastName" };
 +  
 +  final static String QUERY_ARGS = "["
 +      + "{"
 +      + "\"@type\": \"string\","
 +      + "\"@value\": \"Patel\""
 +      + "}"
 +      + "]";
 +
 +  final static String PERSON_AS_JSON_CAS = "{"
 +      + "\"@old\" :" 
 +      + "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 101," + " \"firstName\": \"Mithali\","
 +      + " \"middleName\": \"Dorai\"," + " \"lastName\": \"Raj\","
 +      + " \"birthDate\": \"12/04/1982\"," + "\"gender\": \"FEMALE\"" 
 +      + "},"
 +      + "\"@new\" :" 
 +      + "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 1101," + " \"firstName\": \"Virat\","
 +      + " \"middleName\": \"Premkumar\"," + " \"lastName\": \"Kohli\","
 +      + " \"birthDate\": \"08/11/1988\"," + "\"gender\": \"MALE\"" 
 +      + "}"
 +      + "}";
 +    
 +  final static String PERSON_AS_JSON_REPLACE = "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 501," + " \"firstName\": \"Barack\","
 +      + " \"middleName\": \"Hussein\"," + " \"lastName\": \"Obama\","
 +      + " \"birthDate\": \"04/08/1961\"," + "\"gender\": \"MALE\"" 
 +      + "}";
 +  
 +  private static final String PERSON_LIST_AS_JSON = "[" + "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 3," + " \"firstName\": \"Nishka3\","
 +      + " \"middleName\": \"Nilkanth3\"," + " \"lastName\": \"Patel3\","
 +      + " \"birthDate\": \"07/31/2009\"," + "\"gender\": \"FEMALE\"" + "},"
 +      + "{" + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 4," + " \"firstName\": \"Tanay4\","
 +      + " \"middleName\": \"kiran4\"," + " \"lastName\": \"Patel4\","
 +      + " \"birthDate\": \"23/08/2012\"," + "\"gender\": \"MALE\"" + "}," + "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 5," + " \"firstName\": \"Nishka5\","
 +      + " \"middleName\": \"Nilkanth5\"," + " \"lastName\": \"Patel5\","
 +      + " \"birthDate\": \"31/09/2009\"," + "\"gender\": \"FEMALE\"" + "},"
 +      + "{" + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 6," + " \"firstName\": \"Tanay6\","
 +      + " \"middleName\": \"Kiran6\"," + " \"lastName\": \"Patel\","
 +      + " \"birthDate\": \"23/08/2012\"," + "\"gender\": \"MALE\"" + "}," + "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 7," + " \"firstName\": \"Nishka7\","
 +      + " \"middleName\": \"Nilkanth7\"," + " \"lastName\": \"Patel\","
 +      + " \"birthDate\": \"31/09/2009\"," + "\"gender\": \"FEMALE\"" + "},"
 +      + "{" + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 8," + " \"firstName\": \"Tanay8\","
 +      + " \"middleName\": \"kiran8\"," + " \"lastName\": \"Patel\","
 +      + " \"birthDate\": \"23/08/2012\"," + "\"gender\": \"MALE\"" + "}," + "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 9," + " \"firstName\": \"Nishka9\","
 +      + " \"middleName\": \"Nilkanth9\"," + " \"lastName\": \"Patel\","
 +      + " \"birthDate\": \"31/09/2009\"," + "\"gender\": \"FEMALE\"" + "},"
 +      + "{" + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 10," + " \"firstName\": \"Tanay10\","
 +      + " \"middleName\": \"kiran10\"," + " \"lastName\": \"Patel\","
 +      + " \"birthDate\": \"23/08/2012\"," + "\"gender\": \"MALE\"" + "}," + "{"
 +      + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 11," + " \"firstName\": \"Nishka11\","
 +      + " \"middleName\": \"Nilkanth11\"," + " \"lastName\": \"Patel\","
 +      + " \"birthDate\": \"31/09/2009\"," + "\"gender\": \"FEMALE\"" + "},"
 +      + "{" + "\"@type\": \"com.gemstone.gemfire.rest.internal.web.controllers.Person\","
 +      + "\"id\": 12," + " \"firstName\": \"Tanay12\","
 +      + " \"middleName\": \"kiran12\"," + " \"lastName\": \"Patel\","
 +      + " \"birthDate\": \"23/08/2012\"," + "\"gender\": \"MALE\"" + "}" + "]";
 +
 +  public RestAPIsAndInterOpISDUnitTest(String name) {
 +    super(name);
 +    this.helper = new ManagementTestBase(name);
 +
 +  }
 +
 +  public void setUp() throws Exception {
 +    disconnectAllFromDS();
 +    super.setUp();
 +  }
 +
 +  public void tearDown2() throws Exception {
 +    super.tearDown2();
 +    disconnectAllFromDS();
 +  }
 +  
 +  public static String startBridgeServerWithRestServiceOnInVM(VM vm, final String[] groups, final String locators, final String[] regions, final ServerLoadProbe probe) {
 +    
 +    final String hostName = vm.getHost().getHostName(); 
 +    final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
 +    
 +    //create Cache of given VM and start HTTP service with REST APIs service
 +    new RestAPIsAndInterOpISDUnitTest("temp").startBridgeServer(hostName, serverPort, groups, locators, regions, probe);
 +   
 +    String restEndPoint =  "http://" + hostName + ":" + serverPort + "/gemfire-api/v1";
 +    return restEndPoint;
 +  }
 +  
 +  @SuppressWarnings("deprecation")
 +  protected int startBridgeServer(String hostName, int restServicerPort, final String[] groups, final String locators, final String[] regions, final ServerLoadProbe probe) {
 +            
 +    Properties props = new Properties();
 +    props.setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
 +    props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
 +    props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
 +    props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, hostName);
 +    props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(restServicerPort));
 +    
 +    //Add security properties
 +    props.setProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.CustomRestAPIsAuthenticator.create");
 +    props.setProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.CustomRestAPIsAuthorization.create");
 +    //props.setProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.CustomRestAPIsAuthorization.create");
 +    props.setProperty(DistributionConfig.SECURITY_REST_TOKEN_SERVICE_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.DummyTokenService.create");
 +    
 +    DistributedSystem ds = getSystem(props);
 +    Cache cache = CacheFactory.create(ds);
 +    ((GemFireCacheImpl)cache).setReadSerialized(true);
 +    AttributesFactory factory = new AttributesFactory();
 +    
 +    factory.setEnableBridgeConflation(true);
 +    factory.setDataPolicy(DataPolicy.REPLICATE);
 +    RegionAttributes attrs = factory.create();
 +    for(int i = 0; i < regions.length; i++) {
 +      cache.createRegion(regions[i], attrs);
 +    }
 +    
-     BridgeServer server = cache.addBridgeServer();
++    CacheServer server = cache.addCacheServer();
 +    final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
 +    server.setPort(serverPort);
 +    server.setGroups(groups);
 +    server.setLoadProbe(probe);
 +    try {
 +      server.start();
 +    } catch (IOException e) {
 +      e.printStackTrace();
 +    }
 +    remoteObjects.put(CACHE_KEY, cache);
 +    return new Integer(serverPort);
 +  }
 +  
 +  public static void doPutsInClientCache() {
 +    ClientCache cache = GemFireCacheImpl.getInstance();
 +    assertNotNull(cache);
 +    Region<String, Object> region = cache.getRegion(PEOPLE_REGION_NAME);
 +   
 +    //put person object
 +    final Person person1 = new Person(101L, "Mithali", "Dorai", "Raj", DateTimeUtils.createDate(1982, Calendar.DECEMBER, 4), Gender.FEMALE);
 +    final Person person2 = new Person(102L, "Sachin", "Ramesh", "Tendulkar", DateTimeUtils.createDate(1975, Calendar.DECEMBER, 14), Gender.MALE);
 +    final Person person3 = new Person(103L, "Saurabh", "Baburav", "Ganguly", DateTimeUtils.createDate(1972, Calendar.AUGUST, 29), Gender.MALE);
 +    final Person person4 = new Person(104L, "Rahul", "subrymanyam", "Dravid", DateTimeUtils.createDate(1979, Calendar.MARCH, 17), Gender.MALE);
 +    final Person person5 = new Person(105L, "Jhulan", "Chidambaram", "Goswami", DateTimeUtils.createDate(1983, Calendar.NOVEMBER, 25), Gender.FEMALE);
 +   
 +    region.put("1", person1);
 +    region.put("2", person2);
 +    region.put("3", person3);
 +    region.put("4", person4);
 +    region.put("5", person5);
 +    
 +    final Person person6 = new Person(101L, "Rahul", "Rajiv", "Gndhi", DateTimeUtils.createDate(1970, Calendar.MAY, 14), Gender.MALE);
 +    final Person person7 = new Person(102L, "Narendra", "Damodar", "Modi", DateTimeUtils.createDate(1945, Calendar.DECEMBER, 24), Gender.MALE);
 +    final Person person8 = new Person(103L, "Atal", "Bihari", "Vajpayee", DateTimeUtils.createDate(1920, Calendar.AUGUST, 9), Gender.MALE);
 +    final Person person9 = new Person(104L, "Soniya", "Rajiv", "Gandhi", DateTimeUtils.createDate(1929, Calendar.MARCH, 27), Gender.FEMALE);
 +    final Person person10 = new Person(104L, "Priyanka", "Robert", "Gandhi", DateTimeUtils.createDate(1973, Calendar.APRIL, 15), Gender.FEMALE);
 +    
 +    final Person person11 = new Person(104L, "Murali", "Manohar", "Joshi", DateTimeUtils.createDate(1923, Calendar.APRIL, 25), Gender.MALE);
 +    final Person person12 = new Person(104L, "Lalkrishna", "Parmhansh", "Advani", DateTimeUtils.createDate(1910, Calendar.JANUARY, 01), Gender.MALE);
 +    final Person person13 = new Person(104L, "Shushma", "kumari", "Swaraj", DateTimeUtils.createDate(1943, Calendar.AUGUST, 10), Gender.FEMALE);
 +    final Person person14 = new Person(104L, "Arun", "raman", "jetly", DateTimeUtils.createDate(1942, Calendar.OCTOBER, 27), Gender.MALE);
 +    final Person person15 = new Person(104L, "Amit", "kumar", "shah", DateTimeUtils.createDate(1958, Calendar.DECEMBER, 21), Gender.MALE);
 +    final Person person16 = new Person(104L, "Shila", "kumari", "Dixit", DateTimeUtils.createDate(1927, Calendar.FEBRUARY, 15), Gender.FEMALE);
 +    
 +    Map<String, Object> userMap = new HashMap<String, Object>();
 +    userMap.put("6", person6);
 +    userMap.put("7", person7);
 +    userMap.put("8", person8);
 +    userMap.put("9", person9);
 +    userMap.put("10", person10);
 +    userMap.put("11", person11);
 +    userMap.put("12", person12);
 +    userMap.put("13", person13);
 +    userMap.put("14", person14);
 +    userMap.put("15", person15);
 +    userMap.put("16", person16);
 +    
 +    region.putAll(userMap);
 +    
 +    if (cache != null)
 +      cache.getLogger().info("Gemfire Cache Client: Puts successfully done");
 +  }
 +
 +  public static void doQueryOpsUsingRestApis(String restEndpoint) {
 +    String currentQueryOp = null;
 +    try {
 +      // Query TestCase-1 :: Prepare parameterized Queries
 +      {
 +        currentQueryOp = "findAllPeopleQuery";
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        HttpPost post = new HttpPost(restEndpoint + findAllPeopleQuery);
 +        post.addHeader("Content-Type", "application/json");
 +        post.addHeader("Accept", "application/json");
 +        post.addHeader("security-username", "admin");
 +        post.addHeader("security-password", "admin");
 +        
 +        CloseableHttpResponse createNamedQueryResponse = httpclient.execute(post);
 +        assertEquals(createNamedQueryResponse.getStatusLine().getStatusCode(), 201);
 +        assertNotNull(createNamedQueryResponse.getEntity());
 +        createNamedQueryResponse.close();        
 +        
 +
 +        post = new HttpPost(restEndpoint + findPeopleByGenderQuery);
 +        post.addHeader("Content-Type", "application/json");
 +        post.addHeader("Accept", "application/json");
 +        post.addHeader("security-username", "admin");
 +        post.addHeader("security-password", "admin");
 +        
 +        createNamedQueryResponse = httpclient.execute(post);
 +        assertEquals(createNamedQueryResponse.getStatusLine().getStatusCode(), 201);
 +        assertNotNull(createNamedQueryResponse.getEntity());
 +        createNamedQueryResponse.close();
 +        
 +
 +        post = new HttpPost(restEndpoint + findPeopleByLastNameQuery);
 +        post.addHeader("Content-Type", "application/json");
 +        post.addHeader("Accept", "application/json");
 +        post.addHeader("security-username", "admin");
 +        post.addHeader("security-password", "admin");
 +        createNamedQueryResponse = httpclient.execute(post);
 +        assertEquals(createNamedQueryResponse.getStatusLine().getStatusCode(), 201);
 +        assertNotNull(createNamedQueryResponse.getEntity());
 +        createNamedQueryResponse.close();
 +      }
 +      
 +      // Query TestCase-2 :: List all parameterized queries
 +      {
 +        currentQueryOp = "listAllQueries";
 +        HttpGet get = new HttpGet(restEndpoint + "/queries");
 +        get.addHeader("security-username", "admin");
 +        get.addHeader("security-password", "admin");
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        CloseableHttpResponse listAllQueriesResponse = httpclient.execute(get);
 +        assertEquals(listAllQueriesResponse.getStatusLine().getStatusCode(), 200);
 +        assertNotNull(listAllQueriesResponse.getEntity());
 +        
 +        HttpEntity entity = listAllQueriesResponse.getEntity();
 +        InputStream content = entity.getContent();
 +        BufferedReader reader = new BufferedReader(new InputStreamReader(
 +            content));
 +        String line;
 +        StringBuffer sb = new StringBuffer();
 +        while ((line = reader.readLine()) != null) {
 +          sb.append(line);
 +        }
 +        listAllQueriesResponse.close();
 +      
 +        // Check whether received response contains expected query IDs.
 +
 +        JSONObject jsonObject = new JSONObject(sb.toString());
 +        JSONArray jsonArray = jsonObject.getJSONArray("queries");
 +        for (int i = 0; i < jsonArray.length(); i++) {
 +          assertTrue(
 +            "PREPARE_PARAMETERIZED_QUERY: function IDs are not matched",
 +            Arrays.asList(PARAM_QUERY_IDS_ARRAY).contains(
 +                jsonArray.getJSONObject(i).getString("id")));
 +        }
 +      }  
 +      
 +      // Query TestCase-3 :: Run the specified named query passing in scalar values for query parameters.
 +      {
 +        currentQueryOp = "filterByLastName";
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        HttpPost post = new HttpPost(restEndpoint + "/queries/filterByLastName");
 +        post.addHeader("Content-Type", "application/json");
 +        post.addHeader("Accept", "application/json");
 +        post.addHeader("security-username", "admin");
 +        post.addHeader("security-password", "admin");
 +        
 +        StringEntity entity = new StringEntity(QUERY_ARGS);       
 +        post.setEntity(entity);
 +        CloseableHttpResponse runNamedQueryResponse = httpclient.execute(post);
 +
 +        assertEquals(200, runNamedQueryResponse.getStatusLine().getStatusCode());
 +        assertNotNull(runNamedQueryResponse.getEntity());
 +      }
 +    } catch ( Exception e ) {
 +      throw new TestException(CommandTestBase.getStackTrace(e));
 +    }
 +  }
 +  
 +  public static void verifyUpdatesInClientCache() {
 +    ClientCache cache = GemFireCacheImpl.getInstance();
 +    assertNotNull(cache);
 +    Region<String, Object> region = cache.getRegion(PEOPLE_REGION_NAME);
 +    
 +    {
 +      Person expectedPerson = new Person(3L, "Nishka3", "Nilkanth3", "Patel3", DateTimeUtils.createDate(2009, Calendar.JULY, 31), Gender.FEMALE );
 +      Object value = region.get("3");
 +      if (value instanceof PdxInstance) {
 +        PdxInstance pi3  = (PdxInstance) value;
 +        Person actualPerson = (Person) pi3.getObject();
 +        assertEquals(actualPerson.getId(), expectedPerson.getId());
 +        assertEquals(actualPerson.getFirstName(), expectedPerson.getFirstName());
 +        assertEquals(actualPerson.getMiddleName(), expectedPerson.getMiddleName());
 +        assertEquals(actualPerson.getLastName(), expectedPerson.getLastName());
 +        assertEquals(actualPerson.getBirthDate(), expectedPerson.getBirthDate());
 +        assertEquals(actualPerson.getGender(), expectedPerson.getGender());
 +      } else if (value instanceof Person) {
 +        fail("VerifyUpdatesInClientCache, Get on key 3, Expected to get value of type PdxInstance ");
 +      }
 +    }
 +     
 +    
 +    //TODO: uncomment it once following issue encountered in put?op=CAS is fixed or document the issue
 +    // CAS functionality is not working in following test case
 +    // step-1: Java client, Region.put("K", A);
 +    //Step-2: Rest CAS request for key "K" with data "@old" = A. CAS is failing as existing PdxInstance in cache and
 +    //        PdxInstance generated from JSON (CAS request) does not match as their value's type are getting changed 
 +    /*
 +    //verify update on key "1"
 +    {
 +      Object obj = region.get("1");
 +      if (obj instanceof PdxInstance) {
 +        PdxInstance pi = (PdxInstance)obj;
 +        Person p1 = (Person)pi.getObject();
 +        System.out.println("Nilkanth1 : verifyUpdatesInClientCache() : GET ON KEY=1" + p1.toString());
 +      }else {
 +        System.out.println("Nilkanth1 : verifyUpdatesInClientCache() GET ON KEY=1  returned OBJECT: " + obj.toString());
 +      }
 +    }
 +    */
 +    
 +    //verify update on key "2"
 +    {
 +      Person expectedPerson = new Person(501L, "Barack", "Hussein", "Obama", DateTimeUtils.createDate(1961, Calendar.APRIL, 8), Gender.MALE );
 +      Object value = region.get("2");
 +      if (value instanceof PdxInstance) {
 +        PdxInstance pi3  = (PdxInstance) value;
 +        Person actualPerson = (Person) pi3.getObject();
 +        assertEquals(actualPerson.getId(), expectedPerson.getId());
 +        assertEquals(actualPerson.getFirstName(), expectedPerson.getFirstName());
 +        assertEquals(actualPerson.getMiddleName(), expectedPerson.getMiddleName());
 +        assertEquals(actualPerson.getLastName(), expectedPerson.getLastName());
 +        assertEquals(actualPerson.getBirthDate(), expectedPerson.getBirthDate());
 +        assertEquals(actualPerson.getGender(), expectedPerson.getGender());
 +      }else {
 +        fail("VerifyUpdatesInClientCache, Get on key 2, Expected to get value of type PdxInstance ");
 +      }
 +    }
 +    
 +    //verify Deleted key "13"
 +    {
 +      Object obj = region.get("13");
 +      assertEquals(obj, null);
 +      
 +      obj = region.get("14");
 +      assertEquals(obj, null);
 +      
 +      obj = region.get("15");
 +      assertEquals(obj, null);
 +      
 +      obj = region.get("16");
 +      assertEquals(obj, null);
 +    }
 +    
 +  }
 +  
 +  public static void doUpdatesUsingRestApis(String restEndpoint) {
 +    //UPdate keys using REST calls
 +    {
 +
 +      try {
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        HttpPut put = new HttpPut(restEndpoint
 +            + "/People/3,4,5,6,7,8,9,10,11,12");
 +        put.addHeader("Content-Type", "application/json");
 +        put.addHeader("Accept", "application/json");
 +        put.addHeader("security-username", "admin");
 +        put.addHeader("security-password", "admin");
 +
 +        StringEntity entity = new StringEntity(PERSON_LIST_AS_JSON);
 +        put.setEntity(entity);
 +        CloseableHttpResponse result = httpclient.execute(put);
 +      } catch (Exception e) {
 +        throw new TestException(CommandTestBase.getStackTrace(e));
 +      }
 +    }
 +    
 +    //Delete Single keys
 +    {
 +      try {
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        HttpDelete delete = new HttpDelete(restEndpoint + "/People/13");
 +        delete.addHeader("Content-Type", "application/json");
 +        delete.addHeader("Accept", "application/json");
 +        delete.addHeader("security-username", "admin");
 +        delete.addHeader("security-password", "admin");
 +        CloseableHttpResponse result = httpclient.execute(delete);
 +      } catch (Exception e) {
 +        throw new TestException(CommandTestBase.getStackTrace(e));
 +      }
 +    }
 +    
 +    //Delete set of keys
 +    {
 +      try {
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        HttpDelete delete = new HttpDelete(restEndpoint + "/People/14,15,16");
 +        delete.addHeader("Content-Type", "application/json");
 +        delete.addHeader("Accept", "application/json");
 +        delete.addHeader("security-username", "admin");
 +        delete.addHeader("security-password", "admin");
 +        
 +        CloseableHttpResponse result = httpclient.execute(delete);
 +      } catch (Exception e) {
 +        throw new TestException(CommandTestBase.getStackTrace(e));
 +      }
 +    }
 +    
 +    //REST put?op=CAS for key 1
 +    /*
 +    try {   
 +    {  
 +      HttpEntity<Object> entity = new HttpEntity<Object>(PERSON_AS_JSON_CAS, headers);
 +      ResponseEntity<String> result = RestTestUtils.getRestTemplate().exchange(
 +        restEndpoint + "/People/1?op=cas",
 +        HttpMethod.PUT, entity, String.class);
 +    }
 +    } catch (HttpClientErrorException e) {
 +      
 +      fail("Caught HttpClientErrorException while doing put with op=cas");
 +    }catch (HttpServerErrorException se) {
 +      fail("Caught HttpServerErrorException while doing put with op=cas");
 +    }
 +    */ 
 +    
 +    //REST put?op=REPLACE for key 2
 +    {
 +      /*HttpEntity<Object> entity = new HttpEntity<Object>(PERSON_AS_JSON_REPLACE, headers);
 +      ResponseEntity<String> result = RestTestUtils.getRestTemplate().exchange(
 +        restEndpoint + "/People/2?op=replace",
 +      HttpMethod.PUT, entity, String.class);*/
 +      
 +      try {
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        HttpPut put = new HttpPut(restEndpoint
 +            + "/People/2?op=replace");
 +        put.addHeader("Content-Type", "application/json");
 +        put.addHeader("Accept", "application/json");
 +        put.addHeader("security-username", "admin");
 +        put.addHeader("security-password", "admin");
 +        
 +        StringEntity entity = new StringEntity(PERSON_AS_JSON_REPLACE);
 +        put.setEntity(entity);
 +        CloseableHttpResponse result = httpclient.execute(put);
 +      } catch (Exception e) {
 +        throw new TestException(CommandTestBase.getStackTrace(e));
 +      }
 +    }
 +  }
 +  
 +  public static void fetchRestServerEndpoints(String restEndpoint) {
 +    HttpGet get = new HttpGet(restEndpoint + "/servers");
 +    get.addHeader("Content-Type", "application/json");
 +    get.addHeader("Accept", "application/json");
 +    get.addHeader("security-username", "admin");
 +    get.addHeader("security-password", "admin");
 +    
 +    CloseableHttpClient httpclient = HttpClients.createDefault();
 +    CloseableHttpResponse response;
 +    
 +    try {
 +      response = httpclient.execute(get);
 +      HttpEntity entity = response.getEntity();
 +      InputStream content = entity.getContent();
 +      BufferedReader reader = new BufferedReader(new InputStreamReader(
 +          content));
 +      String line;
 +      StringBuffer str = new StringBuffer();
 +      while ((line = reader.readLine()) != null) {
 +        str.append(line);
 +      }
 +      
 +      //validate the satus code
 +      assertEquals(response.getStatusLine().getStatusCode(), 200);
 +      
 +      if(response.getStatusLine().getStatusCode() == 200) {
 +        JSONArray jsonArray = new JSONArray(str.toString());
 +        
 +        //verify total number of REST service endpoints in DS
 +        assertEquals(jsonArray.length(), 2);
 +      }
 +      
 +    } catch (ClientProtocolException e) { 
 +      e.printStackTrace();
 +      fail(" Rest Request should not have thrown ClientProtocolException!");
 +    } catch (IOException e) {
 +      e.printStackTrace();
 +      fail(" Rest Request should not have thrown IOException!");
 +    } catch (JSONException e) {
 +      e.printStackTrace();
 +      fail(" Rest Request should not have thrown  JSONException!");
 +    }
 +    
 +  }
 +  public static void VerifyGetUsingJavaAPIs(String restEndpoint) {
 +    ClientCache cache = GemFireCacheImpl.getInstance();
 +    assertNotNull(cache);
 +    Region<String, Object> region = cache.getRegion(PEOPLE_REGION_NAME);
 +    Object value = region.get("1");
 +  }
 +  
 +  public static void doGetsUsingRestApis(String restEndpoint) {
 +    //GET using Region APIs
 +    
 +      ClientCache cache = GemFireCacheImpl.getInstance();
 +      /*
 +      assertNotNull(cache);
 +      Region<String, Object> region = cache.getRegion(PEOPLE_REGION_NAME);
 +      Object value = region.get("1");
 +      if(value instanceof PdxInstance){
 +        System.out.println("Nilkanth: value is of Type PdxInstance");
 +        System.out.println("Nilkanth Person = " + ((PdxInstance)value).getField("id"));
 +      }else{
 +        System.out.println("Nilkanth: value is NOT of Type PdxInstance -> type = "+ value.getClass().getName());
 +      }
 +      */
 +      
 +    
 +    //HttpHeaders headers = setAcceptAndContentTypeHeaders(); 
 +    String currentOperation = null;
 +    JSONObject jObject;
 +    JSONArray jArray;
 +    try {    
 +      //1. Get on key="1" and validate result.
 +      {
 +        currentOperation = "GET on key 1";
 +        
 +        HttpGet get = new HttpGet(restEndpoint + "/People/1");
 +        get.addHeader("Content-Type", "application/json");
 +        get.addHeader("Accept", "application/json");
 +        get.addHeader("security-username", "admin");
 +        get.addHeader("security-password", "admin");
 +
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        CloseableHttpResponse response = httpclient.execute(get);
 +        
 +        HttpEntity entity = response.getEntity();
 +        InputStream content = entity.getContent();
 +        BufferedReader reader = new BufferedReader(new InputStreamReader(
 +            content));
 +        String line;
 +        StringBuffer str = new StringBuffer();
 +        while ((line = reader.readLine()) != null) {
 +          str.append(line);
 +        }
 +        
 +        jObject = new JSONObject(str.toString());
 +      
 +        assertEquals(jObject.get("id"), 101);
 +        assertEquals(jObject.get("firstName"), "Mithali");
 +        assertEquals(jObject.get("middleName"), "Dorai");
 +        assertEquals(jObject.get("lastName"), "Raj");
 +        assertEquals(jObject.get("gender"), Gender.FEMALE.name());
 +      }
 +         
 +      //2. Get on key="16" and validate result.
 +      {
 +        currentOperation = "GET on key 16";
 +
 +        
 +        HttpGet get = new HttpGet(restEndpoint + "/People/16");
 +        get.addHeader("Content-Type", "application/json");
 +        get.addHeader("Accept", "application/json");
 +        get.addHeader("security-username", "admin");
 +        get.addHeader("security-password", "admin");
 +
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        CloseableHttpResponse response = httpclient.execute(get);
 +        
 +        HttpEntity entity = response.getEntity();
 +        InputStream content = entity.getContent();
 +        BufferedReader reader = new BufferedReader(new InputStreamReader(
 +            content));
 +        String line;
 +        StringBuffer str = new StringBuffer();
 +        while ((line = reader.readLine()) != null) {
 +          str.append(line);
 +        }
 +        
 +        jObject = new JSONObject(str.toString());
 +        
 +      
 +        assertEquals(jObject.get("id"), 104);
 +        assertEquals(jObject.get("firstName"), "Shila");
 +        assertEquals(jObject.get("middleName"), "kumari");
 +        assertEquals(jObject.get("lastName"), "Dixit");
 +        assertEquals(jObject.get("gender"), Gender.FEMALE.name());
 +      }
 +      
 +      //3. Get all (getAll) entries in Region
 +      {
 +
 +        HttpGet get = new HttpGet(restEndpoint + "/People");
 +        get.addHeader("Content-Type", "application/json");
 +        get.addHeader("Accept", "application/json");
 +        get.addHeader("security-username", "admin");
 +        get.addHeader("security-password", "admin");
 +
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        CloseableHttpResponse result = httpclient.execute(get);
 +        assertEquals(result.getStatusLine().getStatusCode(), 200);
 +        assertNotNull(result.getEntity());
 +      
 +        HttpEntity entity = result.getEntity();
 +        InputStream content = entity.getContent();
 +        BufferedReader reader = new BufferedReader(new InputStreamReader(
 +            content));
 +        String line;
 +        StringBuffer sb = new StringBuffer();
 +        while ((line = reader.readLine()) != null) {
 +          sb.append(line);
 +        }
 +        result.close();
 +        
 +        try {
 +          jObject = new JSONObject(sb.toString());
 +          jArray = jObject.getJSONArray("People");
 +          assertEquals(jArray.length(), 16);
 +        } catch (JSONException e) {
 +          fail(" Rest Request ::" + currentOperation +  " :: should not have thrown JSONException ");
 +        }
 +      }
 +      
 +      //4. GetAll?limit=10 (10 entries) and verify results
 +      {
 +        HttpGet get = new HttpGet(restEndpoint + "/People?limit=10");
 +        get.addHeader("Content-Type", "application/json");
 +        get.addHeader("Accept", "application/json");
 +        get.addHeader("security-username", "admin");
 +        get.addHeader("security-password", "admin");
 +
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        CloseableHttpResponse response = httpclient.execute(get);
 +        assertEquals(response.getStatusLine().getStatusCode(), 200);
 +        assertNotNull(response.getEntity());
 +        
 +        HttpEntity entity = response.getEntity();
 +        InputStream content = entity.getContent();
 +        BufferedReader reader = new BufferedReader(new InputStreamReader(
 +            content));
 +        String line;
 +        StringBuffer str = new StringBuffer();
 +        while ((line = reader.readLine()) != null) {
 +          str.append(line);
 +        }
 +        
 +        try {
 +          jObject = new JSONObject(str.toString());
 +          jArray = jObject.getJSONArray("People");
 +          assertEquals(jArray.length(), 10);
 +        } catch (JSONException e) {
 +          fail(" Rest Request ::" + currentOperation +  " :: should not have thrown JSONException ");
 +        }
 +      }
 +      
 +      //5. Get keys - List all keys in region
 +      {  
 +        
 +        HttpGet get = new HttpGet(restEndpoint + "/People/keys");
 +        get.addHeader("Content-Type", "application/json");
 +        get.addHeader("Accept", "application/json");
 +        get.addHeader("security-username", "admin");
 +        get.addHeader("security-password", "admin");
 +
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        CloseableHttpResponse response = httpclient.execute(get);
 +        assertEquals(response.getStatusLine().getStatusCode(), 200);
 +        assertNotNull(response.getEntity());
 +        
 +        HttpEntity entity = response.getEntity();
 +        InputStream content = entity.getContent();
 +        BufferedReader reader = new BufferedReader(new InputStreamReader(
 +            content));
 +        String line;
 +        StringBuffer str = new StringBuffer();
 +        while ((line = reader.readLine()) != null) {
 +          str.append(line);
 +        }
 +        
 +        try {
 +          jObject = new JSONObject(str.toString());
 +          jArray = jObject.getJSONArray("keys"); 
 +          assertEquals(jArray.length(), 16);
 +        } catch (JSONException e) {
 +          fail(" Rest Request ::" + currentOperation +  " :: should not have thrown JSONException ");
 +        }
 +      } 
 +      
 +      //6. Get data for specific keys
 +      {  
 +       
 +        HttpGet get = new HttpGet(restEndpoint + "/People/1,3,5,7,9,11");
 +        get.addHeader("Content-Type", "application/json");
 +        get.addHeader("Accept", "application/json");
 +        get.addHeader("security-username", "admin");
 +        get.addHeader("security-password", "admin");
 +
 +        CloseableHttpClient httpclient = HttpClients.createDefault();
 +        CloseableHttpResponse response = httpclient.execute(get);
 +        assertEquals(response.getStatusLine().getStatusCode(), 200);
 +        assertNotNull(response.getEntity());
 +        
 +        HttpEntity entity = response.getEntity();
 +        InputStream content = entity.getContent();
 +        BufferedReader reader = new BufferedReader(new InputStreamReader(
 +            content));
 +        String line;
 +        StringBuffer str = new StringBuffer();
 +        while ((line = reader.readLine()) != null) {
 +          str.append(line);
 +        }
 +        
 +        try {
 +          jObject = new JSONObject(str.toString());
 +          jArray = jObject.getJSONArray("People");
 +          assertEquals(jArray.length(), 6);
 +          
 +        } catch (JSONException e) {
 +          fail(" Rest Request ::" + currentOperation +  " :: should not have thrown JSONException ");
 +        }
 +      } 
 +      
 +    }catch ( Exception e ) {
 +      throw new TestException(CommandTestBase.getStackTrace(e)); 
 +    }
 +    
 +  }
 +
 +  public static void createRegionInClientCache() {
 +    ClientCache cache = GemFireCacheImpl.getInstance();
 +    assertNotNull(cache);
 +    ClientRegionFactory<String, Object> crf = cache
 +        .createClientRegionFactory(ClientRegionShortcut.PROXY);
 +    Region<String, Object> region = crf.create(PEOPLE_REGION_NAME);
 +
 +  }
 +
 +  public static void createRegionInManager() {
 +    Cache cache = GemFireCacheImpl.getInstance();
 +    assertNotNull(cache);
 +
 +    RegionFactory<String, Object> rf = cache
 +        .createRegionFactory(RegionShortcut.REPLICATE);
 +    Region<String, Object> region = rf.create(PEOPLE_REGION_NAME);
 +  }
 +
 +  public static void createRegionInPeerServer() {
 +    Cache cache = GemFireCacheImpl.getInstance();
 +    assertNotNull(cache);
 +
 +    RegionFactory<String, Object> rf = cache
 +        .createRegionFactory(RegionShortcut.REPLICATE);
 +    Region<String, Object> region = rf.create(PEOPLE_REGION_NAME);
 +  }
 +
 +  /**
 +   * InterOps Test between REST-client, Peer Cache Client and Client Cache 
 +   * @throws Exception
 +   */
 + 
 +  public void testInterOpsWithReplicatedRegion() throws Exception {
 +
 +    final Host host = Host.getHost(0);
 +    VM locator = host.getVM(0);
 +    VM manager = host.getVM(1);
 +    VM server = host.getVM(2);
 +    VM client = host.getVM(3);
 +
 +    // start locator
 +    //int locatorPort = AvailablePortHelper.getRandomAvailableTCPPortOnVM(locator);
 +    int locatorPort = AvailablePort.getRandomAvailablePort(AvailablePort.SOCKET);
 +    
 +    
 +    startLocatorInVM(locator, locatorPort, "");
 +    
 +    // find locators
 +    String locators = getServerHostName(locator.getHost()) + "[" + locatorPort
 +        + "]";
 +     
 +    // start manager (peer cache)
 +    int managerPort = startManagerInVM(manager,/* groups */null, locators,
-         new String[] {REGION_NAME}, BridgeServer.DEFAULT_LOAD_PROBE);
++        new String[] {REGION_NAME}, CacheServer.DEFAULT_LOAD_PROBE);
 +    
 +    //start startBridgeServer With RestService enabled
 +    String restEndpoint = (String)server.invoke(RestAPIsAndInterOpISDUnitTest.class,
-         "startBridgeServerWithRestServiceOnInVM", new Object[] { server ,  null, locators, new String[] {REGION_NAME}, BridgeServer.DEFAULT_LOAD_PROBE });
++        "startBridgeServerWithRestServiceOnInVM", new Object[] { server ,  null, locators, new String[] {REGION_NAME}, CacheServer.DEFAULT_LOAD_PROBE });
 +    
 +    // create a client cache
 +    createClientCacheInVM(client, getServerHostName(locator.getHost()),
 +        locatorPort);
 +    
 +    // create region in Manager, peer cache and Client cache nodes
 +    manager.invoke(RestAPIsAndInterOpISDUnitTest.class, "createRegionInManager");
 +    
 +    server.invoke(RestAPIsAndInterOpISDUnitTest.class,
 +        "createRegionInPeerServer");
 +    
 +    client.invoke(RestAPIsAndInterOpISDUnitTest.class,
 +        "createRegionInClientCache");
 +    
 +    
 +    // do some person puts from clientcache
 +    client.invoke(RestAPIsAndInterOpISDUnitTest.class, "doPutsInClientCache");
 +
 +    //TEST: fetch all available REST endpoints
 +    //RestAPIsAndInterOpISDUnitTest.fetchRestServerEndpoints(restEndpoint);
 +    //System.out.println("Nilkanth: Test-11  Fetched REST endpoints SUCCESS!");
 +    
 +    // Controller VM - config REST Client and make HTTP calls
 +    RestAPIsAndInterOpISDUnitTest.doGetsUsingRestApis(restEndpoint);
 +    
 +    //update Data using REST APIs
 +    RestAPIsAndInterOpISDUnitTest.doUpdatesUsingRestApis(restEndpoint);
 +    
 +    client.invoke(RestAPIsAndInterOpISDUnitTest.class, "verifyUpdatesInClientCache");
 +    
 +    //Querying
 +    RestAPIsAndInterOpISDUnitTest.doQueryOpsUsingRestApis(restEndpoint);
 +    
 +    
 +    // stop the client and make sure the bridge server notifies
 +    // stopBridgeMemberVM(client);
 +    helper.closeCache(locator);
 +    helper.closeCache(manager);
 +    helper.closeCache(server);
 +    helper.closeCache(client);
 +
 +  }
 +
 +  private void createClientCacheInVM(VM vm, final String host, final int port) {
 +    SerializableRunnable connect = new SerializableRunnable(
 +        "Start Cache client") {
 +      public void run() {
 +        
 +        // Connect using the GemFire locator and create a Caching_Proxy cache
 +        ClientCache c = new ClientCacheFactory()
 +                        .set("security-client-auth-init", "templates.security.UserPasswordAuthInit.create")
 +                         .set("security-username", "admin")
 +                         .set("security-password", "admin")
 +                         .setPdxReadSerialized(true).addPoolLocator(host, port)
 +                         .create();
 +       
 +        Region r = c.createClientRegionFactory(
 +            ClientRegionShortcut.PROXY).create(REGION_NAME);
 +      }
 +    };
 +
 +    if (vm == null) {
 +      connect.run();
 +    } else {
 +      vm.invoke(connect);
 +    }
 +  }
 +
 +  private int startManagerInVM(VM vm, final String[] groups,
 +      final String locators, final String[] regions, final ServerLoadProbe probe) {
 +    SerializableCallable connect = new SerializableCallable("Start Manager ") {
 +      public Object call() throws IOException {
 +        Properties props = new Properties();
 +        props
 +            .setProperty(DistributionConfig.MCAST_PORT_NAME, String.valueOf(0));
 +        props.setProperty(DistributionConfig.LOCATORS_NAME, locators);
 +
 +        props.setProperty("jmx-manager", "true");
 +        props.setProperty("jmx-manager-start", "true");
 +        props.setProperty(DistributionConfig.JMX_MANAGER_PORT_NAME, "0");
 +        
 +        final int httpPort = AvailablePortHelper.getRandomAvailableTCPPort();
 +        //Set REST service related configuration
 +        props.setProperty(DistributionConfig.START_DEV_REST_API_NAME, "true");
 +        props.setProperty(DistributionConfig.HTTP_SERVICE_BIND_ADDRESS_NAME, "localhost");
 +        props.setProperty(DistributionConfig.HTTP_SERVICE_PORT_NAME, String.valueOf(httpPort));
 +        
 +        //Add security properties
 +        props.setProperty(DistributionConfig.SECURITY_CLIENT_AUTHENTICATOR_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.CustomRestAPIsAuthenticator.create");
 +        props.setProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.CustomRestAPIsAuthorization.create");
 +        //props.setProperty(DistributionConfig.SECURITY_CLIENT_ACCESSOR_PP_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.CustomRestAPIsAuthorization.create");
 +        props.setProperty(DistributionConfig.SECURITY_REST_TOKEN_SERVICE_NAME, "com.gemstone.gemfire.rest.internal.web.controllers.DummyTokenService.create");
 +        
 +        DistributedSystem ds = getSystem(props);
 +        Cache cache = CacheFactory.create(ds);
 +        AttributesFactory factory = new AttributesFactory();
 +        
 +        factory.setEnableBridgeConflation(true);
 +        factory.setDataPolicy(DataPolicy.REPLICATE);
 +        RegionAttributes attrs = factory.create();
 +        for (int i = 0; i < regions.length; i++) {
 +          cache.createRegion(regions[i], attrs);
 +        }
-         BridgeServer server = cache.addBridgeServer();
++        CacheServer server = cache.addCacheServer();
 +        final int serverPort = AvailablePortHelper.getRandomAvailableTCPPort();
 +        server.setPort(serverPort);
 +        server.setGroups(groups);
 +        server.setLoadProbe(probe);
 +        server.start();
 +        
 +        return new Integer(serverPort);
 +      }
 +    };
 +    Integer port = (Integer) vm.invoke(connect);
 +    return port.intValue();
 +  }
 +}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/settings.gradle
----------------------------------------------------------------------
diff --cc settings.gradle
index a3b34bb,50b7e40..8e7f23b
--- a/settings.gradle
+++ b/settings.gradle
@@@ -7,9 -7,9 +7,10 @@@ include 'gemfire-junit
  include 'gemfire-core'
  include 'gemfire-web'
  include 'gemfire-web-api'
 +include 'pulse'
  include 'gemfire-assembly'
  include 'gemfire-rebalancer'
+ include 'gemfire-lucene'
  
  def minimumGradleVersion = '2.3'
  if (GradleVersion.current() < GradleVersion.version(minimumGradleVersion)) {


[07/50] [abbrv] incubator-geode git commit: fix CI Failure: ClientMembershipDUnitTest.testGetConnectedClients

Posted by je...@apache.org.
fix CI Failure: ClientMembershipDUnitTest.testGetConnectedClients

increased the wait-time for clients to connect to the server from
10 seconds to 60 seconds.


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

Branch: refs/heads/feature/GEODE-17
Commit: dc780a89cad684c4b62ca306683674212a80b5ac
Parents: 59f2087
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 23 14:51:34 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 23 14:51:34 2015 -0800

----------------------------------------------------------------------
 .../com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/dc780a89/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index 4f06619..d9e9f4c 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -1342,6 +1342,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
     
     for (int i = 0; i < host.getVMCount(); i++) { 
       final VM vm = Host.getHost(0).getVM(i);
+      System.out.println("creating pool in vm_"+i);
       vm.invoke(createPool);
       clientMemberIdArray[i] =  String.valueOf(vm.invoke(
         ClientMembershipDUnitTest.class, "getMemberId"));
@@ -1365,7 +1366,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           return true;
         }
       };
-      waitForCriterion(wc, 10000, 100, false);
+      waitForCriterion(wc, 30000, 100, false);
     }
     
     Map connectedClients = InternalClientMembership.getConnectedClients(false);
@@ -1465,7 +1466,7 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
           return true;
         }
       };
-      waitForCriterion(wc, 10000, 100, false);
+      waitForCriterion(wc, 60000, 100, false);
     }
 
     {


[43/50] [abbrv] incubator-geode git commit: GEODE-184: The gfsh 'locate entry' command fails to find the entry on partitioned regions if the key is not a string

Posted by je...@apache.org.
GEODE-184: The gfsh 'locate entry' command fails to find the entry on partitioned regions if the key is not a string


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

Branch: refs/heads/feature/GEODE-17
Commit: 74e136401fa0d0a01d562c8e3f3db48b30ad56bc
Parents: f974462
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Dec 2 08:10:13 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Wed Dec 2 15:10:06 2015 -0800

----------------------------------------------------------------------
 .../cli/functions/DataCommandFunction.java      |   6 +-
 .../functions/DataCommandFunctionJUnitTest.java | 132 +++++++++++++++++++
 2 files changed, 135 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/74e13640/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
index d4dac05..af849f8 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunction.java
@@ -536,10 +536,10 @@ public class DataCommandFunction extends FunctionAdapter implements  InternalEnt
         //Following code is adaptation of which.java of old Gfsh
         PartitionedRegion pr = (PartitionedRegion)region;
         Region localRegion = PartitionRegionHelper.getLocalData((PartitionedRegion)region);
-        value = localRegion.get(key);
+        value = localRegion.get(keyObject);
         if(value!=null){
-          DistributedMember primaryMember = PartitionRegionHelper.getPrimaryMemberForKey(region, key);
-          int bucketId = pr.getKeyInfo(key).getBucketId();        
+          DistributedMember primaryMember = PartitionRegionHelper.getPrimaryMemberForKey(region, keyObject);
+          int bucketId = pr.getKeyInfo(keyObject).getBucketId();
           boolean isPrimary = member == primaryMember;
           keyInfo.addLocation(new Object[]{region.getFullPath(),true,getJSONForNonPrimitiveObject(value)[1],isPrimary,""+bucketId});          
         }else{

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/74e13640/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java
new file mode 100644
index 0000000..905a9cd
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/management/internal/cli/functions/DataCommandFunctionJUnitTest.java
@@ -0,0 +1,132 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.management.internal.cli.functions;
+
+import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.cache.RegionFactory;
+import com.gemstone.gemfire.cache.RegionShortcut;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.management.internal.cli.domain.DataCommandResult;
+import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import java.util.List;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+
+/**
+ * TODO: Add additional tests for all methods in DataCommandFunction.
+ *
+ * @author Jens Deppe
+ */
+@Category(IntegrationTest.class)
+public class DataCommandFunctionJUnitTest {
+
+  private static Cache cache;
+
+  private static Region region1;
+
+  private static final String PARTITIONED_REGION = "part_region";
+
+  public static class StringCheese {
+    private String cheese;
+
+    public StringCheese() {
+      // Empty constructor
+    }
+
+    public StringCheese(final String cheese) {
+      this.cheese = cheese;
+    }
+
+    public void setCheese(final String cheese) {
+      this.cheese = cheese;
+    }
+
+    @Override
+    public String toString() {
+      return cheese;
+    }
+
+    @Override
+    public int hashCode() {
+      int h = this.cheese.hashCode();
+      return h;
+    }
+
+    public boolean equals(Object other) {
+      if (this == other) {
+        return true;
+      }
+      if (other instanceof StringCheese) {
+        return this.cheese.equals(((StringCheese)other).cheese);
+      }
+      return false;
+    }
+  }
+
+  @BeforeClass
+  public static void setUp() throws Exception {
+    cache = new CacheFactory().
+        set(DistributionConfig.MCAST_PORT_NAME, "0").
+        create();
+    RegionFactory factory = cache.createRegionFactory(RegionShortcut.PARTITION);
+    region1 = factory.create(PARTITIONED_REGION);
+
+    region1.put(new StringCheese("key_1"), "value_1");
+    region1.put("key_2", "value_2");
+  }
+
+  @AfterClass
+  public static void tearDown() throws Exception {
+    cache.close();
+    cache = null;
+  }
+
+  /*
+   * This test addresses GEODE-184
+   */
+  @Test
+  public void testLocateKeyIsObject() throws Exception {
+    DataCommandFunction dataCmdFn = new DataCommandFunction();
+
+    DataCommandResult result = dataCmdFn.locateEntry("{'cheese': 'key_1'}", StringCheese.class.getName(), String.class.getName(), PARTITIONED_REGION, false);
+
+    assertNotNull(result);
+    result.aggregate(null);
+    List<DataCommandResult.KeyInfo> keyInfos = result.getLocateEntryLocations();
+    assertEquals(1, keyInfos.size());
+  }
+
+  @Test
+  public void testLocateKeyIsString() throws Exception {
+    DataCommandFunction dataCmdFn = new DataCommandFunction();
+
+    DataCommandResult result = dataCmdFn.locateEntry("key_2", String.class.getName(), String.class.getName(), PARTITIONED_REGION, false);
+
+    assertNotNull(result);
+    result.aggregate(null);
+    List<DataCommandResult.KeyInfo> keyInfos = result.getLocateEntryLocations();
+    assertEquals(1, keyInfos.size());
+  }
+}


[31/50] [abbrv] incubator-geode git commit: corrections for GMSHealthMonitor from an impromptu code review

Posted by je...@apache.org.
corrections for GMSHealthMonitor from an impromptu code review

Engineers working on the GEODE-77 effort reviewed some of the final-check
code in GMSHealthMonitor and came up with these corrections.

This commit also includes some test clean-up that I hope will help with
GEODE-589.


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

Branch: refs/heads/feature/GEODE-17
Commit: 253549d555abc5cb8bb12595a9c4ac09052ad94d
Parents: e4448ad
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Dec 1 08:35:15 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Dec 1 08:35:15 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/fd/GMSHealthMonitor.java       | 13 ++-----------
 .../gms/messenger/JGroupsMessenger.java           |  8 +++++++-
 .../internal/cache/xmlcache/CacheCreation.java    |  7 ++++++-
 .../cache30/ClientMembershipDUnitTest.java        | 12 +++++++++---
 .../gemfire/cache30/ClientServerCCEDUnitTest.java |  2 +-
 ...istributedAckPersistentRegionCCEDUnitTest.java | 18 +++++++++++++++---
 .../cache30/DistributedAckRegionDUnitTest.java    |  2 +-
 .../DistributedNoAckRegionCCEDUnitTest.java       | 11 +++++++++--
 .../gemfire/cache30/MultiVMRegionTestCase.java    |  4 ++--
 .../gemfire/cache30/TXDistributedDUnitTest.java   |  2 +-
 .../cache/locks/TXLockServiceDUnitTest.java       |  2 +-
 .../src/test/java/dunit/DistributedTestCase.java  |  9 +++++++++
 .../java/dunit/standalone/ProcessManager.java     |  8 --------
 13 files changed, 63 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index 1c005cc..bd60236 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -441,13 +441,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           }
           TimeStamp ts = memberTimeStamps.get(member);
           if (pingResp.getResponseMsg() == null) {
-            // double check the activity map
             if (isStopping) {
               return true;
             }
-            if (checkRecentActivity(member)) {
-              return true;
-            }
             logger.trace("no heartbeat response received from {} and no recent activity", member);
             return false;
           } else {
@@ -486,10 +482,6 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
    */
   private boolean doTCPCheckMember(InternalDistributedMember suspectMember, int port) {
     Socket clientSocket = null;
-    // first check for a recent timestamp
-    if (checkRecentActivity(suspectMember)) {
-      return true;
-    }
     try {
       logger.debug("Checking member {} with TCP socket connection {}:{}.", suspectMember, suspectMember.getInetAddress(), port);
       clientSocket = SocketCreator.getDefaultInstance().connect(suspectMember.getInetAddress(), port,
@@ -516,10 +508,10 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           return true;
         } else {
           //received ERROR
-          return checkRecentActivity(suspectMember);
+          return false;
         }
       } else {// cannot establish TCP connection with suspect member
-        return checkRecentActivity(suspectMember);
+        return false;
       }
     } catch (SocketTimeoutException e) {
       logger.debug("tcp/ip connection timed out");
@@ -1192,7 +1184,6 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
               }
               if (!failed) {
                 logger.info("Final check passed");
-                contactedBy(mbr);
               }
               // whether it's alive or not, at this point we allow it to
               // be watched again

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index b37c930..91c32ae 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -551,7 +551,13 @@ public class JGroupsMessenger implements Messenger {
     }
     
     filterOutgoingMessage(msg);
-    
+
+    // JGroupsMessenger does not support direct-replies, so register
+    // the message's processor if necessary
+    if ((msg instanceof DirectReplyMessage) && msg.isDirectAck() && msg.getProcessorId() <= 0) {
+      ((DirectReplyMessage)msg).registerProcessor();
+    }
+
     InternalDistributedMember[] destinations = msg.getRecipients();
     boolean allDestinations = msg.forAll();
     

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
index ed67ca4..f7063bc 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
@@ -226,6 +226,11 @@ public class CacheCreation implements InternalCache {
   public CacheCreation() {
     this(false);
   }
+  
+  /** clear thread locals that may have been set by previous uses of CacheCreation */
+  public static void clearThreadLocals() {
+    createInProgress = new ThreadLocal<>();
+  }
 
   /**
    * @param forParsing if true then this creation is used for parsing xml;
@@ -357,7 +362,7 @@ public class CacheCreation implements InternalCache {
    * Used from PoolManager to defer to CacheCreation as a manager of pools.
    * @since 5.7
    */
-  private static final ThreadLocal createInProgress = new ThreadLocal();
+  private static ThreadLocal createInProgress = new ThreadLocal();
 
   /**
    * Returns null if the current thread is not doing a CacheCreation create.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
index d9e9f4c..76b5b75 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientMembershipDUnitTest.java
@@ -1328,12 +1328,16 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
         Properties config = new Properties();
         config.setProperty(DistributionConfig.MCAST_PORT_NAME, "0");
         config.setProperty(DistributionConfig.LOCATORS_NAME, "");
+        // 11/30/2015 this test is periodically failing during distributedTest runs
+        // so we are setting the log-level to fine to figure out what's going on
+        config.setProperty(DistributionConfig.LOG_LEVEL_NAME, "fine");
         getSystem(config);
         AttributesFactory factory = new AttributesFactory();
         factory.setScope(Scope.LOCAL);
-        ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, true, -1, -1, null);
+        Pool p = ClientServerTestCase.configureConnectionPool(factory, getServerHostName(host), ports, true, -1, -1, null);
         createRegion(name, factory.create());
         assertNotNull(getRootRegion().getSubregion(name));
+        assertTrue(p.getServers().size() > 0);
       }
     };
 
@@ -1376,8 +1380,10 @@ public class ClientMembershipDUnitTest extends ClientServerTestCase {
       String connectedClient = (String)iter.next();
       getLogWriter().info("[testGetConnectedClients] checking for client " + connectedClient);
       assertTrue(clientMemberIds.contains(connectedClient));
-      getLogWriter().info("[testGetConnectedClients] count for connectedClient: " + 
-                          connectedClients.get(connectedClient));
+      Object[] result = (Object[])connectedClients.get(connectedClient);
+      getLogWriter().info("[testGetConnectedClients] result: " + 
+                          (result==null? "none"
+                              : String.valueOf(result[0])+"; connections="+result[1]));
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
index 9847d7b..784d0c8 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ClientServerCCEDUnitTest.java
@@ -613,7 +613,7 @@ public class ClientServerCCEDUnitTest extends CacheTestCase {
         // bug #50683 - secondary durable queue retains all GC messages
         cf.set("durable-client-id", ""+vm.getPid());
         cf.set("durable-client-timeout", "" + 200);
-        cf.set("log-level", "fine");
+        cf.set("log-level", getDUnitLogLevel());
         ClientCache cache = getClientCache(cf);
         ClientRegionFactory crf = cache.createClientRegionFactory(ClientRegionShortcut.CACHING_PROXY);
         crf.setConcurrencyChecksEnabled(ccEnabled);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
index 3994b49..b17c3c3 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckPersistentRegionCCEDUnitTest.java
@@ -36,17 +36,17 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.tier.sockets.Part;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-
+
 import dunit.AsyncInvocation;
 import dunit.Host;
 import dunit.SerializableCallable;
 import dunit.SerializableRunnable;
 import dunit.VM;
 import dunit.DistributedTestCase.WaitCriterion;
-
+
 import java.io.IOException;
 import java.util.Map;
-
+
 import junit.framework.Assert;
 
 /**
@@ -73,6 +73,18 @@ public class DistributedAckPersistentRegionCCEDUnitTest extends DistributedAckRe
     return factory.create();
   }
 
+//  public void testClearWithConcurrentEventsAsync() throws Exception {
+//    int end = 100;
+//    for (int i=0; i<end; i++) {
+//      System.out.println("Starting run #" + i);
+//      super.testClearWithConcurrentEventsAsync();
+//      if (i<(end-1)) {
+//        tearDown();
+//        setUp();
+//      }
+//    }
+//  }
+  
   public void testClearOnNonReplicateWithConcurrentEvents() {}
   
   public void testConcurrentEventsOnNonReplicatedRegion() {}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
index d3ef4ac..cf258b4 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedAckRegionDUnitTest.java
@@ -74,7 +74,7 @@ public class DistributedAckRegionDUnitTest extends MultiVMRegionTestCase {
   public Properties getDistributedSystemProperties() {
     Properties p = new Properties();
     p.put(DistributionConfig.STATISTIC_SAMPLING_ENABLED_NAME, "true");
-    p.put(DistributionConfig.LOG_LEVEL_NAME, "config");
+    p.put(DistributionConfig.LOG_LEVEL_NAME, getDUnitLogLevel());
     return p;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
index 791341e..4c77562 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/DistributedNoAckRegionCCEDUnitTest.java
@@ -266,8 +266,15 @@ public class DistributedNoAckRegionCCEDUnitTest extends
   }
   
   
-  public void testTombstones() {
-    versionTestTombstones();
+  public void testTombstones() throws Exception {
+//    for (int i=0; i<1000; i++) {
+//      System.out.println("starting run #"+i);
+      versionTestTombstones();
+//      if (i < 999) {
+//        tearDown();
+//        setUp();
+//      }
+//    }
   }
   
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
index b67b1f9..b995494 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/MultiVMRegionTestCase.java
@@ -8229,12 +8229,12 @@ public abstract class MultiVMRegionTestCase extends RegionTestCase {
     return !o1.equals(o2);
   }
   
-  protected AsyncInvocation performOps4ClearWithConcurrentEvents(VM vm, final int opNum) {
+  protected AsyncInvocation performOps4ClearWithConcurrentEvents(VM vm, final int msToRun) {
     SerializableRunnable performOps = new SerializableRunnable("perform concurrent ops") {
       public void run() {
         try {
           boolean includeClear = true;
-          doOpsLoop(opNum, includeClear);
+          doOpsLoop(msToRun, includeClear);
         } catch (CacheException e) {
           fail("while performing concurrent operations", e);
         }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
index b318841..c0034cd 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/TXDistributedDUnitTest.java
@@ -522,7 +522,7 @@ public class TXDistributedDUnitTest extends CacheTestCase {
   @Override
   public Properties getDistributedSystemProperties() {
     Properties p = super.getDistributedSystemProperties();
-    p.put("log-level", "fine");
+    p.put("log-level", getDUnitLogLevel());
     return p;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
index 002854e..bc6fad1 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/locks/TXLockServiceDUnitTest.java
@@ -661,7 +661,7 @@ public class TXLockServiceDUnitTest extends DistributedTestCase {
   
   public Properties getDistributedSystemProperties() {
     Properties props = super.getDistributedSystemProperties();
-    props.setProperty("log-level", "fine");
+    props.setProperty("log-level", getDUnitLogLevel());
     return props;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/dunit/DistributedTestCase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/DistributedTestCase.java b/gemfire-core/src/test/java/dunit/DistributedTestCase.java
index 7db4033..a3d4785 100755
--- a/gemfire-core/src/test/java/dunit/DistributedTestCase.java
+++ b/gemfire-core/src/test/java/dunit/DistributedTestCase.java
@@ -49,6 +49,7 @@ import com.gemstone.gemfire.cache.hdfs.internal.HDFSStoreImpl;
 import com.gemstone.gemfire.cache.hdfs.internal.hoplog.HoplogConfig;
 import com.gemstone.gemfire.cache.query.QueryTestUtils;
 import com.gemstone.gemfire.cache.query.internal.QueryObserverHolder;
+import com.gemstone.gemfire.cache30.ClientServerTestCase;
 import com.gemstone.gemfire.cache30.GlobalLockingDUnitTest;
 import com.gemstone.gemfire.cache30.MultiVMRegionTestCase;
 import com.gemstone.gemfire.cache30.RegionTestCase;
@@ -76,6 +77,7 @@ import com.gemstone.gemfire.internal.cache.tier.InternalClientMembership;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerTestUtil;
 import com.gemstone.gemfire.internal.cache.tier.sockets.ClientProxyMembershipID;
 import com.gemstone.gemfire.internal.cache.tier.sockets.DataSerializerPropogationDUnitTest;
+import com.gemstone.gemfire.internal.cache.xmlcache.CacheCreation;
 import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.LocalLogWriter;
 import com.gemstone.gemfire.internal.logging.LogService;
@@ -756,6 +758,9 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
     closeCache();
     
     SocketCreator.resolve_dns = true;
+    CacheCreation.clearThreadLocals();
+    System.getProperties().remove("gemfire.log-level");
+    System.getProperties().remove("jgroups.resolve_dns");
     InitialImageOperation.slowImageProcessing = 0;
     DistributionMessageObserver.setInstance(null);
     QueryTestUtils.setCache(null);
@@ -767,10 +772,14 @@ public abstract class DistributedTestCase extends TestCase implements java.io.Se
     MultiVMRegionTestCase.CCRegion = null;
     InternalClientMembership.unregisterAllListeners();
     ClientStatsManager.cleanupForTests();
+    ClientServerTestCase.AUTO_LOAD_BALANCE = false;
     unregisterInstantiatorsInThisVM();
     DistributionMessageObserver.setInstance(null);
     QueryObserverHolder.reset();
     DiskStoreObserver.setInstance(null);
+    System.getProperties().remove("gemfire.log-level");
+    System.getProperties().remove("jgroups.resolve_dns");
+    
     if (InternalDistributedSystem.systemAttemptingReconnect != null) {
       InternalDistributedSystem.systemAttemptingReconnect.stopReconnecting();
     }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/253549d5/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java b/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
index b6a4493..60ac04d 100644
--- a/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
+++ b/gemfire-core/src/test/java/dunit/standalone/ProcessManager.java
@@ -34,11 +34,8 @@ import java.util.Map;
 
 import org.apache.commons.io.FileUtils;
 
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.internal.FileUtil;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.sequencelog.EntryLogger;
-import com.gemstone.gemfire.internal.sequencelog.SequenceLoggerImpl;
 
 import dunit.RemoteDUnitVMIF;
 
@@ -47,8 +44,6 @@ import dunit.RemoteDUnitVMIF;
  *
  */
 public class ProcessManager {
-  public static final boolean IS_WINDOWS = System.getProperty("os.name").contains("Windows");
-  
   private int namingPort;
   private Map<Integer, ProcessHolder> processes = new HashMap<Integer, ProcessHolder>();
   private File log4jConfig;
@@ -179,9 +174,6 @@ public class ProcessManager {
       "-Dgemfire.DEFAULT_MAX_OPLOG_SIZE=10",
       "-Dgemfire.disallowMcastDefaults=true",
       "-ea",
-      // use IPv4 on Windows
-      // see https://github.com/belaban/JGroups/wiki/FAQ
-//      (IS_WINDOWS?"-Djava.net.preferIPv4Stack=true":""),
       agent,
       "dunit.standalone.ChildVM"
     };


[08/50] [abbrv] incubator-geode git commit: fix GEODE-598 CI Failure: ReconnectDUnitTest.testReconnectALocator

Posted by je...@apache.org.
fix GEODE-598 CI Failure: ReconnectDUnitTest.testReconnectALocator

changed the criterion used by the test to determine whether the Locator
has started to reconnect.


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

Branch: refs/heads/feature/GEODE-17
Commit: c0d396ab16ac4cb598acdd29d1c57d19735ad305
Parents: dc780a8
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 23 15:33:54 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 23 15:33:54 2015 -0800

----------------------------------------------------------------------
 .../java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/c0d396ab/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
index 5b53159..dd6f1fa 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache30/ReconnectDUnitTest.java
@@ -1099,10 +1099,10 @@ public class ReconnectDUnitTest extends CacheTestCase
         if (oldLocator != null) {
           WaitCriterion wc = new WaitCriterion() {
             public boolean done() {
-              return ((InternalLocator)oldLocator).isStopped();
+              return msys.isReconnecting();
             }
             public String description() {
-              return "waiting for locator to stop: " + oldLocator;
+              return "waiting for locator to start reconnecting: " + oldLocator;
             }
           };
           waitForCriterion(wc, 10000, 50, true);


[14/50] [abbrv] incubator-geode git commit: [GEODE-585]: Simplify hash index code Refactored hash index and hash index set Using modified versions of the fastutil methods for adding and finding index positions for objects Added hash index set unit tests

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/abad018a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java
new file mode 100644
index 0000000..de5cebd
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSetJUnitTest.java
@@ -0,0 +1,504 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+package com.gemstone.gemfire.cache.query.internal.index;
+
+import static org.mockito.Matchers.any;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.stream.IntStream;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import com.gemstone.gemfire.cache.query.TypeMismatchException;
+import com.gemstone.gemfire.cache.query.data.Portfolio;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class HashIndexSetJUnitTest {
+  
+  Map<Integer, Portfolio> portfoliosMap;
+  Set<Portfolio> portfolioSet;
+  HashIndexSet his;
+  
+  public void setupHashIndexSet(int numEntries) {
+    his = createHashIndexSet();
+    portfoliosMap = createPortfolioObjects(numEntries, 0);
+    portfolioSet = new HashSet<Portfolio>(portfoliosMap.values());
+    addPortfoliosToHashIndexSet(portfoliosMap, his);
+  }
+  
+  private void addPortfoliosToHashIndexSet(Map<Integer, Portfolio> portfoliosMap, HashIndexSet hashIndexSet) {
+    portfoliosMap.forEach((k,v) -> {
+      try {
+        hashIndexSet.add(k, v);
+      }
+      catch (TypeMismatchException exception) {
+        throw new Error(exception);
+      }
+    });
+  }
+  
+  private HashIndexSet createHashIndexSet() {
+    HashIndexSet his = new HashIndexSet();  
+    HashIndex.IMQEvaluator mockEvaluator = mock(HashIndex.IMQEvaluator.class);
+    when(mockEvaluator.evaluateKey(any(Object.class))).thenAnswer(new EvaluateKeyAnswer());
+    his.setEvaluator(mockEvaluator);
+    return his;
+  }
+  
+  /**
+   * we are "indexed" on indexKey.  Equality of portfolios is based on ID
+   * indexKeys are based on 0 -> numEntries
+   * IDs are startID -> startID + numEntries
+   * @param numToCreate how many portfolios to create
+   * @param startID the ID value to start incrementing from
+   * @return
+   */
+  public Map<Integer, Portfolio> createPortfolioObjects(int numToCreate, int startID) {
+    Map<Integer, Portfolio> portfoliosMap = new HashMap<>();
+    IntStream.range(0, numToCreate).forEach(e -> {
+        Portfolio p = new Portfolio(e + startID);
+        p.indexKey = e;
+        portfoliosMap.put(p.indexKey, p);
+    });
+    return portfoliosMap;
+  }
+  
+  @Test
+  public void testHashIndexSetAdd() throws Exception {
+    int numEntries = 100;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    his.iterator().forEachRemaining((e ->portfolioSet.remove(e)));
+    Assert.assertTrue(portfolioSet.isEmpty());  
+  }
+  
+  @Test
+  public void testHashIndexSetAddWithNullKey() throws Exception {
+    int numEntries = 100;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    his.add(null, new Portfolio(numEntries + 1));
+    Assert.assertEquals(numEntries + 1, his.size());
+  }
+  
+  //we have to be sure that we dont cause a compaction or growth or else
+  //removed tokens will be removed and a new backing array created
+  @Test
+  public void testHashIndexSetAddUseRemoveTokenSlot() throws Exception {
+    int numEntries = 20;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    his.removeAll(portfolioSet);
+    Assert.assertEquals(numEntries, his._removedTokens);
+    Assert.assertEquals(0, his.size());
+    addPortfoliosToHashIndexSet(portfoliosMap, his);
+    
+    Assert.assertEquals(0, his._removedTokens);
+    Assert.assertEquals(numEntries, his.size());
+  }
+  
+  @Test
+  public void testCompactDueToTooManyRemoveTokens() throws Exception {
+    int numEntries = 100;    
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    his.removeAll(portfolioSet);
+    Assert.assertEquals(numEntries, his._removedTokens);
+    
+    Assert.assertEquals(0, his.size());
+    
+    //Very very bad but we fake out the number of removed tokens
+    his._removedTokens = his._maxSize;
+    addPortfoliosToHashIndexSet(portfoliosMap, his);
+    
+    //compaction should have occured, removed tokens should now be gone
+    Assert.assertEquals(0, his._removedTokens);
+    Assert.assertEquals(numEntries, his.size());
+  }
+  
+  @Test
+  public void testRehashRetainsAllValues() throws Exception {
+    int numEntries = 80;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    his.rehash(1000);
+    Assert.assertEquals(numEntries, his.size());
+    his.iterator().forEachRemaining((e ->portfolioSet.remove(e)));
+    Assert.assertTrue(portfolioSet.isEmpty());  
+  }
+  
+  @Test
+  public void testShrinkByRehashRetainsAllValues() throws Exception {
+    int numEntries = 20;
+    setupHashIndexSet(numEntries);
+
+    Assert.assertEquals(numEntries, his.size());
+    his.rehash(64);
+    Assert.assertEquals(numEntries, his.size());
+    his.iterator().forEachRemaining((e ->portfolioSet.remove(e)));
+    Assert.assertTrue(portfolioSet.isEmpty());  
+  }
+  
+  @Test
+  public void testGetByKey() throws Exception {
+    int numEntries = 20;
+    setupHashIndexSet(numEntries);
+
+    Assert.assertEquals(numEntries, his.size());
+    his.get(1).forEachRemaining((e ->portfolioSet.remove(e)));
+    Assert.assertEquals(numEntries - 1, portfolioSet.size());  
+  }
+  
+  @Test
+  public void testGetByKeyMultipleCollisions() throws Exception {
+    int numEntries = 20;
+    int keyToLookup = 1;
+    his = createHashIndexSet();
+    Map<Integer, Portfolio> collectionOfPorts1 = this.createPortfolioObjects(numEntries, 0);
+    Map<Integer, Portfolio> collectionOfPorts2 = this.createPortfolioObjects(numEntries, numEntries);
+    
+    addPortfoliosToHashIndexSet(collectionOfPorts1, his);
+    addPortfoliosToHashIndexSet(collectionOfPorts2, his);
+    
+    Assert.assertEquals(numEntries * 2, his.size());
+    Iterator iterator = his.get(keyToLookup);
+    int numIterated = 0;
+    while (iterator.hasNext()) {
+      numIterated ++;
+      //verify that the returned values match what we lookedup
+      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+    }
+    Assert.assertEquals(2, numIterated);  
+  }
+  
+  @Test
+  public void testGetByKeyLocatesAfterMultipleColiisionsAndRemoveToken() throws Exception {
+    int numEntries = 20;
+    int keyToLookup = 1;
+    his = createHashIndexSet();
+    Map<Integer, Portfolio> collectionOfPorts1 = this.createPortfolioObjects(numEntries, 0);
+    Map<Integer, Portfolio> collectionOfPorts2 = this.createPortfolioObjects(numEntries, numEntries);
+    Map<Integer, Portfolio> collectionOfPorts3 = this.createPortfolioObjects(numEntries, numEntries * 2);
+    
+    addPortfoliosToHashIndexSet(collectionOfPorts1, his);
+    addPortfoliosToHashIndexSet(collectionOfPorts2, his);
+    addPortfoliosToHashIndexSet(collectionOfPorts3, his);
+    
+    Assert.assertEquals(numEntries * 3, his.size());
+    Iterator iterator = his.get(keyToLookup);
+    int numIterated = 0;
+    while (iterator.hasNext()) {
+      numIterated ++;
+      //verify that the returned values match what we lookedup
+      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+    }
+    Assert.assertEquals(3, numIterated);  
+    
+    //let's remove the second collision
+    his.remove(keyToLookup, collectionOfPorts2.get(keyToLookup));
+    
+    iterator = his.get(keyToLookup);
+    numIterated = 0;
+    while (iterator.hasNext()) {
+      numIterated ++;
+      //verify that the returned values match what we lookedup
+      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+    }
+    Assert.assertEquals(2, numIterated);  
+    
+    //Add it back in and make sure we can iterate all 3 again
+    his.add(keyToLookup, collectionOfPorts2.get(keyToLookup));
+    iterator = his.get(keyToLookup);
+    numIterated = 0;
+    while (iterator.hasNext()) {
+      numIterated ++;
+      //verify that the returned values match what we lookedup
+      Assert.assertEquals(keyToLookup, ((Portfolio)iterator.next()).indexKey);
+    }
+    Assert.assertEquals(3, numIterated);  
+
+  }
+  
+  @Test
+  public void testGetAllNotMatching() throws Exception {
+    int numEntries = 20;
+    his = createHashIndexSet();
+    Map<Integer, Portfolio> collectionOfPorts1 = this.createPortfolioObjects(numEntries, 0);
+    Map<Integer, Portfolio> collectionOfPorts2 = this.createPortfolioObjects(numEntries, numEntries);
+    
+    addPortfoliosToHashIndexSet(collectionOfPorts1, his);
+    addPortfoliosToHashIndexSet(collectionOfPorts2, his);
+    
+    Assert.assertEquals(numEntries * 2, his.size());
+    List<Integer> keysNotToMatch = new LinkedList<>();
+    keysNotToMatch.add(3);
+    keysNotToMatch.add(4);
+    Iterator iterator = his.getAllNotMatching(keysNotToMatch);
+    int numIterated = 0;
+    while (iterator.hasNext()) {
+      numIterated ++;
+      int idFound = ((Portfolio)iterator.next()).indexKey;
+      Assert.assertTrue(idFound != 3 && idFound != 4);
+    }
+    //Make sure we iterated all the entries minus the entries that we decided not to match
+    Assert.assertEquals(numEntries * 2 - 4, numIterated);  
+  }
+  
+  @Test
+  public void testIndexOfObject() throws Exception {
+    int numEntries = 10;
+    his = createHashIndexSet();
+    portfoliosMap = createPortfolioObjects(numEntries, 0);
+    portfoliosMap.forEach((k,v) -> {
+      try {
+        int index = his.add(k, portfoliosMap.get(k));
+        int foundIndex = his.index(portfoliosMap.get(k));
+        Assert.assertEquals(index, foundIndex);
+      }
+      catch (TypeMismatchException ex) {
+        throw new Error(ex);
+      }
+    });
+  }
+  
+  //Add multiple portfolios with the same id
+  //they should collide, we should then be able to look up each one correctly
+  @Test
+  public void testIndexOfObjectWithCollision() throws Exception {
+    int numEntries = 10;
+    his = createHashIndexSet();
+    Map<Integer, Portfolio> portfoliosMap1 = createPortfolioObjects(numEntries, 0);
+    Map<Integer, Portfolio> portfoliosMap2 = createPortfolioObjects(numEntries, numEntries);
+
+    portfoliosMap1.forEach((k,v) -> {
+      try {
+        int index = his.add(k, portfoliosMap1.get(k));
+        int foundIndex = his.index(portfoliosMap1.get(k));
+        Assert.assertEquals(index, foundIndex);
+      }
+      catch (TypeMismatchException ex) {
+        throw new Error(ex);
+      }
+    });
+    portfoliosMap2.forEach((k,v) -> {
+      try {
+        int index = his.add(k, portfoliosMap2.get(k));
+        int foundIndex = his.index(portfoliosMap2.get(k));
+        Assert.assertEquals(index, foundIndex);
+      }
+      catch (TypeMismatchException ex) {
+        throw new Error(ex);
+      }
+    });
+  }
+  
+  
+  @Test
+  public void testIndexWhenObjectNotInSet() {
+    int numEntries = 10;
+    his = createHashIndexSet();
+    portfoliosMap = createPortfolioObjects(numEntries, 0);
+    Assert.assertEquals(-1, his.index(portfoliosMap.get(1)));
+  }
+  
+  @Test
+  public void testIndexWhenObjectNotInSetWhenPopulated() {
+    int numEntries = 10;
+    this.setupHashIndexSet(numEntries);
+    Assert.assertEquals(-1, his.index(new Portfolio(numEntries+1)));
+  }
+  
+  
+  @Test
+  public void testRemove() throws Exception {
+    int numEntries = 20;
+    setupHashIndexSet(numEntries);
+
+    Assert.assertEquals(numEntries, his.size());
+    portfoliosMap.forEach((k,v) -> his.remove(k, v));
+    Assert.assertEquals(0, his.size());
+  }
+  
+  //Test remove where we look for an instance that is not at the specified index slot
+  @Test
+  public void testRemoveIgnoreSlot() throws Exception {
+    int numEntries = 20;
+    setupHashIndexSet(numEntries);
+
+    Assert.assertEquals(numEntries, his.size());
+    portfoliosMap.forEach((k,v) -> his.remove(k, v, his.index(v)));
+    Assert.assertEquals(numEntries, his.size());
+  }
+  
+  @Test
+  public void testRemoveAtWithNull() throws Exception {
+    his = createHashIndexSet();
+    Assert.assertTrue(his.isEmpty());
+    Assert.assertFalse(his.removeAt(0));
+  }
+  
+  @Test
+  public void testRemoveAtWithRemoveToken() throws Exception {
+    his = createHashIndexSet();
+    int index = his.add(1, new Portfolio(1));
+    Assert.assertTrue(his.removeAt(index));
+    Assert.assertFalse(his.removeAt(index));
+  }
+  
+  @Test
+  public void testHashIndexRemoveAll() throws Exception {
+    int numEntries = 100;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    his.removeAll(portfolioSet);
+    Assert.assertTrue(his.isEmpty());  
+  }
+  
+  //Remove all should still remove all portfolios provided, even if there are more provided then contained
+  @Test
+  public void testHashIndexRemoveAllWithAdditionalPortfolios() throws Exception {
+    int numEntries = 100;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    portfolioSet.add(new Portfolio(numEntries + 1));
+    his.removeAll(portfolioSet);
+    Assert.assertTrue(his.isEmpty());  
+  }
+  
+  @Test
+  public void testHashIndexContainsAll() throws Exception {
+    int numEntries = 100;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    Assert.assertTrue(his.containsAll(portfolioSet));
+  }
+  
+  @Test
+  public void testHashIndexRetainAll() throws Exception {
+    int numEntries = 10;
+    setupHashIndexSet(numEntries);
+    Set subset = new HashSet();
+    portfolioSet.forEach(e -> {if (e.indexKey % 2 == 0) {subset.add(e);}});
+    Assert.assertEquals(numEntries, his.size());
+    his.retainAll(subset);
+    his.iterator().forEachRemaining((e ->subset.remove(e)));
+    Assert.assertTrue(subset.isEmpty()); 
+    Assert.assertEquals(numEntries/2, his.size());
+  }
+  
+  @Test
+  public void testHashIndexContainsAllShouldReturnFalse() throws Exception {
+    int numEntries = 100;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    portfolioSet.add(new Portfolio(numEntries + 1));
+    Assert.assertFalse(his.containsAll(portfolioSet));
+  }
+  
+  @Test
+  public void testClear() throws Exception {
+    int numEntries = 100;
+    setupHashIndexSet(numEntries);
+    
+    Assert.assertEquals(numEntries, his.size());
+    his.clear();
+    Assert.assertTrue(his.isEmpty());
+    Assert.assertTrue(his._removedTokens == 0);
+  }
+  
+  @Test
+  public void testAreNullObjectsEqual() throws Exception {
+    his = createHashIndexSet();
+    Assert.assertTrue(his.areObjectsEqual(null, null));
+  }
+  
+  @Test
+  public void testAreIndexeSetsEqualAndHashCodeSame() throws Exception {
+    Map<Integer, Portfolio> portfolioMap = createPortfolioObjects(100, 0);
+    HashIndexSet indexSet1 = createHashIndexSet();
+    HashIndexSet indexSet2 = createHashIndexSet();
+
+    addPortfoliosToHashIndexSet(portfolioMap, indexSet1);
+    addPortfoliosToHashIndexSet(portfolioMap, indexSet2);
+ 
+    Assert.assertTrue(indexSet1.equals(indexSet2));
+    Assert.assertTrue(indexSet2.equals(indexSet1));
+    Assert.assertEquals(indexSet1.hashCode(), indexSet2.hashCode());
+  }
+  
+  @Test
+  public void testAreIndexeSetsNotEqualAndHashCodeDifferent() throws Exception {
+    Map<Integer, Portfolio> portfolioMap = createPortfolioObjects(100, 0);
+    HashIndexSet indexSet1 = createHashIndexSet();
+    HashIndexSet indexSet2 = createHashIndexSet();
+
+    addPortfoliosToHashIndexSet(portfolioMap, indexSet1);
+
+    indexSet2.add(1, portfolioMap.get(1));
+    Assert.assertFalse(indexSet2.equals(indexSet1));
+    Assert.assertFalse(indexSet1.equals(indexSet2));
+    Assert.assertNotEquals(indexSet1.hashCode(), indexSet2.hashCode()); 
+  }
+  
+  @Test
+  public void testIndexSetNotEqualsOtherObjectType() {
+    HashIndexSet indexSet = createHashIndexSet();
+    Assert.assertFalse(indexSet.equals("Other type"));
+    Assert.assertFalse(indexSet.equals(new Object()));
+  }
+ 
+  private static class EvaluateKeyAnswer implements Answer {
+
+    @Override
+    public Object answer(InvocationOnMock invocation) throws Throwable {
+      Object evalOn = invocation.getArgumentAt(0, Object.class);
+      if (evalOn instanceof Portfolio) {
+        Portfolio p = (Portfolio) evalOn;
+        return p.indexKey;
+      }
+      return null;
+    }
+    
+  }
+  
+  
+}


[30/50] [abbrv] incubator-geode git commit: GEODE-616: failure detection ports not set in new membership view

Posted by je...@apache.org.
GEODE-616: failure detection ports not set in new membership view

Added a method to NetView to copy failure detection ports from an old
view to the new view.  I also added a JUnit test for NetView to make
sure we have adequate code-coverage for this class.


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

Branch: refs/heads/feature/GEODE-17
Commit: e4448adc3ce1c5774410194dcbd361eb21890e7d
Parents: 2803a10
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Dec 1 08:33:02 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Dec 1 08:33:02 2015 -0800

----------------------------------------------------------------------
 .../internal/membership/NetView.java            |  46 ++++-
 .../membership/gms/membership/GMSJoinLeave.java |  25 +--
 .../internal/membership/NetViewJUnitTest.java   | 194 +++++++++++++++++++
 3 files changed, 241 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e4448adc/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
index 8800d9d..a90a45d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/NetView.java
@@ -88,6 +88,12 @@ public class NetView implements DataSerializableFixedID {
     Arrays.fill(failureDetectionPorts, -1);
   }
 
+  /**
+   * Create a new view with the contents of the given view and the
+   * specified view ID
+   * @param other
+   * @param viewId
+   */
   public NetView(NetView other, int viewId) {
     this.creator = other.creator;
     this.viewId = viewId;
@@ -129,7 +135,7 @@ public class NetView implements DataSerializableFixedID {
   
   public int getFailureDetectionPort(InternalDistributedMember mbr) {
     int idx = members.indexOf(mbr);
-    if (idx < 0 || failureDetectionPorts == null || idx >= failureDetectionPorts.length) {
+    if (idx < 0 || idx >= failureDetectionPorts.length) {
       return -1;
     }
     return failureDetectionPorts[idx];
@@ -143,15 +149,36 @@ public class NetView implements DataSerializableFixedID {
     ensureFDCapacity(idx);
     failureDetectionPorts[idx] = port;
   }
+  
+  /**
+   * Transfer the failure-detection ports from another view to this one
+   * @param otherView
+   */
+  public void setFailureDetectionPorts(NetView otherView) {
+    int[] ports = otherView.getFailureDetectionPorts();
+    if (ports != null) {
+      int idx = 0;
+      int portsSize = ports.length;
+      for (InternalDistributedMember mbr: otherView.getMembers()) {
+        if (contains(mbr)) {
+          // unit tests create views w/o failure detection ports, so we must check the length
+          // of the array
+          if (idx < portsSize) {
+            setFailureDetectionPort(mbr, ports[idx]);
+          } else {
+            setFailureDetectionPort(mbr, -1);
+          }
+        }
+        idx += 1;
+      }
+    }
+  }
 
   /**
    * ensures that there is a slot at idx to store an int
    */
   private void ensureFDCapacity(int idx) {
-    if (failureDetectionPorts == null) {
-      failureDetectionPorts = new int[idx+10];
-      Arrays.fill(failureDetectionPorts, -1);
-    } else if (idx >= failureDetectionPorts.length) {
+    if (idx >= failureDetectionPorts.length) {
       int[] p = new int[idx+10];
       if (failureDetectionPorts.length > 0) {
         System.arraycopy(failureDetectionPorts, 0, p, 0, failureDetectionPorts.length);
@@ -479,6 +506,15 @@ public class NetView implements DataSerializableFixedID {
         first = false;
       }
     }
+//    sb.append("] fd ports: [");
+//    int[] ports = getFailureDetectionPorts();
+//    int numMembers = size();
+//    for (int i=0; i<numMembers; i++) {
+//      if (i > 0) {
+//        sb.append(' ');
+//      }
+//      sb.append(ports[i]);
+//    }
     sb.append("]");
     return sb.toString();
   }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e4448adc/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 1c7b601..2f8d734 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -531,7 +531,6 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       NetView check = new NetView(v, v.getViewId() + 1);
       synchronized (removedMembers) {
         removedMembers.add(mbr);
-        check = new NetView(v, v.getViewId());
         check.addCrashedMembers(removedMembers);
         check.removeAll(removedMembers);
       }
@@ -660,6 +659,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
         mbrs.removeAll(leaving);
         newView = new NetView(this.localAddress, viewNumber, mbrs, leaving,
             removals);
+        newView.setFailureDetectionPorts(currentView);
         newView.setFailureDetectionPort(this.localAddress, services.getHealthMonitor().getFailureDetectionPort());
       }
       if (viewCreator == null || viewCreator.isShutdown()) {
@@ -1890,23 +1890,7 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
           }
         }
         if (currentView != null) {
-          int[] ports = currentView.getFailureDetectionPorts();
-          if (ports != null) {
-            int idx = 0;
-            int portsSize = ports.length;
-            for (InternalDistributedMember mbr: currentView.getMembers()) {
-              if (newView.contains(mbr)) {
-                // unit tests create views w/o failure detection ports, so we must check the length
-                // of the array
-                if (idx < portsSize) {
-                  newView.setFailureDetectionPort(mbr, ports[idx]);
-                } else {
-                  newView.setFailureDetectionPort(mbr, -1);
-                }
-              }
-              idx += 1;
-            }
-          }
+          newView.setFailureDetectionPorts(currentView);
         }
       }
 
@@ -1995,12 +1979,15 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
             logger.info("adding these new members from a conflicting view to the new view: {}", newMembers);
             for (InternalDistributedMember mbr: newMembers) {
               int port = conflictingView.getFailureDetectionPort(mbr);
-              JoinRequestMessage msg = new JoinRequestMessage(localAddress, mbr, null, port);
               newView.add(mbr);
               newView.setFailureDetectionPort(mbr, port);
               joinReqs.add(mbr);
             }
           }
+          // trump the view ID of the conflicting view so mine will be accepted
+          if (conflictingView.getViewId() >= newView.getViewId()) {
+            newView = new NetView(newView, conflictingView.getViewId()+1);
+          }
         }
 
         if (!unresponsive.isEmpty()) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e4448adc/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java
new file mode 100755
index 0000000..603c7bf
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/NetViewJUnitTest.java
@@ -0,0 +1,194 @@
+package com.gemstone.gemfire.distributed.internal.membership;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
+import java.io.IOException;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
+import java.util.Timer;
+
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.distributed.internal.membership.NetView;
+import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class NetViewJUnitTest {
+  List<InternalDistributedMember> members;
+  
+  @Before
+  public void initMembers() throws Exception {
+    int numMembers = 10;
+    members = new ArrayList<>(numMembers);
+    for (int i=0; i<numMembers; i++) {
+      members.add(new InternalDistributedMember(SocketCreator.getLocalHost(), 1000+i));
+    }
+    // view creator is a locator
+    members.get(0).setVmKind(DistributionManager.LOCATOR_DM_TYPE);
+    members.get(0).setVmViewId(0);
+    members.get(0).getNetMember().setPreferredForCoordinator(true);
+    
+    // members who joined in view #1
+    for (int i=1; i<(numMembers-1); i++) {
+      members.get(i).setVmViewId(1);
+      members.get(i).setVmKind(DistributionManager.NORMAL_DM_TYPE);
+      members.get(i).getNetMember().setPreferredForCoordinator(false);
+    }
+
+    // member joining in this view
+    members.get(numMembers-1).setVmViewId(2);
+    members.get(numMembers-1).setVmKind(DistributionManager.NORMAL_DM_TYPE);
+  }
+  
+  private void setFailureDetectionPorts(NetView view) {
+    int numMembers = members.size();
+    // use the membership port as the FD port so it's easy to figure out problems
+    for (int i=0; i<numMembers; i++) {
+      view.setFailureDetectionPort(members.get(i), members.get(i).getPort());
+    }
+  }
+  
+  @Test
+  public void testCreateView() throws Exception {
+    int numMembers = members.size();
+    NetView view = new NetView(members.get(0), 2, members, Collections.emptySet(), Collections.emptySet());
+    setFailureDetectionPorts(view);
+    
+    assertTrue(view.getCreator().equals(members.get(0)));
+    assertEquals(2, view.getViewId());
+    assertEquals(members, view.getMembers());
+    assertEquals(0, view.getCrashedMembers().size());
+    assertEquals(members.get(1), view.getLeadMember()); // a locator can't be lead member
+    assertEquals(0, view.getShutdownMembers().size());
+    assertEquals(1, view.getNewMembers().size());
+    assertEquals(members.get(numMembers-1), view.getNewMembers().iterator().next());
+    assertEquals(members.get(0), view.getCoordinator());
+    
+    for (int i=0; i<numMembers; i++) {
+      InternalDistributedMember mbr = members.get(i);
+      assertEquals(mbr.getPort(), view.getFailureDetectionPort(mbr));
+    }
+    
+    assertFalse(view.shouldBeCoordinator(members.get(1)));
+    assertTrue(view.shouldBeCoordinator(members.get(0)));
+    assertEquals(members.get(numMembers-1), view.getCoordinator(Collections.singletonList(members.get(0))));
+    members.get(numMembers-1).getNetMember().setPreferredForCoordinator(false);
+    assertEquals(members.get(1), view.getCoordinator(Collections.singletonList(members.get(0))));
+    
+    members.get(numMembers-1).getNetMember().setPreferredForCoordinator(true);
+    List<InternalDistributedMember> preferred = view.getPreferredCoordinators(Collections.<InternalDistributedMember>singleton(members.get(1)), members.get(0), 2);
+    assertEquals(3, preferred.size());
+    assertEquals(members.get(numMembers-1), preferred.get(0));
+  }
+  
+  @Test
+  public void testRemoveMembers() throws Exception {
+    int numMembers = members.size();
+    NetView view = new NetView(members.get(0), 2, new ArrayList<>(members), Collections.emptySet(),
+        Collections.emptySet());
+    setFailureDetectionPorts(view);
+
+    for (int i=1; i<numMembers; i+=2) {
+      view.remove(members.get(i));
+      assertFalse(view.contains(members.get(i)));
+    }
+    
+    List<InternalDistributedMember> remainingMembers = view.getMembers();
+    int num = remainingMembers.size();
+    for (int i=0; i<num; i++) {
+      InternalDistributedMember mbr = remainingMembers.get(i);
+      assertEquals(mbr.getPort(), view.getFailureDetectionPort(mbr));
+    }
+  }
+  
+  @Test
+  public void testRemoveAll() throws Exception {
+    int numMembers = members.size();
+    NetView view = new NetView(members.get(0), 2, new ArrayList<>(members), Collections.emptySet(),
+        Collections.emptySet());
+    setFailureDetectionPorts(view);
+
+    Collection<InternalDistributedMember> removals = new ArrayList<>(numMembers/2);
+    for (int i=1; i<numMembers; i+=2) {
+      removals.add(members.get(i));
+    }
+    
+    view.removeAll(removals);
+    for (InternalDistributedMember mbr: removals) {
+      assertFalse(view.contains(mbr));
+    }
+    assertEquals(numMembers-removals.size(), view.size());
+
+    List<InternalDistributedMember> remainingMembers = view.getMembers();
+    int num = remainingMembers.size();
+    for (int i=0; i<num; i++) {
+      InternalDistributedMember mbr = remainingMembers.get(i);
+      assertEquals(mbr.getPort(), view.getFailureDetectionPort(mbr));
+    }
+  }
+  
+  @Test
+  public void testCopyView() throws Exception {
+    NetView view = new NetView(members.get(0), 2, new ArrayList<>(members), Collections.emptySet(),
+        Collections.emptySet());
+    setFailureDetectionPorts(view);
+
+    NetView newView = new NetView(view, 3);
+
+    assertTrue(newView.getCreator().equals(members.get(0)));
+    assertEquals(3, newView.getViewId());
+    assertEquals(members, newView.getMembers());
+    assertEquals(0, newView.getCrashedMembers().size());
+    assertEquals(members.get(1), newView.getLeadMember()); // a locator can't be lead member
+    assertEquals(0, newView.getShutdownMembers().size());
+    assertEquals(0, newView.getNewMembers().size());
+    assertTrue(newView.equals(view));
+    assertTrue(view.equals(newView));
+    newView.remove(members.get(1));
+    assertFalse(newView.equals(view));
+  }
+  
+  @Test
+  public void testAddLotsOfMembers() throws Exception {
+    NetView view = new NetView(members.get(0), 2, new ArrayList<>(members), Collections.emptySet(),
+        Collections.emptySet());
+    setFailureDetectionPorts(view);
+    
+    NetView copy = new NetView(view, 2);
+
+    int oldSize = view.size();
+    for (int i=0; i<100; i++) {
+      InternalDistributedMember mbr = new InternalDistributedMember(SocketCreator.getLocalHost(), 2000+i);
+      mbr.setVmKind(DistributionManager.NORMAL_DM_TYPE);
+      mbr.setVmViewId(2);
+      view.add(mbr);
+      view.setFailureDetectionPort(mbr, 2000+i);
+    }
+    
+    assertEquals(oldSize+100, view.size());
+    for (InternalDistributedMember mbr: view.getMembers()) {
+      assertEquals(mbr.getPort(), view.getFailureDetectionPort(mbr));
+    }
+    
+    assertEquals(100, view.getNewMembers(copy).size());
+  }
+  
+}


[22/50] [abbrv] incubator-geode git commit: GEODE-18: adding ASF header

Posted by je...@apache.org.
GEODE-18: adding ASF header


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

Branch: refs/heads/feature/GEODE-17
Commit: 4eb9e33ad541f6e2a4cff9b0669fd75554b9b3b4
Parents: 360665f
Author: Dick Cavender <dc...@pivotal.io>
Authored: Tue Nov 24 15:33:46 2015 -0800
Committer: Dick Cavender <dc...@pivotal.io>
Committed: Tue Nov 24 15:34:28 2015 -0800

----------------------------------------------------------------------
 .../internal/offheap/ReferenceCountHelper.java     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4eb9e33a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
index 85a0505..e396060 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
@@ -1,3 +1,20 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package com.gemstone.gemfire.internal.offheap;
 
 import java.util.ArrayList;


[06/50] [abbrv] incubator-geode git commit: fix GEODE-594: CI Failure in BackwardCompatibilitySerializationDUnitTest

Posted by je...@apache.org.
fix GEODE-594: CI Failure in BackwardCompatibilitySerializationDUnitTest

changed the test to be a CacheTestCase and use getCache()


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

Branch: refs/heads/feature/GEODE-17
Commit: 59f208734481f8f1da77790e5807e846442b9b7c
Parents: bbccb60
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Mon Nov 23 14:32:05 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Mon Nov 23 14:33:22 2015 -0800

----------------------------------------------------------------------
 .../BackwardCompatibilitySerializationDUnitTest.java   | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/59f20873/gemfire-core/src/test/java/com/gemstone/gemfire/internal/BackwardCompatibilitySerializationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/BackwardCompatibilitySerializationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/BackwardCompatibilitySerializationDUnitTest.java
index d730b9e..35269f7 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/BackwardCompatibilitySerializationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/BackwardCompatibilitySerializationDUnitTest.java
@@ -16,10 +16,6 @@
  */
 package com.gemstone.gemfire.internal;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.DataInput;
@@ -34,14 +30,11 @@ import java.util.ArrayList;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.cache.Cache;
 import com.gemstone.gemfire.cache.CacheFactory;
+import com.gemstone.gemfire.cache30.CacheTestCase;
 import com.gemstone.gemfire.internal.cache.DistributedPutAllOperation.EntryVersionsList;
-import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
-
-import dunit.DistributedTestCase;
 
 /**
  * Test the DSFID serialization framework added for rolling upgrades in 7.1
@@ -50,7 +43,7 @@ import dunit.DistributedTestCase;
  * 
  * 
  */
-public class BackwardCompatibilitySerializationDUnitTest extends DistributedTestCase {
+public class BackwardCompatibilitySerializationDUnitTest extends CacheTestCase {
 
   private transient ByteArrayOutputStream baos;
   private transient ByteArrayInputStream bais;
@@ -206,7 +199,7 @@ public class BackwardCompatibilitySerializationDUnitTest extends DistributedTest
     }
     
     // some msgs require distributed system
-    Cache c = new CacheFactory().set("locators", "localhost["+getDUnitLocatorPort()+"]").create();
+    Cache c = getCache();
     for (Object o : DSFIDFactory.getDsfidmap2().values()) {
       Constructor<?> cons = (Constructor<?>) o;
       if (cons != null) {


[45/50] [abbrv] incubator-geode git commit: Added GMSJoinLeave tests

Posted by je...@apache.org.
Added GMSJoinLeave tests


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

Branch: refs/heads/feature/GEODE-17
Commit: e0bf6858ab3db9c043853cef32cba0cffc1f1b68
Parents: fba6867
Author: Hitesh Khamesra <hi...@yahoo.com>
Authored: Fri Dec 4 09:04:18 2015 -0800
Committer: Hitesh Khamesra <hi...@yahoo.com>
Committed: Fri Dec 4 09:05:41 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/membership/GMSJoinLeave.java |  17 ++-
 .../gms/membership/GMSJoinLeaveJUnitTest.java   | 149 +++++++++++++++++++
 2 files changed, 165 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e0bf6858/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 2f9c514..2986238 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -1476,12 +1476,24 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
     return result;
   }
 
+  /***
+   * test method
+   * @return ViewReplyProcessor
+   */
+  protected ViewReplyProcessor getPrepareViewReplyProcessor() {
+    return prepareProcessor;
+  }
+  
+  protected boolean testPrepareProcessorWaiting(){
+    return prepareProcessor.isWaiting();
+  }
+  
   class ViewReplyProcessor {
     volatile int viewId = -1;
     final Set<InternalDistributedMember> notRepliedYet = new HashSet<>();
     NetView conflictingView;
     InternalDistributedMember conflictingViewSender;
-    boolean waiting;
+    volatile boolean waiting;
     final boolean isPrepareViewProcessor;
     final Set<InternalDistributedMember> pendingRemovals = new HashSet<>();
 
@@ -1498,6 +1510,9 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       pendingRemovals.clear();
     }
 
+    boolean isWaiting(){
+      return waiting;
+    }
     synchronized void processPendingRequests(Set<InternalDistributedMember> pendingLeaves, Set<InternalDistributedMember> pendingRemovals) {
       // there's no point in waiting for members who have already
       // requested to leave or who have been declared crashed.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e0bf6858/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index e49e4ae..abc7a2f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -41,8 +41,14 @@ import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
+import org.mockito.ArgumentCaptor;
+import org.mockito.internal.verification.Times;
+import org.mockito.internal.verification.api.VerificationData;
 import org.mockito.invocation.InvocationOnMock;
 import org.mockito.stubbing.Answer;
+import org.mockito.verification.Timeout;
+import org.mockito.verification.VerificationMode;
+import org.mockito.verification.VerificationWithTimeout;
 
 import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
@@ -57,13 +63,17 @@ import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Manag
 import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
 import com.gemstone.gemfire.distributed.internal.membership.gms.locator.FindCoordinatorResponse;
 import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave.SearchState;
+import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave.ViewReplyProcessor;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.InstallViewMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinRequestMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.JoinResponseMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.LeaveRequestMessage;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.NetworkPartitionMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.RemoveMemberMessage;
 import com.gemstone.gemfire.distributed.internal.membership.gms.messages.ViewAckMessage;
 import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.admin.remote.AddStatListenerResponse;
+import com.gemstone.gemfire.internal.admin.remote.StatListenerMessage;
 import com.gemstone.gemfire.security.AuthenticationFailedException;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
@@ -793,5 +803,144 @@ public class GMSJoinLeaveJUnitTest {
     b.run();
     verify(messenger).sendUnreliably(isA(InstallViewMessage.class));
   }
+  
+  private void installView(int viewId,InternalDistributedMember coordinator, List<InternalDistributedMember> members) throws IOException {
+    Set<InternalDistributedMember> shutdowns = new HashSet<>();
+    Set<InternalDistributedMember> crashes = new HashSet<>();
+    
+    when(services.getMessenger()).thenReturn(messenger);
+    
+    //prepare the view
+    NetView netView = new NetView(coordinator, viewId, members, shutdowns, crashes);
+    InstallViewMessage installViewMessage = new InstallViewMessage(netView, credentials, false);
+    gmsJoinLeave.processMessage(installViewMessage);
+   // verify(messenger).send(any(ViewAckMessage.class));
+  }
+  
+  @Test
+  public void testIgnoreoldView() throws Exception {
+    initMocks(false);
+    installView(3, mockMembers[0], createMemberList(mockMembers[0], mockMembers[1], mockMembers[2], gmsJoinLeaveMemberId, mockMembers[3]));
+    //now try to intall old view..
+    installView(1, mockMembers[0], createMemberList(mockMembers[0], mockMembers[1], mockMembers[2], gmsJoinLeaveMemberId, mockMembers[3]));
+    
+    assertFalse("Expected view id is 3 but found " + gmsJoinLeave.getView().getViewId(), gmsJoinLeave.getView().getViewId() == 1);
+  }
+  
+  @Test
+  public void testClearViewRequests() throws Exception {
+    try {
+    initMocks(false);
+    System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
+    gmsJoinLeave.join();
+    gmsJoinLeave.processMessage(new JoinRequestMessage(mockMembers[0], mockMembers[0], credentials, -1));
+    int viewRequests = gmsJoinLeave.getViewRequests().size();
+    
+    assertTrue( "There should be 1 viewRequest but found " + viewRequests, viewRequests == 1);
+    Thread.sleep(2 * GMSJoinLeave.MEMBER_REQUEST_COLLECTION_INTERVAL);
+    
+    viewRequests = gmsJoinLeave.getViewRequests().size();
+    assertTrue( "There should be 0 viewRequest but found " + viewRequests, viewRequests == 0);
+    }finally {
+      System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY);
+    }
+  }
+  
+  /***
+   * validating ViewReplyProcessor's memberSuspected, 
+   * processLeaveRequest, processRemoveRequest, processViewResponse method
+   */
+  @Test
+  public void testViewReplyProcessor() throws Exception {
+    try {
+      initMocks(false);
+      System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
+      gmsJoinLeave.join();
+      Set<InternalDistributedMember> recips = new HashSet<>();
+      recips.add(mockMembers[0]);
+      recips.add(mockMembers[1]);
+      recips.add(mockMembers[2]);
+      recips.add(mockMembers[3]);
+      ViewReplyProcessor prepareProcessor = gmsJoinLeave.getPrepareViewReplyProcessor(); 
+      prepareProcessor.initialize( 1, recips);
+      assertTrue("Prepare processor should be waiting ", gmsJoinLeave.testPrepareProcessorWaiting());
+      
+      prepareProcessor.memberSuspected(gmsJoinLeaveMemberId, mockMembers[0]);
+      prepareProcessor.processLeaveRequest(mockMembers[1]);
+      prepareProcessor.processRemoveRequest(mockMembers[2]);
+      prepareProcessor.processViewResponse(1, mockMembers[3], null);
+      
+      assertFalse("Prepare processor should not be waiting ", gmsJoinLeave.testPrepareProcessorWaiting());
+      }finally {
+        System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY);
+      }
+  }
+  
+  /***
+   * validating ViewReplyProcessor's processPendingRequests method
+   */
+  @Test
+  public void testViewReplyProcessor2() throws Exception {
+    try {
+      initMocks(false);
+      System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
+      gmsJoinLeave.join();
+      Set<InternalDistributedMember> recips = new HashSet<>();
+      recips.add(mockMembers[0]);
+      recips.add(mockMembers[1]);
+      recips.add(mockMembers[2]);
+      recips.add(mockMembers[3]);
+      ViewReplyProcessor prepareProcessor = gmsJoinLeave.getPrepareViewReplyProcessor();
+      prepareProcessor.initialize(1, recips);
+      assertTrue("Prepare processor should be waiting ", gmsJoinLeave.testPrepareProcessorWaiting());
+      Set<InternalDistributedMember> pendingLeaves = new HashSet<>();
+      pendingLeaves.add(mockMembers[0]);
+      Set<InternalDistributedMember> pendingRemovals = new HashSet<>();
+      pendingRemovals.add(mockMembers[1]);
+      
+      prepareProcessor.processPendingRequests(pendingLeaves, pendingRemovals);
+      
+      prepareProcessor.processViewResponse(1, mockMembers[2], null);
+      prepareProcessor.processViewResponse(1, mockMembers[3], null);
+      
+      assertFalse("Prepare processor should not be waiting ", gmsJoinLeave.testPrepareProcessorWaiting());
+      }finally {
+        System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY);
+      }
+  }
+  
+  @Test
+  public void testJoinResponseMsgWithBecomeCoordinator() throws Exception {
+    initMocks(false);
+    gmsJoinLeaveMemberId.getNetMember().setPreferredForCoordinator(false);
+    JoinRequestMessage reqMsg = new JoinRequestMessage(gmsJoinLeaveMemberId, mockMembers[0], null, 56734);
+    InternalDistributedMember ids = new InternalDistributedMember("localhost", 97898);
+    ids.getNetMember().setPreferredForCoordinator(true);
+    gmsJoinLeave.processMessage(reqMsg);
+    ArgumentCaptor<JoinResponseMessage> ac = new ArgumentCaptor<>();
+    verify(messenger).send(ac.capture());
+    
+    assertTrue("Should have asked for becoming a coordinator", ac.getValue().getBecomeCoordinator());
+  }
+  
+  @Test
+  public void testNetworkPartionMessage() throws Exception {
+    try {
+      initMocks(true);
+      System.setProperty(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY, "true");
+      gmsJoinLeave.join();
+      installView(1, gmsJoinLeaveMemberId, createMemberList(mockMembers[0], mockMembers[1], mockMembers[2], gmsJoinLeaveMemberId, mockMembers[3]));
+      for(int i = 1; i < 4; i++) {
+        RemoveMemberMessage msg = new RemoveMemberMessage(gmsJoinLeaveMemberId, mockMembers[i], "crashed");
+        msg.setSender(gmsJoinLeaveMemberId);
+        gmsJoinLeave.processMessage(msg);
+      }
+      Timeout to = new Timeout(2 * GMSJoinLeave.MEMBER_REQUEST_COLLECTION_INTERVAL, new Times(1));
+      verify(messenger, to).send( isA(NetworkPartitionMessage.class));
+                 
+    }finally {
+      System.getProperties().remove(GMSJoinLeave.BYPASS_DISCOVERY_PROPERTY);
+    }    
+  }
 }
 


[28/50] [abbrv] incubator-geode git commit: Merge branch 'feature/GEODE-584' into develop

Posted by je...@apache.org.
Merge branch 'feature/GEODE-584' into develop


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

Branch: refs/heads/feature/GEODE-17
Commit: b8fb18a5f4c0f54870aaa8a0ffd135d339a97599
Parents: 6e25230 91536e6
Author: Anthony Baker <ab...@pivotal.io>
Authored: Fri Nov 27 22:07:07 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Fri Nov 27 22:07:07 2015 -0800

----------------------------------------------------------------------
 gemfire-assembly/build.gradle                   |   1 +
 gemfire-core/build.gradle                       |   2 +-
 .../management/internal/cli/GfshParser.java     |  17 +-
 .../internal/cli/converters/DirConverter.java   |   2 +-
 .../cli/multistep/CLIMultiStepHelper.java       |   6 +-
 .../internal/cli/parser/GfshMethodTarget.java   |   8 +-
 .../cli/parser/jopt/JoptOptionParser.java       |  20 +-
 .../parser/preprocessor/PreprocessorUtils.java  |  11 +-
 .../cli/remote/RemoteExecutionStrategy.java     |   4 +-
 .../cli/shell/GfshExecutionStrategy.java        |   4 +-
 .../internal/cli/util/CommentSkipHelper.java    |   2 +-
 .../internal/cli/util/spring/Assert.java        |  35 ---
 .../internal/cli/util/spring/ObjectUtils.java   | 300 -------------------
 .../cli/util/spring/ReflectionUtils.java        | 132 --------
 .../internal/cli/util/spring/StringUtils.java   | 229 --------------
 15 files changed, 40 insertions(+), 733 deletions(-)
----------------------------------------------------------------------



[11/50] [abbrv] incubator-geode git commit: GEODE-580: cleanup off-heap code

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
index c800335..f16253e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl.java
@@ -16,69 +16,30 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutput;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Arrays;
-import java.util.Collection;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
-import java.util.NavigableSet;
-import java.util.NoSuchElementException;
 import java.util.Set;
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentLinkedQueue;
-import java.util.concurrent.ConcurrentMap;
-import java.util.concurrent.ConcurrentSkipListSet;
-import java.util.concurrent.CopyOnWriteArrayList;
 import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicLongFieldUpdater;
 import java.util.concurrent.atomic.AtomicReference;
-import java.util.concurrent.atomic.AtomicReferenceArray;
-
 import org.apache.logging.log4j.Logger;
 
-import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.LogWriter;
-import com.gemstone.gemfire.OutOfOffHeapMemoryException;
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.cache.Region;
-import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.DSCODE;
-import com.gemstone.gemfire.internal.DataSerializableFixedID;
-import com.gemstone.gemfire.internal.HeapDataOutputStream;
-import com.gemstone.gemfire.internal.InternalDataSerializer;
 import com.gemstone.gemfire.internal.cache.BucketRegion;
-import com.gemstone.gemfire.internal.cache.BytesAndBitsForCompactor;
-import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
-import com.gemstone.gemfire.internal.cache.EntryBits;
-import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
-import com.gemstone.gemfire.internal.cache.RegionEntryContext;
-import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ConcurrentBag.Node;
 import com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
-import com.gemstone.gemfire.internal.shared.StringPrintWriter;
 
 /**
  * This allocator is somewhat like an Arena allocator.
@@ -95,7 +56,7 @@ import com.gemstone.gemfire.internal.shared.StringPrintWriter;
  */
 public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryInspector {
 
-  private static final Logger logger = LogService.getLogger();
+  static final Logger logger = LogService.getLogger();
   
   public static final String FREE_OFF_HEAP_MEMORY_PROPERTY = "gemfire.free-off-heap-memory";
   
@@ -118,9 +79,9 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   public final static int MAX_TINY = TINY_MULTIPLE*TINY_FREE_LIST_COUNT;
   public final static int HUGE_MULTIPLE = 256;
   
-  private volatile OffHeapMemoryStats stats;
+  volatile OffHeapMemoryStats stats;
   
-  private volatile OutOfOffHeapMemoryListener ooohml;
+  volatile OutOfOffHeapMemoryListener ooohml;
   
   /** The MemoryChunks that this allocator is managing by allocating smaller chunks of them.
    * The contents of this array never change.
@@ -135,7 +96,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   
   private static SimpleMemoryAllocatorImpl singleton = null;
   private static final AtomicReference<Thread> asyncCleanupThread = new AtomicReference<Thread>();
-  private final ChunkFactory chunkFactory;
+  final ChunkFactory chunkFactory;
   
   public static SimpleMemoryAllocatorImpl getAllocator() {
     SimpleMemoryAllocatorImpl result = singleton;
@@ -157,7 +118,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
       result.reuse(ooohml, lw, stats, offHeapMemorySize);
       lw.config("Reusing " + result.getTotalMemory() + " bytes of off-heap memory. The maximum size of a single off-heap object is " + result.largestSlab + " bytes.");
       created = true;
-      invokeAfterReuse(result);
+      LifecycleListener.invokeAfterReuse(result);
     } else {
       // allocate memory chunks
       //SimpleMemoryAllocatorImpl.cleanupPreviousAllocator();
@@ -189,7 +150,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
       result = new SimpleMemoryAllocatorImpl(ooohml, stats, slabs);
       created = true;
       singleton = result;
-      invokeAfterCreate(result);
+      LifecycleListener.invokeAfterCreate(result);
     }
     } finally {
       if (!created) {
@@ -203,7 +164,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   public static SimpleMemoryAllocatorImpl create(OutOfOffHeapMemoryListener oooml, OffHeapMemoryStats stats, UnsafeMemoryChunk[] slabs) {
     SimpleMemoryAllocatorImpl result = new SimpleMemoryAllocatorImpl(oooml, stats, slabs);
     singleton = result;
-    invokeAfterCreate(result);
+    LifecycleListener.invokeAfterCreate(result);
     return result;
   }
   
@@ -323,7 +284,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     this.stats.incMaxMemory(this.totalSlabSize);
     this.stats.incFreeMemory(this.totalSlabSize);
     
-    this.freeList = new FreeListManager();
+    this.freeList = new FreeListManager(this);
   }
   
   public List<Chunk> getLostChunks() {
@@ -401,190 +362,12 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     //System.out.println("allocating " + size);
     Chunk result = this.freeList.allocate(size, chunkType);
     //("allocated off heap object of size " + size + " @" + Long.toHexString(result.getMemoryAddress()), true);
-    if (trackReferenceCounts()) {
-      refCountChanged(result.getMemoryAddress(), false, 1);
+    if (ReferenceCountHelper.trackReferenceCounts()) {
+      ReferenceCountHelper.refCountChanged(result.getMemoryAddress(), false, 1);
     }
     return result;
   }
   
-  /**
-   * Used to represent offheap addresses whose
-   * value encodes actual data instead a memory
-   * location.
-   * Instances of this class have a very short lifetime.
-   * 
-   * @author darrel
-   *
-   */
-  public static class DataAsAddress implements StoredObject {
-    private final long address;
-    
-    public DataAsAddress(long addr) {
-      this.address = addr;
-    }
-    
-    public long getEncodedAddress() {
-      return this.address;
-    }
-
-    @Override
-    public boolean equals(Object o) {
-      if (o instanceof DataAsAddress) {
-        return getEncodedAddress() == ((DataAsAddress) o).getEncodedAddress();
-      }
-      return false;
-    }
-    
-    @Override
-    public int hashCode() {
-      long value = getEncodedAddress();
-      return (int)(value ^ (value >>> 32));
-    }
-
-    @Override
-    public int getSizeInBytes() {
-      return 0;
-    }
-
-    public byte[] getDecompressedBytes(RegionEntryContext r) {
-      return OffHeapRegionEntryHelper.encodedAddressToBytes(this.address, true, r);
-    }
-
-    /**
-     * If we contain a byte[] return it.
-     * Otherwise return the serialize bytes in us in a byte array.
-     */
-    public byte[] getRawBytes() {
-      return OffHeapRegionEntryHelper.encodedAddressToRawBytes(this.address);
-    }
-    
-    @Override
-    public byte[] getSerializedValue() {
-      return OffHeapRegionEntryHelper.encodedAddressToBytes(this.address);
-    }
-
-    @Override
-    public Object getDeserializedValue(Region r, RegionEntry re) {
-      return OffHeapRegionEntryHelper.encodedAddressToObject(this.address);
-    }
-
-    @Override
-    public Object getDeserializedForReading() {
-      return getDeserializedValue(null,null);
-    }
-    
-    @Override
-    public Object getValueAsDeserializedHeapObject() {
-      return getDeserializedValue(null,null);
-    }
-    
-    @Override
-    public byte[] getValueAsHeapByteArray() {
-      if (isSerialized()) {
-        return getSerializedValue();
-      } else {
-        return (byte[])getDeserializedForReading();
-      }
-    }
-
-    @Override
-    public String getStringForm() {
-      try {
-        return StringUtils.forceToString(getDeserializedForReading());
-      } catch (RuntimeException ex) {
-        return "Could not convert object to string because " + ex;
-      }
-    }
-
-    @Override
-    public Object getDeserializedWritableCopy(Region r, RegionEntry re) {
-      return getDeserializedValue(null,null);
-    }
-
-    @Override
-    public Object getValue() {
-      if (isSerialized()) {
-        return getSerializedValue();
-      } else {
-        throw new IllegalStateException("Can not call getValue on StoredObject that is not serialized");
-      }
-    }
-
-    @Override
-    public void writeValueAsByteArray(DataOutput out) throws IOException {
-      DataSerializer.writeByteArray(getSerializedValue(), out);
-    }
-
-    @Override
-    public void fillSerializedValue(BytesAndBitsForCompactor wrapper,
-        byte userBits) {
-      byte[] value;
-      if (isSerialized()) {
-        value = getSerializedValue();
-        userBits = EntryBits.setSerialized(userBits, true);
-      } else {
-        value = (byte[]) getDeserializedForReading();
-      }
-      wrapper.setData(value, userBits, value.length, true);
-    }
-
-    @Override
-    public int getValueSizeInBytes() {
-      return 0;
-    }
-    
-    @Override
-    public void sendTo(DataOutput out) throws IOException {
-      if (isSerialized()) {
-        out.write(getSerializedValue());
-      } else {
-        Object objToSend = (byte[]) getDeserializedForReading(); // deserialized as a byte[]
-        DataSerializer.writeObject(objToSend, out);
-      }
-    }
-
-    @Override
-    public void sendAsByteArray(DataOutput out) throws IOException {
-      byte[] bytes;
-      if (isSerialized()) {
-        bytes = getSerializedValue();
-      } else {
-        bytes = (byte[]) getDeserializedForReading();
-      }
-      DataSerializer.writeByteArray(bytes, out);
-      
-    }
-    
-    @Override
-    public void sendAsCachedDeserializable(DataOutput out) throws IOException {
-      if (!isSerialized()) {
-        throw new IllegalStateException("sendAsCachedDeserializable can only be called on serialized StoredObjects");
-      }
-      InternalDataSerializer.writeDSFIDHeader(DataSerializableFixedID.VM_CACHED_DESERIALIZABLE, out);
-      sendAsByteArray(out);
-    }
-
-    @Override
-    public boolean isSerialized() {
-      return OffHeapRegionEntryHelper.isSerialized(this.address);
-    }
-
-    @Override
-    public boolean isCompressed() {
-      return OffHeapRegionEntryHelper.isCompressed(this.address);
-    }
-    
-    @Override
-    public boolean retain() {
-      // nothing needed
-      return true;
-    }
-    @Override
-    public void release() {
-      // nothing needed
-    }
-  }
-
   @SuppressWarnings("unused")
   public static void debugLog(String msg, boolean logStack) {
     if (logStack) {
@@ -607,8 +390,8 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     Chunk result = this.freeList.allocate(v.length, chunkType);
     //debugLog("allocated off heap object of size " + v.length + " @" + Long.toHexString(result.getMemoryAddress()), true);
     //debugLog("allocated off heap object of size " + v.length + " @" + Long.toHexString(result.getMemoryAddress()) +  "chunkSize=" + result.getSize() + " isSerialized=" + isSerialized + " v=" + Arrays.toString(v), true);
-    if (trackReferenceCounts()) {
-      refCountChanged(result.getMemoryAddress(), false, 1);
+    if (ReferenceCountHelper.trackReferenceCounts()) {
+      ReferenceCountHelper.refCountChanged(result.getMemoryAddress(), false, 1);
     }
     assert result.getChunkType() == chunkType: "chunkType=" + chunkType + " getChunkType()=" + result.getChunkType();
     result.setSerializedValue(v);
@@ -635,7 +418,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
   @Override
   public void close() {
     try {
-      invokeBeforeClose(this);
+      LifecycleListener.invokeBeforeClose(this);
     } finally {
       this.ooohml.close();
       if (Boolean.getBoolean(FREE_OFF_HEAP_MEMORY_PROPERTY)) {
@@ -710,7 +493,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
 //    asyncCleanupThread.set(t);    
   }
   
-  private void freeChunk(long addr) {
+  void freeChunk(long addr) {
     this.freeList.free(addr);
   }
   
@@ -772,7 +555,7 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     }
   }
   
-  private void notifyListeners() {
+  void notifyListeners() {
     final MemoryUsageListener[] savedListeners = this.memoryUsageListeners;
     
     if (savedListeners.length == 0) {
@@ -785,2391 +568,73 @@ public final class SimpleMemoryAllocatorImpl implements MemoryAllocator, MemoryI
     }
   }
   
-  public class FreeListManager {
-    private final AtomicReferenceArray<SyncChunkStack> tinyFreeLists = new AtomicReferenceArray<SyncChunkStack>(TINY_FREE_LIST_COUNT);
-    // Deadcoding the BIG stuff. Idea is to have a bigger TINY list by default
-//    /**
-//     * Every allocated chunk smaller than BIG_MULTIPLE*BIG_FREE_LIST_COUNT but that is not tiny will allocate a chunk of memory that is a multiple of this value.
-//     * Sizes are always rounded up to the next multiple of this constant
-//     * so internal fragmentation will be limited to BIG_MULTIPLE-1 bytes per allocation
-//     * and on average will be BIG_MULTIPLE/2 given a random distribution of size requests.
-//     */
-//    public final static int BIG_MULTIPLE = TINY_MULTIPLE*8;
-//    /**
-//     * Number of free lists to keep for big allocations.
-//     */
-//    private final static int BIG_FREE_LIST_COUNT = 2048;
-//    private final static int BIG_OFFSET = (MAX_TINY/BIG_MULTIPLE*BIG_MULTIPLE);
-//    public final static int MAX_BIG = (BIG_MULTIPLE*BIG_FREE_LIST_COUNT) + BIG_OFFSET;
-//    private final AtomicReferenceArray<ConcurrentChunkStack> bigFreeLists = new AtomicReferenceArray<ConcurrentChunkStack>(BIG_FREE_LIST_COUNT);
-    // hugeChunkSet is sorted by chunk size in ascending order. It will only contain chunks larger than MAX_TINY.
-    private final ConcurrentSkipListSet<Chunk> hugeChunkSet = new ConcurrentSkipListSet<Chunk>();
-    private final AtomicLong allocatedSize = new AtomicLong(0L);
-   
-    private int getNearestTinyMultiple(int size) {
-      return (size-1)/TINY_MULTIPLE;
-    }
-    public List<Chunk> getLiveChunks() {
-      ArrayList<Chunk> result = new ArrayList<Chunk>();
-      UnsafeMemoryChunk[] slabs = getSlabs();
-      for (int i=0; i < slabs.length; i++) {
-        getLiveChunks(slabs[i], result);
-      }
-      return result;
-    }
-    private void getLiveChunks(UnsafeMemoryChunk slab, List<Chunk> result) {
-      long addr = slab.getMemoryAddress();
-      while (addr <= (slab.getMemoryAddress() + slab.getSize() - Chunk.MIN_CHUNK_SIZE)) {
-        Fragment f = isAddrInFragmentFreeSpace(addr);
-        if (f != null) {
-          addr = f.getMemoryAddress() + f.getSize();
-        } else {
-          int curChunkSize = Chunk.getSize(addr);
-          int refCount = Chunk.getRefCount(addr);
-          if (refCount > 0) {
-            result.add(SimpleMemoryAllocatorImpl.this.chunkFactory.newChunk(addr));
-          }
-          addr += curChunkSize;
-        }
-      }
-    }
-    /**
-     * If addr is in the free space of a fragment then return that fragment; otherwise return null.
-     */
-    private Fragment isAddrInFragmentFreeSpace(long addr) {
-      for (Fragment f: this.fragmentList) {
-        if (addr >= (f.getMemoryAddress() + f.getFreeIndex()) && addr < (f.getMemoryAddress() + f.getSize())) {
-          return f;
-        }
-      }
-      return null;
-    }
-    public long getUsedMemory() {
-      return this.allocatedSize.get();
-    }
-    public long getFreeMemory() {
-      return getTotalMemory() - getUsedMemory();
-//      long result = getFreeFragmentMemory();
-//      result += getFreeTinyMemory();
-//      result += getFreeHugeMemory();
-//      return result;
-    }
-    public long getFreeFragmentMemory() {
-      long result = 0;
-      for (Fragment f: this.fragmentList) {
-        int freeSpace = f.freeSpace();
-        if (freeSpace >= Chunk.MIN_CHUNK_SIZE) {
-          result += freeSpace;
-        }
-      }
-      return result;
-    }
-    public long getFreeTinyMemory() {
-      long tinyFree = 0;
-      for (int i=0; i < this.tinyFreeLists.length(); i++) {
-        SyncChunkStack cl = this.tinyFreeLists.get(i);
-        if (cl != null) {
-          tinyFree += cl.computeTotalSize();
-        }
-      }
-      return tinyFree;
-    }
-//    public long getFreeBigMemory() {
-//      long bigFree = 0;
-//      for (int i=0; i < this.bigFreeLists.length(); i++) {
-//        ConcurrentChunkStack cl = this.bigFreeLists.get(i);
-//        if (cl != null) {
-//          bigFree += cl.computeTotalSize();
-//        }
-//      }
-//      return bigFree;
-//    }
-    public long getFreeHugeMemory() {
-      long hugeFree = 0;
-      for (Chunk c: this.hugeChunkSet) {
-        hugeFree += c.getSize();
-      }
-      return hugeFree;
-    }
-//    private int getNearestBigMultiple(int size) {
-//      return (size-1-BIG_OFFSET)/BIG_MULTIPLE;
-//    }
-
-    /**
-     * Each long in this array tells us how much of the corresponding slab is allocated.
-     */
-    //private final AtomicIntegerArray slabOffsets = new AtomicIntegerArray(getSlabs().length);
-    /**
-     * The slab id of the last slab we allocated from.
-     */
-    private final AtomicInteger lastFragmentAllocation = new AtomicInteger(0);
-
-    private final CopyOnWriteArrayList<Fragment> fragmentList;
-    public FreeListManager() {
-      UnsafeMemoryChunk[] slabs = getSlabs();
-      Fragment[] tmp = new Fragment[slabs.length];
-      for (int i=0; i < slabs.length; i++) {
-        tmp[i] = new Fragment(slabs[i].getMemoryAddress(), slabs[i].getSize());
-      }
-      this.fragmentList = new CopyOnWriteArrayList<Fragment>(tmp);
-      
-      if(validateMemoryWithFill) {
-        fillFragments();
-      }
-    }
-    
-    /**
-     * Fills all fragments with a fill used for data integrity validation.
-     */
-    private void fillFragments() {
-      for(Fragment fragment : this.fragmentList) {
-        fragment.fill();
-      }
-    }
-    
-    /**
-     * This is a bit of a hack. TODO add some timeout logic in case this thread never does another off heap allocation.
-     */
-//    private final ThreadLocal<Chunk> tlCache = new ThreadLocal<Chunk>();
-    
-    /**
-     * Allocate a chunk of memory of at least the given size.
-     * The basic algorithm is:
-     * 1. Look for a previously allocated and freed chunk close to the size requested.
-     * 2. See if the original chunk is big enough to split. If so do so.
-     * 3. Look for a previously allocated and freed chunk of any size larger than the one requested.
-     *    If we find one split it.
-     * <p>
-     * It might be better not to include step 3 since we expect and freed chunk to be reallocated in the future.
-     * Maybe it would be better for 3 to look for adjacent free blocks that can be merged together.
-     * For now we will just try 1 and 2 and then report out of mem.
-     * @param size minimum bytes the returned chunk must have.
-     * @param chunkType TODO
-     * @return the allocated chunk
-     * @throws IllegalStateException if a chunk can not be allocated.
-     */
-    @SuppressWarnings("synthetic-access")
-    public Chunk allocate(int size, ChunkType chunkType) {
-      Chunk result = null; /*tlCache.get();
-      
-      if (result != null && result.getDataSize() == size) {
-        tlCache.set(null);
-      } else */{
-        assert size > 0;
-        if (chunkType == null) {
-          chunkType = GemFireChunk.TYPE;
-        }
-        result = basicAllocate(size, true, chunkType);
-        result.setDataSize(size);
-      }
-      stats.incObjects(1);
-      int resultSize = result.getSize();
-      this.allocatedSize.addAndGet(resultSize);
-      stats.incUsedMemory(resultSize);
-      stats.incFreeMemory(-resultSize);
-      result.initializeUseCount();
-      notifyListeners();
-      
-      return result;
-    }
-    
-    private Chunk basicAllocate(int size, boolean useSlabs, ChunkType chunkType) {
-      if (useSlabs) {
-        // Every object stored off heap has a header so we need
-        // to adjust the size so that the header gets allocated.
-        // If useSlabs is false then the incoming size has already
-        // been adjusted.
-        size += Chunk.OFF_HEAP_HEADER_SIZE;
-      }
-      if (size <= MAX_TINY) {
-        return allocateTiny(size, useSlabs, chunkType);
-//      } else if (size <= MAX_BIG) {
-//        return allocateBig(size, useSlabs);
-      } else {
-        return allocateHuge(size, useSlabs, chunkType);
-      }
-    }
-    
-    private Chunk allocateFromFragments(int chunkSize, ChunkType chunkType) {
-      do {
-        final int lastAllocationId = this.lastFragmentAllocation.get();
-        for (int i=lastAllocationId; i < this.fragmentList.size(); i++) {
-          Chunk result = allocateFromFragment(i, chunkSize, chunkType);
-          if (result != null) {
-            return result;
-          }
-        }
-        for (int i=0; i < lastAllocationId; i++) {
-          Chunk result = allocateFromFragment(i, chunkSize, chunkType);
-          if (result != null) {
-            return result;
-          }
-        }
-      } while (compact(chunkSize));
-      // We tried all the fragments and didn't find any free memory.
-      logOffHeapState(chunkSize);
-      final OutOfOffHeapMemoryException failure = new OutOfOffHeapMemoryException("Out of off-heap memory. Could not allocate size of " + chunkSize);
-      try {
-        throw failure;
-      } finally {
-        SimpleMemoryAllocatorImpl.this.ooohml.outOfOffHeapMemory(failure);
-      }
-    }
-    
-    private void logOffHeapState(int chunkSize) {
-      if (InternalDistributedSystem.getAnyInstance() != null) {
-        LogWriter lw = InternalDistributedSystem.getAnyInstance().getLogWriter();
-        lw.info("OutOfOffHeapMemory allocating size of " + chunkSize + ". allocated=" + this.allocatedSize.get() + " compactions=" + this.compactCount.get() + " objects=" + stats.getObjects() + " free=" + stats.getFreeMemory() + " fragments=" + stats.getFragments() + " largestFragment=" + stats.getLargestFragment() + " fragmentation=" + stats.getFragmentation());
-        logFragmentState(lw);
-        logTinyState(lw);
-//        logBigState(lw);
-        logHugeState(lw);
-      }
-    }
-
-    private void logHugeState(LogWriter lw) {
-      for (Chunk c: this.hugeChunkSet) {
-        lw.info("Free huge of size " + c.getSize());
-      }
-    }
-//    private void logBigState(LogWriter lw) {
-//      for (int i=0; i < this.bigFreeLists.length(); i++) {
-//        ConcurrentChunkStack cl = this.bigFreeLists.get(i);
-//        if (cl != null) {
-//          cl.logSizes(lw, "Free big of size ");
-//        }
-//      }
-//    }
-    private void logTinyState(LogWriter lw) {
-      for (int i=0; i < this.tinyFreeLists.length(); i++) {
-        SyncChunkStack cl = this.tinyFreeLists.get(i);
-        if (cl != null) {
-          cl.logSizes(lw, "Free tiny of size ");
+  static void validateAddress(long addr) {
+    validateAddressAndSize(addr, -1);
+  }
+  
+  static void validateAddressAndSize(long addr, int size) {
+    // if the caller does not have a "size" to provide then use -1
+    if ((addr & 7) != 0) {
+      StringBuilder sb = new StringBuilder();
+      sb.append("address was not 8 byte aligned: 0x").append(Long.toString(addr, 16));
+      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.singleton;
+      if (ma != null) {
+        sb.append(". Valid addresses must be in one of the following ranges: ");
+        for (int i=0; i < ma.slabs.length; i++) {
+          long startAddr = ma.slabs[i].getMemoryAddress();
+          long endAddr = startAddr + ma.slabs[i].getSize();
+          sb.append("[").append(Long.toString(startAddr, 16)).append("..").append(Long.toString(endAddr, 16)).append("] ");
         }
       }
+      throw new IllegalStateException(sb.toString());
     }
-    private void logFragmentState(LogWriter lw) {
-      for (Fragment f: this.fragmentList) {
-        int freeSpace = f.freeSpace();
-        if (freeSpace > 0) {
-          lw.info("Fragment at " + f.getMemoryAddress() + " of size " + f.getSize() + " has " + freeSpace + " bytes free.");
-        }
-      }
+    if (addr >= 0 && addr < 1024) {
+      throw new IllegalStateException("addr was smaller than expected 0x" + addr);
     }
+    validateAddressAndSizeWithinSlab(addr, size);
+  }
 
-    private final AtomicInteger compactCount = new AtomicInteger();
-    /**
-     * Compacts memory and returns true if enough memory to allocate chunkSize
-     * is freed. Otherwise returns false;
-     * TODO OFFHEAP: what should be done about contiguous chunks that end up being bigger than 2G?
-     * Currently if we are given slabs bigger than 2G or that just happen to be contiguous and add
-     * up to 2G then the compactor may unify them together into a single Chunk and our 32-bit chunkSize
-     * field will overflow. This code needs to detect this and just create a chunk of 2G and then start
-     * a new one.
-     * Or to prevent it from happening we could just check the incoming slabs and throw away a few bytes
-     * to keep them from being contiguous.
-     */
-    private boolean compact(int chunkSize) {
-      final long startCompactionTime = getStats().startCompaction();
-      final int countPreSync = this.compactCount.get();
-      try {
-        synchronized (this) {
-          if (this.compactCount.get() != countPreSync) {
-            // someone else did a compaction while we waited on the sync.
-            // So just return true causing the caller to retry the allocation.
-            return true;
-          }
-          ArrayList<SyncChunkStack> freeChunks = new ArrayList<SyncChunkStack>();
-          collectFreeChunks(freeChunks);
-          final int SORT_ARRAY_BLOCK_SIZE = 128;
-          long[] sorted = new long[SORT_ARRAY_BLOCK_SIZE];
-          int sortedSize = 0;
-          boolean result = false;
-          int largestFragment = 0;
-          for (SyncChunkStack l: freeChunks) {
-            long addr = l.poll();
-            while (addr != 0) {
-              int idx = Arrays.binarySearch(sorted, 0, sortedSize, addr);
-              //System.out.println("DEBUG addr=" + addr + " size=" + Chunk.getSize(addr) + " idx="+idx + " sortedSize=" + sortedSize);
-              if (idx >= 0) {
-                throw new IllegalStateException("duplicate memory address found during compaction!");
-              }
-              idx = -idx;
-              idx--;
-              if (idx == sortedSize) {
-                // addr is > everything in the array
-                if (sortedSize == 0) {
-                  // nothing was in the array
-                  sorted[0] = addr;
-                  sortedSize++;
-                } else {
-                  // see if we can conflate into sorted[idx]
-                  long lowAddr = sorted[idx-1];
-                  int lowSize = Chunk.getSize(lowAddr);
-                  if (lowAddr + lowSize == addr) {
-                    // append the addr chunk to lowAddr
-                    Chunk.setSize(lowAddr, lowSize + Chunk.getSize(addr));
-                  } else {
-                    if (sortedSize >= sorted.length) {
-                      long[] newSorted = new long[sorted.length+SORT_ARRAY_BLOCK_SIZE];
-                      System.arraycopy(sorted, 0, newSorted, 0, sorted.length);
-                      sorted = newSorted;
-                    }
-                    sortedSize++;
-                    sorted[idx] = addr;
-                  }
-                }
-              } else {
-                int addrSize = Chunk.getSize(addr);
-                long highAddr = sorted[idx];
-                if (addr + addrSize == highAddr) {
-                  // append highAddr chunk to addr
-                  Chunk.setSize(addr, addrSize + Chunk.getSize(highAddr));
-                  sorted[idx] = addr;
-                } else {
-                  boolean insert = idx==0;
-                  if (!insert) {
-                    long lowAddr = sorted[idx-1];
-  //                  if (lowAddr == 0L) {
-  //                    long[] tmp = Arrays.copyOf(sorted, sortedSize);
-  //                    throw new IllegalStateException("addr was zero at idx=" + (idx-1) + " sorted="+ Arrays.toString(tmp));
-  //                  }
-                    int lowSize = Chunk.getSize(lowAddr);
-                    if (lowAddr + lowSize == addr) {
-                      // append the addr chunk to lowAddr
-                      Chunk.setSize(lowAddr, lowSize + addrSize);
-                    } else {
-                      insert = true;
-                    }
-                  }
-                  if (insert) {
-                    if (sortedSize >= sorted.length) {
-                      long[] newSorted = new long[sorted.length+SORT_ARRAY_BLOCK_SIZE];
-                      System.arraycopy(sorted, 0, newSorted, 0, idx);
-                      newSorted[idx] = addr;
-                      System.arraycopy(sorted, idx, newSorted, idx+1, sortedSize-idx);
-                      sorted = newSorted;
-                    } else {
-                      System.arraycopy(sorted, idx, sorted, idx+1, sortedSize-idx);
-                      sorted[idx] = addr;
-                    }
-                    sortedSize++;
-                  }
-                }
+  static void validateAddressAndSizeWithinSlab(long addr, int size) {
+    if (DO_EXPENSIVE_VALIDATION) {
+      SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.singleton;
+      if (ma != null) {
+        for (int i=0; i < ma.slabs.length; i++) {
+          if (ma.slabs[i].getMemoryAddress() <= addr && addr < (ma.slabs[i].getMemoryAddress() + ma.slabs[i].getSize())) {
+            // validate addr + size is within the same slab
+            if (size != -1) { // skip this check if size is -1
+              if (!(ma.slabs[i].getMemoryAddress() <= (addr+size-1) && (addr+size-1) < (ma.slabs[i].getMemoryAddress() + ma.slabs[i].getSize()))) {
+                throw new IllegalStateException(" address 0x" + Long.toString(addr+size-1, 16) + " does not address the original slab memory");
               }
-              addr = l.poll();
-            }
-          }
-          for (int i=sortedSize-1; i > 0; i--) {
-            long addr = sorted[i];
-            long lowAddr = sorted[i-1];
-            int lowSize = Chunk.getSize(lowAddr);
-            if (lowAddr + lowSize == addr) {
-              // append addr chunk to lowAddr
-              Chunk.setSize(lowAddr, lowSize + Chunk.getSize(addr));
-              sorted[i] = 0L;
-            }
-          }
-          this.lastFragmentAllocation.set(0);
-          ArrayList<Fragment> tmp = new ArrayList<Fragment>();
-          for (int i=sortedSize-1; i >= 0; i--) {
-            long addr = sorted[i];
-            if (addr == 0L) continue;
-            int addrSize = Chunk.getSize(addr);
-            Fragment f = new Fragment(addr, addrSize);
-            if (addrSize >= chunkSize) {
-              result = true;
-            }
-            if (addrSize > largestFragment) {
-              largestFragment = addrSize;
-              // TODO it might be better to sort them biggest first
-              tmp.add(0, f);
-            } else {
-              tmp.add(f);
-            }
-          }
-          this.fragmentList.addAll(tmp);
-          
-          // Reinitialize fragments with fill pattern data
-          if(validateMemoryWithFill) {
-            fillFragments();
-          }
-          
-          // Signal any waiters that a compaction happened.
-          this.compactCount.incrementAndGet();
-          
-          getStats().setLargestFragment(largestFragment);
-          getStats().setFragments(tmp.size());        
-          updateFragmentation();
-          
-          return result;
-        } // sync
-      } finally {
-        getStats().endCompaction(startCompactionTime);
-      }
-    }
-    
-    private void updateFragmentation() {      
-      long freeSize = getStats().getFreeMemory();
-
-      // Calculate free space fragmentation only if there is free space available.
-      if(freeSize > 0) {
-        long largestFragment = getStats().getLargestFragment();
-        long numerator = freeSize - largestFragment;
-        
-        double percentage = (double) numerator / (double) freeSize;
-        percentage *= 100d;
-        
-        int wholePercentage = (int) Math.rint(percentage);
-        getStats().setFragmentation(wholePercentage);
-      } else {
-        // No free space? Then we have no free space fragmentation.
-        getStats().setFragmentation(0);
-      }
-    }
-    
-    private void collectFreeChunks(List<SyncChunkStack> l) {
-      collectFreeFragmentChunks(l);
-      collectFreeHugeChunks(l);
-//      collectFreeBigChunks(l);
-      collectFreeTinyChunks(l);
-    }
-    private void collectFreeFragmentChunks(List<SyncChunkStack> l) {
-      if (this.fragmentList.size() == 0) return;
-      SyncChunkStack result = new SyncChunkStack();
-      for (Fragment f: this.fragmentList) {
-        int offset;
-        int diff;
-        do {
-          offset = f.getFreeIndex();
-          diff = f.getSize() - offset;
-        } while (diff >= Chunk.MIN_CHUNK_SIZE && !f.allocate(offset, offset+diff));
-        if (diff < Chunk.MIN_CHUNK_SIZE) {
-          if (diff > 0) {
-            logger.debug("Lost memory of size {}", diff);
-          }
-          // fragment is too small to turn into a chunk
-          // TODO we need to make sure this never happens
-          // by keeping sizes rounded. I think I did this
-          // by introducing MIN_CHUNK_SIZE and by rounding
-          // the size of huge allocations.
-          continue;
-        }
-        long chunkAddr = f.getMemoryAddress()+offset;
-        Chunk.setSize(chunkAddr, diff);
-        result.offer(chunkAddr);
-      }
-      // All the fragments have been turned in to chunks so now clear them
-      // The compaction will create new fragments.
-      this.fragmentList.clear();
-      if (!result.isEmpty()) {
-        l.add(result);
-      }
-    }
-    private void collectFreeTinyChunks(List<SyncChunkStack> l) {
-      for (int i=0; i < this.tinyFreeLists.length(); i++) {
-        SyncChunkStack cl = this.tinyFreeLists.get(i);
-        if (cl != null) {
-          long head = cl.clear();
-          if (head != 0L) {
-            l.add(new SyncChunkStack(head));
-          }
-        }
-      }
-    }
-//    private void collectFreeBigChunks(List<ConcurrentChunkStack> l) {
-//      for (int i=0; i < this.bigFreeLists.length(); i++) {
-//        ConcurrentChunkStack cl = this.bigFreeLists.get(i);
-//        if (cl != null) {
-//          long head = cl.clear();
-//          if (head != 0L) {
-//            l.add(new ConcurrentChunkStack(head));
-//          }
-//        }
-//      }
-//    }
-    public void collectFreeHugeChunks(List<SyncChunkStack> l) {
-      Chunk c = this.hugeChunkSet.pollFirst();
-      SyncChunkStack result = null;
-      while (c != null) {
-        if (result == null) {
-          result = new SyncChunkStack();
-          l.add(result);
-        }
-        result.offer(c.getMemoryAddress());
-        c = this.hugeChunkSet.pollFirst();
-      }
-    }
-    
-    private Chunk allocateFromFragment(final int fragIdx, final int chunkSize, ChunkType chunkType) {
-      if (fragIdx >= this.fragmentList.size()) return null;
-      final Fragment fragment;
-      try {
-        fragment = this.fragmentList.get(fragIdx);
-      } catch (IndexOutOfBoundsException ignore) {
-        // A concurrent compaction can cause this.
-        return null;
-      }
-      boolean retryFragment;
-      do {
-        retryFragment = false;
-        int oldOffset = fragment.getFreeIndex();
-        int fragmentSize = fragment.getSize();
-        int fragmentFreeSize = fragmentSize - oldOffset;
-        if (fragmentFreeSize >= chunkSize) {
-          // this fragment has room
-          // Try to allocate up to BATCH_SIZE more chunks from it
-          int allocSize = chunkSize * BATCH_SIZE;
-          if (allocSize > fragmentFreeSize) {
-            allocSize = (fragmentFreeSize / chunkSize) * chunkSize;
-          }
-          int newOffset = oldOffset + allocSize;
-          int extraSize = fragmentSize - newOffset;
-          if (extraSize < Chunk.MIN_CHUNK_SIZE) {
-            // include these last few bytes of the fragment in the allocation.
-            // If we don't then they will be lost forever.
-            // The extraSize bytes only apply to the first chunk we allocate (not the batch ones).
-            newOffset += extraSize;
-          } else {
-            extraSize = 0;
-          }
-          if (fragment.allocate(oldOffset, newOffset)) {
-            // We did the allocate!
-            this.lastFragmentAllocation.set(fragIdx);
-            Chunk result = chunkFactory.newChunk(fragment.getMemoryAddress()+oldOffset, chunkSize+extraSize, chunkType);
-            allocSize -= chunkSize+extraSize;
-            oldOffset += extraSize;
-            while (allocSize > 0) {
-              oldOffset += chunkSize;
-              // we add the batch ones immediately to the freelist
-              result.readyForFree();
-              free(result.getMemoryAddress(), false);
-              result = chunkFactory.newChunk(fragment.getMemoryAddress()+oldOffset, chunkSize, chunkType);
-              allocSize -= chunkSize;
-            }
-            
-            if(validateMemoryWithFill) {
-              result.validateFill();
             }
-            
-            return result;
-          } else {
-            // TODO OFFHEAP: if batch allocations are disabled should we not call basicAllocate here?
-            // Since we know another thread did a concurrent alloc
-            // that possibly did a batch check the free list again.
-            Chunk result = basicAllocate(chunkSize, false, chunkType);
-            if (result != null) {
-              return result;
-            }
-            retryFragment = true;
-          }
-        }
-      } while (retryFragment);
-      return null; // did not find enough free space in this fragment
-    }
-
-    private int round(int multiple, int value) {
-      return (int) ((((long)value + (multiple-1)) / multiple) * multiple);
-    }
-    private Chunk allocateTiny(int size, boolean useFragments, ChunkType chunkType) {
-      return basicAllocate(getNearestTinyMultiple(size), TINY_MULTIPLE, 0, this.tinyFreeLists, useFragments, chunkType);
-    }
-//    private Chunk allocateBig(int size, boolean useFragments) {
-//      return basicAllocate(getNearestBigMultiple(size), BIG_MULTIPLE, BIG_OFFSET, this.bigFreeLists, useFragments);
-//    }
-    private Chunk basicAllocate(int idx, int multiple, int offset, AtomicReferenceArray<SyncChunkStack> freeLists, boolean useFragments, ChunkType chunkType) {
-      SyncChunkStack clq = freeLists.get(idx);
-      if (clq != null) {
-        long memAddr = clq.poll();
-        if (memAddr != 0) {
-          Chunk result = SimpleMemoryAllocatorImpl.this.chunkFactory.newChunk(memAddr, chunkType);
-          
-          // Data integrity check.
-          if(validateMemoryWithFill) {          
-            result.validateFill();
-          }
-          
-          result.readyForAllocation(chunkType);
-          return result;
-        }
-      }
-      if (useFragments) {
-        return allocateFromFragments(((idx+1)*multiple)+offset, chunkType);
-      } else {
-        return null;
-      }
-    }
-    private Chunk allocateHuge(int size, boolean useFragments, ChunkType chunkType) {
-      // sizeHolder is a fake Chunk used to search our sorted hugeChunkSet.
-      Chunk sizeHolder = newFakeChunk(size);
-      NavigableSet<Chunk> ts = this.hugeChunkSet.tailSet(sizeHolder);
-      Chunk result = ts.pollFirst();
-      if (result != null) {
-        if (result.getSize() - (HUGE_MULTIPLE - Chunk.OFF_HEAP_HEADER_SIZE) < size) {
-          // close enough to the requested size; just return it.
-          
-          // Data integrity check.
-          if(validateMemoryWithFill) {          
-            result.validateFill();
-          }
-          if (chunkType.getSrcType() != Chunk.getSrcType(result.getMemoryAddress())) {
-            // The java wrapper class that was cached in the huge chunk list is the wrong type.
-            // So allocate a new one and garbage collect the old one.
-            result = SimpleMemoryAllocatorImpl.this.chunkFactory.newChunk(result.getMemoryAddress(), chunkType);
+            return;
           }
-          result.readyForAllocation(chunkType);
-          return result;
-        } else {
-          this.hugeChunkSet.add(result);
-        }
-      }
-      if (useFragments) {
-        // We round it up to the next multiple of TINY_MULTIPLE to make
-        // sure we always have chunks allocated on an 8 byte boundary.
-        return allocateFromFragments(round(TINY_MULTIPLE, size), chunkType);
-      } else {
-        return null;
-      }
-    }
-    
-    @SuppressWarnings("synthetic-access")
-    public void free(long addr) {
-      free(addr, true);
-    }
-    
-    private void free(long addr, boolean updateStats) {
-      int cSize = Chunk.getSize(addr);
-      if (updateStats) {
-        stats.incObjects(-1);
-        this.allocatedSize.addAndGet(-cSize);
-        stats.incUsedMemory(-cSize);
-        stats.incFreeMemory(cSize);
-        notifyListeners();
-      }
-      /*Chunk oldTlChunk = this.tlCache.get();
-      this.tlCache.set(c);
-      if (oldTlChunk != null) {
-        int oldTlcSize = oldTlChunk.getSize();
-        if (oldTlcSize <= MAX_TINY) {
-          freeTiny(oldTlChunk);
-        } else if (oldTlcSize <= MAX_BIG) {
-          freeBig(oldTlChunk);
-        } else {
-          freeHuge(oldTlChunk);
-        }
-      }*/
-      if (cSize <= MAX_TINY) {
-        freeTiny(addr, cSize);
-//      } else if (cSize <= MAX_BIG) {
-//        freeBig(addr, cSize);
-      } else {
-        freeHuge(addr, cSize);
-      }
-    }
-    private void freeTiny(long addr, int cSize) {
-      basicFree(addr, getNearestTinyMultiple(cSize), this.tinyFreeLists);
-    }
-//    private void freeBig(long addr, int cSize) {
-//      basicFree(addr, getNearestBigMultiple(cSize), this.bigFreeLists);
-//    }
-    private void basicFree(long addr, int idx, AtomicReferenceArray<SyncChunkStack> freeLists) {
-      SyncChunkStack clq = freeLists.get(idx);
-      if (clq != null) {
-        clq.offer(addr);
-      } else {
-        clq = new SyncChunkStack();
-        clq.offer(addr);
-        if (!freeLists.compareAndSet(idx, null, clq)) {
-          clq = freeLists.get(idx);
-          clq.offer(addr);
         }
+        throw new IllegalStateException(" address 0x" + Long.toString(addr, 16) + " does not address the original slab memory");
       }
-      
-    }
-    private void freeHuge(long addr, int cSize) {
-      this.hugeChunkSet.add(SimpleMemoryAllocatorImpl.this.chunkFactory.newChunk(addr)); // TODO make this a collection of longs
     }
   }
   
+  /** The inspection snapshot for MemoryInspector */
+  private List<MemoryBlock> memoryBlocks;
   
-  
-  
-  /*private Chunk newChunk(long addr, int chunkSize) {
-    return this.chunkFactory.newChunk(addr, chunkSize);
-  }*/
-  
-  private Chunk newFakeChunk(int chunkSize) {
-    return new FakeChunk(chunkSize);
+  @Override
+  public MemoryInspector getMemoryInspector() {
+    return this;
   }
   
-  
-  public static interface ChunkFactory  {
-    /**
-     * Create a new chunk of the given size and type at the given address.
-     */
-    Chunk newChunk(long address, int chunkSize, ChunkType chunkType);
-    /**
-     * Create a new chunk for a block of memory (identified by address)
-     * that has already been allocated.
-     * The size and type are derived from the existing object header.
-     */
-    Chunk newChunk(long address);
-    /**
-     * Create a new chunk of the given type for a block of memory (identified by address)
-     * that has already been allocated.
-     * The size is derived from the existing object header.
-     */
-    Chunk newChunk(long address, ChunkType chunkType);
-    /**
-     * Given the address of an existing chunk return its ChunkType.
-     */
-    ChunkType getChunkTypeForAddress(long address);
-    /**
-     * Given the rawBits from the object header of an existing chunk
-     * return its ChunkType.
-     */
-    ChunkType getChunkTypeForRawBits(int bits);
+  @Override
+  public synchronized void clearInspectionSnapshot() {
+    this.memoryBlocks = null;
   }
   
-  private static class GemFireChunkFactory implements ChunkFactory {
-    @Override
-    public Chunk newChunk(long address, int chunkSize, ChunkType chunkType) {
-      assert chunkType.equals(GemFireChunk.TYPE);
-      return new GemFireChunk(address,chunkSize);
-    }
-
-    @Override
-    public Chunk newChunk(long address) {
-      return new GemFireChunk(address);
+  @Override
+  public synchronized void createInspectionSnapshot() {
+    List<MemoryBlock> value = this.memoryBlocks;
+    if (value == null) {
+      value = getOrderedBlocks();
+      this.memoryBlocks = value;
     }
-
-    @Override
-    public Chunk newChunk(long address, ChunkType chunkType) {
-      assert chunkType.equals(GemFireChunk.TYPE);
-      return new GemFireChunk(address);
-    }
-
-    @Override
-    public ChunkType getChunkTypeForAddress(long address) {
-      assert Chunk.getSrcType(address) == Chunk.SRC_TYPE_GFE;
-      return GemFireChunk.TYPE;
-    }
-
-    @Override
-    public ChunkType getChunkTypeForRawBits(int bits) {
-      assert Chunk.getSrcTypeFromRawBits(bits) == Chunk.SRC_TYPE_GFE;
-      return GemFireChunk.TYPE;
-    }
-  }
-  
-  
-  /**
-   * Used to keep the heapForm around while an operation is still in progress.
-   * This allows the operation to access the serialized heap form instead of copying
-   * it from offheap. See bug 48135.
-   * 
-   * @author darrel
-   *
-   */
-  public static class ChunkWithHeapForm extends GemFireChunk {
-    private final byte[] heapForm;
-    
-    public ChunkWithHeapForm(GemFireChunk chunk, byte[] heapForm) {
-      super(chunk);
-      this.heapForm = heapForm;
-    }
-
-    @Override
-    protected byte[] getRawBytes() {
-      return this.heapForm;
-    }
-    
-    public Chunk getChunkWithoutHeapForm() {
-      return new GemFireChunk(this);
-    }
-  }
-  
-  public static abstract class ChunkType {
-    public abstract int getSrcType();
-    public abstract Chunk newChunk(long memoryAddress);
-    public abstract Chunk newChunk(long memoryAddress, int chunkSize);
-  }
-  
-  public static class GemFireChunkType extends ChunkType {
-    private static final GemFireChunkType singleton = new GemFireChunkType();
-    public static GemFireChunkType singleton() { return singleton; }
-    
-    private GemFireChunkType() {}
-
-    @Override
-    public int getSrcType() {
-      return Chunk.SRC_TYPE_GFE;
-    }
-
-    @Override
-    public Chunk newChunk(long memoryAddress) {      
-      return new GemFireChunk(memoryAddress);
-    }
-
-    @Override
-    public Chunk newChunk(long memoryAddress, int chunkSize) {     
-      return new GemFireChunk(memoryAddress, chunkSize);
-    }
-  }
-  public static class GemFireChunk extends Chunk {
-    public static final ChunkType TYPE = new ChunkType() {
-      @Override
-      public int getSrcType() {
-        return Chunk.SRC_TYPE_GFE;
-      }
-      @Override
-      public Chunk newChunk(long memoryAddress) {
-        return new GemFireChunk(memoryAddress);
-      }
-      @Override
-      public Chunk newChunk(long memoryAddress, int chunkSize) {
-        return new GemFireChunk(memoryAddress, chunkSize);
-      }
-    };
-    public GemFireChunk(long memoryAddress, int chunkSize) {
-      super(memoryAddress, chunkSize, TYPE);
-    }
-
-    public GemFireChunk(long memoryAddress) {
-      super(memoryAddress);
-      // chunkType may be set by caller when it calls readyForAllocation
-    }
-    public GemFireChunk(GemFireChunk chunk) {
-      super(chunk);
-    }
-    @Override
-    public Chunk slice(int position, int limit) {
-      return new GemFireChunkSlice(this, position, limit);
-    }
-  }
-  public static class GemFireChunkSlice extends GemFireChunk {
-    private final int offset;
-    private final int capacity;
-    public GemFireChunkSlice(GemFireChunk gemFireChunk, int position, int limit) {
-      super(gemFireChunk);
-      this.offset = gemFireChunk.getBaseDataOffset() + position;
-      this.capacity = limit - position;
-    }
-    @Override
-    public int getDataSize() {
-      return this.capacity;
-    }
-    
-    @Override
-    protected long getBaseDataAddress() {
-      return super.getBaseDataAddress() + this.offset;
-    }
-    @Override
-    protected int getBaseDataOffset() {
-      return this.offset;
-    }
-  }
-  /**
-   * Note: this class has a natural ordering that is inconsistent with equals.
-   * Instances of this class should have a short lifetime. We do not store references
-   * to it in the cache. Instead the memoryAddress is stored in a primitive field in
-   * the cache and if used it will then, if needed, create an instance of this class.
-   */
-  public static abstract class Chunk extends OffHeapCachedDeserializable implements Comparable<Chunk>, ConcurrentBag.Node, MemoryBlock {
-    /**
-     * The unsafe memory address of the first byte of this chunk
-     */
-    private final long memoryAddress;
-    
-    /**
-     * The useCount, chunkSize, dataSizeDelta, isSerialized, and isCompressed
-     * are all stored in off heap memory in a HEADER. This saves heap memory
-     * by using off heap.
-     */
-    public final static int OFF_HEAP_HEADER_SIZE = 4 + 4;
-    /**
-     * We need to smallest chunk to at least have enough room for a hdr
-     * and for an off heap ref (which is a long).
-     */
-    public final static int MIN_CHUNK_SIZE = OFF_HEAP_HEADER_SIZE + 8;
-    /**
-     * int field.
-     * The number of bytes in this chunk.
-     */
-    private final static int CHUNK_SIZE_OFFSET = 0;
-    /**
-     * Volatile int field
-     * The upper two bits are used for the isSerialized
-     * and isCompressed flags.
-     * The next three bits are used to encode the SRC_TYPE enum.
-     * The lower 3 bits of the most significant byte contains a magic number to help us detect
-     * if we are changing the ref count of an object that has been released.
-     * The next byte contains the dataSizeDelta.
-     * The number of bytes of logical data in this chunk.
-     * Since the number of bytes of logical data is always <= chunkSize
-     * and since chunkSize never changes, we have dataSize be
-     * a delta whose max value would be HUGE_MULTIPLE-1.
-     * The lower two bytes contains the use count.
-     */
-    private final static int REF_COUNT_OFFSET = 4;
-    /**
-     * The upper two bits are used for the isSerialized
-     * and isCompressed flags.
-     */
-    private final static int IS_SERIALIZED_BIT =    0x80000000;
-    private final static int IS_COMPRESSED_BIT =    0x40000000;
-    private final static int SRC_TYPE_MASK = 0x38000000;
-    private final static int SRC_TYPE_SHIFT = 16/*refCount*/+8/*dataSize*/+3/*magicSize*/;
-    private final static int MAGIC_MASK = 0x07000000;
-    private final static int MAGIC_NUMBER = 0x05000000;
-    private final static int DATA_SIZE_DELTA_MASK = 0x00ff0000;
-    private final static int DATA_SIZE_SHIFT = 16;
-    private final static int REF_COUNT_MASK =       0x0000ffff;
-    private final static int MAX_REF_COUNT = 0xFFFF;
-    final static long FILL_PATTERN = 0x3c3c3c3c3c3c3c3cL;
-    final static byte FILL_BYTE = 0x3c;
-    
-    // The 8 bits reserved for SRC_TYPE are basically no longer used.
-    // So we could free up these 8 bits for some other use or we could
-    // keep them for future extensions.
-    // If we ever want to allocate other "types" into a chunk of off-heap
-    // memory then the SRC_TYPE would be the way to go.
-    // For example we may want to allocate the memory for the off-heap
-    // RegionEntry in off-heap memory without it being of type GFE.
-    // When it is of type GFE then it either needs to be the bytes
-    // of a byte array or it needs to be a serialized java object.
-    // For the RegionEntry we may want all the primitive fields of
-    // the entry at certain offsets in the off-heap memory so we could
-    // access them directly in native byte format (i.e. no serialization).
-    // Note that for every SRC_TYPE we should have a ChunkType subclass.
-    public final static int SRC_TYPE_UNUSED0 = 0 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED1 = 1 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED2 = 2 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED3 = 3 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_GFE = 4 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED5 = 5 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED6 = 6 << SRC_TYPE_SHIFT;
-    public final static int SRC_TYPE_UNUSED7 = 7 << SRC_TYPE_SHIFT;
-    
-    protected Chunk(long memoryAddress, int chunkSize, ChunkType chunkType) {
-      validateAddressAndSize(memoryAddress, chunkSize);
-      this.memoryAddress = memoryAddress;
-      setSize(chunkSize);
-      UnsafeMemoryChunk.writeAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET, MAGIC_NUMBER|chunkType.getSrcType());
-    }
-    public void readyForFree() {
-      UnsafeMemoryChunk.writeAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET, 0);
-    }
-    public void readyForAllocation(ChunkType chunkType) {
-      if (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET, 0, MAGIC_NUMBER|chunkType.getSrcType())) {
-        throw new IllegalStateException("Expected 0 but found " + Integer.toHexString(UnsafeMemoryChunk.readAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET)));
-      }
-    }
-    /**
-     * Should only be used by FakeChunk subclass
-     */
-    protected Chunk() {
-      this.memoryAddress = 0L;
-    }
-    
-    /**
-     * Used to create a Chunk given an existing, already allocated,
-     * memoryAddress. The off heap header has already been initialized.
-     */
-    protected Chunk(long memoryAddress) {
-      validateAddress(memoryAddress);
-      this.memoryAddress = memoryAddress;
-    }
-    
-    protected Chunk(Chunk chunk) {
-      this.memoryAddress = chunk.memoryAddress;
-    }
-    
-    /**
-     * Throw an exception if this chunk is not allocated
-     */
-    public void checkIsAllocated() {
-      int originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
-      if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
-        throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
-      }
-    }
-    
-    public void incSize(int inc) {
-      setSize(getSize()+inc);
-    }
-    
-    protected void beforeReturningToAllocator() {
-      
-    }
-
-    @Override
-    public int getSize() {
-      return getSize(this.memoryAddress);
-    }
-
-    public void setSize(int size) {
-      setSize(this.memoryAddress, size);
-    }
-
-    public long getMemoryAddress() {
-      return this.memoryAddress;
-    }
-    
-    public int getDataSize() {
-      /*int dataSizeDelta = UnsafeMemoryChunk.readAbsoluteInt(this.memoryAddress+REF_COUNT_OFFSET);
-      dataSizeDelta &= DATA_SIZE_DELTA_MASK;
-      dataSizeDelta >>= DATA_SIZE_SHIFT;
-      return getSize() - dataSizeDelta;*/
-      return getDataSize(this.memoryAddress);
-    }
-    
-    protected static int getDataSize(long memoryAdress) {
-      int dataSizeDelta = UnsafeMemoryChunk.readAbsoluteInt(memoryAdress+REF_COUNT_OFFSET);
-      dataSizeDelta &= DATA_SIZE_DELTA_MASK;
-      dataSizeDelta >>= DATA_SIZE_SHIFT;
-      return getSize(memoryAdress) - dataSizeDelta;
-    }
-    
-    protected long getBaseDataAddress() {
-      return this.memoryAddress+OFF_HEAP_HEADER_SIZE;
-    }
-    protected int getBaseDataOffset() {
-      return 0;
-    }
-    
-    /**
-     * Creates and returns a direct ByteBuffer that contains the contents of this Chunk.
-     * Note that the returned ByteBuffer has a reference to this chunk's
-     * off-heap address so it can only be used while this Chunk is retained.
-     * @return the created direct byte buffer or null if it could not be created.
-     */
-    @Unretained
-    public ByteBuffer createDirectByteBuffer() {
-      return basicCreateDirectByteBuffer(getBaseDataAddress(), getDataSize());
-    }
-    @Override
-    public void sendTo(DataOutput out) throws IOException {
-      if (!this.isCompressed() && out instanceof HeapDataOutputStream) {
-        ByteBuffer bb = createDirectByteBuffer();
-        if (bb != null) {
-          HeapDataOutputStream hdos = (HeapDataOutputStream) out;
-          if (this.isSerialized()) {
-            hdos.write(bb);
-          } else {
-            hdos.writeByte(DSCODE.BYTE_ARRAY);
-            InternalDataSerializer.writeArrayLength(bb.remaining(), hdos);
-            hdos.write(bb);
-          }
-          return;
-        }
-      }
-      super.sendTo(out);
-    }
-    
-    @Override
-    public void sendAsByteArray(DataOutput out) throws IOException {
-      if (!isCompressed() && out instanceof HeapDataOutputStream) {
-        ByteBuffer bb = createDirectByteBuffer();
-        if (bb != null) {
-          HeapDataOutputStream hdos = (HeapDataOutputStream) out;
-          InternalDataSerializer.writeArrayLength(bb.remaining(), hdos);
-          hdos.write(bb);
-          return;
-        }
-      }
-      super.sendAsByteArray(out);
-    }
-       
-    private static volatile Class dbbClass = null;
-    private static volatile Constructor dbbCtor = null;
-    private static volatile boolean dbbCreateFailed = false;
-    
-    /**
-     * @return the created direct byte buffer or null if it could not be created.
-     */
-    private static ByteBuffer basicCreateDirectByteBuffer(long baseDataAddress, int dataSize) {
-      if (dbbCreateFailed) {
-        return null;
-      }
-      Constructor ctor = dbbCtor;
-      if (ctor == null) {
-        Class c = dbbClass;
-        if (c == null) {
-          try {
-            c = Class.forName("java.nio.DirectByteBuffer");
-          } catch (ClassNotFoundException e) {
-            //throw new IllegalStateException("Could not find java.nio.DirectByteBuffer", e);
-            dbbCreateFailed = true;
-            dbbAddressFailed = true;
-            return null;
-          }
-          dbbClass = c;
-        }
-        try {
-          ctor = c.getDeclaredConstructor(long.class, int.class);
-        } catch (NoSuchMethodException | SecurityException e) {
-          //throw new IllegalStateException("Could not get constructor DirectByteBuffer(long, int)", e);
-          dbbClass = null;
-          dbbCreateFailed = true;
-          return null;
-        }
-        ctor.setAccessible(true);
-        dbbCtor = ctor;
-      }
-      try {
-        return (ByteBuffer)ctor.newInstance(baseDataAddress, dataSize);
-      } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
-        //throw new IllegalStateException("Could not create an instance using DirectByteBuffer(long, int)", e);
-        dbbClass = null;
-        dbbCtor = null;
-        dbbCreateFailed = true;
-        return null;
-      }
-    }
-    private static volatile Method dbbAddressMethod = null;
-    private static volatile boolean dbbAddressFailed = false;
-    
-    /**
-     * Returns the address of the Unsafe memory for the first byte of a direct ByteBuffer.
-     * If the buffer is not direct or the address can not be obtained return 0.
-     */
-    public static long getDirectByteBufferAddress(ByteBuffer bb) {
-      if (!bb.isDirect()) {
-        return 0L;
-      }
-      if (dbbAddressFailed) {
-        return 0L;
-      }
-      Method m = dbbAddressMethod;
-      if (m == null) {
-        Class c = dbbClass;
-        if (c == null) {
-          try {
-            c = Class.forName("java.nio.DirectByteBuffer");
-          } catch (ClassNotFoundException e) {
-            //throw new IllegalStateException("Could not find java.nio.DirectByteBuffer", e);
-            dbbCreateFailed = true;
-            dbbAddressFailed = true;
-            return 0L;
-          }
-          dbbClass = c;
-        }
-        try {
-          m = c.getDeclaredMethod("address");
-        } catch (NoSuchMethodException | SecurityException e) {
-          //throw new IllegalStateException("Could not get method DirectByteBuffer.address()", e);
-          dbbClass = null;
-          dbbAddressFailed = true;
-          return 0L;
-        }
-        m.setAccessible(true);
-        dbbAddressMethod = m;
-      }
-      try {
-        return (Long)m.invoke(bb);
-      } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
-        //throw new IllegalStateException("Could not create an invoke DirectByteBuffer.address()", e);
-        dbbClass = null;
-        dbbAddressMethod = null;
-        dbbAddressFailed = true;
-        return 0L;
-      }
-    }
-    /**
-     * Returns an address that can be used with unsafe apis to access this chunks memory.
-     * @param offset the offset from this chunk's first byte of the byte the returned address should point to. Must be >= 0.
-     * @param size the number of bytes that will be read using the returned address. Assertion will use this to verify that all the memory accessed belongs to this chunk. Must be > 0.
-     * @return a memory address that can be used with unsafe apis
-     */
-    public long getUnsafeAddress(int offset, int size) {
-      assert offset >= 0 && offset + size <= getDataSize(): "Offset=" + offset + ",size=" + size + ",dataSize=" + getDataSize() + ", chunkSize=" + getSize() + ", but offset + size must be <= " + getDataSize();
-      assert size > 0;
-      long result = getBaseDataAddress() + offset;
-      // validateAddressAndSizeWithinSlab(result, size);
-      return result;
-    }
-    
-    @Override
-    public byte readByte(int offset) {
-      assert offset < getDataSize();
-      return UnsafeMemoryChunk.readAbsoluteByte(getBaseDataAddress() + offset);
-    }
-
-    @Override
-    public void writeByte(int offset, byte value) {
-      assert offset < getDataSize();
-      UnsafeMemoryChunk.writeAbsoluteByte(getBaseDataAddress() + offset, value);
-    }
-
-    @Override
-    public void readBytes(int offset, byte[] bytes) {
-      readBytes(offset, bytes, 0, bytes.length);
-    }
-
-    @Override
-    public void writeBytes(int offset, byte[] bytes) {
-      writeBytes(offset, bytes, 0, bytes.length);
-    }
-
-    public long getAddressForReading(int offset, int size) {
-      assert offset+size <= getDataSize();
-      return getBaseDataAddress() + offset;
-    }
-    
-    @Override
-    public void readBytes(int offset, byte[] bytes, int bytesOffset, int size) {
-      assert offset+size <= getDataSize();
-      UnsafeMemoryChunk.readAbsoluteBytes(getBaseDataAddress() + offset, bytes, bytesOffset, size);
-    }
-
-    @Override
-    public void writeBytes(int offset, byte[] bytes, int bytesOffset, int size) {
-      assert offset+size <= getDataSize();
-      validateAddressAndSizeWithinSlab(getBaseDataAddress() + offset, size);
-      UnsafeMemoryChunk.writeAbsoluteBytes(getBaseDataAddress() + offset, bytes, bytesOffset, size);
-    }
-    
-    @Override
-    public void release() {
-      release(this.memoryAddress, true);
-     }
-
-    @Override
-    public int compareTo(Chunk o) {
-      int result = Integer.signum(getSize() - o.getSize());
-      if (result == 0) {
-        // For the same sized chunks we really don't care about their order
-        // but we need compareTo to only return 0 if the two chunks are identical
-        result = Long.signum(getMemoryAddress() - o.getMemoryAddress());
-      }
-      return result;
-    }
-    
-    @Override
-    public boolean equals(Object o) {
-      if (o instanceof Chunk) {
-        return getMemoryAddress() == ((Chunk) o).getMemoryAddress();
-      }
-      return false;
-    }
-    
-    @Override
-    public int hashCode() {
-      long value = this.getMemoryAddress();
-      return (int)(value ^ (value >>> 32));
-    }
-
-    // OffHeapCachedDeserializable methods 
-    
-    @Override
-    public void setSerializedValue(byte[] value) {
-      writeBytes(0, value);
-    }
-    
-    public byte[] getDecompressedBytes(RegionEntryContext context) {
-      byte[] result = getCompressedBytes();
-      long time = context.getCachePerfStats().startDecompression();
-      result = context.getCompressor().decompress(result);
-      context.getCachePerfStats().endDecompression(time);      
-      return result;
-    }
-    
-    /**
-     * Returns the raw possibly compressed bytes of this chunk
-     */
-    public byte[] getCompressedBytes() {
-      byte[] result = new byte[getDataSize()];
-      readBytes(0, result);
-      //debugLog("reading", true);
-      getAllocator().getStats().incReads();
-      return result;
-    }
-    protected byte[] getRawBytes() {
-      byte[] result = getCompressedBytes();
-      // TODO OFFHEAP: change the following to assert !isCompressed();
-      if (isCompressed()) {
-        throw new UnsupportedOperationException();
-      }
-      return result;
-    }
-
-    @Override
-    public byte[] getSerializedValue() {
-      byte [] result = getRawBytes();
-      if (!isSerialized()) {
-        // The object is a byte[]. So we need to make it look like a serialized byte[] in our result
-        result = EntryEventImpl.serialize(result);
-      }
-      return result;
-    }
-    
-    @Override
-    public Object getDeserializedValue(Region r, RegionEntry re) {
-      if (isSerialized()) {
-        // TODO OFFHEAP: debug deserializeChunk
-        return EntryEventImpl.deserialize(getRawBytes());
-        //assert !isCompressed();
-        //return EntryEventImpl.deserializeChunk(this);
-      } else {
-        return getRawBytes();
-      }
-    }
-    
-    /**
-     * We want this to include memory overhead so use getSize() instead of getDataSize().
-     */
-    @Override
-    public int getSizeInBytes() {
-      // Calling getSize includes the off heap header size.
-      // We do not add anything to this since the size of the reference belongs to the region entry size
-      // not the size of this object.
-      return getSize();
-    }
-
-    @Override
-    public int getValueSizeInBytes() {
-      return getDataSize();
-    }
-
-    @Override
-    public void copyBytes(int src, int dst, int size) {
-      throw new UnsupportedOperationException("Implement if used");
-//      assert src+size <= getDataSize();
-//      assert dst+size < getDataSize();
-//      getSlabs()[this.getSlabIdx()].copyBytes(getBaseDataAddress()+src, getBaseDataAddress()+dst, size);
-    }
-
-    @Override
-    public boolean isSerialized() {
-      return (UnsafeMemoryChunk.readAbsoluteInt(this.memoryAddress+REF_COUNT_OFFSET) & IS_SERIALIZED_BIT) != 0;
-    }
-
-    @Override
-    public boolean isCompressed() {
-      return (UnsafeMemoryChunk.readAbsoluteInt(this.memoryAddress+REF_COUNT_OFFSET) & IS_COMPRESSED_BIT) != 0;
-    }
-
-    @Override
-    public boolean retain() {
-      return retain(this.memoryAddress);
-    }
-
-    @Override
-    public int getRefCount() {
-      return getRefCount(this.memoryAddress);
-    }
-
-    // By adding this one object ref to Chunk we are able to have free lists that only have memory overhead of a single objref per free item.
-    //private Node cbNodeNext;
-    @Override
-    public void setNextCBNode(Node next) {
-      throw new UnsupportedOperationException();
-      //this.cbNodeNext = next;
-    }
-
-    @Override
-    public Node getNextCBNode() {
-      throw new UnsupportedOperationException();
-      //return this.cbNodeNext;
-    }
-    public static int getSize(long memAddr) {
-      validateAddress(memAddr);
-      return UnsafeMemoryChunk.readAbsoluteInt(memAddr+CHUNK_SIZE_OFFSET);
-    }
-    public static void setSize(long memAddr, int size) {
-      validateAddressAndSize(memAddr, size);
-      UnsafeMemoryChunk.writeAbsoluteInt(memAddr+CHUNK_SIZE_OFFSET, size);
-    }
-    public static long getNext(long memAddr) {
-      validateAddress(memAddr);
-      return UnsafeMemoryChunk.readAbsoluteLong(memAddr+OFF_HEAP_HEADER_SIZE);
-    }
-    public static void setNext(long memAddr, long next) {
-      validateAddress(memAddr);
-      UnsafeMemoryChunk.writeAbsoluteLong(memAddr+OFF_HEAP_HEADER_SIZE, next);
-    }
-    @Override
-    public ChunkType getChunkType() {
-      return getAllocator().getChunkFactory().getChunkTypeForAddress(getMemoryAddress());
-    }
-    public static int getSrcTypeOrdinal(long memAddr) {
-      return getSrcType(memAddr) >> SRC_TYPE_SHIFT;
-    }
-    public static int getSrcType(long memAddr) {
-      return getSrcTypeFromRawBits(UnsafeMemoryChunk.readAbsoluteInt(memAddr+REF_COUNT_OFFSET));
-    }
-    public static int getSrcTypeFromRawBits(int rawBits) {
-      return rawBits & SRC_TYPE_MASK;
-    }
-    public static int getSrcTypeOrdinalFromRawBits(int rawBits) {
-      return getSrcTypeFromRawBits(rawBits) >> SRC_TYPE_SHIFT;
-    }
-    
-    /**
-     * Fills the chunk with a repeated byte fill pattern.
-     * @param baseAddress the starting address for a {@link Chunk}.
-     */
-    public static void fill(long baseAddress) {
-      long startAddress = baseAddress + MIN_CHUNK_SIZE;
-      int size = getSize(baseAddress) - MIN_CHUNK_SIZE;
-      
-      UnsafeMemoryChunk.fill(startAddress, size, FILL_BYTE);
-    }
-    
-    /**
-     * Validates that the fill pattern for this chunk has not been disturbed.  This method
-     * assumes the TINY_MULTIPLE is 8 bytes.
-     * @throws IllegalStateException when the pattern has been violated.
-     */
-    public void validateFill() {
-      assert TINY_MULTIPLE == 8;
-      
-      long startAddress = getMemoryAddress() + MIN_CHUNK_SIZE;
-      int size = getSize() - MIN_CHUNK_SIZE;
-      
-      for(int i = 0;i < size;i += TINY_MULTIPLE) {
-        if(UnsafeMemoryChunk.readAbsoluteLong(startAddress + i) != FILL_PATTERN) {
-          throw new IllegalStateException("Fill pattern violated for chunk " + getMemoryAddress() + " with size " + getSize());
-        }        
-      }
-    }
-
-    public void setSerialized(boolean isSerialized) {
-      if (isSerialized) {
-        int bits;
-        int originalBits;
-        do {
-          originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
-          if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
-            throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
-          }
-          bits = originalBits | IS_SERIALIZED_BIT;
-        } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, originalBits, bits));
-      }
-    }
-    public void setCompressed(boolean isCompressed) {
-      if (isCompressed) {
-        int bits;
-        int originalBits;
-        do {
-          originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
-          if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
-            throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
-          }
-          bits = originalBits | IS_COMPRESSED_BIT;
-        } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, originalBits, bits));
-      }
-    }
-    public void setDataSize(int dataSize) { // KIRK
-      assert dataSize <= getSize();
-      int delta = getSize() - dataSize;
-      assert delta <= (DATA_SIZE_DELTA_MASK >> DATA_SIZE_SHIFT);
-      delta <<= DATA_SIZE_SHIFT;
-      int bits;
-      int originalBits;
-      do {
-        originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
-        if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
-          throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
-        }
-        bits = originalBits;
-        bits &= ~DATA_SIZE_DELTA_MASK; // clear the old dataSizeDelta bits
-        bits |= delta; // set the dataSizeDelta bits to the new delta value
-      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, originalBits, bits));
-    }
-    
-    public void initializeUseCount() {
-      int rawBits;
-      do {
-        rawBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
-        if ((rawBits&MAGIC_MASK) != MAGIC_NUMBER) {
-          throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(rawBits));
-        }
-        int uc = rawBits & REF_COUNT_MASK;
-        if (uc != 0) {
-          throw new IllegalStateException("Expected use count to be zero but it was: " + uc + " rawBits=0x" + Integer.toHexString(rawBits));
-        }
-      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, rawBits, rawBits+1));
-    }
-
-    public static int getRefCount(long memAddr) {
-      return UnsafeMemoryChunk.readAbsoluteInt(memAddr+REF_COUNT_OFFSET) & REF_COUNT_MASK;
-    }
-
-    public static boolean retain(long memAddr) {
-      validateAddress(memAddr);
-      int uc;
-      int rawBits;
-      int retryCount = 0;
-      do {
-        rawBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET);
-        if ((rawBits&MAGIC_MASK) != MAGIC_NUMBER) {
-          // same as uc == 0
-          // TODO MAGIC_NUMBER rethink its use and interaction with compactor fragments
-          return false;
-        }
-        uc = rawBits & REF_COUNT_MASK;
-        if (uc == MAX_REF_COUNT) {
-          throw new IllegalStateException("Maximum use count exceeded. rawBits=" + Integer.toHexString(rawBits));
-        } else if (uc == 0) {
-          return false;
-        }
-        retryCount++;
-        if (retryCount > 1000) {
-          throw new IllegalStateException("tried to write " + (rawBits+1) + " to @" + Long.toHexString(memAddr) + " 1,000 times.");
-        }
-      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET, rawBits, rawBits+1));
-      //debugLog("use inced ref count " + (uc+1) + " @" + Long.toHexString(memAddr), true);
-      if (trackReferenceCounts()) {
-        refCountChanged(memAddr, false, uc+1);
-      }
-
-      return true;
-    }
-    public static void release(final long memAddr, boolean issueOnReturnCallback) {
-      validateAddress(memAddr);
-      int newCount;
-      int rawBits;
-      boolean returnToAllocator;
-      do {
-        returnToAllocator = false;
-        rawBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET);
-        if ((rawBits&MAGIC_MASK) != MAGIC_NUMBER) {
-          String msg = "It looks like off heap memory @" + Long.toHexString(memAddr) + " was already freed. rawBits=" + Integer.toHexString(rawBits) + " history=" + getFreeRefCountInfo(memAddr);
-          //debugLog(msg, true);
-          throw new IllegalStateException(msg);
-        }
-        int curCount = rawBits&REF_COUNT_MASK;
-        if ((curCount) == 0) {
-          //debugLog("too many frees @" + Long.toHexString(memAddr), true);
-          throw new IllegalStateException("Memory has already been freed." + " history=" + getFreeRefCountInfo(memAddr) /*+ System.identityHashCode(this)*/);
-        }
-        if (curCount == 1) {
-          newCount = 0; // clear the use count, bits, and the delta size since it will be freed.
-          returnToAllocator = true;
-        } else {
-          newCount = rawBits-1;
-        }
-      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET, rawBits, newCount));
-      //debugLog("free deced ref count " + (newCount&USE_COUNT_MASK) + " @" + Long.toHexString(memAddr), true);
-      if (returnToAllocator ) {
-        /*
-        if(issueOnReturnCallback) {
-         final GemFireCacheImpl.StaticSystemCallbacks sysCb =
-              GemFireCacheImpl.FactoryStatics.systemCallbacks;
-          if(sysCb != null ) {
-            ChunkType ct = SimpleMemoryAllocatorImpl.getAllocator().getChunkFactory().getChunkTypeForRawBits(rawBits);
-            int dataSizeDelta = computeDataSizeDelta(rawBits);
-            sysCb.beforeReturningOffHeapMemoryToAllocator(memAddr, ct, dataSizeDelta);
-          }
-        }
-        */
-       
-        if (trackReferenceCounts()) {
-          if (trackFreedReferenceCounts()) {
-            refCountChanged(memAddr, true, newCount&REF_COUNT_MASK);
-          }
-          freeRefCountInfo(memAddr);
-        }
-        
-        // Use fill pattern for free list data integrity check.
-        if(SimpleMemoryAllocatorImpl.getAllocator().validateMemoryWithFill) {
-          fill(memAddr);
-        }
-        
-        getAllocator().freeChunk(memAddr);
-      } else {
-        if (trackReferenceCounts()) {
-          refCountChanged(memAddr, true, newCount&REF_COUNT_MASK);
-        }
-      }
-    }
-    
-    private static int computeDataSizeDelta(int rawBits) {
-      int dataSizeDelta = rawBits;
-      dataSizeDelta &= DATA_SIZE_DELTA_MASK;
-      dataSizeDelta >>= DATA_SIZE_SHIFT;
-      return dataSizeDelta;
-    }
-    
-    @Override
-    public String toString() {
-      return toStringForOffHeapByteSource();
-      // This old impl is not safe because it calls getDeserializedForReading and we have code that call toString that does not inc the refcount.
-      // Also if this Chunk is compressed we don't know how to decompress it.
-      //return super.toString() + ":<dataSize=" + getDataSize() + " refCount=" + getRefCount() + " addr=" + getMemoryAddress() + " storedObject=" + getDeserializedForReading() + ">";
-    }
-    
-    protected String toStringForOffHeapByteSource() {
-      return super.toString() + ":<dataSize=" + getDataSize() + " refCount=" + getRefCount() + " addr=" + Long.toHexString(getMemoryAddress()) + ">";
-    }
-    
-    @Override
-    public State getState() {
-      if (getRefCount() > 0) {
-        return State.ALLOCATED;
-      } else {
-        return State.DEALLOCATED;
-      }
-    }
-    @Override
-    public MemoryBlock getNextBlock() {
-      throw new UnsupportedOperationException();
-    }
-    @Override
-    public int getBlockSize() {
-      return getSize();
-    }
-    @Override
-    public int getSlabId() {
-      throw new UnsupportedOperationException();
-    }
-    @Override
-    public int getFreeListId() {
-      return -1;
-    }
-    @Override
-    public String getDataType() {
-      return null;
-    }
-    @Override
-    public Object getDataValue() {
-      return null;
-    }
-    public Chunk slice(int position, int limit) {
-      throw new UnsupportedOperationException();
-    }
-  }
-  public static class FakeChunk extends Chunk {
-    private final int size;
-    public FakeChunk(int size) {
-      super();
-      this.size = size;
-    }
-    @Override
-    public int getSize() {
-      return this.size;
-    }
-  }
-  /**
-   * Simple stack structure.
-   * The chunk in the top of this stack is pointed to by topAddr.
-   * Each next chunk is found be reading a long from the data in the previous chunk.
-   * An address of 0L means it is then end of the stack.
-   * This class has a subtle race condition in it between
-   * one thread doing a poll, allocating data into the chunk returned by poll,
-   * and then offering it back. Meanwhile another thread did a poll of the same head chunk,
-   * read some of the allocating data as the "next" address and then did the compareAndSet
-   * call and it worked because the first thread had already put it back in.
-   * So this class should not be used. Instead use SyncChunkStack.
-   * 
-   * @author darrel
-   *
-   */
-  public static class BuggyConcurrentChunkStack {
-    // all uses of topAddr are done using topAddrUpdater
-    @SuppressWarnings("unused")
-    private volatile long topAddr;
-    private static final AtomicLongFieldUpdater<BuggyConcurrentChunkStack> topAddrUpdater = AtomicLongFieldUpdater.newUpdater(BuggyConcurrentChunkStack.class, "topAddr");
-    
-    public BuggyConcurrentChunkStack(long addr) {
-      if (addr != 0L) validateAddress(addr);
-      this.topAddr = addr;
-    }
-    public BuggyConcurrentChunkStack() {
-      this.topAddr = 0L;
-    }
-    public boolean isEmpty() {
-      return topAddrUpdater.get(this) == 0L;
-    }
-    public void offer(long e) {
-      assert e != 0;
-      validateAddress(e);
-      long curHead;
-      do {
-        curHead = topAddrUpdater.get(this);
-        Chunk.setNext(e, curHead);
-      } while (!topAddrUpdater.compareAndSet(this, curHead, e));
-    }
-    public long poll() {
-      long result;
-      long newHead;
-      do {
-        result = topAddrUpdater.get(this);
-        if (result == 0L) return 0L;
-        newHead = Chunk.getNext(result);
-        
-      } while (!topAddrUpdater.compareAndSet(this, result, newHead));
-      if (newHead != 0L) validateAddress(newHead);
-      return result;
-    }
-    /**
-     * Removes all the Chunks from this stack
-     * and returns the address of the first chunk.
-     * The caller owns all the Chunks after this call.
-     */
-    public long clear() {
-      long result;
-      do {
-        result = topAddrUpdater.get(this);
-        if (result == 0L) return 0L;
-      } while (!topAddrUpdater.compareAndSet(this, result, 0L));
-      return result;
-    }
-    public void logSizes(LogWriter lw, String msg) {
-      long headAddr = topAddrUpdater.get(this);
-      long addr;
-      boolean concurrentModDetected;
-      do {
-        concurrentModDetected = false;
-        addr = headAddr;
-        while (addr != 0L) {
-          int curSize = Chunk.getSize(addr);
-          addr = Chunk.getNext(addr);
-          long curHead = topAddrUpdater.get(this);
-          if (curHead != headAddr) {
-            headAddr = curHead;
-            concurrentModDetected = true;
-            // Someone added or removed from the stack.
-            // So we break out of the inner loop and start
-            // again at the new head.
-            break;
-          }
-          // TODO construct a single log msg
-          // that gets reset on the concurrent mad.
-          lw.info(msg + curSize);
-        }
-      } while (concurrentModDetected);
-    }
-    public long computeTotalSize() {
-      long result;
-      long headAddr = topAddrUpdater.get(this);
-      long addr;
-      boolean concurrentModDetected;
-      do {
-        concurrentModDetected = false;
-        result = 0;
-        addr = headAddr;
-        while (addr != 0L) {
-          result += Chunk.getSize(addr);
-          addr = Chunk.getNext(addr);
-          long curHead = topAddrUpdater.get(this);
-          if (curHead != headAddr) {
-            headAddr = curHead;
-            concurrentModDetected = true;
-            // Someone added or removed from the stack.
-            // So we break out of the inner loop and start
-            // again at the new head.
-            break;
-          }
-        }
-      } while (concurrentModDetected);
-      return result;
-    }
-  }
-  public static class SyncChunkStack {
-    // Ok to read without sync but must be synced on write
-    private volatile long topAddr;
-    
-    public SyncChunkStack(long addr) {
-      if (addr != 0L) validateAddress(addr);
-      this.topAddr = addr;
-    }
-    public SyncChunkStack() {
-      this.topAddr = 0L;
-    }
-    public boolean isEmpty() {
-      return this.topAddr == 0L;
-    }
-    public void offer(long e) {
-      assert e != 0;
-      validateAddress(e);
-      synchronized (this) {
-        Chunk.setNext(e, this.topAddr);
-        this.topAddr = e;
-      }
-    }
-    public long poll() {
-      long result;
-      synchronized (this) {
-        result = this.topAddr;
-        if (result != 0L) {
-          this.topAddr = Chunk.getNext(result);
-        }
-      }
-      return result;
-    }
-    /**
-     * Removes all the Chunks from this stack
-     * and returns the address of the first chunk.
-     * The caller owns all the Chunks after this call.
-     */
-    public long clear() {
-      long result;
-      synchronized (this) {
-        result = this.topAddr;
-        if (result != 0L) {
-          this.topAddr = 0L;
-        }
-      }
-      return result;
-    }
-    public void logSizes(LogWriter lw, String msg) {
-      long headAddr = this.topAddr;
-      long addr;
-      boolean concurrentModDetected;
-      do {
-        concurrentModDetected = false;
-        addr = headAddr;
-        while (addr != 0L) {
-          int curSize = Chunk.getSize(addr);
-          addr = Chunk.getNext(addr);
-          long curHead = this.topAddr;
-          if (curHead != headAddr) {
-            headAddr = curHead;
-            concurrentModDetected = true;
-            // Someone added or removed from the stack.
-            // So we break out of the inner loop and start
-            // again at the new head.
-            break;
-          }
-          // TODO construct a single log msg
-          // that gets reset on the concurrent mad.
-          lw.info(msg + curSize);
-        }
-      } while (concurrentModDetected);
-    }
-    public long computeTotalSize() {
-      long result;
-      long headAddr = this.topAddr;
-      long addr;
-      boolean concurrentModDetected;
-      do {
-        concurrentModDetected = false;
-        result = 0;
-        addr = headAddr;
-        while (addr != 0L) {
-          result += Chunk.getSize(addr);
-          addr = Chunk.getNext(addr);
-          long curHead = this.topAddr;
-          if (curHead != headAddr) {
-            headAddr = curHead;
-            concurrentModDetected = true;
-            // Someone added or removed from the stack.
-            // So we break out of the inner loop and start
-            // again at the new head.
-            break;
-          }
-        }
-      } while (concurrentModDetected);
-      return result;
-    }
-  }
-  
-  private static void validateAddress(long addr) {
-    validateAddressAndSize(addr, -1);
-  }
-  
-  private static void validateAddressAndSize(long addr, int size) {
-    // if the caller does not have a "size" to provide then use -1
-    if ((addr & 7) != 0) {
-      StringBuilder sb = new StringBuilder();
-      sb.append("address was not 8 byte aligned: 0x").append(Long.toString(addr, 16));
-      SimpleMem

<TRUNCATED>


[10/50] [abbrv] incubator-geode git commit: GEODE-580: cleanup off-heap code

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SyncChunkStack.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SyncChunkStack.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SyncChunkStack.java
new file mode 100644
index 0000000..a615af0
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/SyncChunkStack.java
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import com.gemstone.gemfire.LogWriter;
+
+/**
+ * A "stack" of "chunk" instances. The chunks are not kept
+ * in java object form but instead each "chunk" is just an
+ * off-heap address.
+ * This class is used for each "tiny" free-list of the off-heap memory allocator.
+ */
+public class SyncChunkStack {
+  // Ok to read without sync but must be synced on write
+  private volatile long topAddr;
+  
+  public SyncChunkStack(long addr) {
+    if (addr != 0L) SimpleMemoryAllocatorImpl.validateAddress(addr);
+    this.topAddr = addr;
+  }
+  public SyncChunkStack() {
+    this.topAddr = 0L;
+  }
+  public boolean isEmpty() {
+    return this.topAddr == 0L;
+  }
+  public void offer(long e) {
+    assert e != 0;
+    SimpleMemoryAllocatorImpl.validateAddress(e);
+    synchronized (this) {
+      Chunk.setNext(e, this.topAddr);
+      this.topAddr = e;
+    }
+  }
+  public long poll() {
+    long result;
+    synchronized (this) {
+      result = this.topAddr;
+      if (result != 0L) {
+        this.topAddr = Chunk.getNext(result);
+      }
+    }
+    return result;
+  }
+  /**
+   * Returns the address of the "top" item in this stack.
+   */
+  public long getTopAddress() {
+    return this.topAddr;
+  }
+  /**
+   * Removes all the Chunks from this stack
+   * and returns the address of the first chunk.
+   * The caller owns all the Chunks after this call.
+   */
+  public long clear() {
+    long result;
+    synchronized (this) {
+      result = this.topAddr;
+      if (result != 0L) {
+        this.topAddr = 0L;
+      }
+    }
+    return result;
+  }
+  public void logSizes(LogWriter lw, String msg) {
+    long headAddr = this.topAddr;
+    long addr;
+    boolean concurrentModDetected;
+    do {
+      concurrentModDetected = false;
+      addr = headAddr;
+      while (addr != 0L) {
+        int curSize = Chunk.getSize(addr);
+        addr = Chunk.getNext(addr);
+        long curHead = this.topAddr;
+        if (curHead != headAddr) {
+          headAddr = curHead;
+          concurrentModDetected = true;
+          // Someone added or removed from the stack.
+          // So we break out of the inner loop and start
+          // again at the new head.
+          break;
+        }
+        // TODO construct a single log msg
+        // that gets reset on the concurrent mad.
+        lw.info(msg + curSize);
+      }
+    } while (concurrentModDetected);
+  }
+  public long computeTotalSize() {
+    long result;
+    long headAddr = this.topAddr;
+    long addr;
+    boolean concurrentModDetected;
+    do {
+      concurrentModDetected = false;
+      result = 0;
+      addr = headAddr;
+      while (addr != 0L) {
+        result += Chunk.getSize(addr);
+        addr = Chunk.getNext(addr);
+        long curHead = this.topAddr;
+        if (curHead != headAddr) {
+          headAddr = curHead;
+          concurrentModDetected = true;
+          // Someone added or removed from the stack.
+          // So we break out of the inner loop and start
+          // again at the new head.
+          break;
+        }
+      }
+    } while (concurrentModDetected);
+    return result;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ByteBufferInputStream.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ByteBufferInputStream.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ByteBufferInputStream.java
index 8577569..8a7d351 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ByteBufferInputStream.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ByteBufferInputStream.java
@@ -31,8 +31,8 @@ import java.nio.ByteOrder;
 
 import com.gemstone.gemfire.internal.ByteBufferWriter;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 
 /**
  * <p>

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ImmutableByteBufferInputStream.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ImmutableByteBufferInputStream.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ImmutableByteBufferInputStream.java
index 4f16c8a..52f332f 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ImmutableByteBufferInputStream.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/ImmutableByteBufferInputStream.java
@@ -18,7 +18,7 @@ package com.gemstone.gemfire.internal.tcp;
 
 import java.nio.ByteBuffer;
 
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 
 /**
  * You should only create an instance of this class if the bytes this buffer reads

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/BlobHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/BlobHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/BlobHelper.java
index 6665e55..7a4840e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/BlobHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/BlobHelper.java
@@ -27,7 +27,7 @@ import com.gemstone.gemfire.internal.DSCODE;
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 import com.gemstone.gemfire.pdx.internal.PdxInputStream;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxInputStream.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxInputStream.java b/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxInputStream.java
index 66d4887..85e078d 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxInputStream.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/pdx/internal/PdxInputStream.java
@@ -26,7 +26,7 @@ import java.util.Date;
 import com.gemstone.gemfire.DataSerializer;
 import com.gemstone.gemfire.InternalGemFireException;
 import com.gemstone.gemfire.pdx.PdxSerializationException;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream;
 import com.gemstone.gemfire.internal.tcp.ImmutableByteBufferInputStream;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ChunkValueWrapperJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ChunkValueWrapperJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ChunkValueWrapperJUnitTest.java
index 428b205..0606387 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ChunkValueWrapperJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/ChunkValueWrapperJUnitTest.java
@@ -29,10 +29,10 @@ import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.ChunkValueWrapper;
 import com.gemstone.gemfire.internal.cache.DiskEntry.Helper.Flushable;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
index 2fc3c82..948c7f8 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OffHeapTestUtil.java
@@ -23,8 +23,9 @@ import junit.framework.Assert;
 
 import com.gemstone.gemfire.cache.CacheClosedException;
 import com.gemstone.gemfire.internal.offheap.MemoryBlock;
+import com.gemstone.gemfire.internal.offheap.RefCountChangeInfo;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.RefCountChangeInfo;
 
 @SuppressWarnings("deprecation")
 public class OffHeapTestUtil {
@@ -51,7 +52,7 @@ public class OffHeapTestUtil {
     }
     
     if(orphans != null && ! orphans.isEmpty()) {
-      List<RefCountChangeInfo> info = SimpleMemoryAllocatorImpl.getRefCountInfo(orphans.get(0).getMemoryAddress());
+      List<RefCountChangeInfo> info = ReferenceCountHelper.getRefCountInfo(orphans.get(0).getMemoryAddress());
       System.out.println("FOUND ORPHAN!!");
       System.out.println("Sample orphan: " + orphans.get(0));
       System.out.println("Orphan info: " + info);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
index 727a59c..f7d0714 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/OldValueImporterTestBase.java
@@ -26,11 +26,11 @@ import org.junit.Test;
 
 import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl.OldValueImporter;
+import com.gemstone.gemfire.internal.offheap.Chunk;
+import com.gemstone.gemfire.internal.offheap.DataAsAddress;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.DataAsAddress;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
 import com.gemstone.gemfire.internal.util.BlobHelper;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/ConcurrentBagJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/ConcurrentBagJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/ConcurrentBagJUnitTest.java
deleted file mode 100644
index 8bba8db..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/ConcurrentBagJUnitTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.offheap;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.Iterator;
-import java.util.NoSuchElementException;
-
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ConcurrentBag.Node;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class ConcurrentBagJUnitTest {
-  
-  public static class IntNode implements SimpleMemoryAllocatorImpl.ConcurrentBag.Node {
-
-    private final int data;
-    
-    public IntNode(int i) {
-      this.data = i;
-    }
-    
-    public Integer getData() {
-      return this.data;
-    }
-    
-    private Node next;
-    @Override
-    public void setNextCBNode(Node next) {
-      this.next = next;
-    }
-    @Override
-    public Node getNextCBNode() {
-      return this.next;
-    }
-    
-  }
-  @Test
-  public void testBasicFreeList() {
-    SimpleMemoryAllocatorImpl.ConcurrentBag<IntNode> l = new SimpleMemoryAllocatorImpl.ConcurrentBag<IntNode>(5000);
-    assertEquals(false, l.iterator().hasNext());
-    try {
-      l.iterator().next();
-      fail("expected NoSuchElementException");
-    } catch (NoSuchElementException expected) {
-    }
-    assertEquals(null, l.poll());
-    
-    l.offer(new IntNode(1));
-    assertEquals(true, l.iterator().hasNext());
-    
-    assertEquals(Integer.valueOf(1), l.iterator().next().getData());
-    assertEquals(Integer.valueOf(1), l.poll().getData());
-    assertEquals(false, l.iterator().hasNext());
-    assertEquals(null, l.poll());
-    
-    try {
-      l.iterator().remove();
-      fail("expected UnsupportedOperationException");
-    } catch (UnsupportedOperationException expected) {
-    }
-//    {
-//      l.offer(new IntNode(1));
-//      l.offer(new IntNode(2));
-//      Iterator<IntNode> it = l.iterator();
-//      assertEquals(true, it.hasNext());
-//      assertEquals(Integer.valueOf(1), it.next().getData());
-//      assertEquals(true, it.hasNext());
-//      assertEquals(Integer.valueOf(2), it.next().getData());
-//      assertEquals(false, it.hasNext());
-//      
-//      it = l.iterator();
-//      try {
-//        it.remove();
-//        fail("expected IllegalStateException");
-//      } catch (IllegalStateException expected) {
-//      }
-//      it.next();
-//      it.remove();
-//      try {
-//        it.remove();
-//        fail("expected IllegalStateException");
-//      } catch (IllegalStateException expected) {
-//      }
-//      assertEquals(Integer.valueOf(2), it.next());
-//      assertEquals(false, it.hasNext());
-//      
-//      assertEquals(Integer.valueOf(2), l.poll());
-//      assertEquals(null, l.poll());
-//    }
-    
-    for (int i=1; i <= 3999; i++) {
-      l.offer(new IntNode(i));
-    }
-    {
-      Iterator<IntNode> it = l.iterator();
-//    for (int i=1; i <= 3999; i++) {
-      for (int i=3999; i >= 1; i--) {
-        assertEquals(true, it.hasNext());
-        assertEquals(Integer.valueOf(i), it.next().getData());
-      }
-      assertEquals(false, it.hasNext());
-    }
-//  for (int i=1; i <= 3999; i++) {
-    for (int i=3999; i >= 1; i--) {
-      assertEquals(Integer.valueOf(i), l.poll().getData());
-    }
-    assertEquals(null, l.poll());
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
index 2d38a26..93f2039 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/FreeListOffHeapRegionJUnitTest.java
@@ -40,7 +40,7 @@ public class FreeListOffHeapRegionJUnitTest extends OffHeapRegionBase {
 
   @Override
   public int perObjectOverhead() {
-    return SimpleMemoryAllocatorImpl.Chunk.OFF_HEAP_HEADER_SIZE;
+    return Chunk.OFF_HEAP_HEADER_SIZE;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
index 73fb51d..2f539d5 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionBase.java
@@ -38,7 +38,6 @@ import com.gemstone.gemfire.compression.Compressor;
 import com.gemstone.gemfire.compression.SnappyCompressor;
 import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
index a47d42d..b9e8456 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapValidationJUnitTest.java
@@ -61,7 +61,6 @@ import com.gemstone.gemfire.internal.HeapDataOutputStream;
 import com.gemstone.gemfire.internal.Version;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.LocalRegion;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
index e19f4cb..daebefa 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OffHeapWriteObjectAsByteArrayJUnitTest.java
@@ -34,8 +34,6 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.DataAsAddress;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
index 3636c79..6e26b2f 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/OldFreeListOffHeapRegionJUnitTest.java
@@ -41,7 +41,7 @@ public class OldFreeListOffHeapRegionJUnitTest extends OffHeapRegionBase {
 
   @Override
   public int perObjectOverhead() {
-    return SimpleMemoryAllocatorImpl.Chunk.OFF_HEAP_HEADER_SIZE;
+    return Chunk.OFF_HEAP_HEADER_SIZE;
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java
index 745d2c0..c8b1834 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorFillPatternJUnitTest.java
@@ -29,10 +29,8 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import static org.junit.Assert.*;
-
 import junit.framework.TestCase;
 
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
index ea90bdc..19dfebb 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorJUnitTest.java
@@ -31,7 +31,6 @@ import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
 import com.gemstone.gemfire.OutOfOffHeapMemoryException;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 @Category(UnitTest.class)
@@ -46,7 +45,7 @@ public class SimpleMemoryAllocatorJUnitTest {
     int TINY_MULTIPLE = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.TINY_MULTIPLE;
 //    int BIG_MULTIPLE = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.FreeListManager.BIG_MULTIPLE;
     int HUGE_MULTIPLE = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.HUGE_MULTIPLE;
-    int perObjectOverhead = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk.OFF_HEAP_HEADER_SIZE;
+    int perObjectOverhead = com.gemstone.gemfire.internal.offheap.Chunk.OFF_HEAP_HEADER_SIZE;
     int maxTiny = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.MAX_TINY-perObjectOverhead;
 //    int MIN_BIG_SIZE = round(BIG_MULTIPLE, maxTiny+perObjectOverhead+1)-perObjectOverhead;
 //    int maxBig = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.FreeListManager.MAX_BIG-perObjectOverhead;
@@ -167,7 +166,7 @@ public class SimpleMemoryAllocatorJUnitTest {
   
   @Test
   public void testCompaction() {
-    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk.OFF_HEAP_HEADER_SIZE;
+    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.Chunk.OFF_HEAP_HEADER_SIZE;
     final int BIG_ALLOC_SIZE = 150000;
     final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
     final int TOTAL_MEM = BIG_ALLOC_SIZE;
@@ -283,7 +282,7 @@ public class SimpleMemoryAllocatorJUnitTest {
   boolean memoryUsageEventReceived;
   @Test
   public void testUsageEventListener() {
-    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk.OFF_HEAP_HEADER_SIZE;
+    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.Chunk.OFF_HEAP_HEADER_SIZE;
     final int SMALL_ALLOC_SIZE = 1000;
     UnsafeMemoryChunk slab = new UnsafeMemoryChunk(3000);
     try {
@@ -326,7 +325,7 @@ public class SimpleMemoryAllocatorJUnitTest {
   
   @Test
   public void testOutOfOffHeapMemory() {
-    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk.OFF_HEAP_HEADER_SIZE;
+    final int perObjectOverhead = com.gemstone.gemfire.internal.offheap.Chunk.OFF_HEAP_HEADER_SIZE;
     final int BIG_ALLOC_SIZE = 150000;
     final int SMALL_ALLOC_SIZE = BIG_ALLOC_SIZE/2;
     final int TOTAL_MEM = BIG_ALLOC_SIZE;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorLifecycleListenerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorLifecycleListenerJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorLifecycleListenerJUnitTest.java
index 38f969e..2df8656 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorLifecycleListenerJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorLifecycleListenerJUnitTest.java
@@ -26,7 +26,6 @@ import org.junit.Assert;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
 
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.LifecycleListener;
 import com.gemstone.gemfire.test.junit.categories.UnitTest;
 
 /**
@@ -45,7 +44,7 @@ public class SimpleMemoryAllocatorLifecycleListenerJUnitTest {
   
   @After
   public void tearDown() throws Exception {
-    SimpleMemoryAllocatorImpl.removeLifecycleListener(this.listener);
+    LifecycleListener.removeLifecycleListener(this.listener);
     this.afterCreateCallbacks.clear();
     this.afterReuseCallbacks.clear();
     this.beforeCloseCallbacks.clear();
@@ -54,8 +53,8 @@ public class SimpleMemoryAllocatorLifecycleListenerJUnitTest {
 
   @Test
   public void testAddRemoveListener() {
-    SimpleMemoryAllocatorImpl.addLifecycleListener(this.listener);
-    SimpleMemoryAllocatorImpl.removeLifecycleListener(this.listener);
+    LifecycleListener.addLifecycleListener(this.listener);
+    LifecycleListener.removeLifecycleListener(this.listener);
 
     UnsafeMemoryChunk slab = new UnsafeMemoryChunk(1024); // 1k
     SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new UnsafeMemoryChunk[]{slab});
@@ -73,7 +72,7 @@ public class SimpleMemoryAllocatorLifecycleListenerJUnitTest {
   
   @Test
   public void testCallbacksAreCalledAfterCreate() {
-    SimpleMemoryAllocatorImpl.addLifecycleListener(this.listener);
+    LifecycleListener.addLifecycleListener(this.listener);
     
     UnsafeMemoryChunk slab = new UnsafeMemoryChunk(1024); // 1k
     SimpleMemoryAllocatorImpl ma = SimpleMemoryAllocatorImpl.create(new NullOutOfOffHeapMemoryListener(), new NullOffHeapMemoryStats(), new UnsafeMemoryChunk[]{slab});

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
index b3a4ab5..c7c7b7b 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteBufferByteSourceJUnitTest.java
@@ -22,8 +22,8 @@ import java.nio.ByteBuffer;
 
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSource;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSourceFactory;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
index d0e1986..543ef94 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/pdx/OffHeapByteSourceJUnitTest.java
@@ -20,12 +20,12 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.experimental.categories.Category;
 
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.NullOffHeapMemoryStats;
 import com.gemstone.gemfire.internal.offheap.NullOutOfOffHeapMemoryListener;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSource;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.ByteSourceFactory;
 import com.gemstone.gemfire.internal.tcp.ByteBufferInputStream.OffHeapByteSource;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
index 060a5ec..ce49654 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/excludedClasses.txt
@@ -19,6 +19,7 @@ com/gemstone/gemfire/internal/logging/log4j/LocalizedMessage
 com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders
 com/gemstone/gemfire/internal/logging/log4j/LogWriterAppenders$Identifier
 com/gemstone/gemfire/internal/logging/log4j/LogWriterLogger
+com/gemstone/gemfire/internal/offheap/RefCountChangeInfo
 com/gemstone/gemfire/internal/process/BlockingProcessStreamReader
 com/gemstone/gemfire/internal/process/NonBlockingProcessStreamReader
 com/gemstone/gemfire/internal/process/ProcessStreamReader

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
index a9479e3..03e82d0 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedSerializables.txt
@@ -470,7 +470,6 @@ com/gemstone/gemfire/internal/memcached/commands/ClientError,true,-2426928000696
 com/gemstone/gemfire/internal/offheap/MemoryBlock$State,false
 com/gemstone/gemfire/internal/offheap/OffHeapStorage$1,false
 com/gemstone/gemfire/internal/offheap/OffHeapStorage$2,false
-com/gemstone/gemfire/internal/offheap/SimpleMemoryAllocatorImpl$RefCountChangeInfo,false,dupCount:int,owner:java/lang/Object,rc:int,stackTraceString:java/lang/String,threadName:java/lang/String
 com/gemstone/gemfire/internal/offheap/annotations/OffHeapIdentifier,false,id:java/lang/String
 com/gemstone/gemfire/internal/process/ConnectionFailedException,true,5622636452836752700
 com/gemstone/gemfire/internal/process/FileAlreadyExistsException,true,5471082555536094256


[05/50] [abbrv] incubator-geode git commit: GEODE-587: Include the lucence dependent jars on the classpath

Posted by je...@apache.org.
GEODE-587: Include the lucence dependent jars on the classpath

The gemfire-assembly build creates the runtime classpath.  This is
a slight tweak to ensure the lucene jars are added to the classpath.


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

Branch: refs/heads/feature/GEODE-17
Commit: bbccb60563f5e1833b925342388bedc1813450e8
Parents: 452328f
Author: Anthony Baker <ab...@pivotal.io>
Authored: Mon Nov 23 12:41:06 2015 -0800
Committer: Anthony Baker <ab...@pivotal.io>
Committed: Mon Nov 23 12:41:06 2015 -0800

----------------------------------------------------------------------
 gemfire-assembly/build.gradle | 22 +++++++++++++++-------
 1 file changed, 15 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/bbccb605/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --git a/gemfire-assembly/build.gradle b/gemfire-assembly/build.gradle
index 5f82905..8f803ae 100755
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@ -74,10 +74,12 @@ task defaultCacheConfig(type: JavaExec, dependsOn: classes) {
 // This closure sets the gemfire classpath.  If we add another jar to the classpath it must
 // be included in the filter logic below.
 def cp = {
-  configurations.archives.dependencies.collect { it.dependencyProject }
+  def jars = configurations.archives.dependencies.collect { it.dependencyProject }
     .findAll { !it.name.contains('web') }
     .collect { it.jar.archiveName }
-    .join(' ') + ' ' +
+    .join(' ')
+
+  jars += ' ' + 
     project(':gemfire-core').configurations.runtime.collect { it.getName() }.findAll {
       it.contains('antlr') ||
       it.contains('commons-io') ||
@@ -105,10 +107,6 @@ def cp = {
       it.contains('log4j-jcl') ||
       it.contains('log4j-jul') ||
       it.contains('log4j-slf4j-impl') ||
-      it.contains('lucene-analyzers-common') ||
-      it.contains('lucene-core') ||
-      it.contains('lucene-queries') ||
-      it.contains('lucene-queryparser') ||
       it.contains('slf4j-api') ||
       it.contains('spring-core') ||
       it.contains('spring-shell') ||
@@ -116,7 +114,17 @@ def cp = {
       it.contains('hbase') ||
       it.contains('jgroups') ||
       it.contains('netty')
-    }.join(' ') 
+    }.join(' ')
+    
+  jars += ' ' +
+    project(':gemfire-lucene').configurations.runtime.collect { it.getName() }.findAll {
+      it.contains('lucene-analyzers-common') ||
+      it.contains('lucene-core') ||
+      it.contains('lucene-queries') ||
+      it.contains('lucene-queryparser')
+    }.join(' ')
+    
+  return jars
 }
 
 // Note: this dependency doesn't work if you change a library version from


[12/50] [abbrv] incubator-geode git commit: GEODE-580: cleanup off-heap code

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
new file mode 100644
index 0000000..bd05ddb
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Fragment.java
@@ -0,0 +1,125 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+
+/**
+ * A fragment is a block of memory that can have chunks allocated from it.
+ * The allocations are always from the front so the free memory is always
+ * at the end. The freeIdx keeps track of the first byte of free memory in
+ * the fragment.
+ * The base memory address and the total size of a fragment never change.
+ * During compaction fragments go away and are recreated.
+ * 
+ * @author darrel
+ *
+ */
+public class Fragment implements MemoryBlock {
+  private static final byte FILL_BYTE = Chunk.FILL_BYTE;
+  private final long baseAddr;
+  private final int size;
+  @SuppressWarnings("unused")
+  private volatile int freeIdx;
+  private static AtomicIntegerFieldUpdater<Fragment> freeIdxUpdater = AtomicIntegerFieldUpdater.newUpdater(Fragment.class, "freeIdx");
+  
+  public Fragment(long addr, int size) {
+    SimpleMemoryAllocatorImpl.validateAddress(addr);
+    this.baseAddr = addr;
+    this.size = size;
+    freeIdxUpdater.set(this, 0);
+  }
+  
+  public int freeSpace() {
+    return getSize() - getFreeIndex();
+  }
+
+  public boolean allocate(int oldOffset, int newOffset) {
+    return freeIdxUpdater.compareAndSet(this, oldOffset, newOffset);
+  }
+
+  public int getFreeIndex() {
+    return freeIdxUpdater.get(this);
+  }
+
+  public int getSize() {
+    return this.size;
+  }
+
+  public long getMemoryAddress() {
+    return this.baseAddr;
+  }
+
+  @Override
+  public State getState() {
+    return State.UNUSED;
+  }
+
+  @Override
+  public MemoryBlock getNextBlock() {
+    throw new UnsupportedOperationException();
+  }
+  
+  @Override
+  public int getBlockSize() {
+    return freeSpace();
+  }
+  
+  @Override
+  public int getSlabId() {
+    throw new UnsupportedOperationException();
+  }
+
+  @Override
+  public int getFreeListId() {
+    return -1;
+  }
+
+  @Override
+  public int getRefCount() {
+    return 0;
+  }
+
+  @Override
+  public String getDataType() {
+    return "N/A";
+  }
+
+  @Override
+  public boolean isSerialized() {
+    return false;
+  }
+
+  @Override
+  public boolean isCompressed() {
+    return false;
+  }
+
+  @Override
+  public Object getDataValue() {
+    return null;
+  }
+  
+  public void fill() {
+    UnsafeMemoryChunk.fill(this.baseAddr, this.size, FILL_BYTE);
+  }
+
+  @Override
+  public ChunkType getChunkType() {
+    return null;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
new file mode 100644
index 0000000..48a0756
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/FreeListManager.java
@@ -0,0 +1,807 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.NavigableSet;
+import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReferenceArray;
+
+import com.gemstone.gemfire.LogWriter;
+import com.gemstone.gemfire.OutOfOffHeapMemoryException;
+import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
+import com.gemstone.gemfire.internal.offheap.MemoryBlock.State;
+
+/**
+ * Manages the free lists for a SimpleMemoryAllocatorImpl
+ */
+public class FreeListManager {
+  final private AtomicReferenceArray<SyncChunkStack> tinyFreeLists = new AtomicReferenceArray<SyncChunkStack>(SimpleMemoryAllocatorImpl.TINY_FREE_LIST_COUNT);
+  // hugeChunkSet is sorted by chunk size in ascending order. It will only contain chunks larger than MAX_TINY.
+  private final ConcurrentSkipListSet<Chunk> hugeChunkSet = new ConcurrentSkipListSet<Chunk>();
+  private final AtomicLong allocatedSize = new AtomicLong(0L);
+
+  private int getNearestTinyMultiple(int size) {
+    return (size-1)/SimpleMemoryAllocatorImpl.TINY_MULTIPLE;
+  }
+  List<Chunk> getLiveChunks() {
+    ArrayList<Chunk> result = new ArrayList<Chunk>();
+    UnsafeMemoryChunk[] slabs = this.ma.getSlabs();
+    for (int i=0; i < slabs.length; i++) {
+      getLiveChunks(slabs[i], result);
+    }
+    return result;
+  }
+  private void getLiveChunks(UnsafeMemoryChunk slab, List<Chunk> result) {
+    long addr = slab.getMemoryAddress();
+    while (addr <= (slab.getMemoryAddress() + slab.getSize() - Chunk.MIN_CHUNK_SIZE)) {
+      Fragment f = isAddrInFragmentFreeSpace(addr);
+      if (f != null) {
+        addr = f.getMemoryAddress() + f.getSize();
+      } else {
+        int curChunkSize = Chunk.getSize(addr);
+        int refCount = Chunk.getRefCount(addr);
+        if (refCount > 0) {
+          result.add(this.ma.chunkFactory.newChunk(addr));
+        }
+        addr += curChunkSize;
+      }
+    }
+  }
+  /**
+   * If addr is in the free space of a fragment then return that fragment; otherwise return null.
+   */
+  private Fragment isAddrInFragmentFreeSpace(long addr) {
+    for (Fragment f: this.fragmentList) {
+      if (addr >= (f.getMemoryAddress() + f.getFreeIndex()) && addr < (f.getMemoryAddress() + f.getSize())) {
+        return f;
+      }
+    }
+    return null;
+  }
+  public long getUsedMemory() {
+    return this.allocatedSize.get();
+  }
+  public long getFreeMemory() {
+    return this.ma.getTotalMemory() - getUsedMemory();
+  }
+  long getFreeFragmentMemory() {
+    long result = 0;
+    for (Fragment f: this.fragmentList) {
+      int freeSpace = f.freeSpace();
+      if (freeSpace >= Chunk.MIN_CHUNK_SIZE) {
+        result += freeSpace;
+      }
+    }
+    return result;
+  }
+  long getFreeTinyMemory() {
+    long tinyFree = 0;
+    for (int i=0; i < this.tinyFreeLists.length(); i++) {
+      SyncChunkStack cl = this.tinyFreeLists.get(i);
+      if (cl != null) {
+        tinyFree += cl.computeTotalSize();
+      }
+    }
+    return tinyFree;
+  }
+  long getFreeHugeMemory() {
+    long hugeFree = 0;
+    for (Chunk c: this.hugeChunkSet) {
+      hugeFree += c.getSize();
+    }
+    return hugeFree;
+  }
+
+  /**
+   * The id of the last fragment we allocated from.
+   */
+  private final AtomicInteger lastFragmentAllocation = new AtomicInteger(0);
+  private final CopyOnWriteArrayList<Fragment> fragmentList;
+  private final SimpleMemoryAllocatorImpl ma;
+
+  public FreeListManager(SimpleMemoryAllocatorImpl ma) {
+    this.ma = ma;
+    UnsafeMemoryChunk[] slabs = ma.getSlabs();
+    Fragment[] tmp = new Fragment[slabs.length];
+    for (int i=0; i < slabs.length; i++) {
+      tmp[i] = new Fragment(slabs[i].getMemoryAddress(), slabs[i].getSize());
+    }
+    this.fragmentList = new CopyOnWriteArrayList<Fragment>(tmp);
+
+    if(ma.validateMemoryWithFill) {
+      fillFragments();
+    }
+  }
+
+  /**
+   * Fills all fragments with a fill used for data integrity validation.
+   */
+  private void fillFragments() {
+    for(Fragment fragment : this.fragmentList) {
+      fragment.fill();
+    }
+  }
+
+  /**
+   * Allocate a chunk of memory of at least the given size.
+   * The basic algorithm is:
+   * 1. Look for a previously allocated and freed chunk close to the size requested.
+   * 2. See if the original chunk is big enough to split. If so do so.
+   * 3. Look for a previously allocated and freed chunk of any size larger than the one requested.
+   *    If we find one split it.
+   * <p>
+   * It might be better not to include step 3 since we expect and freed chunk to be reallocated in the future.
+   * Maybe it would be better for 3 to look for adjacent free blocks that can be merged together.
+   * For now we will just try 1 and 2 and then report out of mem.
+   * @param size minimum bytes the returned chunk must have.
+   * @param chunkType TODO
+   * @return the allocated chunk
+   * @throws IllegalStateException if a chunk can not be allocated.
+   */
+  @SuppressWarnings("synthetic-access")
+  public Chunk allocate(int size, ChunkType chunkType) {
+    Chunk result = null;
+    {
+      assert size > 0;
+      if (chunkType == null) {
+        chunkType = GemFireChunk.TYPE;
+      }
+      result = basicAllocate(size, true, chunkType);
+      result.setDataSize(size);
+    }
+    this.ma.stats.incObjects(1);
+    int resultSize = result.getSize();
+    this.allocatedSize.addAndGet(resultSize);
+    this.ma.stats.incUsedMemory(resultSize);
+    this.ma.stats.incFreeMemory(-resultSize);
+    result.initializeUseCount();
+    this.ma.notifyListeners();
+
+    return result;
+  }
+
+  private Chunk basicAllocate(int size, boolean useSlabs, ChunkType chunkType) {
+    if (useSlabs) {
+      // Every object stored off heap has a header so we need
+      // to adjust the size so that the header gets allocated.
+      // If useSlabs is false then the incoming size has already
+      // been adjusted.
+      size += Chunk.OFF_HEAP_HEADER_SIZE;
+    }
+    if (size <= SimpleMemoryAllocatorImpl.MAX_TINY) {
+      return allocateTiny(size, useSlabs, chunkType);
+    } else {
+      return allocateHuge(size, useSlabs, chunkType);
+    }
+  }
+
+  private Chunk allocateFromFragments(int chunkSize, ChunkType chunkType) {
+    do {
+      final int lastAllocationId = this.lastFragmentAllocation.get();
+      for (int i=lastAllocationId; i < this.fragmentList.size(); i++) {
+        Chunk result = allocateFromFragment(i, chunkSize, chunkType);
+        if (result != null) {
+          return result;
+        }
+      }
+      for (int i=0; i < lastAllocationId; i++) {
+        Chunk result = allocateFromFragment(i, chunkSize, chunkType);
+        if (result != null) {
+          return result;
+        }
+      }
+    } while (compact(chunkSize));
+    // We tried all the fragments and didn't find any free memory.
+    logOffHeapState(chunkSize);
+    final OutOfOffHeapMemoryException failure = new OutOfOffHeapMemoryException("Out of off-heap memory. Could not allocate size of " + chunkSize);
+    try {
+      throw failure;
+    } finally {
+      this.ma.ooohml.outOfOffHeapMemory(failure);
+    }
+  }
+
+  private void logOffHeapState(int chunkSize) {
+    if (InternalDistributedSystem.getAnyInstance() != null) {
+      LogWriter lw = InternalDistributedSystem.getAnyInstance().getLogWriter();
+      lw.info("OutOfOffHeapMemory allocating size of " + chunkSize + ". allocated=" + this.allocatedSize.get() + " compactions=" + this.compactCount.get() + " objects=" + this.ma.stats.getObjects() + " free=" + this.ma.stats.getFreeMemory() + " fragments=" + this.ma.stats.getFragments() + " largestFragment=" + this.ma.stats.getLargestFragment() + " fragmentation=" + this.ma.stats.getFragmentation());
+      logFragmentState(lw);
+      logTinyState(lw);
+      logHugeState(lw);
+    }
+  }
+
+  private void logHugeState(LogWriter lw) {
+    for (Chunk c: this.hugeChunkSet) {
+      lw.info("Free huge of size " + c.getSize());
+    }
+  }
+  private void logTinyState(LogWriter lw) {
+    for (int i=0; i < this.tinyFreeLists.length(); i++) {
+      SyncChunkStack cl = this.tinyFreeLists.get(i);
+      if (cl != null) {
+        cl.logSizes(lw, "Free tiny of size ");
+      }
+    }
+  }
+  private void logFragmentState(LogWriter lw) {
+    for (Fragment f: this.fragmentList) {
+      int freeSpace = f.freeSpace();
+      if (freeSpace > 0) {
+        lw.info("Fragment at " + f.getMemoryAddress() + " of size " + f.getSize() + " has " + freeSpace + " bytes free.");
+      }
+    }
+  }
+
+  private final AtomicInteger compactCount = new AtomicInteger();
+  /**
+   * Compacts memory and returns true if enough memory to allocate chunkSize
+   * is freed. Otherwise returns false;
+   * TODO OFFHEAP: what should be done about contiguous chunks that end up being bigger than 2G?
+   * Currently if we are given slabs bigger than 2G or that just happen to be contiguous and add
+   * up to 2G then the compactor may unify them together into a single Chunk and our 32-bit chunkSize
+   * field will overflow. This code needs to detect this and just create a chunk of 2G and then start
+   * a new one.
+   * Or to prevent it from happening we could just check the incoming slabs and throw away a few bytes
+   * to keep them from being contiguous.
+   */
+  private boolean compact(int chunkSize) {
+    final long startCompactionTime = this.ma.getStats().startCompaction();
+    final int countPreSync = this.compactCount.get();
+    try {
+      synchronized (this) {
+        if (this.compactCount.get() != countPreSync) {
+          // someone else did a compaction while we waited on the sync.
+          // So just return true causing the caller to retry the allocation.
+          return true;
+        }
+        ArrayList<SyncChunkStack> freeChunks = new ArrayList<SyncChunkStack>();
+        collectFreeChunks(freeChunks);
+        final int SORT_ARRAY_BLOCK_SIZE = 128;
+        long[] sorted = new long[SORT_ARRAY_BLOCK_SIZE];
+        int sortedSize = 0;
+        boolean result = false;
+        int largestFragment = 0;
+        for (SyncChunkStack l: freeChunks) {
+          long addr = l.poll();
+          while (addr != 0) {
+            int idx = Arrays.binarySearch(sorted, 0, sortedSize, addr);
+            //System.out.println("DEBUG addr=" + addr + " size=" + Chunk.getSize(addr) + " idx="+idx + " sortedSize=" + sortedSize);
+            if (idx >= 0) {
+              throw new IllegalStateException("duplicate memory address found during compaction!");
+            }
+            idx = -idx;
+            idx--;
+            if (idx == sortedSize) {
+              // addr is > everything in the array
+              if (sortedSize == 0) {
+                // nothing was in the array
+                sorted[0] = addr;
+                sortedSize++;
+              } else {
+                // see if we can conflate into sorted[idx]
+                long lowAddr = sorted[idx-1];
+                int lowSize = Chunk.getSize(lowAddr);
+                if (lowAddr + lowSize == addr) {
+                  // append the addr chunk to lowAddr
+                  Chunk.setSize(lowAddr, lowSize + Chunk.getSize(addr));
+                } else {
+                  if (sortedSize >= sorted.length) {
+                    long[] newSorted = new long[sorted.length+SORT_ARRAY_BLOCK_SIZE];
+                    System.arraycopy(sorted, 0, newSorted, 0, sorted.length);
+                    sorted = newSorted;
+                  }
+                  sortedSize++;
+                  sorted[idx] = addr;
+                }
+              }
+            } else {
+              int addrSize = Chunk.getSize(addr);
+              long highAddr = sorted[idx];
+              if (addr + addrSize == highAddr) {
+                // append highAddr chunk to addr
+                Chunk.setSize(addr, addrSize + Chunk.getSize(highAddr));
+                sorted[idx] = addr;
+              } else {
+                boolean insert = idx==0;
+                if (!insert) {
+                  long lowAddr = sorted[idx-1];
+                  //                  if (lowAddr == 0L) {
+                  //                    long[] tmp = Arrays.copyOf(sorted, sortedSize);
+                  //                    throw new IllegalStateException("addr was zero at idx=" + (idx-1) + " sorted="+ Arrays.toString(tmp));
+                  //                  }
+                  int lowSize = Chunk.getSize(lowAddr);
+                  if (lowAddr + lowSize == addr) {
+                    // append the addr chunk to lowAddr
+                    Chunk.setSize(lowAddr, lowSize + addrSize);
+                  } else {
+                    insert = true;
+                  }
+                }
+                if (insert) {
+                  if (sortedSize >= sorted.length) {
+                    long[] newSorted = new long[sorted.length+SORT_ARRAY_BLOCK_SIZE];
+                    System.arraycopy(sorted, 0, newSorted, 0, idx);
+                    newSorted[idx] = addr;
+                    System.arraycopy(sorted, idx, newSorted, idx+1, sortedSize-idx);
+                    sorted = newSorted;
+                  } else {
+                    System.arraycopy(sorted, idx, sorted, idx+1, sortedSize-idx);
+                    sorted[idx] = addr;
+                  }
+                  sortedSize++;
+                }
+              }
+            }
+            addr = l.poll();
+          }
+        }
+        for (int i=sortedSize-1; i > 0; i--) {
+          long addr = sorted[i];
+          long lowAddr = sorted[i-1];
+          int lowSize = Chunk.getSize(lowAddr);
+          if (lowAddr + lowSize == addr) {
+            // append addr chunk to lowAddr
+            Chunk.setSize(lowAddr, lowSize + Chunk.getSize(addr));
+            sorted[i] = 0L;
+          }
+        }
+        this.lastFragmentAllocation.set(0);
+        ArrayList<Fragment> tmp = new ArrayList<Fragment>();
+        for (int i=sortedSize-1; i >= 0; i--) {
+          long addr = sorted[i];
+          if (addr == 0L) continue;
+          int addrSize = Chunk.getSize(addr);
+          Fragment f = new Fragment(addr, addrSize);
+          if (addrSize >= chunkSize) {
+            result = true;
+          }
+          if (addrSize > largestFragment) {
+            largestFragment = addrSize;
+            // TODO it might be better to sort them biggest first
+            tmp.add(0, f);
+          } else {
+            tmp.add(f);
+          }
+        }
+        this.fragmentList.addAll(tmp);
+
+        // Reinitialize fragments with fill pattern data
+        if(this.ma.validateMemoryWithFill) {
+          fillFragments();
+        }
+
+        // Signal any waiters that a compaction happened.
+        this.compactCount.incrementAndGet();
+
+        this.ma.getStats().setLargestFragment(largestFragment);
+        this.ma.getStats().setFragments(tmp.size());        
+        updateFragmentation();
+
+        return result;
+      } // sync
+    } finally {
+      this.ma.getStats().endCompaction(startCompactionTime);
+    }
+  }
+
+  private void updateFragmentation() {      
+    long freeSize = this.ma.getStats().getFreeMemory();
+
+    // Calculate free space fragmentation only if there is free space available.
+    if(freeSize > 0) {
+      long largestFragment = this.ma.getStats().getLargestFragment();
+      long numerator = freeSize - largestFragment;
+
+      double percentage = (double) numerator / (double) freeSize;
+      percentage *= 100d;
+
+      int wholePercentage = (int) Math.rint(percentage);
+      this.ma.getStats().setFragmentation(wholePercentage);
+    } else {
+      // No free space? Then we have no free space fragmentation.
+      this.ma.getStats().setFragmentation(0);
+    }
+  }
+
+  private void collectFreeChunks(List<SyncChunkStack> l) {
+    collectFreeFragmentChunks(l);
+    collectFreeHugeChunks(l);
+    collectFreeTinyChunks(l);
+  }
+  private void collectFreeFragmentChunks(List<SyncChunkStack> l) {
+    if (this.fragmentList.size() == 0) return;
+    SyncChunkStack result = new SyncChunkStack();
+    for (Fragment f: this.fragmentList) {
+      int offset;
+      int diff;
+      do {
+        offset = f.getFreeIndex();
+        diff = f.getSize() - offset;
+      } while (diff >= Chunk.MIN_CHUNK_SIZE && !f.allocate(offset, offset+diff));
+      if (diff < Chunk.MIN_CHUNK_SIZE) {
+        if (diff > 0) {
+          SimpleMemoryAllocatorImpl.logger.debug("Lost memory of size {}", diff);
+        }
+        // fragment is too small to turn into a chunk
+        // TODO we need to make sure this never happens
+        // by keeping sizes rounded. I think I did this
+        // by introducing MIN_CHUNK_SIZE and by rounding
+        // the size of huge allocations.
+        continue;
+      }
+      long chunkAddr = f.getMemoryAddress()+offset;
+      Chunk.setSize(chunkAddr, diff);
+      result.offer(chunkAddr);
+    }
+    // All the fragments have been turned in to chunks so now clear them
+    // The compaction will create new fragments.
+    this.fragmentList.clear();
+    if (!result.isEmpty()) {
+      l.add(result);
+    }
+  }
+  private void collectFreeTinyChunks(List<SyncChunkStack> l) {
+    for (int i=0; i < this.tinyFreeLists.length(); i++) {
+      SyncChunkStack cl = this.tinyFreeLists.get(i);
+      if (cl != null) {
+        long head = cl.clear();
+        if (head != 0L) {
+          l.add(new SyncChunkStack(head));
+        }
+      }
+    }
+  }
+  private void collectFreeHugeChunks(List<SyncChunkStack> l) {
+    Chunk c = this.hugeChunkSet.pollFirst();
+    SyncChunkStack result = null;
+    while (c != null) {
+      if (result == null) {
+        result = new SyncChunkStack();
+        l.add(result);
+      }
+      result.offer(c.getMemoryAddress());
+      c = this.hugeChunkSet.pollFirst();
+    }
+  }
+
+  private Chunk allocateFromFragment(final int fragIdx, final int chunkSize, ChunkType chunkType) {
+    if (fragIdx >= this.fragmentList.size()) return null;
+    final Fragment fragment;
+    try {
+      fragment = this.fragmentList.get(fragIdx);
+    } catch (IndexOutOfBoundsException ignore) {
+      // A concurrent compaction can cause this.
+      return null;
+    }
+    boolean retryFragment;
+    do {
+      retryFragment = false;
+      int oldOffset = fragment.getFreeIndex();
+      int fragmentSize = fragment.getSize();
+      int fragmentFreeSize = fragmentSize - oldOffset;
+      if (fragmentFreeSize >= chunkSize) {
+        // this fragment has room
+        // Try to allocate up to BATCH_SIZE more chunks from it
+        int allocSize = chunkSize * SimpleMemoryAllocatorImpl.BATCH_SIZE;
+        if (allocSize > fragmentFreeSize) {
+          allocSize = (fragmentFreeSize / chunkSize) * chunkSize;
+        }
+        int newOffset = oldOffset + allocSize;
+        int extraSize = fragmentSize - newOffset;
+        if (extraSize < Chunk.MIN_CHUNK_SIZE) {
+          // include these last few bytes of the fragment in the allocation.
+          // If we don't then they will be lost forever.
+          // The extraSize bytes only apply to the first chunk we allocate (not the batch ones).
+          newOffset += extraSize;
+        } else {
+          extraSize = 0;
+        }
+        if (fragment.allocate(oldOffset, newOffset)) {
+          // We did the allocate!
+          this.lastFragmentAllocation.set(fragIdx);
+          Chunk result = this.ma.chunkFactory.newChunk(fragment.getMemoryAddress()+oldOffset, chunkSize+extraSize, chunkType);
+          allocSize -= chunkSize+extraSize;
+          oldOffset += extraSize;
+          while (allocSize > 0) {
+            oldOffset += chunkSize;
+            // we add the batch ones immediately to the freelist
+            result.readyForFree();
+            free(result.getMemoryAddress(), false);
+            result = this.ma.chunkFactory.newChunk(fragment.getMemoryAddress()+oldOffset, chunkSize, chunkType);
+            allocSize -= chunkSize;
+          }
+
+          if(this.ma.validateMemoryWithFill) {
+            result.validateFill();
+          }
+
+          return result;
+        } else {
+          // TODO OFFHEAP: if batch allocations are disabled should we not call basicAllocate here?
+          // Since we know another thread did a concurrent alloc
+          // that possibly did a batch check the free list again.
+          Chunk result = basicAllocate(chunkSize, false, chunkType);
+          if (result != null) {
+            return result;
+          }
+          retryFragment = true;
+        }
+      }
+    } while (retryFragment);
+    return null; // did not find enough free space in this fragment
+  }
+
+  private int round(int multiple, int value) {
+    return (int) ((((long)value + (multiple-1)) / multiple) * multiple);
+  }
+  private Chunk allocateTiny(int size, boolean useFragments, ChunkType chunkType) {
+    return basicAllocate(getNearestTinyMultiple(size), SimpleMemoryAllocatorImpl.TINY_MULTIPLE, 0, this.tinyFreeLists, useFragments, chunkType);
+  }
+  private Chunk basicAllocate(int idx, int multiple, int offset, AtomicReferenceArray<SyncChunkStack> freeLists, boolean useFragments, ChunkType chunkType) {
+    SyncChunkStack clq = freeLists.get(idx);
+    if (clq != null) {
+      long memAddr = clq.poll();
+      if (memAddr != 0) {
+        Chunk result = this.ma.chunkFactory.newChunk(memAddr, chunkType);
+
+        // Data integrity check.
+        if(this.ma.validateMemoryWithFill) {          
+          result.validateFill();
+        }
+
+        result.readyForAllocation(chunkType);
+        return result;
+      }
+    }
+    if (useFragments) {
+      return allocateFromFragments(((idx+1)*multiple)+offset, chunkType);
+    } else {
+      return null;
+    }
+  }
+  private Chunk allocateHuge(int size, boolean useFragments, ChunkType chunkType) {
+    // sizeHolder is a fake Chunk used to search our sorted hugeChunkSet.
+    Chunk sizeHolder = new FakeChunk(size);
+    NavigableSet<Chunk> ts = this.hugeChunkSet.tailSet(sizeHolder);
+    Chunk result = ts.pollFirst();
+    if (result != null) {
+      if (result.getSize() - (SimpleMemoryAllocatorImpl.HUGE_MULTIPLE - Chunk.OFF_HEAP_HEADER_SIZE) < size) {
+        // close enough to the requested size; just return it.
+
+        // Data integrity check.
+        if(this.ma.validateMemoryWithFill) {          
+          result.validateFill();
+        }
+        if (chunkType.getSrcType() != Chunk.getSrcType(result.getMemoryAddress())) {
+          // The java wrapper class that was cached in the huge chunk list is the wrong type.
+          // So allocate a new one and garbage collect the old one.
+          result = this.ma.chunkFactory.newChunk(result.getMemoryAddress(), chunkType);
+        }
+        result.readyForAllocation(chunkType);
+        return result;
+      } else {
+        this.hugeChunkSet.add(result);
+      }
+    }
+    if (useFragments) {
+      // We round it up to the next multiple of TINY_MULTIPLE to make
+      // sure we always have chunks allocated on an 8 byte boundary.
+      return allocateFromFragments(round(SimpleMemoryAllocatorImpl.TINY_MULTIPLE, size), chunkType);
+    } else {
+      return null;
+    }
+  }
+  
+  /**
+   * Used by the FreeListManager to easily search its
+   * ConcurrentSkipListSet. This is not a real chunk
+   * but only used for searching.
+   */
+  private static class FakeChunk extends Chunk {
+    private final int size;
+    public FakeChunk(int size) {
+      super();
+      this.size = size;
+    }
+    @Override
+    public int getSize() {
+      return this.size;
+    }
+  }
+
+  @SuppressWarnings("synthetic-access")
+  public void free(long addr) {
+    free(addr, true);
+  }
+
+  private void free(long addr, boolean updateStats) {
+    int cSize = Chunk.getSize(addr);
+    if (updateStats) {
+      this.ma.stats.incObjects(-1);
+      this.allocatedSize.addAndGet(-cSize);
+      this.ma.stats.incUsedMemory(-cSize);
+      this.ma.stats.incFreeMemory(cSize);
+      this.ma.notifyListeners();
+    }
+    if (cSize <= SimpleMemoryAllocatorImpl.MAX_TINY) {
+      freeTiny(addr, cSize);
+    } else {
+      freeHuge(addr, cSize);
+    }
+  }
+  private void freeTiny(long addr, int cSize) {
+    basicFree(addr, getNearestTinyMultiple(cSize), this.tinyFreeLists);
+  }
+  private void basicFree(long addr, int idx, AtomicReferenceArray<SyncChunkStack> freeLists) {
+    SyncChunkStack clq = freeLists.get(idx);
+    if (clq != null) {
+      clq.offer(addr);
+    } else {
+      clq = new SyncChunkStack();
+      clq.offer(addr);
+      if (!freeLists.compareAndSet(idx, null, clq)) {
+        clq = freeLists.get(idx);
+        clq.offer(addr);
+      }
+    }
+
+  }
+  private void freeHuge(long addr, int cSize) {
+    this.hugeChunkSet.add(this.ma.chunkFactory.newChunk(addr)); // TODO make this a collection of longs
+  }
+
+  List<MemoryBlock> getOrderedBlocks() {
+    final List<MemoryBlock> value = new ArrayList<MemoryBlock>();
+    addBlocksFromFragments(this.fragmentList, value); // unused fragments
+    addBlocksFromChunks(getLiveChunks(), value); // used chunks
+    addBlocksFromChunks(this.hugeChunkSet, value);    // huge free chunks
+    addMemoryBlocks(getTinyFreeBlocks(), value);           // tiny free chunks
+    Collections.sort(value, 
+        new Comparator<MemoryBlock>() {
+          @Override
+          public int compare(MemoryBlock o1, MemoryBlock o2) {
+            return Long.valueOf(o1.getMemoryAddress()).compareTo(o2.getMemoryAddress());
+          }
+    });
+    return value;
+  }
+  private void addBlocksFromFragments(Collection<Fragment> src, List<MemoryBlock> dest) {
+    for (MemoryBlock block : src) {
+      dest.add(new MemoryBlockNode(this.ma, block));
+    }
+  }
+  
+  private void addBlocksFromChunks(Collection<Chunk> src, List<MemoryBlock> dest) {
+    for (Chunk chunk : src) {
+      dest.add(new MemoryBlockNode(this.ma, chunk));
+    }
+  }
+  
+  private void addMemoryBlocks(Collection<MemoryBlock> src, List<MemoryBlock> dest) {
+    for (MemoryBlock block : src) {
+      dest.add(new MemoryBlockNode(this.ma, block));
+    }
+  }
+  
+  private List<MemoryBlock> getTinyFreeBlocks() {
+    final List<MemoryBlock> value = new ArrayList<MemoryBlock>();
+    final SimpleMemoryAllocatorImpl sma = this.ma;
+    for (int i = 0; i < this.tinyFreeLists.length(); i++) {
+      if (this.tinyFreeLists.get(i) == null) continue;
+      long addr = this.tinyFreeLists.get(i).getTopAddress();
+      while (addr != 0L) {
+        value.add(new MemoryBlockNode(sma, new TinyMemoryBlock(addr, i)));
+        addr = Chunk.getNext(addr);
+      }
+    }
+    return value;
+  }
+  List<MemoryBlock> getAllocatedBlocks() {
+    final List<MemoryBlock> value = new ArrayList<MemoryBlock>();
+    addBlocksFromChunks(getLiveChunks(), value); // used chunks
+    Collections.sort(value, 
+        new Comparator<MemoryBlock>() {
+          @Override
+          public int compare(MemoryBlock o1, MemoryBlock o2) {
+            return Long.valueOf(o1.getMemoryAddress()).compareTo(o2.getMemoryAddress());
+          }
+    });
+    return value;
+  }
+  /**
+   * Used to represent an address from a tiny free list as a MemoryBlock
+   */
+  private static final class TinyMemoryBlock implements MemoryBlock {
+    private final long address;
+    private final int freeListId;
+
+    private TinyMemoryBlock(long address, int freeListId) {
+      this.address = address;
+      this.freeListId = freeListId;
+    }
+
+    @Override
+    public State getState() {
+      return State.DEALLOCATED;
+    }
+
+    @Override
+    public long getMemoryAddress() {
+      return address;
+    }
+
+    @Override
+    public int getBlockSize() {
+      return Chunk.getSize(address);
+    }
+
+    @Override
+    public MemoryBlock getNextBlock() {
+      throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int getSlabId() {
+      throw new UnsupportedOperationException();
+    }
+
+    @Override
+    public int getFreeListId() {
+      return freeListId;
+    }
+
+    @Override
+    public int getRefCount() {
+      return 0;
+    }
+
+    @Override
+    public String getDataType() {
+      return "N/A";
+    }
+
+    @Override
+    public boolean isSerialized() {
+      return false;
+    }
+
+    @Override
+    public boolean isCompressed() {
+      return false;
+    }
+
+    @Override
+    public Object getDataValue() {
+      return null;
+    }
+
+    @Override
+    public ChunkType getChunkType() {
+      return null;
+    }
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java
new file mode 100644
index 0000000..3167613
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunk.java
@@ -0,0 +1,55 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+
+/**
+ * A chunk that stores a GemFire object.
+ * Currently the object stored in this chunk
+ * is always an entry value of a Region.
+ */
+public class GemFireChunk extends Chunk {
+  public static final ChunkType TYPE = new ChunkType() {
+    @Override
+    public int getSrcType() {
+      return Chunk.SRC_TYPE_GFE;
+    }
+    @Override
+    public Chunk newChunk(long memoryAddress) {
+      return new GemFireChunk(memoryAddress);
+    }
+    @Override
+    public Chunk newChunk(long memoryAddress, int chunkSize) {
+      return new GemFireChunk(memoryAddress, chunkSize);
+    }
+  };
+  public GemFireChunk(long memoryAddress, int chunkSize) {
+    super(memoryAddress, chunkSize, TYPE);
+  }
+
+  public GemFireChunk(long memoryAddress) {
+    super(memoryAddress);
+    // chunkType may be set by caller when it calls readyForAllocation
+  }
+  public GemFireChunk(GemFireChunk chunk) {
+    super(chunk);
+  }
+  @Override
+  public Chunk slice(int position, int limit) {
+    return new GemFireChunkSlice(this, position, limit);
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkFactory.java
new file mode 100644
index 0000000..c3f3bcc
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkFactory.java
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+
+/**
+ * A ChunkFactory that produces chunks of type GemFireChunk.
+ */
+public class GemFireChunkFactory implements ChunkFactory {
+  @Override
+  public Chunk newChunk(long address, int chunkSize, ChunkType chunkType) {
+    assert chunkType.equals(GemFireChunk.TYPE);
+    return new GemFireChunk(address,chunkSize);
+  }
+
+  @Override
+  public Chunk newChunk(long address) {
+    return new GemFireChunk(address);
+  }
+
+  @Override
+  public Chunk newChunk(long address, ChunkType chunkType) {
+    assert chunkType.equals(GemFireChunk.TYPE);
+    return new GemFireChunk(address);
+  }
+
+  @Override
+  public ChunkType getChunkTypeForAddress(long address) {
+    assert Chunk.getSrcType(address) == Chunk.SRC_TYPE_GFE;
+    return GemFireChunk.TYPE;
+  }
+
+  @Override
+  public ChunkType getChunkTypeForRawBits(int bits) {
+    assert Chunk.getSrcTypeFromRawBits(bits) == Chunk.SRC_TYPE_GFE;
+    return GemFireChunk.TYPE;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkSlice.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkSlice.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkSlice.java
new file mode 100644
index 0000000..0c27aa3
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/GemFireChunkSlice.java
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+/**
+ * Represents a slice of a GemFireChunk.
+ * A slice is a subsequence of the bytes stored in a GemFireChunk.
+ */
+public class GemFireChunkSlice extends GemFireChunk {
+  private final int offset;
+  private final int capacity;
+  public GemFireChunkSlice(GemFireChunk gemFireChunk, int position, int limit) {
+    super(gemFireChunk);
+    this.offset = gemFireChunk.getBaseDataOffset() + position;
+    this.capacity = limit - position;
+  }
+  @Override
+  public int getDataSize() {
+    return this.capacity;
+  }
+  
+  @Override
+  protected long getBaseDataAddress() {
+    return super.getBaseDataAddress() + this.offset;
+  }
+  @Override
+  protected int getBaseDataOffset() {
+    return this.offset;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java
new file mode 100644
index 0000000..613b12a
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/LifecycleListener.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+/**
+ * Used by tests to get notifications about the lifecycle of a 
+ * SimpleMemoryAllocatorImpl.
+ * 
+ * @author Kirk Lund
+ */
+public interface LifecycleListener {
+
+  /**
+   * Callback is invoked after creating a new SimpleMemoryAllocatorImpl. 
+   * 
+   * Create occurs during the first initialization of an 
+   * InternalDistributedSystem within the JVM.
+   * 
+   * @param allocator the instance that has just been created
+   */
+  public void afterCreate(SimpleMemoryAllocatorImpl allocator);
+  /**
+   * Callback is invoked after reopening an existing SimpleMemoryAllocatorImpl 
+   * for reuse. 
+   * 
+   * Reuse occurs during any intialization of an 
+   * InternalDistributedSystem after the first one was connected and then
+   * disconnected within the JVM.
+   * 
+   * @param allocator the instance that has just been reopened for reuse
+   */
+  public void afterReuse(SimpleMemoryAllocatorImpl allocator);
+  /**
+   * Callback is invoked before closing the SimpleMemoryAllocatorImpl
+   * 
+   * Close occurs after the InternalDistributedSystem and DistributionManager 
+   * have completely disconnected. 
+   * 
+   * @param allocator the instance that is about to be closed
+   */
+  public void beforeClose(SimpleMemoryAllocatorImpl allocator);
+  
+  static  void invokeBeforeClose(SimpleMemoryAllocatorImpl allocator) {
+    for (Iterator<LifecycleListener> iter = lifecycleListeners.iterator(); iter.hasNext();) {
+      LifecycleListener listener = iter.next();
+      listener.beforeClose(allocator);
+    }
+  }
+  static void invokeAfterReuse(SimpleMemoryAllocatorImpl allocator) {
+    for (Iterator<LifecycleListener> iter = lifecycleListeners.iterator(); iter.hasNext();) {
+      LifecycleListener listener = iter.next();
+      listener.afterReuse(allocator);
+    }
+  }
+  static void invokeAfterCreate(SimpleMemoryAllocatorImpl allocator) {
+    for (Iterator<LifecycleListener> iter = lifecycleListeners.iterator(); iter.hasNext();) {
+      LifecycleListener listener = iter.next();
+      listener.afterCreate(allocator);
+    }
+  }
+  /**
+   * Removes a LifecycleListener. Does nothing if the instance has not been added.
+   * @param listener the instance to remove
+   */
+  public static void removeLifecycleListener(LifecycleListener listener) {
+    lifecycleListeners.remove(listener);
+  }
+  /**
+   * Adds a LifecycleListener.
+   * @param listener the instance to add
+   */
+  public static void addLifecycleListener(LifecycleListener listener) {
+    LifecycleListener.lifecycleListeners.add(listener);
+  }
+
+  /**
+   * Following should be private but java 8 does not support that.
+   */
+  static final List<LifecycleListener> lifecycleListeners = new CopyOnWriteArrayList<LifecycleListener>();
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
index bf38089..231ff3a 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryAllocator.java
@@ -17,7 +17,6 @@
 package com.gemstone.gemfire.internal.offheap;
 
 import com.gemstone.gemfire.compression.Compressor;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ChunkType;
 
 /**
  * Basic contract for a heap that manages off heap memory. Any MemoryChunks allocated from a heap

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlock.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlock.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlock.java
index 05cc796..3ad9283 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlock.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlock.java
@@ -16,7 +16,6 @@
  */
 package com.gemstone.gemfire.internal.offheap;
 
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ChunkType;
 
 /**
  * Basic size and usage information about an off-heap memory block under

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
new file mode 100644
index 0000000..3f5f4dc
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/MemoryBlockNode.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.io.IOException;
+import java.util.Arrays;
+
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.CacheClosedException;
+import com.gemstone.gemfire.internal.offheap.MemoryBlock.State;
+
+/**
+ * Basic implementation of MemoryBlock for test validation only.
+ */
+public class MemoryBlockNode implements MemoryBlock {
+  private final SimpleMemoryAllocatorImpl ma;
+  private final MemoryBlock block;
+  MemoryBlockNode(SimpleMemoryAllocatorImpl ma, MemoryBlock block) {
+    this.ma = ma;
+    this.block = block;
+  }
+  @Override
+  public State getState() {
+    return this.block.getState();
+  }
+  @Override
+  public long getMemoryAddress() {
+    return this.block.getMemoryAddress();
+  }
+  @Override
+  public int getBlockSize() {
+    return this.block.getBlockSize();
+  }
+  @Override
+  public MemoryBlock getNextBlock() {
+    return this.ma.getBlockAfter(this);
+  }
+  public int getSlabId() {
+    return this.ma.findSlab(getMemoryAddress());
+  }
+  @Override
+  public int getFreeListId() {
+    return this.block.getFreeListId();
+  }
+  public int getRefCount() {
+    return this.block.getRefCount(); // delegate to fix GEODE-489
+  }
+  public String getDataType() {
+    if (this.block.getDataType() != null) {
+      return this.block.getDataType();
+    }
+    if (!isSerialized()) {
+      // byte array
+      if (isCompressed()) {
+        return "compressed byte[" + ((Chunk)this.block).getDataSize() + "]";
+      } else {
+        return "byte[" + ((Chunk)this.block).getDataSize() + "]";
+      }
+    } else if (isCompressed()) {
+      return "compressed object of size " + ((Chunk)this.block).getDataSize();
+    }
+    //Object obj = EntryEventImpl.deserialize(((Chunk)this.block).getRawBytes());
+    byte[] bytes = ((Chunk)this.block).getRawBytes();
+    return DataType.getDataType(bytes);
+  }
+  public boolean isSerialized() {
+    return this.block.isSerialized();
+  }
+  public boolean isCompressed() {
+    return this.block.isCompressed();
+  }
+  @Override
+  public Object getDataValue() {
+    String dataType = getDataType();
+    if (dataType == null || dataType.equals("N/A")) {
+      return null;
+    } else if (isCompressed()) {
+      return ((Chunk)this.block).getCompressedBytes();
+    } else if (!isSerialized()) {
+      // byte array
+      //return "byte[" + ((Chunk)this.block).getDataSize() + "]";
+      return ((Chunk)this.block).getRawBytes();
+    } else {
+      try {
+        byte[] bytes = ((Chunk)this.block).getRawBytes();
+        return DataSerializer.readObject(DataType.getDataInput(bytes));
+      } catch (IOException e) {
+        e.printStackTrace();
+        return "IOException:" + e.getMessage();
+      } catch (ClassNotFoundException e) {
+        e.printStackTrace();
+        return "ClassNotFoundException:" + e.getMessage();
+      } catch (CacheClosedException e) {
+        e.printStackTrace();
+        return "CacheClosedException:" + e.getMessage();
+      }
+    }
+  }
+  @Override
+  public String toString() {
+    final StringBuilder sb = new StringBuilder(MemoryBlock.class.getSimpleName());
+    sb.append("{");
+    sb.append("MemoryAddress=").append(getMemoryAddress());
+    sb.append(", State=").append(getState());
+    sb.append(", BlockSize=").append(getBlockSize());
+    sb.append(", SlabId=").append(getSlabId());
+    sb.append(", FreeListId=");
+    if (getState() == State.UNUSED || getState() == State.ALLOCATED) {
+      sb.append("NONE");
+    } else if (getFreeListId() == -1) {
+      sb.append("HUGE");
+    } else {
+      sb.append(getFreeListId());
+    }
+    sb.append(", RefCount=").append(getRefCount());
+    ChunkType ct = this.getChunkType();
+    if (ct != null) {
+      sb.append(", " + ct);
+    }
+    sb.append(", isSerialized=").append(isSerialized());
+    sb.append(", isCompressed=").append(isCompressed());
+    sb.append(", DataType=").append(getDataType());
+    {
+      sb.append(", DataValue=");
+      Object dataValue = getDataValue();
+      if (dataValue instanceof byte[]) {
+        byte[] ba = (byte[]) dataValue;
+        if (ba.length < 1024) {
+          sb.append(Arrays.toString(ba));
+        } else {
+          sb.append("<byte array of length " + ba.length + ">");
+        }
+      } else {
+        sb.append(dataValue);
+      }
+    }
+    sb.append("}");
+    return sb.toString();
+  }
+  @Override
+  public ChunkType getChunkType() {
+    return this.block.getChunkType();
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
index 1bc2cdf..143fb25 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapCachedDeserializable.java
@@ -30,7 +30,6 @@ import com.gemstone.gemfire.internal.cache.CachedDeserializableFactory;
 import com.gemstone.gemfire.internal.cache.EntryBits;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.lang.StringUtils;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
index b5677cd..4845931 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapHelper.java
@@ -106,9 +106,9 @@ public class OffHeapHelper {
    */
   public static boolean releaseWithNoTracking(@Released Object o) {
     if (o instanceof MemoryChunkWithRefCount) {
-      SimpleMemoryAllocatorImpl.skipRefCountTracking();
+      ReferenceCountHelper.skipRefCountTracking();
       ((MemoryChunkWithRefCount) o).release();
-      SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+      ReferenceCountHelper.unskipRefCountTracking();
       return true;
     } else {
       return false;
@@ -121,9 +121,9 @@ public class OffHeapHelper {
    */
   public static boolean releaseAndTrackOwner(@Released final Object o, final Object owner) {
     if (o instanceof MemoryChunkWithRefCount) {
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(owner);
+      ReferenceCountHelper.setReferenceCountOwner(owner);
       ((MemoryChunkWithRefCount) o).release();
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+      ReferenceCountHelper.setReferenceCountOwner(null);
       return true;
     } else {
       return false;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
index 4fcacbf..d1a81f0 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/OffHeapRegionEntryHelper.java
@@ -24,8 +24,6 @@ import com.gemstone.gemfire.internal.cache.EntryEventImpl;
 import com.gemstone.gemfire.internal.cache.OffHeapRegionEntry;
 import com.gemstone.gemfire.internal.cache.RegionEntryContext;
 import com.gemstone.gemfire.internal.cache.Token;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.DataAsAddress;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
@@ -371,9 +369,9 @@ public class OffHeapRegionEntryHelper {
     do {
       oldAddress = re.getAddress();
     } while (!re.setAddress(oldAddress, newAddress));
-    SimpleMemoryAllocatorImpl.setReferenceCountOwner(re);
+    ReferenceCountHelper.setReferenceCountOwner(re);
     releaseAddress(oldAddress);
-    SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+    ReferenceCountHelper.setReferenceCountOwner(null);
   }
  
   public static Token getValueAsToken(@Unretained OffHeapRegionEntry re) {
@@ -422,7 +420,7 @@ public class OffHeapRegionEntryHelper {
         long addr2 = re.getAddress();
         retryCount++;
         if (retryCount > 100) {
-          throw new IllegalStateException("retain failed addr=" + addr + " addr2=" + addr + " 100 times" + " history=" + SimpleMemoryAllocatorImpl.getFreeRefCountInfo(addr));
+          throw new IllegalStateException("retain failed addr=" + addr + " addr2=" + addr + " 100 times" + " history=" + ReferenceCountHelper.getFreeRefCountInfo(addr));
         }
         addr = addr2;
         // Since retain returned false our region entry should have a different

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java
new file mode 100644
index 0000000..56cab97
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/RefCountChangeInfo.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import com.gemstone.gemfire.internal.shared.StringPrintWriter;
+
+@SuppressWarnings("serial")
+/**
+ * Used by SimpleMemoryAllocatorImpl to debug off-heap memory leaks.
+ */
+public class RefCountChangeInfo extends Throwable {
+  private final String threadName;
+  private final int rc;
+  private final Object owner;
+  private int dupCount;
+  
+  public RefCountChangeInfo(boolean decRefCount, int rc, Object owner) {
+    super(decRefCount ? "FREE" : "USED");
+    this.threadName = Thread.currentThread().getName();
+    this.rc = rc;
+    this.owner = owner;
+  }
+  
+  public Object getOwner() {
+    return this.owner;
+  }
+  
+  public int getDupCount() {
+    return this.dupCount;
+  }
+  public void decDupCount() {
+    this.dupCount--;
+  }
+
+  @Override
+  public String toString() {
+    ByteArrayOutputStream baos = new ByteArrayOutputStream(64*1024);
+    PrintStream ps = new PrintStream(baos);
+    ps.print(this.getMessage());
+    ps.print(" rc=");
+    ps.print(this.rc);
+    if (this.dupCount > 0) {
+      ps.print(" dupCount=");
+      ps.print(this.dupCount);
+    }
+    ps.print(" by ");
+    ps.print(this.threadName);
+    if (this.owner != null) {
+      ps.print(" owner=");
+      ps.print(this.owner.getClass().getName());
+      ps.print("@");
+      ps.print(System.identityHashCode(this.owner));
+    }
+    ps.println(": ");
+    StackTraceElement[] trace = getStackTrace();
+    // skip the initial elements from SimpleMemoryAllocatorImpl
+    int skip=0;
+    for (int i=0; i < trace.length; i++) {
+      if (!trace[i].getClassName().contains("SimpleMemoryAllocatorImpl")) {
+        skip = i;
+        break;
+      }
+    }
+    for (int i=skip; i < trace.length; i++) {
+      ps.println("\tat " + trace[i]);
+    }
+    ps.flush();
+    return baos.toString();
+  }
+  
+  public boolean isDuplicate(RefCountChangeInfo other) {
+    if (!getMessage().equals(other.getMessage())) return false;
+    String trace = getStackTraceString();
+    String traceOther = other.getStackTraceString();
+    if (trace.hashCode() != traceOther.hashCode()) return false;
+    if (trace.equals(traceOther)) {
+      this.dupCount++;
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  private String stackTraceString;
+  private String getStackTraceString() {
+    String result = this.stackTraceString;
+    if (result == null) {
+      StringPrintWriter spr = new StringPrintWriter();
+      printStackTrace(spr);
+      result = spr.getBuilder().toString();
+      this.stackTraceString = result;
+    }
+    return result;
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
new file mode 100644
index 0000000..85a0505
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ReferenceCountHelper.java
@@ -0,0 +1,235 @@
+package com.gemstone.gemfire.internal.offheap;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ConcurrentMap;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+
+/**
+ * This class provides static methods to help
+ * debug off-heap reference count problems.
+ * To enable reference count tracking set: -Dgemfire.trackOffHeapRefCounts=true.
+ * To enable free operation tracking set: -Dgemfire.trackOffHeapFreedRefCounts=true.
+ */
+public class ReferenceCountHelper {
+  private ReferenceCountHelper() {
+    // no instances allowed
+  }
+  final static private boolean trackRefCounts = Boolean.getBoolean("gemfire.trackOffHeapRefCounts");
+  final static private boolean trackFreedRefCounts = Boolean.getBoolean("gemfire.trackOffHeapFreedRefCounts");
+  final static private ConcurrentMap<Long, List<RefCountChangeInfo>> stacktraces;
+  final static private ConcurrentMap<Long, List<RefCountChangeInfo>> freedStacktraces;
+  final static private ThreadLocal<Object> refCountOwner;
+  final static private ThreadLocal<AtomicInteger> refCountReenterCount;
+  final static private Object SKIP_REF_COUNT_TRACKING = new Object();
+  final static private List<RefCountChangeInfo> LOCKED = Collections.emptyList();
+
+  static {
+    if (trackRefCounts) {
+      stacktraces = new ConcurrentHashMap<Long, List<RefCountChangeInfo>>();
+      if (trackFreedRefCounts) {
+        freedStacktraces = new ConcurrentHashMap<Long, List<RefCountChangeInfo>>();
+      } else {
+        freedStacktraces = null;
+      }
+      refCountOwner = new ThreadLocal<Object>();
+      refCountReenterCount = new ThreadLocal<AtomicInteger>();
+    } else {
+      stacktraces = null;
+      freedStacktraces = null;
+      refCountOwner = null;
+      refCountReenterCount = null;
+    }
+  }
+  
+  /**
+   * Returns true if reference count tracking is enabled.
+   */
+  public static boolean trackReferenceCounts() {
+    return trackRefCounts;
+  }
+
+  /**
+   * Returns true if free operation tracking is enabled.
+   */
+  public static boolean trackFreedReferenceCounts() {
+    return trackFreedRefCounts;
+  }
+
+  /**
+   * Optional call to tell the tracker the logical "owner"
+   * of the reference count. For example you could set
+   * the particular EntryEventImpl instance that incremented
+   * the reference count and is responsible for decrementing it.
+   * Calling this method is a noop if !trackReferenceCounts.
+   */
+  public static void setReferenceCountOwner(Object owner) {
+    if (trackReferenceCounts()) {
+      if (refCountOwner.get() != null) {
+        AtomicInteger ai = refCountReenterCount.get();
+        if (owner != null) {
+          ai.incrementAndGet();
+        } else {
+          if (ai.decrementAndGet() <= 0) {
+            refCountOwner.set(null);
+            ai.set(0);
+          }
+        }
+      } else {
+        AtomicInteger ai = refCountReenterCount.get();
+        if (ai == null) {
+          ai = new AtomicInteger(0);
+          refCountReenterCount.set(ai);
+        }
+        if (owner != null) {
+          ai.set(1);
+        } else {
+          ai.set(0);
+        }
+        refCountOwner.set(owner);
+      }
+    }
+  }
+
+  /**
+   * Create, set, and return a generic reference count owner object.
+   * Calling this method is a noop and returns null if !trackReferenceCounts.
+   */
+  public static Object createReferenceCountOwner() {
+    Object result = null;
+    if (trackReferenceCounts()) {
+      result = new Object();
+      setReferenceCountOwner(result);
+    }
+    return result;
+  }
+
+  /**
+   * Call this method before incrementing a reference count
+   * if you know that tracking is not needed because you know
+   * that the allocate and free will always be done in the same
+   * code block.
+   * Callers of this method must also call unskipRefCountTracking
+   * after the allocation or free is done.
+   */
+  public static void skipRefCountTracking() {
+    setReferenceCountOwner(SKIP_REF_COUNT_TRACKING);
+  }
+
+  /**
+   * Call this method to undo a call to skipRefCountTracking.
+   */
+  public static void unskipRefCountTracking() {
+    setReferenceCountOwner(null);
+  }
+
+  /**
+   * Returns a list of any reference count tracking information for
+   * the given Chunk address.
+   */
+  public static List<RefCountChangeInfo> getRefCountInfo(long address) {
+    if (!trackReferenceCounts()) return null;
+    List<RefCountChangeInfo> result = stacktraces.get(address);
+    while (result != null && !stacktraces.replace(address, result, LOCKED)) {
+      result = stacktraces.get(address);
+    }
+    return result;
+  }
+
+  /**
+   * Returns a list of any free operation tracking information.
+   * This is used to describe who did the previous free(s) when an extra one
+   * ends up being done and fails.
+   */
+  public static List<RefCountChangeInfo> getFreeRefCountInfo(long address) {
+    if (!trackReferenceCounts() || !trackFreedReferenceCounts()) return null;
+    return freedStacktraces.get(address);
+  }
+
+  /**
+   * Used internally to report that a reference count has changed.
+   */
+  static void refCountChanged(Long address, boolean decRefCount, int rc) {
+    final Object owner = refCountOwner.get();
+    if (owner == SKIP_REF_COUNT_TRACKING) {
+      return;
+    }
+    List<RefCountChangeInfo> list = stacktraces.get(address);
+    if (list == null) {
+      List<RefCountChangeInfo> newList = new ArrayList<RefCountChangeInfo>();
+      List<RefCountChangeInfo> old = stacktraces.putIfAbsent(address, newList);
+      if (old == null) {
+        list = newList;
+      } else {
+        list = old;
+      }
+    }
+    if (decRefCount) {
+      if (owner != null) {
+        synchronized (list) {
+          for (int i=0; i < list.size(); i++) {
+            RefCountChangeInfo info = list.get(i);
+            if (owner instanceof RegionEntry) {
+              // use identity comparison on region entries since sqlf does some wierd stuff in the equals method
+              if (owner == info.getOwner()) {
+                if (info.getDupCount() > 0) {
+                  info.decDupCount();
+                } else {
+                  list.remove(i);
+                }
+                return;
+              }
+            } else if (owner.equals(info.getOwner())) {
+              if (info.getDupCount() > 0) {
+                info.decDupCount();
+              } else {
+                list.remove(i);
+              }
+              return;
+            }
+          }
+        }
+      }
+    }
+    if (list == LOCKED) {
+      SimpleMemoryAllocatorImpl.debugLog("refCount " + (decRefCount ? "deced" : "inced") + " after orphan detected for @" + Long.toHexString(address), true);
+      return;
+    }
+    RefCountChangeInfo info = new RefCountChangeInfo(decRefCount, rc, owner);
+    synchronized (list) {
+      //      if (list.size() == 16) {
+      //        debugLog("dumping @" + Long.toHexString(address) + " history=" + list, false);
+      //        list.clear();
+      //      }
+      for (RefCountChangeInfo e: list) {
+        if (e.isDuplicate(info)) {
+          // No need to add it
+          return;
+        }
+      }
+      list.add(info);
+    }
+  }
+
+  /**
+   * Called internally when free operations are tracked to record
+   * that a free has happened of the given address.
+   */
+  static void freeRefCountInfo(Long address) {
+    if (!trackReferenceCounts()) return;
+    List<RefCountChangeInfo> freedInfo = stacktraces.remove(address);
+    if (freedInfo == LOCKED) {
+      SimpleMemoryAllocatorImpl.debugLog("freed after orphan detected for @" + Long.toHexString(address), true);
+    } else if (trackFreedReferenceCounts()) {
+      if (freedInfo != null) {
+        freedStacktraces.put(address, freedInfo);
+      } else {
+        freedStacktraces.remove(address);
+      }
+    }
+  }
+}


[46/50] [abbrv] incubator-geode git commit: Adding additional unit tests for GMSHealthMonitor and GMSJoinLeave Moved GMSHealthMonitorJUnitTest to package level of GMSHealthMonitor Minor refactoring to allow testing

Posted by je...@apache.org.
Adding additional unit tests for GMSHealthMonitor and GMSJoinLeave
Moved GMSHealthMonitorJUnitTest to package level of GMSHealthMonitor
Minor refactoring to allow testing


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

Branch: refs/heads/feature/GEODE-17
Commit: 3259c0238a97413268297b663219d72bf8b130c9
Parents: e0bf685
Author: Jason Huynh <hu...@gmail.com>
Authored: Wed Dec 2 15:11:40 2015 -0800
Committer: Jason Huynh <hu...@gmail.com>
Committed: Fri Dec 4 10:40:52 2015 -0800

----------------------------------------------------------------------
 .../membership/InternalDistributedMember.java   |  16 +-
 .../membership/gms/fd/GMSHealthMonitor.java     |  60 +-
 .../membership/gms/membership/GMSJoinLeave.java |   8 +
 .../gms/fd/GMSHealthMonitorJUnitTest.java       | 576 +++++++++++++++++++
 .../gms/membership/GMSJoinLeaveJUnitTest.java   |  31 +-
 .../fd/GMSHealthMonitorJUnitTest.java           | 461 ---------------
 6 files changed, 666 insertions(+), 486 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3259c023/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 10478b7..b112b92 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
@@ -292,7 +292,21 @@ public final class InternalDistributedMember
    * @throws UnknownHostException if the given hostname cannot be resolved
    */
   public InternalDistributedMember(String i, int p, Version version) throws UnknownHostException {
-    netMbr = MemberFactory.newNetMember(i, p);
+    this (i, p, version, MemberFactory.newNetMember(i, p));
+  }
+  
+  /**
+   * Create a InternalDistributedMember referring to the current host (as defined by the given
+   * string).<p>
+   *
+   * <b>
+   * THIS METHOD IS FOR TESTING ONLY.  DO NOT USE IT TO CREATE IDs FOR
+   * USE IN THE PRODUCT.  IT DOES NOT PROPERLY INITIALIZE ATTRIBUTES NEEDED
+   * FOR P2P FUNCTIONALITY.
+   * </b>
+   **/
+  public InternalDistributedMember(String i, int p, Version version, NetMember netMember) throws UnknownHostException {
+    netMbr = netMember;
     defaultToCurrentHost();
     this.vmKind = DistributionManager.NORMAL_DM_TYPE;
     this.versionObj = version;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3259c023/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index fcda1a0..cc64f9b 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -56,6 +56,7 @@ import org.jgroups.util.UUID;
 
 import com.gemstone.gemfire.CancelException;
 import com.gemstone.gemfire.GemFireConfigException;
+import com.gemstone.gemfire.SystemConnectException;
 import com.gemstone.gemfire.distributed.DistributedMember;
 import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
 import com.gemstone.gemfire.distributed.internal.DistributionMessage;
@@ -173,9 +174,8 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   
   // For TCP check
   private ExecutorService serverSocketExecutor;
-  private static final int OK = 0x7B;
-  private static final int ERROR = 0x00;  
-  private InetAddress socketAddress;
+  static final int OK = 0x7B;
+  static final int ERROR = 0x00;  
   private volatile int socketPort;
   private volatile ServerSocket serverSocket;
 
@@ -491,11 +491,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
         InputStream in = clientSocket.getInputStream();
         DataOutputStream out = new DataOutputStream(clientSocket.getOutputStream());
         GMSMember gmbr = (GMSMember) suspectMember.getNetMember();
-        out.writeShort(Version.CURRENT_ORDINAL);
-        out.writeInt(gmbr.getVmViewId());
-        out.writeLong(gmbr.getUuidLSBs());
-        out.writeLong(gmbr.getUuidMSBs());
-        out.flush();
+        writeMemberToStream(gmbr, out);
         clientSocket.shutdownOutput();
         logger.debug("Connected - reading response", suspectMember);
         int b = in.read();
@@ -531,6 +527,14 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
     return false;
   }
   
+  void writeMemberToStream(GMSMember gmbr, DataOutputStream out) throws IOException {
+    out.writeShort(Version.CURRENT_ORDINAL);
+    out.writeInt(gmbr.getVmViewId());
+    out.writeLong(gmbr.getUuidLSBs());
+    out.writeLong(gmbr.getUuidMSBs());
+    out.flush();
+  }
+  
   /*
    * (non-Javadoc)
    * 
@@ -610,32 +614,37 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
 
   }
 
-  /**
-   * start the thread that listens for tcp/ip connections and responds
-   * to connection attempts
-   */
-  private void startTcpServer() {
-    // allocate a socket here so there are no race conditions between knowing the FD
-    // socket port and joining the system
-    socketAddress = localAddress.getInetAddress();
-    int[] portRange = services.getConfig().getMembershipPortRange();            
+  ServerSocket createServerSocket(InetAddress socketAddress, int[] portRange) {
+    ServerSocket serverSocket = null;
     try {
       serverSocket = SocketCreator.getDefaultInstance().createServerSocketUsingPortRange(socketAddress, 50/*backlog*/, true/*isBindAddress*/, false/*useNIO*/, 65536/*tcpBufferSize*/, portRange);
       socketPort = serverSocket.getLocalPort();
     } catch (IOException e) {
       throw new GemFireConfigException("Unable to allocate a failure detection port in the membership-port range", e);
+    } catch (SystemConnectException e) {
+      throw new GemFireConfigException("Unable to allocate a failure detection port in the membership-port range", e);
     }
+    return serverSocket;
+  }
+  
+  /**
+   * start the thread that listens for tcp/ip connections and responds
+   * to connection attempts
+   */
+  private void startTcpServer(ServerSocket ssocket) {
+    // allocate a socket here so there are no race conditions between knowing the FD
+    // socket port and joining the system
 
     serverSocketExecutor.execute(new Runnable() {
       @Override
       public void run() {
-        logger.info("Started failure detection server thread on {}:{}.", socketAddress, socketPort);
+        logger.info("Started failure detection server thread on {}:{}.", ssocket.getInetAddress(), socketPort);
         Socket socket = null;
         try {
           while (!services.getCancelCriterion().isCancelInProgress() 
               && !GMSHealthMonitor.this.isStopping) {
             try {
-              socket = serverSocket.accept();
+              socket = ssocket.accept();
               if (GMSHealthMonitor.this.playingDead) {
                 continue;
               }
@@ -658,9 +667,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
           logger.info("GMSHealthMonitor server thread exiting");
         } finally {
           // close the server socket
-          if (serverSocket != null && !serverSocket.isClosed()) {
+          if (ssocket != null && !ssocket.isClosed()) {
             try {
-              serverSocket.close();
+              ssocket.close();
               serverSocket = null;
               logger.info("GMSHealthMonitor server socket closed.");
             } catch (IOException e) {
@@ -841,8 +850,9 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
 
   @Override
   public void started() {
-    this.localAddress = services.getMessenger().getMemberID();
-    startTcpServer();
+    setLocalAddress( services.getMessenger().getMemberID());
+    serverSocket = createServerSocket(localAddress.getInetAddress(), services.getConfig().getMembershipPortRange());
+    startTcpServer(serverSocket);
     startHeartbeatThread();
   }
 
@@ -941,6 +951,10 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
   public void emergencyClose() {
     stopServices();
   }
+  
+  void setLocalAddress(InternalDistributedMember idm) {
+    this.localAddress = idm;
+  }
 
   @Override
   public void processMessage(DistributionMessage m) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3259c023/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
index 2986238..84a0bd7 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeave.java
@@ -1058,6 +1058,14 @@ public class GMSJoinLeave implements JoinLeave, MessageHandler {
       joinResponse.notify();
     }
   }
+  
+  /**
+   * for testing, do not use in any other case as it is not thread safe
+   * @param req
+   */
+  JoinResponseMessage[] getJoinResponseMessage() {
+    return joinResponse;
+  }
 
   private void processFindCoordinatorRequest(FindCoordinatorRequest req) {
     FindCoordinatorResponse resp;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3259c023/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
new file mode 100644
index 0000000..86205b9
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java
@@ -0,0 +1,576 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal.membership.gms.fd;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Matchers.any;
+import static org.mockito.Matchers.isA;
+import static org.mockito.Mockito.atLeastOnce;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.InetAddress;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import org.jgroups.util.UUID;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.distributed.internal.membership.NetView;
+import com.gemstone.gemfire.distributed.internal.membership.gms.GMSMember;
+import com.gemstone.gemfire.distributed.internal.membership.gms.ServiceConfig;
+import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
+import com.gemstone.gemfire.distributed.internal.membership.gms.Services.Stopper;
+import com.gemstone.gemfire.distributed.internal.membership.gms.fd.GMSHealthMonitor.ClientSocketHandler;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.JoinLeave;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Manager;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatMessage;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatRequestMessage;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectMembersMessage;
+import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectRequest;
+import com.gemstone.gemfire.internal.SocketCreator;
+import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class GMSHealthMonitorJUnitTest {
+
+  private Services services;
+  private ServiceConfig mockConfig;
+  private DistributionConfig mockDistConfig;
+  private List<InternalDistributedMember> mockMembers;
+  private Messenger messenger;
+  private JoinLeave joinLeave;
+  private GMSHealthMonitor gmsHealthMonitor;
+  private Manager manager;
+  final long memberTimeout = 1000l;
+  private int[] portRange= new int[]{0, 65535};
+
+  @Before
+  public void initMocks() throws UnknownHostException {
+    System.setProperty("gemfire.bind-address", "localhost");
+    mockDistConfig = mock(DistributionConfig.class);
+    mockConfig = mock(ServiceConfig.class);
+    messenger = mock(Messenger.class);
+    joinLeave = mock(JoinLeave.class);
+    manager = mock(Manager.class);
+    services = mock(Services.class);
+    Stopper stopper = mock(Stopper.class);
+
+    when(mockConfig.getDistributionConfig()).thenReturn(mockDistConfig);
+    when(mockConfig.getMemberTimeout()).thenReturn(memberTimeout);
+    when(mockConfig.getMembershipPortRange()).thenReturn(portRange);
+    when(services.getConfig()).thenReturn(mockConfig);
+    when(services.getMessenger()).thenReturn(messenger);
+    when(services.getJoinLeave()).thenReturn(joinLeave);
+    when(services.getCancelCriterion()).thenReturn(stopper);
+    when(services.getManager()).thenReturn(manager);
+    when(stopper.isCancelInProgress()).thenReturn(false);
+    
+
+    if (mockMembers == null) {
+      mockMembers = new ArrayList<InternalDistributedMember>();
+      for (int i = 0; i < 7; i++) {
+        InternalDistributedMember mbr = new InternalDistributedMember("localhost", 8888 + i);
+  
+        if (i == 0 || i == 1) {
+          mbr.setVmKind(DistributionManager.LOCATOR_DM_TYPE);
+          mbr.getNetMember().setPreferredForCoordinator(true);
+        }
+        mockMembers.add(mbr);
+      }
+    }
+    when(joinLeave.getMemberID()).thenReturn(mockMembers.get(3));
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+    gmsHealthMonitor = new GMSHealthMonitor();
+    gmsHealthMonitor.init(services);
+    gmsHealthMonitor.start();
+  }
+
+  @After
+  public void tearDown() {
+    gmsHealthMonitor.stop();
+  }
+
+  @Test
+  public void testHMServiceStarted() throws IOException {
+
+    InternalDistributedMember mbr = new InternalDistributedMember(SocketCreator.getLocalHost(), 12345);
+    mbr.setVmViewId(1);
+    when(messenger.getMemberID()).thenReturn(mbr);
+    gmsHealthMonitor.started();
+    
+    NetView v = new NetView(mbr, 1, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    gmsHealthMonitor.processMessage(new HeartbeatRequestMessage(mbr, 1));
+    verify(messenger, atLeastOnce()).send(any(HeartbeatMessage.class));
+  }
+
+  /**
+   * checks who is next neighbor
+   */
+  @Test
+  public void testHMNextNeighborVerify() throws IOException {
+
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+    gmsHealthMonitor.started();
+
+    gmsHealthMonitor.installView(v);
+
+    Assert.assertEquals(mockMembers.get(4), gmsHealthMonitor.getNextNeighbor());
+
+  }
+
+  @Test
+  public void testHMNextNeighborAfterTimeout() throws Exception {
+    System.out.println("testHMNextNeighborAfterTimeout starting");
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+//    System.out.printf("memberID is %s view is %s\n", mockMembers.get(3), v);
+    
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+    gmsHealthMonitor.started();
+
+    gmsHealthMonitor.installView(v);
+
+    // allow the monitor to give up on the initial "next neighbor" and
+    // move on to the one after it
+    long giveup = System.currentTimeMillis() + memberTimeout + 500;
+    InternalDistributedMember expected = mockMembers.get(5);
+    InternalDistributedMember neighbor = gmsHealthMonitor.getNextNeighbor();
+    while (System.currentTimeMillis() < giveup && neighbor != expected) {
+      Thread.sleep(5);
+      neighbor = gmsHealthMonitor.getNextNeighbor();
+    }
+
+    // neighbor should change to 5th
+    System.out.println("testHMNextNeighborAfterTimeout ending");
+    Assert.assertEquals("expected " + expected + " but found " + neighbor
+        + ".  view="+v, expected, neighbor);
+  }
+
+  /**
+   * it checks neighbor before member-timeout, it should be same
+   */
+
+  @Test
+  public void testHMNextNeighborBeforeTimeout() throws IOException {
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+    gmsHealthMonitor.started();
+
+    gmsHealthMonitor.installView(v);
+
+    //Should we remove these sleeps and force the checkmember directly instead of waiting?
+    try {
+      // member-timeout is 1000 ms.  We initiate a check and choose
+      // a new neighbor at 500 ms
+      Thread.sleep(memberTimeout/GMSHealthMonitor.LOGICAL_INTERVAL - 100);
+    } catch (InterruptedException e) {
+    }
+    // neighbor should be same
+    System.out.println("next neighbor is " + gmsHealthMonitor.getNextNeighbor() +
+        "\nmy address is " + mockMembers.get(3) +
+        "\nview is " + v);
+
+    Assert.assertEquals(mockMembers.get(4), gmsHealthMonitor.getNextNeighbor());
+  }
+  
+  /***
+   * checks whether member-check thread sends suspectMembers message
+   */
+  @Test
+  public void testSuspectMembersCalledThroughMemberCheckThread() throws Exception {
+    System.out.println("testSuspectMembersCalledThroughMemberCheckThread starting");
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+    gmsHealthMonitor.started();
+
+    gmsHealthMonitor.installView(v);
+
+    // when the view is installed we start a heartbeat timeout.  After
+    // that expires we request a heartbeat
+    Thread.sleep(3*memberTimeout + 100);
+
+    System.out.println("testSuspectMembersCalledThroughMemberCheckThread ending");
+    assertTrue(gmsHealthMonitor.isSuspectMember(mockMembers.get(4)));
+  }
+
+  /***
+   * checks ping thread didn't sends suspectMembers message before timeout
+   */
+  @Test
+  public void testSuspectMembersNotCalledThroughPingThreadBeforeTimeout() {
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+    gmsHealthMonitor.started();
+    
+    gmsHealthMonitor.installView(v);
+    InternalDistributedMember neighbor = gmsHealthMonitor.getNextNeighbor();
+
+    try {
+      // member-timeout is 1000 ms
+      // plus 100 ms for ack
+      Thread.sleep(memberTimeout - 200);
+    } catch (InterruptedException e) {
+    }
+
+    assertFalse(gmsHealthMonitor.isSuspectMember(neighbor));
+  }
+
+  /***
+   * Checks whether suspect thread sends suspectMembers message
+   */
+  @Test
+  public void testSuspectMembersCalledThroughSuspectThread() throws Exception {
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+    
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+
+    gmsHealthMonitor.installView(v);
+
+    gmsHealthMonitor.suspect(mockMembers.get(1), "Not responding");
+
+    Thread.sleep(GMSHealthMonitor.MEMBER_SUSPECT_COLLECTION_INTERVAL + 1000);
+
+    verify(messenger, atLeastOnce()).send(any(SuspectMembersMessage.class));
+  }
+
+  /***
+   * Checks suspect thread doesn't sends suspectMembers message before timeout
+   */
+  @Test
+  public void testSuspectMembersNotCalledThroughSuspectThreadBeforeTimeout() {
+
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    MethodExecuted messageSent = new MethodExecuted();
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+
+    gmsHealthMonitor.installView(v);
+
+    gmsHealthMonitor.suspect(mockMembers.get(1), "Not responding");
+
+    when(messenger.send(isA(SuspectMembersMessage.class))).thenAnswer(messageSent);
+
+    try {
+      // suspect thread timeout is 200 ms
+      Thread.sleep(100l);
+    } catch (InterruptedException e) {
+    }
+
+    assertTrue("SuspectMembersMessage shouldn't have sent", !messageSent.isMethodExecuted());
+  }
+
+  /***
+   * Send remove member message after doing final check, ping Timeout
+   */
+  @Test
+  public void testRemoveMemberCalled() throws Exception {
+    System.out.println("testRemoveMemberCalled starting");
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(0)); // coordinator and local member
+    gmsHealthMonitor.started();
+
+    gmsHealthMonitor.installView(v);
+    
+    Thread.sleep(memberTimeout/GMSHealthMonitor.LOGICAL_INTERVAL);
+
+    ArrayList<InternalDistributedMember> recipient = new ArrayList<InternalDistributedMember>();
+    recipient.add(mockMembers.get(0));
+    ArrayList<SuspectRequest> as = new ArrayList<SuspectRequest>();
+    SuspectRequest sr = new SuspectRequest(mockMembers.get(1), "Not Responding");// removing member 1
+    as.add(sr);
+    SuspectMembersMessage sm = new SuspectMembersMessage(recipient, as);
+    sm.setSender(mockMembers.get(0));
+
+    gmsHealthMonitor.processMessage(sm);
+
+    Thread.sleep(2*memberTimeout + 200);
+
+    System.out.println("testRemoveMemberCalled ending");
+    verify(joinLeave, atLeastOnce()).remove(any(InternalDistributedMember.class), any(String.class));
+  }
+
+  /***
+   * Shouldn't send remove member message before doing final check, or before ping Timeout
+   */
+  @Test
+  public void testRemoveMemberNotCalledBeforeTimeout() {
+    System.out.println("testRemoveMemberNotCalledBeforeTimeout starting");
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(0)); // coordinator and local member
+    when(joinLeave.getMemberID()).thenReturn(mockMembers.get(0)); // coordinator and local member
+    gmsHealthMonitor.started();
+
+    gmsHealthMonitor.installView(v);
+
+    ArrayList<InternalDistributedMember> recipient = new ArrayList<InternalDistributedMember>();
+    recipient.add(mockMembers.get(0));
+    ArrayList<SuspectRequest> as = new ArrayList<SuspectRequest>();
+    SuspectRequest sr = new SuspectRequest(mockMembers.get(1), "Not Responding");// removing member 1
+    as.add(sr);
+    SuspectMembersMessage sm = new SuspectMembersMessage(recipient, as);
+    sm.setSender(mockMembers.get(0));
+
+    gmsHealthMonitor.processMessage(sm);
+
+    try {
+      // this happens after final check, ping timeout
+      Thread.sleep(memberTimeout-100);
+    } catch (InterruptedException e) {
+    }
+
+    System.out.println("testRemoveMemberNotCalledBeforeTimeout ending");
+    verify(joinLeave, never()).remove(any(InternalDistributedMember.class), any(String.class));
+  }
+
+  /***
+   * Send remove member message after doing final check for coordinator, ping timeout
+   * This test trying to remove coordinator
+   */
+  @Test
+  public void testRemoveMemberCalledAfterDoingFinalCheckOnCoordinator() throws Exception {
+
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // preferred coordinators are 0 and 1
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(1));// next preferred coordinator
+    gmsHealthMonitor.started();
+
+    gmsHealthMonitor.installView(v);
+    
+    Thread.sleep(memberTimeout/GMSHealthMonitor.LOGICAL_INTERVAL);
+
+    ArrayList<InternalDistributedMember> recipient = new ArrayList<InternalDistributedMember>();
+    recipient.add(mockMembers.get(0));
+    recipient.add(mockMembers.get(1));
+    ArrayList<SuspectRequest> as = new ArrayList<SuspectRequest>();
+    SuspectRequest sr = new SuspectRequest(mockMembers.get(0), "Not Responding");// removing coordinator
+    as.add(sr);
+    SuspectMembersMessage sm = new SuspectMembersMessage(recipient, as);
+    sm.setSender(mockMembers.get(4));// member 4 sends suspect message
+
+    gmsHealthMonitor.processMessage(sm);
+
+    // this happens after final check, ping timeout = 1000 ms
+    Thread.sleep(memberTimeout + 200);
+
+    verify(joinLeave, atLeastOnce()).remove(any(InternalDistributedMember.class), any(String.class));
+  }
+
+  /***
+   * validates HealthMonitor.CheckIfAvailable api
+   */
+  @Test
+  public void testCheckIfAvailable() {
+
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+
+    gmsHealthMonitor.installView(v);
+
+    long startTime = System.currentTimeMillis();
+
+    boolean retVal = gmsHealthMonitor.checkIfAvailable(mockMembers.get(1), "Not responding", false);
+
+    long timeTaken = System.currentTimeMillis() - startTime;
+
+    assertTrue("This should have taken member ping timeout 100ms ", timeTaken > 90);
+    assertTrue("CheckIfAvailable should have return false", !retVal);
+  }
+
+  @Test
+  public void testShutdown() {
+
+    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
+
+    // 3rd is current member
+    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
+
+    gmsHealthMonitor.installView(v);
+
+    gmsHealthMonitor.stop();
+
+    try {
+      // this happens after final check, membertimeout = 1000
+      Thread.sleep(100l);
+    } catch (InterruptedException e) {
+    }
+
+    assertTrue("HeathMonitor should have shutdown", gmsHealthMonitor.isShutdown());
+
+  }
+  
+  @Test
+  public void testCreateServerSocket() throws Exception {
+    try (ServerSocket socket = gmsHealthMonitor.createServerSocket(InetAddress.getLocalHost(), portRange)) {
+      Assert.assertTrue( portRange[0] <= socket.getLocalPort() && socket.getLocalPort() <= portRange[1]);
+    }
+  }
+
+  @Test
+  public void testCreateServerSocketPortRangeInvalid() throws Exception {
+    try (ServerSocket socket = gmsHealthMonitor.createServerSocket(InetAddress.getLocalHost(), new int[]{-1, -1})) {
+      Assert.fail("socket was created with invalid port range");
+    }
+    catch (IllegalArgumentException e) {
+      
+    }
+  }
+  
+  @Test
+  public void testClientSocketHandler() throws Exception {
+    int viewId = 2;
+    long msb = 3;
+    long lsb = 4;
+    GMSMember otherMember = createGMSMember(Version.CURRENT_ORDINAL, viewId, msb, lsb);
+    GMSMember gmsMember = createGMSMember(Version.CURRENT_ORDINAL, viewId, msb, lsb);
+    executeTestClientSocketHandler(gmsMember, otherMember, GMSHealthMonitor.OK);
+  }
+
+  @Test
+  public void testClientSocketHandlerWhenMsbDoNotMatch() throws Exception {
+    int viewId = 2;
+    long msb = 3;
+    long lsb = 4;
+    GMSMember otherMember = createGMSMember(Version.CURRENT_ORDINAL, viewId, msb + 1, lsb);
+    GMSMember gmsMember = createGMSMember(Version.CURRENT_ORDINAL, viewId, msb, lsb);
+    executeTestClientSocketHandler(gmsMember, otherMember, GMSHealthMonitor.ERROR);
+  }
+  
+  @Test
+  public void testClientSocketHandlerWhenLsbDoNotMatch() throws Exception {
+    int viewId = 2;
+    long msb = 3;
+    long lsb = 4;
+    GMSMember otherMember = createGMSMember(Version.CURRENT_ORDINAL, viewId, msb, lsb + 1);
+    GMSMember gmsMember = createGMSMember(Version.CURRENT_ORDINAL, viewId, msb, lsb);
+    executeTestClientSocketHandler(gmsMember, otherMember, GMSHealthMonitor.ERROR);
+  }
+  
+  @Test
+  public void testClientSocketHandlerWhenViewIdDoNotMatch() throws Exception {
+    int viewId = 2;
+    long msb = 3;
+    long lsb = 4;
+    GMSMember otherMember = createGMSMember(Version.CURRENT_ORDINAL, viewId + 1, msb, lsb);
+    GMSMember gmsMember = createGMSMember(Version.CURRENT_ORDINAL, viewId, msb, lsb);
+    executeTestClientSocketHandler(gmsMember, otherMember, GMSHealthMonitor.ERROR);
+  }
+  
+  public void executeTestClientSocketHandler(GMSMember gmsMember, GMSMember otherMember, int expectedResult) throws Exception {
+    //We have already set the view id in the member but when creating the IDM it resets it to -1 for some reason
+    int viewId = gmsMember.getVmViewId();
+    
+    InternalDistributedMember testMember = new InternalDistributedMember("localhost", 9000, Version.CURRENT, gmsMember);
+    //We set to our expected test viewId in the IDM as well as reseting the gms member
+    testMember.setVmViewId(viewId);
+    gmsMember.setBirthViewId(viewId);
+    
+
+    //Set up the incoming/received bytes.  We just wrap output streams and write out the gms member information
+    byte[] receivedBytes = writeMemberToBytes(otherMember);
+    InputStream mockInputStream = new ByteArrayInputStream(receivedBytes);
+    
+    //configure the mock to return the mocked incoming bytes and provide an outputstream that we will check
+    Socket fakeSocket = mock(Socket.class);
+    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+    when(fakeSocket.getInputStream()).thenReturn(mockInputStream);
+    when(fakeSocket.getOutputStream()).thenReturn(outputStream);
+
+    //run the socket handler
+    gmsHealthMonitor.setLocalAddress(testMember);
+    ClientSocketHandler handler = gmsHealthMonitor.new ClientSocketHandler(fakeSocket);
+    handler.run();
+    
+    //verify the written bytes are as expected
+    DataInputStream dis = new DataInputStream(new ByteArrayInputStream(outputStream.toByteArray()));
+    int byteReply = dis.read();
+    Assert.assertEquals(expectedResult, byteReply);
+  }
+
+  private GMSMember createGMSMember(short version, int viewId, long msb, long lsb) {
+    GMSMember gmsMember = new GMSMember();
+    gmsMember.setVersionOrdinal(version);
+    gmsMember.setBirthViewId(viewId);
+    gmsMember.setUUID(new UUID(msb, lsb));
+    return gmsMember;
+  }
+  
+  private byte[] writeMemberToBytes(GMSMember gmsMember) throws IOException {
+    ByteArrayOutputStream baos = new ByteArrayOutputStream();
+    DataOutputStream dataReceive = new DataOutputStream(baos);
+    gmsHealthMonitor.writeMemberToStream(gmsMember, dataReceive);
+    return baos.toByteArray();
+  }
+
+
+  private class MethodExecuted implements Answer {
+    private boolean methodExecuted = false;
+
+    public boolean isMethodExecuted() {
+      return methodExecuted;
+    }
+
+    @Override
+    public Object answer(InvocationOnMock invocation) throws Throwable {
+      methodExecuted = true;
+      return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3259c023/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
index abc7a2f..9895f68 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/GMSJoinLeaveJUnitTest.java
@@ -19,7 +19,7 @@ package com.gemstone.gemfire.distributed.internal.membership.gms.membership;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Matchers.any;
-import static org.mockito.Mockito.isA;
+import static org.mockito.Matchers.isA;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.times;
@@ -244,6 +244,21 @@ public class GMSJoinLeaveJUnitTest {
     verify(messenger).send(any(JoinResponseMessage.class));
   }
   
+  //This test does not test the actual join process but rather that the join response gets loggedß
+  @Test
+  public void testProcessJoinResponseIsRecorded() throws IOException {
+    initMocks();
+    when(services.getAuthenticator()).thenReturn(authenticator);
+    when(authenticator.authenticate(mockMembers[0], null)).thenThrow(new AuthenticationFailedException("we want to fail auth here"));
+    when(services.getMessenger()).thenReturn(messenger);
+      
+    JoinResponseMessage[] joinResponse = gmsJoinLeave.getJoinResponseMessage();
+    
+    JoinResponseMessage jrm = new JoinResponseMessage();
+    gmsJoinLeave.processMessage(jrm);
+    Assert.assertEquals(jrm, joinResponse[0]);
+  }
+  
   /**
    * prepares and install a view
    * @throws IOException
@@ -635,6 +650,20 @@ public class GMSJoinLeaveJUnitTest {
     verify(manager).quorumLost(crashes, newView);
   }
   
+  //Possibly modify test to check for network partition message in the force disconnect
+  @Test
+  public void testNetworkPartitionMessageReceived() throws Exception {
+    initMocks();
+    gmsJoinLeave.becomeCoordinatorForTest();
+    List<InternalDistributedMember> members = Arrays.asList(mockMembers);
+    Set<InternalDistributedMember> empty = Collections.<InternalDistributedMember>emptySet();
+    NetView v = new NetView(mockMembers[0], 2, members, empty, empty);
+    NetworkPartitionMessage message = new NetworkPartitionMessage();
+    gmsJoinLeave.processMessage(message);
+    verify(manager).forceDisconnect(any(String.class));
+  }
+
+  
   @Test 
   public void testQuorumLossNotificationWithNetworkPartitionDetectionDisabled() throws IOException {
     initMocks(false);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3259c023/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
deleted file mode 100644
index 41a99a6..0000000
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
+++ /dev/null
@@ -1,461 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.distributed.internal.membership.gms.membership.fd;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.isA;
-import static org.mockito.Mockito.atLeastOnce;
-import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.never;
-import static org.mockito.Mockito.verify;
-import static org.mockito.Mockito.when;
-
-import java.io.IOException;
-import java.net.UnknownHostException;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-import com.gemstone.gemfire.distributed.internal.DistributionConfig;
-import com.gemstone.gemfire.distributed.internal.DistributionManager;
-import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
-import com.gemstone.gemfire.distributed.internal.membership.NetView;
-import com.gemstone.gemfire.distributed.internal.membership.gms.ServiceConfig;
-import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
-import com.gemstone.gemfire.distributed.internal.membership.gms.Services.Stopper;
-import com.gemstone.gemfire.distributed.internal.membership.gms.fd.GMSHealthMonitor;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.JoinLeave;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Manager;
-import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.HeartbeatRequestMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectMembersMessage;
-import com.gemstone.gemfire.distributed.internal.membership.gms.messages.SuspectRequest;
-import com.gemstone.gemfire.internal.SocketCreator;
-import com.gemstone.gemfire.test.junit.categories.UnitTest;
-
-@Category(UnitTest.class)
-public class GMSHealthMonitorJUnitTest {
-
-  private Services services;
-  private ServiceConfig mockConfig;
-  private DistributionConfig mockDistConfig;
-  private List<InternalDistributedMember> mockMembers;
-  private Messenger messenger;
-  private JoinLeave joinLeave;
-  private GMSHealthMonitor gmsHealthMonitor;
-  private Manager manager;
-  final long memberTimeout = 1000l;
-  private int[] portRange= new int[]{0, 65535};
-
-  @Before
-  public void initMocks() throws UnknownHostException {
-    System.setProperty("gemfire.bind-address", "localhost");
-    mockDistConfig = mock(DistributionConfig.class);
-    mockConfig = mock(ServiceConfig.class);
-    messenger = mock(Messenger.class);
-    joinLeave = mock(JoinLeave.class);
-    manager = mock(Manager.class);
-    services = mock(Services.class);
-    Stopper stopper = mock(Stopper.class);
-
-    when(mockConfig.getDistributionConfig()).thenReturn(mockDistConfig);
-    when(mockConfig.getMemberTimeout()).thenReturn(memberTimeout);
-    when(mockConfig.getMembershipPortRange()).thenReturn(portRange);
-    when(services.getConfig()).thenReturn(mockConfig);
-    when(services.getMessenger()).thenReturn(messenger);
-    when(services.getJoinLeave()).thenReturn(joinLeave);
-    when(services.getCancelCriterion()).thenReturn(stopper);
-    when(services.getManager()).thenReturn(manager);
-    when(stopper.isCancelInProgress()).thenReturn(false);
-    
-
-    if (mockMembers == null) {
-      mockMembers = new ArrayList<InternalDistributedMember>();
-      for (int i = 0; i < 7; i++) {
-        InternalDistributedMember mbr = new InternalDistributedMember("localhost", 8888 + i);
-  
-        if (i == 0 || i == 1) {
-          mbr.setVmKind(DistributionManager.LOCATOR_DM_TYPE);
-          mbr.getNetMember().setPreferredForCoordinator(true);
-        }
-        mockMembers.add(mbr);
-      }
-    }
-    when(joinLeave.getMemberID()).thenReturn(mockMembers.get(3));
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor = new GMSHealthMonitor();
-    gmsHealthMonitor.init(services);
-    gmsHealthMonitor.start();
-  }
-
-  @After
-  public void tearDown() {
-    gmsHealthMonitor.stop();
-    System.getProperties().remove("gemfire.bind-address");
-  }
-
-  @Test
-  public void testHMServiceStarted() throws IOException {
-
-    InternalDistributedMember mbr = new InternalDistributedMember(SocketCreator.getLocalHost(), 12345);
-    mbr.setVmViewId(1);
-    when(messenger.getMemberID()).thenReturn(mbr);
-    gmsHealthMonitor.started();
-    
-    NetView v = new NetView(mbr, 1, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    gmsHealthMonitor.processMessage(new HeartbeatRequestMessage(mbr, 1));
-    verify(messenger, atLeastOnce()).send(any(HeartbeatMessage.class));
-  }
-
-  /**
-   * checks who is next neighbor
-   */
-  @Test
-  public void testHMNextNeighborVerify() throws IOException {
-
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-
-    Assert.assertEquals(mockMembers.get(4), gmsHealthMonitor.getNextNeighbor());
-
-  }
-
-  @Test
-  public void testHMNextNeighborAfterTimeout() throws Exception {
-    System.out.println("testHMNextNeighborAfterTimeout starting");
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-//    System.out.printf("memberID is %s view is %s\n", mockMembers.get(3), v);
-    
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-
-    // allow the monitor to give up on the initial "next neighbor" and
-    // move on to the one after it
-    long giveup = System.currentTimeMillis() + memberTimeout + 600;
-    InternalDistributedMember expected = mockMembers.get(5);
-    InternalDistributedMember neighbor = gmsHealthMonitor.getNextNeighbor();
-    while (System.currentTimeMillis() < giveup && neighbor != expected) {
-      Thread.sleep(5);
-      neighbor = gmsHealthMonitor.getNextNeighbor();
-    }
-
-    // neighbor should change to 5th
-    System.out.println("testHMNextNeighborAfterTimeout ending");
-    Assert.assertEquals("expected " + expected + " but found " + neighbor
-        + ".  view="+v, expected, neighbor);
-  }
-
-  /**
-   * it checks neighbor before member-timeout, it should be same
-   */
-
-  @Test
-  public void testHMNextNeighborBeforeTimeout() throws IOException {
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-
-    try {
-      // member-timeout is 1000 ms.  We initiate a check and choose
-      // a new neighbor at 500 ms
-      Thread.sleep(memberTimeout/GMSHealthMonitor.LOGICAL_INTERVAL - 100);
-    } catch (InterruptedException e) {
-    }
-    // neighbor should be same
-    System.out.println("next neighbor is " + gmsHealthMonitor.getNextNeighbor() +
-        "\nmy address is " + mockMembers.get(3) +
-        "\nview is " + v);
-
-    Assert.assertEquals(mockMembers.get(4), gmsHealthMonitor.getNextNeighbor());
-  }
-  
-  /***
-   * checks whether member-check thread sends suspectMembers message
-   */
-  @Test
-  public void testSuspectMembersCalledThroughMemberCheckThread() throws Exception {
-    System.out.println("testSuspectMembersCalledThroughMemberCheckThread starting");
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-
-    // when the view is installed we start a heartbeat timeout.  After
-    // that expires we request a heartbeat
-    Thread.sleep(3*memberTimeout + 100);
-
-    System.out.println("testSuspectMembersCalledThroughMemberCheckThread ending");
-    assertTrue(gmsHealthMonitor.isSuspectMember(mockMembers.get(4)));
-  }
-
-  /***
-   * checks ping thread didn't sends suspectMembers message before timeout
-   */
-  @Test
-  public void testSuspectMembersNotCalledThroughPingThreadBeforeTimeout() {
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-    gmsHealthMonitor.started();
-    
-    gmsHealthMonitor.installView(v);
-    InternalDistributedMember neighbor = gmsHealthMonitor.getNextNeighbor();
-
-    try {
-      // member-timeout is 1000 ms
-      // plus 100 ms for ack
-      Thread.sleep(memberTimeout - 200);
-    } catch (InterruptedException e) {
-    }
-
-    assertFalse(gmsHealthMonitor.isSuspectMember(neighbor));
-  }
-
-  /***
-   * Checks whether suspect thread sends suspectMembers message
-   */
-  @Test
-  public void testSuspectMembersCalledThroughSuspectThread() throws Exception {
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-    
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-
-    gmsHealthMonitor.installView(v);
-
-    gmsHealthMonitor.suspect(mockMembers.get(1), "Not responding");
-
-    Thread.sleep(GMSHealthMonitor.MEMBER_SUSPECT_COLLECTION_INTERVAL + 1000);
-
-    verify(messenger, atLeastOnce()).send(any(SuspectMembersMessage.class));
-  }
-
-  /***
-   * Checks suspect thread doesn't sends suspectMembers message before timeout
-   */
-  @Test
-  public void testSuspectMembersNotCalledThroughSuspectThreadBeforeTimeout() {
-
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    MethodExecuted messageSent = new MethodExecuted();
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-
-    gmsHealthMonitor.installView(v);
-
-    gmsHealthMonitor.suspect(mockMembers.get(1), "Not responding");
-
-    when(messenger.send(isA(SuspectMembersMessage.class))).thenAnswer(messageSent);
-
-    try {
-      // suspect thread timeout is 200 ms
-      Thread.sleep(100l);
-    } catch (InterruptedException e) {
-    }
-
-    assertTrue("SuspectMembersMessage shouldn't have sent", !messageSent.isMethodExecuted());
-  }
-
-  /***
-   * Send remove member message after doing final check, ping Timeout
-   */
-  @Test
-  public void testRemoveMemberCalled() throws Exception {
-    System.out.println("testRemoveMemberCalled starting");
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(0)); // coordinator and local member
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-    
-    Thread.sleep(memberTimeout/GMSHealthMonitor.LOGICAL_INTERVAL);
-
-    ArrayList<InternalDistributedMember> recipient = new ArrayList<InternalDistributedMember>();
-    recipient.add(mockMembers.get(0));
-    ArrayList<SuspectRequest> as = new ArrayList<SuspectRequest>();
-    SuspectRequest sr = new SuspectRequest(mockMembers.get(1), "Not Responding");// removing member 1
-    as.add(sr);
-    SuspectMembersMessage sm = new SuspectMembersMessage(recipient, as);
-    sm.setSender(mockMembers.get(0));
-
-    gmsHealthMonitor.processMessage(sm);
-
-    Thread.sleep(2*memberTimeout + 200);
-
-    System.out.println("testRemoveMemberCalled ending");
-    verify(joinLeave, atLeastOnce()).remove(any(InternalDistributedMember.class), any(String.class));
-  }
-
-  /***
-   * Shouldn't send remove member message before doing final check, or before ping Timeout
-   */
-  @Test
-  public void testRemoveMemberNotCalledBeforeTimeout() {
-    System.out.println("testRemoveMemberNotCalledBeforeTimeout starting");
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(0)); // coordinator and local member
-    when(joinLeave.getMemberID()).thenReturn(mockMembers.get(0)); // coordinator and local member
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-
-    ArrayList<InternalDistributedMember> recipient = new ArrayList<InternalDistributedMember>();
-    recipient.add(mockMembers.get(0));
-    ArrayList<SuspectRequest> as = new ArrayList<SuspectRequest>();
-    SuspectRequest sr = new SuspectRequest(mockMembers.get(1), "Not Responding");// removing member 1
-    as.add(sr);
-    SuspectMembersMessage sm = new SuspectMembersMessage(recipient, as);
-    sm.setSender(mockMembers.get(0));
-
-    gmsHealthMonitor.processMessage(sm);
-
-    try {
-      // this happens after final check, ping timeout
-      Thread.sleep(memberTimeout-100);
-    } catch (InterruptedException e) {
-    }
-
-    System.out.println("testRemoveMemberNotCalledBeforeTimeout ending");
-    verify(joinLeave, never()).remove(any(InternalDistributedMember.class), any(String.class));
-  }
-
-  /***
-   * Send remove member message after doing final check for coordinator, ping timeout
-   * This test trying to remove coordinator
-   */
-  @Test
-  public void testRemoveMemberCalledAfterDoingFinalCheckOnCoordinator() throws Exception {
-
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // preferred coordinators are 0 and 1
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(1));// next preferred coordinator
-    gmsHealthMonitor.started();
-
-    gmsHealthMonitor.installView(v);
-    
-    Thread.sleep(memberTimeout/GMSHealthMonitor.LOGICAL_INTERVAL);
-
-    ArrayList<InternalDistributedMember> recipient = new ArrayList<InternalDistributedMember>();
-    recipient.add(mockMembers.get(0));
-    recipient.add(mockMembers.get(1));
-    ArrayList<SuspectRequest> as = new ArrayList<SuspectRequest>();
-    SuspectRequest sr = new SuspectRequest(mockMembers.get(0), "Not Responding");// removing coordinator
-    as.add(sr);
-    SuspectMembersMessage sm = new SuspectMembersMessage(recipient, as);
-    sm.setSender(mockMembers.get(4));// member 4 sends suspect message
-
-    gmsHealthMonitor.processMessage(sm);
-
-    // this happens after final check, ping timeout = 1000 ms
-    Thread.sleep(memberTimeout + 200);
-
-    verify(joinLeave, atLeastOnce()).remove(any(InternalDistributedMember.class), any(String.class));
-  }
-
-  /***
-   * validates HealthMonitor.CheckIfAvailable api
-   */
-  @Test
-  public void testCheckIfAvailable() {
-
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-
-    gmsHealthMonitor.installView(v);
-
-    long startTime = System.currentTimeMillis();
-
-    boolean retVal = gmsHealthMonitor.checkIfAvailable(mockMembers.get(1), "Not responding", false);
-
-    long timeTaken = System.currentTimeMillis() - startTime;
-
-    assertTrue("This should have taken member ping timeout 100ms ", timeTaken > 90);
-    assertTrue("CheckIfAvailable should have return false", !retVal);
-  }
-
-  @Test
-  public void testShutdown() {
-
-    NetView v = new NetView(mockMembers.get(0), 2, mockMembers, new HashSet<InternalDistributedMember>(), new HashSet<InternalDistributedMember>());
-
-    // 3rd is current member
-    when(messenger.getMemberID()).thenReturn(mockMembers.get(3));
-
-    gmsHealthMonitor.installView(v);
-
-    gmsHealthMonitor.stop();
-
-    try {
-      // this happens after final check, membertimeout = 1000
-      Thread.sleep(100l);
-    } catch (InterruptedException e) {
-    }
-
-    assertTrue("HeathMonitor should have shutdown", gmsHealthMonitor.isShutdown());
-
-  }
-
-  private class MethodExecuted implements Answer {
-    private boolean methodExecuted = false;
-
-    public boolean isMethodExecuted() {
-      return methodExecuted;
-    }
-
-    @Override
-    public Object answer(InvocationOnMock invocation) throws Throwable {
-      methodExecuted = true;
-      return null;
-    }
-  }
-}


[21/50] [abbrv] incubator-geode git commit: Merge branch 'develop' of https://github.com/pawelantczak/incubator-geode into develop

Posted by je...@apache.org.
Merge branch 'develop' of https://github.com/pawelantczak/incubator-geode into develop

This closes #44

----
commit 00ffa98e6d62c8f8b5c1df15aa8bae180ac1d266
Author: Paweł Antczak <pa...@antczak.org>
Date:   2015-11-24T19:17:23Z

    Fix Spark Connector tutorial links flow

----


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

Branch: refs/heads/feature/GEODE-17
Commit: b2ef6a2e776c752c33ba395377a645c580381751
Parents: 360665f 00ffa98
Author: Jianxia Chen <jc...@pivotal.io>
Authored: Tue Nov 24 13:59:40 2015 -0800
Committer: Jianxia Chen <jc...@pivotal.io>
Committed: Tue Nov 24 13:59:40 2015 -0800

----------------------------------------------------------------------
 gemfire-spark-connector/doc/5_rdd_join.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[23/50] [abbrv] incubator-geode git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-geode into develop

Posted by je...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-geode into develop


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

Branch: refs/heads/feature/GEODE-17
Commit: 6612b9f23741118a41c73efdf99c28c42c6dbc5a
Parents: 4eb9e33 b2ef6a2
Author: Dick Cavender <dc...@pivotal.io>
Authored: Tue Nov 24 15:34:49 2015 -0800
Committer: Dick Cavender <dc...@pivotal.io>
Committed: Tue Nov 24 15:34:49 2015 -0800

----------------------------------------------------------------------
 gemfire-spark-connector/doc/5_rdd_join.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------



[49/50] [abbrv] incubator-geode git commit: Merge branch 'develop' into feature/GEODE-17

Posted by je...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/build.gradle
----------------------------------------------------------------------
diff --cc build.gradle
index 44be620,b5465b8..395d543
--- a/build.gradle
+++ b/build.gradle
@@@ -372,11 -407,13 +407,11 @@@ subprojects 
          }
          
          maxHeapSize '768m'
-         jvmArgs = ['-XX:+HeapDumpOnOutOfMemoryError', '-XX:MaxPermSize=256M', '-ea']
+         jvmArgs = ['-XX:+HeapDumpOnOutOfMemoryError', '-ea']
  
 -        systemProperties = [
 -          'gemfire.DEFAULT_MAX_OPLOG_SIZE' : '10',
 -          'gemfire.disallowMcastDefaults'  : 'true',
 -          'jline.terminal'                 : 'jline.UnsupportedTerminal',
 -        ]
 +        systemProperty 'gemfire.DEFAULT_MAX_OPLOG_SIZE', '10'
 +        systemProperty 'gemfire.disallowMcastDefaults', 'true'
 +        systemProperty 'jline.terminal', 'jline.UnsupportedTerminal'
  
          def eol = System.getProperty('line.separator')
          def progress = new File(resultsDir, "$test.name-progress.txt")

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-assembly/build.gradle
----------------------------------------------------------------------
diff --cc gemfire-assembly/build.gradle
index c4d9581,8de6d4e..84d9209
--- a/gemfire-assembly/build.gradle
+++ b/gemfire-assembly/build.gradle
@@@ -21,13 -21,13 +21,14 @@@ configurations 
  dependencies {
    provided project(':gemfire-core')
    
+   archives project(':gemfire-common')  
    archives project(':gemfire-json')  
    archives project(':gemfire-joptsimple')  
-   archives project(':gemfire-jgroups')  
    archives project(':gemfire-core')  
+   archives project(':gemfire-lucene')
    archives project(':gemfire-web')
    archives project(':gemfire-web-api')
 +  archives project(':pulse')
  
    testCompile project(path: ':gemfire-junit', configuration: 'testOutput')
    testCompile project(path: ':gemfire-core', configuration: 'testOutput')
@@@ -183,9 -191,12 +192,12 @@@ distributions 
          }
          from project(":gemfire-core").configurations.archives.allArtifacts.files
  
+         from project(":gemfire-lucene").configurations.runtime
+         from project(":gemfire-lucene").configurations.archives.allArtifacts.files
+ 
          // include this jar        
          from project(":gemfire-web-api").jar.outputs.files.getFiles()
 -        
 +
          // dependency jars
          from depsJar
          from gfshDepsJar

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/build.gradle
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/OperationContext.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/DistributedSystem.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/AbstractDistributionConfig.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/3bf38a03/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfigImpl.java
----------------------------------------------------------------------


[40/50] [abbrv] incubator-geode git commit: GEODE-621: Added BucketCountLoadProbe to sanctionedDataSerializables

Posted by je...@apache.org.
GEODE-621: Added BucketCountLoadProbe to sanctionedDataSerializables

Fixing a failing in AnalyzeSerializables due to the changes for
GEODE-581


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

Branch: refs/heads/feature/GEODE-17
Commit: ae8c475de698e87305092aa711be953ee2daafb0
Parents: b7030d1
Author: Dan Smith <up...@apache.org>
Authored: Wed Dec 2 10:07:33 2015 -0800
Committer: Dan Smith <up...@apache.org>
Committed: Wed Dec 2 10:07:33 2015 -0800

----------------------------------------------------------------------
 .../gemfire/codeAnalysis/sanctionedDataSerializables.txt         | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/ae8c475d/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index af0ee36..d553ad9 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -1569,6 +1569,10 @@ com/gemstone/gemfire/internal/cache/partitioned/BucketBackupMessage,2
 fromData,16,2a2bb7001d2a2bb9001e0100b50003b1
 toData,16,2a2bb7001f2b2ab40003b900200200b1
 
+com/gemstone/gemfire/internal/cache/partitioned/BucketCountLoadProbe,2
+fromData,1,b1
+toData,1,b1
+
 com/gemstone/gemfire/internal/cache/partitioned/BucketProfileUpdateMessage,2
 fromData,47,2a2bb700232a2bb900240100b500052a2bb900240100b500062a2bb900240100b500022a2bb80025c00026b50007b1
 toData,44,2a2bb700272b2ab40005b9002802002b2ab40006b9002802002b2ab40002b9002802002ab400072bb80029b1


[36/50] [abbrv] incubator-geode git commit: GEODE-581: LoadProbe that balances based on bucket count

Posted by je...@apache.org.
GEODE-581: LoadProbe that balances based on bucket count

Adding a load probe that balances partitioned regions based on bucket
count, rather than on the amount of data in bytes on each node.


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

Branch: refs/heads/feature/GEODE-17
Commit: 442faa06f3b3a7cb85065ee5b0585ed679c80ba0
Parents: bff59d1
Author: Dan Smith <ds...@pivotal.io>
Authored: Thu Dec 2 19:44:38 2010 +0000
Committer: Dan Smith <up...@apache.org>
Committed: Tue Dec 1 13:21:48 2015 -0800

----------------------------------------------------------------------
 .../gemstone/gemfire/internal/DSFIDFactory.java |   2 +
 .../internal/DataSerializableFixedID.java       |   3 +-
 .../cache/control/InternalResourceManager.java  |  11 +-
 .../cache/partitioned/BucketCountLoadProbe.java |  75 ++++++++++
 .../control/RebalanceOperationDUnitTest.java    | 141 ++++++++++++++++++-
 5 files changed, 227 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/442faa06/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
index 24dd181..b77dfdb 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DSFIDFactory.java
@@ -302,6 +302,7 @@ import com.gemstone.gemfire.internal.cache.partitioned.AllBucketProfilesUpdateMe
 import com.gemstone.gemfire.internal.cache.partitioned.BecomePrimaryBucketMessage;
 import com.gemstone.gemfire.internal.cache.partitioned.BecomePrimaryBucketMessage.BecomePrimaryBucketReplyMessage;
 import com.gemstone.gemfire.internal.cache.partitioned.BucketBackupMessage;
+import com.gemstone.gemfire.internal.cache.partitioned.BucketCountLoadProbe;
 import com.gemstone.gemfire.internal.cache.partitioned.BucketProfileUpdateMessage;
 import com.gemstone.gemfire.internal.cache.partitioned.BucketSizeMessage;
 import com.gemstone.gemfire.internal.cache.partitioned.BucketSizeMessage.BucketSizeReplyMessage;
@@ -1052,6 +1053,7 @@ public final class DSFIDFactory implements DataSerializableFixedID {
         DestroyRegionOnDataStoreMessage.class);
     registerDSFID(SHUTDOWN_ALL_GATEWAYHUBS_REQUEST,
         ShutdownAllGatewayHubsRequest.class);
+    registerDSFID(BUCKET_COUNT_LOAD_PROBE, BucketCountLoadProbe.class);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/442faa06/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
index 8dd8f00..7b263bf 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/DataSerializableFixedID.java
@@ -746,8 +746,9 @@ public interface DataSerializableFixedID extends SerializationVersions {
   public static final short SERIAL_ACKED_MESSAGE = 2001;
   public static final short CLIENT_DATASERIALIZER_MESSAGE=2002;
   
-  //2003..2099 unused
+  //2003..2098 unused
   
+  public static final short BUCKET_COUNT_LOAD_PROBE = 2099;
   public static final short PERSISTENT_MEMBERSHIP_VIEW_REQUEST =2100;
   public static final short PERSISTENT_MEMBERSHIP_VIEW_REPLY = 2101;
   public static final short PERSISTENT_STATE_QUERY_REQUEST = 2102;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/442faa06/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
index 98e1f25..ef9c502 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/control/InternalResourceManager.java
@@ -89,7 +89,7 @@ public class InternalResourceManager implements ResourceManager {
 
   final GemFireCacheImpl cache;
   
-  private final LoadProbe loadProbe;
+  private LoadProbe loadProbe;
   
   private final ResourceManagerStats stats;
   private final ResourceAdvisor resourceAdvisor;
@@ -545,6 +545,15 @@ public class InternalResourceManager implements ResourceManager {
     return this.loadProbe;
   }
 
+  /**
+   * This method is test purposes only.
+   */
+  public LoadProbe setLoadProbe(LoadProbe probe) {
+    LoadProbe old = this.loadProbe;
+    this.loadProbe = probe;
+    return old;
+  }
+
   /* (non-Javadoc)
    * @see com.gemstone.gemfire.cache.control.ResourceManager#setEvictionHeapPercentage(int)
    */

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/442faa06/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketCountLoadProbe.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketCountLoadProbe.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketCountLoadProbe.java
new file mode 100644
index 0000000..07c9a1f
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/BucketCountLoadProbe.java
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.cache.partitioned;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.internal.DataSerializableFixedID;
+import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.cache.BucketAdvisor;
+import com.gemstone.gemfire.internal.cache.PartitionedRegion;
+import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
+
+/**
+ * A load probe which calculates the load of a pr using
+ * the just the number of buckets on a member.
+ * 
+ */
+public class BucketCountLoadProbe implements LoadProbe, DataSerializableFixedID {
+  private static final long serialVersionUID = 7040814060882774875L;
+
+  public PRLoad getLoad(PartitionedRegion pr) {
+    PartitionedRegionDataStore ds = pr.getDataStore();
+    int configuredBucketCount = pr.getTotalNumberOfBuckets();
+    PRLoad prLoad = new PRLoad(
+        configuredBucketCount, pr.getLocalMaxMemory());
+    
+    // key: bid, value: size
+    for(Integer bidInt : ds.getAllLocalBucketIds()) {
+      int bid = bidInt.intValue();
+      
+      BucketAdvisor bucketAdvisor = pr.getRegionAdvisor().
+      getBucket(bid).getBucketAdvisor();
+      //Wait for a primary to exist for this bucket, because
+      //it might be this member.
+      bucketAdvisor.getPrimary();
+      boolean isPrimary = pr.getRegionAdvisor().
+          getBucket(bid).getBucketAdvisor().isPrimary();
+      prLoad.addBucket(bid, 1, isPrimary ? 1 : 0);
+    }
+    
+    return prLoad;
+  }
+
+  public void fromData(DataInput in) throws IOException, ClassNotFoundException {
+  }
+
+  public void toData(DataOutput out) throws IOException {
+  }
+
+  public int getDSFID() {
+    return BUCKET_COUNT_LOAD_PROBE;
+  }
+
+  @Override
+  public Version[] getSerializationVersions() {
+    return null;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/442faa06/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
index 9029b8d..88516fe 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/control/RebalanceOperationDUnitTest.java
@@ -43,6 +43,7 @@ import com.gemstone.gemfire.cache.DiskStoreFactory;
 import com.gemstone.gemfire.cache.EntryEvent;
 import com.gemstone.gemfire.cache.EvictionAction;
 import com.gemstone.gemfire.cache.EvictionAttributes;
+import com.gemstone.gemfire.cache.GemFireCache;
 import com.gemstone.gemfire.cache.LoaderHelper;
 import com.gemstone.gemfire.cache.PartitionAttributes;
 import com.gemstone.gemfire.cache.PartitionAttributesFactory;
@@ -66,9 +67,12 @@ import com.gemstone.gemfire.internal.cache.BucketRegion;
 import com.gemstone.gemfire.internal.cache.ColocationHelper;
 import com.gemstone.gemfire.internal.cache.DiskStoreImpl;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+import com.gemstone.gemfire.internal.cache.InternalCache;
 import com.gemstone.gemfire.internal.cache.PartitionedRegion;
 import com.gemstone.gemfire.internal.cache.PartitionedRegionDataStore;
 import com.gemstone.gemfire.internal.cache.control.InternalResourceManager.ResourceObserverAdapter;
+import com.gemstone.gemfire.internal.cache.partitioned.BucketCountLoadProbe;
+import com.gemstone.gemfire.internal.cache.partitioned.LoadProbe;
 
 import dunit.AsyncInvocation;
 import dunit.Host;
@@ -2810,13 +2814,144 @@ public class RebalanceOperationDUnitTest extends CacheTestCase {
     moveBucketsWithUnrecoveredValuesRedundancy(false);
   }
   
+  public void testBalanceBucketsByCountSimulation() {
+    balanceBucketsByCount(true);
+  }
+  
+  public void testBalanceBucketsByCount() {
+    balanceBucketsByCount(false);
+  }
+  
   /**
    * Check to make sure that we balance
-   * buckets between two hosts with no redundancy,
-   * 
-   * even if the values have not yet been faulted in from disk.
+   * buckets between two hosts with no redundancy.
    * @param simulate
    */
+  public void balanceBucketsByCount(final boolean simulate) {
+    Host host = Host.getHost(0);
+    VM vm0 = host.getVM(0);
+    VM vm1 = host.getVM(1);
+
+    LoadProbe oldProbe = setLoadProbe(vm0, new BucketCountLoadProbe());
+    try {
+      SerializableRunnable createPrRegion = new SerializableRunnable("createRegion") {
+        public void run()
+        {
+          Cache cache = getCache();
+          AttributesFactory attr = new AttributesFactory();
+          PartitionAttributesFactory paf = new PartitionAttributesFactory();
+          paf.setRedundantCopies(0);
+          paf.setRecoveryDelay(-1);
+          paf.setStartupRecoveryDelay(-1);
+          PartitionAttributes prAttr = paf.create();
+          attr.setPartitionAttributes(prAttr);
+          attr.setCacheLoader(new Bug40228Loader());
+          cache.createRegion("region1", attr.create());
+        }
+      };
+
+      //Create the region in only 1 VM
+      vm0.invoke(createPrRegion);
+
+      //Create some buckets with very uneven sizes
+      vm0.invoke(new SerializableRunnable("createSomeBuckets") {
+
+        public void run() {
+          Cache cache = getCache();
+          Region region = cache.getRegion("region1");
+          region.put(Integer.valueOf(1), new byte[1024 * 1024]);
+          region.put(Integer.valueOf(2), "A");
+          region.put(Integer.valueOf(3), "A");
+          region.put(Integer.valueOf(4), "A");
+          region.put(Integer.valueOf(5), "A");
+          region.put(Integer.valueOf(6), "A");
+        }
+      });
+
+      //Create the region in the other VM (should have no effect)
+      vm1.invoke(createPrRegion);
+
+      //Now simulate a rebalance
+      vm0.invoke(new SerializableRunnable("simulateRebalance") {
+
+        public void run() {
+          Cache cache = getCache();
+          ResourceManager manager = cache.getResourceManager();
+          RebalanceResults results = doRebalance(simulate, manager);
+          assertEquals(0, results.getTotalBucketCreatesCompleted());
+          assertEquals(0, results.getTotalPrimaryTransfersCompleted());
+          assertEquals(3, results.getTotalBucketTransfersCompleted());
+          assertTrue(0 < results.getTotalBucketTransferBytes());
+          Set<PartitionRebalanceInfo> detailSet = results.getPartitionRebalanceDetails();
+          assertEquals(1, detailSet.size());
+          PartitionRebalanceInfo details = detailSet.iterator().next();
+          assertEquals(0, details.getBucketCreatesCompleted());
+          assertEquals(0, details.getPrimaryTransfersCompleted());
+          assertTrue(0 < details.getBucketTransferBytes());
+          assertEquals(3, details.getBucketTransfersCompleted());
+
+          Set<PartitionMemberInfo> afterDetails = details.getPartitionMemberDetailsAfter();
+          assertEquals(2, afterDetails.size());
+          for(PartitionMemberInfo memberDetails: afterDetails) {
+            assertEquals(3, memberDetails.getBucketCount());
+            assertEquals(3, memberDetails.getPrimaryCount());
+          }
+          if(!simulate) {
+            verifyStats(manager, results);
+          }
+        }
+      });
+
+      if(!simulate) {
+        SerializableRunnable checkRedundancyFixed = new SerializableRunnable("checkRedundancyFixed") {
+
+          public void run() {
+            Cache cache = getCache();
+            Region region = cache.getRegion("region1");
+            PartitionRegionInfo details = PartitionRegionHelper.getPartitionRegionInfo(region);
+            assertEquals(6, details.getCreatedBucketCount());
+            assertEquals(0,details.getActualRedundantCopies());
+            assertEquals(0,details.getLowRedundancyBucketCount());
+            assertEquals(2, details.getPartitionMemberInfo().size());
+            for(PartitionMemberInfo memberDetails: details.getPartitionMemberInfo()) {
+              assertEquals(3, memberDetails.getBucketCount());
+              assertEquals(3, memberDetails.getPrimaryCount());
+            }
+
+            //check to make sure that moving buckets didn't close the cache loader
+            Bug40228Loader loader = (Bug40228Loader) cache.getRegion("region1").getAttributes().getCacheLoader();
+            assertFalse(loader.isClosed());
+          }
+        };
+
+        vm0.invoke(checkRedundancyFixed);
+        vm1.invoke(checkRedundancyFixed);
+      }
+    } finally {
+      setLoadProbe(vm0, oldProbe);
+    }
+  }
+  
+  private LoadProbe setLoadProbe(VM vm, final LoadProbe probe) {
+    LoadProbe oldProbe = (LoadProbe) vm.invoke(new SerializableCallable("set load probe") {
+      
+      public Object call() {
+        GemFireCacheImpl cache = (GemFireCacheImpl) getCache();
+        InternalResourceManager mgr = cache.getResourceManager();
+        return mgr.setLoadProbe(probe);
+      }
+    });
+    
+    return oldProbe;
+  }
+
+  /** 
+   * Test to ensure that we wait for
+   * in progress write operations before moving a primary.
+   * @throws InterruptedException 
+   * @throws CancellationException 
+   * @throws TimeoutException 
+   */
   public void moveBucketsWithUnrecoveredValuesRedundancy(final boolean simulate) {
     Host host = Host.getHost(0);
     VM vm0 = host.getVM(0);


[18/50] [abbrv] incubator-geode git commit: GEODE-592. Increased wait time

Posted by je...@apache.org.
GEODE-592. Increased wait time


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

Branch: refs/heads/feature/GEODE-17
Commit: 52f0a1d59ea08de8cbff2be4ff96da3065ad5a05
Parents: 3588b02
Author: Hitesh Khamesra <hi...@yahoo.com>
Authored: Tue Nov 24 10:06:35 2015 -0800
Committer: Hitesh Khamesra <hi...@yahoo.com>
Committed: Tue Nov 24 12:19:33 2015 -0800

----------------------------------------------------------------------
 .../membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/52f0a1d5/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
index 1699068..1113f5f 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
@@ -149,7 +149,7 @@ public class GMSHealthMonitorJUnitTest {
 
     // allow the monitor to give up on the initial "next neighbor" and
     // move on to the one after it
-    long giveup = System.currentTimeMillis() + memberTimeout + 500;
+    long giveup = System.currentTimeMillis() + memberTimeout + 600;
     InternalDistributedMember expected = mockMembers.get(5);
     InternalDistributedMember neighbor = gmsHealthMonitor.getNextNeighbor();
     while (System.currentTimeMillis() < giveup && neighbor != expected) {


[25/50] [abbrv] incubator-geode git commit: GEODE-605: Fix https access for REST Swagger UI

Posted by je...@apache.org.
GEODE-605: Fix https access for REST Swagger UI


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

Branch: refs/heads/feature/GEODE-17
Commit: 1b0905c9d9a38662d1aafc58749ae882ddc68edd
Parents: 6612b9f
Author: Jens Deppe <jd...@pivotal.io>
Authored: Wed Nov 25 09:43:31 2015 -0800
Committer: Jens Deppe <jd...@pivotal.io>
Committed: Wed Nov 25 09:43:31 2015 -0800

----------------------------------------------------------------------
 .../web/swagger/config/RestApiPathProvider.java        | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/1b0905c9/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
----------------------------------------------------------------------
diff --git a/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java b/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
index ea40060..a8921d7 100644
--- a/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
+++ b/gemfire-web-api/src/main/java/com/gemstone/gemfire/rest/internal/web/swagger/config/RestApiPathProvider.java
@@ -18,9 +18,8 @@ package com.gemstone.gemfire.rest.internal.web.swagger.config;
 
 import javax.servlet.ServletContext;
 
-import com.gemstone.gemfire.cache.Cache;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.InternalDistributedSystem;
-import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.mangofactory.swagger.core.SwaggerPathProvider;
 
@@ -42,12 +41,10 @@ public class RestApiPathProvider implements SwaggerPathProvider {
     Assert.isTrue(!StringUtils.isBlank(docsLocation),
         "The docs location must be specified!");
 
-    this.docsLocation = "http://"
-        + InternalDistributedSystem.getAnyInstance().getConfig()
-            .getHttpServiceBindAddress()
-        + ":"
-        + InternalDistributedSystem.getAnyInstance().getConfig()
-            .getHttpServicePort();
+    DistributionConfig config = InternalDistributedSystem.getAnyInstance().getConfig();
+    String scheme = config.getHttpServiceSSLEnabled() ? "https" : "http";
+
+    this.docsLocation = scheme + "://" + config.getHttpServiceBindAddress() + ":" + config.getHttpServicePort();
   }
 
   @Override


[32/50] [abbrv] incubator-geode git commit: Adding code-coverage testing for GMSMembershipManager and removing unused code.

Posted by je...@apache.org.
Adding code-coverage testing for GMSMembershipManager and removing unused code.


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

Branch: refs/heads/feature/GEODE-17
Commit: 38dd3ed892be2acd1609c0b72ee5f4d4cfe85175
Parents: 253549d
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Fri Nov 20 13:33:21 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Dec 1 08:47:51 2015 -0800

----------------------------------------------------------------------
 .../internal/DistributionChannel.java           |   2 +-
 .../internal/DistributionManager.java           |  29 +-
 .../internal/HighPriorityAckedMessage.java      |   4 +-
 .../distributed/internal/StartupMessage.java    |  19 -
 .../distributed/internal/StartupOperation.java  |   1 -
 .../internal/direct/DirectChannel.java          |  16 +-
 .../internal/direct/DirectChannelListener.java  |  22 ++
 .../DistributedMembershipListener.java          |  13 +-
 .../internal/membership/MemberFactory.java      |   8 -
 .../internal/membership/MemberServices.java     |   6 -
 .../internal/membership/MembershipManager.java  |  13 -
 .../internal/membership/gms/GMSMember.java      |  22 --
 .../membership/gms/GMSMemberFactory.java        |  12 +-
 .../internal/membership/gms/GMSUtil.java        |  19 +
 .../membership/gms/fd/GMSHealthMonitor.java     |   2 +-
 .../gms/messenger/JGroupsMessenger.java         |   9 +-
 .../gms/mgr/GMSMembershipManager.java           | 342 +++--------------
 .../internal/logging/log4j/LogMarker.java       |   1 -
 .../gemfire/internal/tcp/Connection.java        |   7 +
 .../gemfire/internal/tcp/TCPConduit.java        |   6 +-
 .../membership/MembershipJUnitTest.java         |  29 +-
 .../locator/GMSLocatorRecoveryJUnitTest.java    |   4 +-
 .../gms/mgr/GMSMembershipManagerJUnitTest.java  | 370 +++++++++++++++++++
 23 files changed, 520 insertions(+), 436 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/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 daccc9c..a31c92f 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
@@ -132,7 +132,7 @@ public class DistributionChannel  {
   public long getId() {
     MembershipManager mgr = this.membershipManager;
     if (mgr == null) {
-      throw new DistributedSystemDisconnectedException(LocalizedStrings.DistributionChannel_I_NO_LONGER_HAVE_A_MEMBERSHIP_ID.toLocalizedString(), membershipManager.getShutdownCause());
+      throw new DistributedSystemDisconnectedException(LocalizedStrings.DistributionChannel_I_NO_LONGER_HAVE_A_MEMBERSHIP_ID.toLocalizedString());
     }
     InternalDistributedMember moi = mgr.getLocalMember();
     if (moi == null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/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 837194c..5d3bdce 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
@@ -593,7 +593,7 @@ public class DistributionManager
             }
           }
         }
-        dm.addNewMember(id, null); // add ourselves
+        dm.addNewMember(id); // add ourselves
         dm.selectElder(); // ShutdownException could be thrown here
       }
 
@@ -1440,7 +1440,7 @@ public class DistributionManager
       // Add them all to our view
       Iterator<InternalDistributedMember> it = v.getMembers().iterator();
       while (it.hasNext()) {
-        addNewMember(it.next(), null);
+        addNewMember(it.next());
       }
       
       // Figure out who the elder is...
@@ -1610,15 +1610,6 @@ public class DistributionManager
   }
 
   /**
-   * Returns a remote reference to the channel used for point-to-point
-   * communications, or null if the normal channel is being used for
-   * this.
-   */
-  protected Stub getDirectChannel() {
-    return membershipManager.getDirectChannel();
-  }
-
-  /**
    * Returns an unmodifiable set containing the identities of all of
    * the known (non-admin-only) distribution managers.
    */
@@ -1820,16 +1811,16 @@ public class DistributionManager
     }
   }
 
-  public void addNewMember(InternalDistributedMember member, Stub stub) {
+  public void addNewMember(InternalDistributedMember member) {
     // This is the place to cleanup the zombieMembers
     int vmType = member.getVmKind();
     switch (vmType) {
       case ADMIN_ONLY_DM_TYPE:
-        handleConsoleStartup(member, stub);
+        handleConsoleStartup(member);
         break;
       case LOCATOR_DM_TYPE:
       case NORMAL_DM_TYPE:
-        handleManagerStartup(member, stub);
+        handleManagerStartup(member);
         break;        
       default:
         throw new InternalGemFireError(LocalizedStrings.DistributionManager_UNKNOWN_MEMBER_TYPE_0.toLocalizedString(Integer.valueOf(vmType)));
@@ -2795,7 +2786,7 @@ public class DistributionManager
         if (unresponsiveElder) {
           logger.warn(LocalizedMessage.create(
               LocalizedStrings.DistributionManager_FORCING_AN_ELDER_JOIN_EVENT_SINCE_A_STARTUP_RESPONSE_WAS_NOT_RECEIVED_FROM_ELDER__0_, e));
-          handleManagerStartup(e, null/*stub already registered*/);
+          handleManagerStartup(e);
         }
       } // an elder exists
     } // someone didn't reply
@@ -3104,7 +3095,7 @@ public class DistributionManager
    *        The id of the distribution manager starting up
    *
    */
-  private void handleManagerStartup(InternalDistributedMember theId, Stub directChannel) {
+  private void handleManagerStartup(InternalDistributedMember theId) {
     HashMap<InternalDistributedMember,InternalDistributedMember> tmp = null;
     synchronized (this.membersLock) {
       // Note test is under membersLock
@@ -3150,7 +3141,7 @@ public class DistributionManager
    * the distributed cache.
    *
    */
-  private void handleConsoleStartup(InternalDistributedMember theId, Serializable directChannel) {
+  private void handleConsoleStartup(InternalDistributedMember theId) {
     // if we have an all listener then notify it NOW.
     HashSet tmp = null;
     synchronized (this.membersLock) {
@@ -4400,12 +4391,12 @@ public class DistributionManager
       handleIncomingDMsg(message);
     }
 
-    public void newMemberConnected(InternalDistributedMember member, Stub stub) {
+    public void newMemberConnected(InternalDistributedMember member) {
       // Do not elect the elder here as surprise members invoke this callback
       // without holding the view lock.  That can cause a race condition and
       // subsequent deadlock (#45566).  Elder selection is now done when a view
       // is installed.
-      dm.addNewMember(member, stub);
+      dm.addNewMember(member);
     }
 
     public void memberDeparted(InternalDistributedMember theId, boolean crashed, String reason) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/HighPriorityAckedMessage.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/HighPriorityAckedMessage.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/HighPriorityAckedMessage.java
index cf0a856..66bd9bb 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/HighPriorityAckedMessage.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/HighPriorityAckedMessage.java
@@ -69,7 +69,9 @@ public final class HighPriorityAckedMessage extends HighPriorityDistributionMess
     if (ds != null) {
       this.originDm = (DistributionManager)ds.getDistributionManager();
     }
-    this.id = this.originDm.getDistributionManagerId();
+    if (this.originDm != null) {
+      this.id = this.originDm.getDistributionManagerId();
+    }
   }
   
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/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 612d3fa..96f8b60 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
@@ -46,8 +46,6 @@ import com.gemstone.gemfire.internal.tcp.Stub;
 public final class StartupMessage extends HighPriorityDistributionMessage implements AdminMessageType {
   private static final Logger logger = LogService.getLogger();
 
-  /** A stub for the direct channel for this manager */
-  private Stub directChannel;
   private String version = GemFireVersion.getGemFireVersion(); // added for bug 29005
   private int replyProcessorId;
   private boolean isMcastEnabled;
@@ -102,13 +100,6 @@ public final class StartupMessage extends HighPriorityDistributionMessage implem
   ///////////////////////  Instance Methods  ///////////////////////
   
   /**
-   * Sets the id of the distribution manager that is starting up
-   */
-  void setDirectChannel(Stub directChannel) {
-    this.directChannel = directChannel;
-  }
-
-  /**
    * Sets the reply processor for this message
    */
   void setReplyProcessorId(int proc) {
@@ -319,10 +310,6 @@ public final class StartupMessage extends HighPriorityDistributionMessage implem
   @Override
   public void toData(DataOutput out) throws IOException {
     super.toData(out);
-    out.writeBoolean(this.directChannel != null);
-    if (this.directChannel != null) {
-      InternalDataSerializer.invokeToData(this.directChannel, out);
-    }
 
     boolean pre9_0_0_0 = InternalDataSerializer.
         getVersionForDataStream(out).compareTo(Version.GFE_90) < 0;
@@ -391,12 +378,6 @@ public final class StartupMessage extends HighPriorityDistributionMessage implem
   public void fromData(DataInput in)
     throws IOException, ClassNotFoundException {
     super.fromData(in);
-    boolean hasDirectChannel = in.readBoolean();
-    if (hasDirectChannel) {
-      this.directChannel = Stub.createFromData(in);
-    } else {
-      this.directChannel = null;
-    }
 
     boolean pre9_0_0_0 = InternalDataSerializer.
         getVersionForDataStream(in).compareTo(Version.GFE_90) < 0;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/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 6d0ccb7..721f95b 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
@@ -65,7 +65,6 @@ public class StartupOperation {
     msg.setDistributedSystemId(dm.getConfig().getDistributedSystemId());
     msg.setRedundancyZone(redundancyZone);
     msg.setEnforceUniqueZone(enforceUniqueZone);
-    msg.setDirectChannel(dm.getDirectChannel());
     msg.setMcastEnabled(transport.isMcastEnabled());
     msg.setMcastPort(dm.getSystem().getOriginalConfig().getMcastPort());
     msg.setMcastHostAddress(dm.getSystem().getOriginalConfig().getMcastAddress());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/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 fb7572a..f84813e 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
@@ -91,7 +91,7 @@ public class DirectChannel {
     private volatile boolean disconnectCompleted = true;
 
     /** this is the DistributionManager, most of the time */
-    private final DistributedMembershipListener receiver;
+    private final DirectChannelListener receiver;
 
     private final InetAddress address;
     
@@ -142,17 +142,17 @@ public class DirectChannel {
 
     /**
      * @param mgr
-     * @param dm
+     * @param listener
      * @param dc
      * @param unused
      * @throws ConnectionException
      */
-    public DirectChannel(MembershipManager mgr, DistributedMembershipListener dm,
-        DistributionConfig dc, Properties unused) 
+    public DirectChannel(MembershipManager mgr, DirectChannelListener listener,
+        DistributionConfig dc) 
         throws ConnectionException {
-      this.receiver = dm;
+      this.receiver = listener;
 
-      this.address = initAddress(dm, dc);
+      this.address = initAddress(dc);
       boolean isBindAddress = dc.getBindAddress() != null;
       try {
         int port = Integer.getInteger("tcpServerPort", 0).intValue();
@@ -889,7 +889,7 @@ public class DirectChannel {
   }
 
   /** returns the receiver to which this DirectChannel is delivering messages */
-  protected DistributedMembershipListener getReceiver() {
+  protected DirectChannelListener getReceiver() {
     return receiver;
   }
 
@@ -909,7 +909,7 @@ public class DirectChannel {
     return this.conduit;
   }
 
-  private InetAddress initAddress(DistributedMembershipListener dm, DistributionConfig dc) {
+  private InetAddress initAddress(DistributionConfig dc) {
 
     String bindAddress = dc.getBindAddress();
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannelListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannelListener.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannelListener.java
new file mode 100755
index 0000000..28f481b
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/direct/DirectChannelListener.java
@@ -0,0 +1,22 @@
+package com.gemstone.gemfire.distributed.internal.direct;
+
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.DistributionMessage;
+
+public interface DirectChannelListener {
+
+  /**
+   * Event indicating a message has been delivered that we need to process.
+   * 
+   * @param o the message that should be processed.
+   */
+  public void messageReceived(DistributionMessage o);
+  
+
+  /**
+   * Return the distribution manager for this receiver
+   * @return the distribution manager
+   */
+  public DistributionManager getDM();
+  
+}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/DistributedMembershipListener.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/DistributedMembershipListener.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/DistributedMembershipListener.java
index 5436b47..acfd6ba 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/DistributedMembershipListener.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/DistributedMembershipListener.java
@@ -21,8 +21,9 @@ import java.util.Set;
 
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.DistributionMessage;
+import com.gemstone.gemfire.distributed.internal.direct.DirectChannelListener;
 
-public interface DistributedMembershipListener {
+public interface DistributedMembershipListener extends DirectChannelListener {
 
   /** this method is invoked when the processing of a new view is completed */
   public void viewInstalled(NetView view);
@@ -33,10 +34,8 @@ public interface DistributedMembershipListener {
   /**
    * Event indicating that a new member has joined the system.
    * @param m the new member
-   * @param stub the stub, if any, representing communication to this member
    */
-  public void newMemberConnected(InternalDistributedMember m, 
-      com.gemstone.gemfire.internal.tcp.Stub stub);
+  public void newMemberConnected(InternalDistributedMember m);
 
   /**
    * Event indicating that a member has left the system
@@ -83,10 +82,4 @@ public interface DistributedMembershipListener {
    */
   public String toString();
   
-  /**
-   * Return the distribution manager for this receiver
-   * @return the distribution manager
-   */
-  public DistributionManager getDM();
-  
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
index c8a23e8..250a9a3 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberFactory.java
@@ -38,14 +38,6 @@ public class MemberFactory {
   private static final MemberServices services = new GMSMemberFactory();
 
   /**
-   * Return a blank NetMember (used by externalization)
-   * @return the new NetMember
-   */
-  static public NetMember newNetMember() {
-    return services.newNetMember();
-  }
-  
-  /**
    * Return a new NetMember, possibly for a different host
    * 
    * @param i the name of the host for the specified NetMember, the current host (hopefully)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
index 8fb302e..3fb6ef2 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MemberServices.java
@@ -35,12 +35,6 @@ import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
 public interface MemberServices {
 
   /**
-   * Return a blank NetMember (used by externalization)
-   * @return the new NetMember
-   */
-  public abstract NetMember newNetMember();
-  
-  /**
    * Return a new NetMember, possibly for a different host
    * 
    * @param i the name of the host for the specified NetMember, the current host (hopefully)

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MembershipManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MembershipManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MembershipManager.java
index f72e6e2..54b82a7 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MembershipManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/MembershipManager.java
@@ -121,13 +121,6 @@ public interface MembershipManager {
    */
   public void startEventProcessing();
   
-  /**
-   * Return the underlying proxy object, if any, associated with this
-   * local side of this connection.
-   * 
-   * @return the Stub
-   */
-  public Stub getDirectChannel();
   
   /**
    * @param destinations list of members to send the message to.  A list of
@@ -345,10 +338,4 @@ public interface MembershipManager {
    */
   public void releaseQuorumChecker(QuorumChecker checker);
   
-  /**
-   * sets the log writer for authentication logging
-   * @param writer
-   */
-  public void setSecurityLogWriter(InternalLogWriter writer);
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
index e7c9315..f4784ed 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
@@ -93,28 +93,6 @@ public class GMSMember implements NetMember, DataSerializableFixedID {
   }
   
   /**
-   * This is the only constructor to refer to a CacheMember other
-   * than the current host.
-   */
-  public GMSMember(GMSMember m) {
-    udpPort=m.udpPort;
-    preferredForCoordinator=m.preferredForCoordinator;
-    splitBrainEnabled=m.splitBrainEnabled;
-    memberWeight=m.memberWeight;
-    inetAddr=m.inetAddr;
-    processId=m.processId;
-    vmKind=m.vmKind;
-    vmViewId=m.vmViewId;
-    directPort=m.directPort;
-    name=m.name;
-    durableClientAttributes=m.durableClientAttributes;
-    groups=m.groups;
-    versionOrdinal=m.versionOrdinal;
-    uuidLSBs=m.uuidLSBs;
-    uuidMSBs=m.uuidMSBs;
-  }
-
-  /**
    * Create a CacheMember referring to the current host (as defined by
    * the given string).
    * 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
index 36311a2..2063d7c 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberFactory.java
@@ -95,17 +95,6 @@ public class GMSMemberFactory implements MemberServices {
     return newNetMember(inetAddr, p);
   }
   
-  /**
-   * Return a new Member
-   * 
-   * Used by externalization only.
-   * 
-   * @return blank member for use with externalization
-   */
-  public NetMember newNetMember() {
-    return new GMSMember();
-  }
-
   public MembershipManager newMembershipManager(DistributedMembershipListener listener,
           DistributionConfig config,
           RemoteTransportConfig transport, DMStats stats) throws DistributionException
@@ -140,4 +129,5 @@ public class GMSMemberFactory implements MemberServices {
     
     return new GMSLocator(bindAddress, stateFile, locatorString, usePreferredCoordinators, networkPartitionDetectionEnabled, stats);
   }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSUtil.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSUtil.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSUtil.java
index df8847c..6478c70 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSUtil.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSUtil.java
@@ -136,5 +136,24 @@ public class GMSUtil {
   }
   
   
+  /** compareTo for InetAddresses */
+  public static int compareAddresses(InetAddress one, InetAddress two) {
+    byte[] oneBytes = one.getAddress();
+    byte[] twoBytes = two.getAddress();
+
+    if (oneBytes != twoBytes) {
+      for (int i = 0; i < oneBytes.length; i++) {
+        if (i >= twoBytes.length)
+          return -1; // same as far as they go, but shorter...
+        if (oneBytes[i] < twoBytes[i])
+          return -1;
+        if (oneBytes[i] > twoBytes[i])
+          return 1;
+      }
+      if (oneBytes.length > twoBytes.length)
+        return 1; // same as far as they go, but longer...
+    }
+    return 0;
+  }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
index bd60236..fcda1a0 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/fd/GMSHealthMonitor.java
@@ -419,7 +419,7 @@ public class GMSHealthMonitor implements HealthMonitor, MessageHandler {
    * @return
    */
   private boolean doCheckMember(InternalDistributedMember member) {
-    if (playingDead) {
+    if (playingDead || beingSick) {
       // a member playingDead should not be sending messages to other
       // members, so we avoid sending heartbeat requests or suspect
       // messages by returning true.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 91c32ae..3a00f62 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -605,7 +605,7 @@ public class JGroupsMessenger implements Messenger {
         }
       }
       if (problem != null) {
-        if (services.getManager().getShutdownCause() != null) {
+        if (services.getShutdownCause() != null) {
           Throwable cause = services.getShutdownCause();
           // If ForcedDisconnectException occurred then report it as actual
           // problem.
@@ -901,13 +901,6 @@ public class JGroupsMessenger implements Messenger {
   }
   
   /**
-   * returns the JChannel for test verification
-   */
-  public JChannel getJGroupsChannel() {
-    return this.myChannel;
-  }
-  
-  /**
    * for unit testing we need to replace UDP with a fake UDP protocol 
    */
   public void setJGroupsStackConfigForTesting(String config) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
index e7c937d..4e108be 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManager.java
@@ -65,12 +65,14 @@ import com.gemstone.gemfire.distributed.internal.SizeableRunnable;
 import com.gemstone.gemfire.distributed.internal.StartupMessage;
 import com.gemstone.gemfire.distributed.internal.ThrottlingMemLinkedQueueWithDMStats;
 import com.gemstone.gemfire.distributed.internal.direct.DirectChannel;
+import com.gemstone.gemfire.distributed.internal.direct.DirectChannelListener;
 import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
 import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipManager;
 import com.gemstone.gemfire.distributed.internal.membership.MembershipTestHook;
 import com.gemstone.gemfire.distributed.internal.membership.NetView;
 import com.gemstone.gemfire.distributed.internal.membership.QuorumChecker;
+import com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil;
 import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
 import com.gemstone.gemfire.distributed.internal.membership.gms.SuspectMember;
 import com.gemstone.gemfire.distributed.internal.membership.gms.fd.GMSHealthMonitor;
@@ -85,7 +87,6 @@ import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheServerCreation;
 import com.gemstone.gemfire.internal.cache.xmlcache.CacheXmlGenerator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.logging.InternalLogWriter;
 import com.gemstone.gemfire.internal.logging.log4j.AlertAppender;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
@@ -134,18 +135,16 @@ public class GMSMembershipManager implements MembershipManager, Manager
   }
   
   static class StartupEvent  {
-    static final int DEPARTURE = 1;
-    static final int CONNECT = 2;
-    static final int VIEW = 3;
-    static final int MESSAGE = 4;
+    static final int SURPRISE_CONNECT = 1;
+    static final int VIEW = 2;
+    static final int MESSAGE = 3;
     
     /**
      * indicates whether the event is a departure, a surprise connect
      * (i.e., before the view message arrived), a view, or a regular
      * message
      * 
-     * @see #DEPARTURE
-     * @see #CONNECT
+     * @see #SURPRISE_CONNECT
      * @see #VIEW
      * @see #MESSAGE
      */
@@ -164,20 +163,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
       StringBuffer sb = new StringBuffer();
       sb.append("kind=");
       switch (kind) {
-      case DEPARTURE:
-        sb.append("departure; member = <")
-          .append(member)
-          .append(">; crashed = ")
-          .append(crashed)
-          .append("; reason = ");
-        if (reason != null && (reason.indexOf("NoSuchMemberException") >= 0)) {
-          sb.append(LocalizedStrings.GroupMembershipService_TCPIP_CONNECTIONS_CLOSED.toLocalizedString());
-        }
-        else {
-          sb.append(reason);
-        }
-        break;
-      case CONNECT:
+      case SURPRISE_CONNECT:
         sb.append("connect; member = <" + member + ">; stub = " + stub);
         break;
       case VIEW:
@@ -193,42 +179,23 @@ public class GMSMembershipManager implements MembershipManager, Manager
       }
       return sb.toString();
     }
-    /**
-     * Create a departure event
-     * @param dm the member that left
-     * @param crashed true if this member crashed
-     * @param reason reason string, esp. if crashed
-     */
-    StartupEvent(InternalDistributedMember dm, boolean crashed, String reason) {
-      this.kind = DEPARTURE;
-      this.member = dm;
-      this.crashed = crashed;
-      this.reason = reason;
-    }
-    /**
-     * Indicate if this is a departure
-     * @return true if this is a departure event
-     */
-    boolean isDepartureEvent() {
-      return this.kind == DEPARTURE;
-    }
 
     /**
-     * Create a connect event
+     * Create a surprise connect event
      * @param member the member connecting
      * @param id the stub
      */
     StartupEvent(final InternalDistributedMember member, final Stub id) {
-      this.kind = CONNECT;
+      this.kind = SURPRISE_CONNECT;
       this.member = member;
       this.stub = id;
     }
     /**
-     * Indicate if this is a connect event
+     * Indicate if this is a surprise connect event
      * @return true if this is a connect event
      */
-    boolean isConnect() {
-      return this.kind == CONNECT;
+    boolean isSurpriseConnect() {
+      return this.kind == SURPRISE_CONNECT;
     }
 
     /**
@@ -398,11 +365,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
    */
   private final long suspectMemberTimeout = 180000;
   
-  /** sleep period, in millis, that the user of this manager should slumber after creating
-      the manager.  This is advice from the JChannel itself when it detects a concurrent
-      startup race condition that requires a settling period. */
-  private long channelPause = 0;  
-
   /**
    * Length of time, in seconds, that a member is retained in the zombie set
    * 
@@ -451,10 +413,10 @@ public class GMSMembershipManager implements MembershipManager, Manager
    * @author jpenney
    * 
    */
-  class MyDCReceiver implements DistributedMembershipListener
+  class MyDCReceiver implements DirectChannelListener
   {
 
-    DistributedMembershipListener upCall;
+    DirectChannelListener upCall;
     
     /**
      * Don't provide events until the caller has told us we are ready.
@@ -465,60 +427,17 @@ public class GMSMembershipManager implements MembershipManager, Manager
      * client; we don't need to put this check before every call...
      *
      */
-   MyDCReceiver(DistributedMembershipListener up) {
+   MyDCReceiver(DirectChannelListener up) {
       upCall = up;
     }
 
-    public void messageReceived(DistributionMessage msg)
-    {
+    public void messageReceived(DistributionMessage msg) {
       // bug 36851 - notify failure detection that we've had contact from a member
       services.getHealthMonitor().contactedBy(msg.getSender());
       handleOrDeferMessage(msg);
     }
 
-    public void newMemberConnected(final InternalDistributedMember member, final Stub id)
-    {
-      handleOrDeferSurpriseConnect(member, id);
-    }
-
-    public void memberDeparted(InternalDistributedMember id, boolean crashed, String reason)
-    {
-      try {
-        handleOrDeferRemove(id, crashed, reason);
-      }
-      catch (DistributedSystemDisconnectedException ignore) {
-        // ignore
-      }
-      catch (RuntimeException e) {
-        logger.warn(LocalizedMessage.create(LocalizedStrings.GroupMembershipService_MEMBERSHIP_ERROR_HANDLING_MEMBER_DEPARTURE__0), e);
-      }
-    }
-    
-    public void quorumLost(Set<InternalDistributedMember> failures, List<InternalDistributedMember> remaining) {
-    }
-
-    public void memberSuspect(InternalDistributedMember suspect, InternalDistributedMember whoSuspected) {
-      // the direct channel isn't currently a source of suspect events, though
-      // it does request initiation of suspicion through the membership
-      // manager
-    }
-
-    public boolean isShutdownMsgSent()
-    {
-      return upCall.isShutdownMsgSent();
-    }
-
-    public void membershipFailure(String reason, Throwable t)
-    {
-      upCall.membershipFailure(reason, t);
-    }
-    
-    public void viewInstalled(NetView view) {
-      upCall.viewInstalled(view);
-    }
-
-    public DistributionManager getDM()
-    {
+    public DistributionManager getDM() {
      return upCall.getDM();
     }
 
@@ -547,9 +466,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
       msg.append("Membership: Processing view ");
       msg.append(newView);
       msg.append("} on " + address.toString());
-      if (logger.isDebugEnabled()) {
-        logger.debug(LogMarker.DM_VIEWS, msg);
-      }
       if (!newView.contains(address)) {
         logger.info(LocalizedMessage.create(
             LocalizedStrings.GroupMembershipService_THE_MEMBER_WITH_ID_0_IS_NO_LONGER_IN_MY_OWN_VIEW_1,
@@ -584,10 +500,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
       
       if (newViewId < latestViewId) {
         // ignore this view since it is old news
-        if (newViewId < latestViewId && logger.isDebugEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
-          logger.debug(LogMarker.DISTRIBUTION_VIEWS, "Membership: Ignoring view (with id {}) since it is older than the last view (with id {}); ignoredView={}",
-              newViewId, latestViewId, newView);
-        }
         return;
       }
 
@@ -641,8 +553,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
         }
 
         if (shutdownInProgress()) {
-          logger.info(LogMarker.DM_VIEWS, LocalizedMessage.create(
-              LocalizedStrings.GroupMembershipService_MEMBERSHIP_SHUNNING_MEMBER__0__DURING_OUR_SHUTDOWN, m));
           addShunnedMember(m);
           continue; // no additions processed after shutdown begins
         } else {
@@ -655,7 +565,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
         logger.info(LocalizedMessage.create(LocalizedStrings.GroupMembershipService_MEMBERSHIP_PROCESSING_ADDITION__0_, m));
 
         try {
-          listener.newMemberConnected(m, getStubForMember(m));
+          listener.newMemberConnected(m);
         }
         catch (VirtualMachineError err) {
           SystemFailure.initiateFailure(err);
@@ -690,8 +600,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
         }
 
         try {
-          logger.info(LogMarker.DM_VIEWS, LocalizedMessage.create(
-              LocalizedStrings.GroupMembershipService_MEMBERSHIP_PROCESSING_DEPARTING_MEMBER__0_, m));
           removeWithViewLock(m,
               newView.getCrashedMembers().contains(m) || suspectedMembers.containsKey(m)
               , "departed membership view");
@@ -741,9 +649,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
         if (birthtime.longValue() < oldestAllowed) {
           InternalDistributedMember m = (InternalDistributedMember)entry.getKey();
           it.remove();
-          if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
-            logger.trace(LogMarker.DISTRIBUTION_VIEWS, "Membership: expiring suspect member <{}>", m);
-          }
         }
       }
       try {
@@ -755,8 +660,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
     } finally {
       latestViewLock.writeLock().unlock();
     }
-    logger.info(LogMarker.DM_VIEWS, LocalizedMessage.create(
-        LocalizedStrings.GroupMembershipService_MEMBERSHIP_FINISHED_VIEW_PROCESSING_VIEWID___0, Long.valueOf(newViewId)));
   }
 
   /**
@@ -869,7 +772,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
 
     int dcPort = 0;
     if (!tcpDisabled) {
-      directChannel = new DirectChannel(this, dcReceiver, config, null);
+      directChannel = new DirectChannel(this, dcReceiver, config);
       dcPort = directChannel.getPort();
     }
 
@@ -971,23 +874,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
   }
   
   /**
-   * Remove a member, or queue a startup operation to do so
-   * @param dm the member to shun
-   * @param crashed true if crashed
-   * @param reason the reason, esp. if crashed
-   */
-  protected void handleOrDeferRemove(InternalDistributedMember dm,
-      boolean crashed, String reason) {
-    synchronized(startupLock) {
-      if (!processingEvents) {
-        startupMessages.add(new StartupEvent(dm, crashed, reason));
-        return;
-      }
-    }
-    removeMember(dm, crashed, reason);
-  }
-  
-  /**
    * Remove a member.  {@link #latestViewLock} must be held
    * before this method is called.  If member is not already shunned,
    * the uplevel event handler is invoked.
@@ -1007,10 +893,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
       return; // Explicit deletion, no upcall.
     }
     
-    if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
-      logger.trace(LogMarker.DISTRIBUTION_VIEWS, "Membership: dispatching uplevel departure event for < {} >", dm);
-    }
-    
     try {
       listener.memberDeparted(dm, crashed, reason);
     }
@@ -1020,48 +902,12 @@ public class GMSMembershipManager implements MembershipManager, Manager
   }
   
   /**
-   * Automatic removal of a member (for internal
-   * use only).  Write-locks {@link #latestViewLock} and then deletes
-   * the member.
-   * 
-   * @param dm
-   * @param crashed
-   * @param reason
-   */
-  protected void removeMember(InternalDistributedMember dm,
-      boolean crashed, String reason)
-  {
-    if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
-      StringBuffer sb = new StringBuffer(200);
-      sb.append("Membership: removing <")
-         .append(dm)
-         .append(">; crashed = ")
-         .append(crashed)
-         .append("; reason = ");
-      if (reason != null && (reason.indexOf("NoSuchMemberException") >= 0)) {
-        sb.append("tcp/ip connections closed");
-      }
-      else {
-        sb.append(reason);
-      }
-      logger.trace(LogMarker.DISTRIBUTION_VIEWS, sb);
-    }
-    latestViewLock.writeLock().lock();
-    try {
-      removeWithViewLock(dm, crashed, reason);
-    } finally {
-      latestViewLock.writeLock().unlock();
-    }
-  }
-  
- 
-  /**
    * Process a surprise connect event, or place it on the startup queue.
    * @param member the member
    * @param stub its stub
    */
-  protected void handleOrDeferSurpriseConnect(InternalDistributedMember member,
-      Stub stub) {
+  protected void handleOrDeferSurpriseConnect(InternalDistributedMember member) {
+    Stub stub = new Stub(member.getInetAddress(), member.getDirectChannelPort(), member.getVmViewId());
     synchronized (startupLock) {
       if (!processingEvents) {
         startupMessages.add(new StartupEvent(member, stub));
@@ -1113,7 +959,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
         return true;
       }
       if (member.getVmViewId() < 0) {
-        logger.warn("attempt to add a surprise member that has not yet joined the distributed system: " + member, new Exception("stack trace"));
+        logger.warn("adding a surprise member that has not yet joined the distributed system: " + member, new Exception("stack trace"));
       }
       if (latestView.getViewId() > member.getVmViewId()) {
         // tell the process that it should shut down distribution.
@@ -1133,20 +979,11 @@ public class GMSMembershipManager implements MembershipManager, Manager
         return false;
       }
 
-      if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
-        logger.trace(LogMarker.DISTRIBUTION_VIEWS, "Membership: Received message from surprise member: <{}>.  My view number is {} it is {}", 
-            member, latestView.getViewId(), member.getVmViewId());
-      }
-
       // Adding him to this set ensures we won't remove him if a new
       // view comes in and he's still not visible.
       surpriseMembers.put(member, Long.valueOf(System.currentTimeMillis()));
 
       if (shutdownInProgress()) {
-        if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
-          logger.trace(LogMarker.DISTRIBUTION_VIEWS, "Membership: new member during shutdown ignored: <{}>", member); 
-        }
-
         // Force disconnect, esp. the TCPConduit
         String msg = LocalizedStrings.GroupMembershipService_THIS_DISTRIBUTED_SYSTEM_IS_SHUTTING_DOWN.toLocalizedString();
         if (directChannel != null) {
@@ -1166,10 +1003,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
       } else {
 
         // Now that we're sure the member is new, add them.
-        if (logger.isTraceEnabled(LogMarker.DM_VIEWS)) {
-          logger.trace(LogMarker.DM_VIEWS, "Membership: Processing surprise addition <{}>", member);
-        }
-
         // make sure the surprise-member cleanup task is running
         if (this.cleanupTimer == null) {
           startCleanupTimer();
@@ -1206,7 +1039,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
       logger.warn(LocalizedMessage.create(
           LocalizedStrings.GroupMembershipService_MEMBERSHIP_IGNORING_SURPRISE_CONNECT_FROM_SHUNNED_MEMBER_0, member));
     } else {
-      listener.newMemberConnected(member, s);
+      listener.newMemberConnected(member);
     }
     return !warn;
   }
@@ -1364,10 +1197,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
       // to avoid blocking a reader thread
       NetView newView = viewArg;
       long newId = viewArg.getViewId();
-      if (logger.isTraceEnabled(LogMarker.DM_VIEWS)) {
-        logger.trace(LogMarker.DM_VIEWS, "Membership: queuing new view for processing, id = {}, view = {}", 
-            newId, newView);
-      }
       LocalViewMessage v = new LocalViewMessage(address, newId, newView,
           GMSMembershipManager.this);
 
@@ -1445,10 +1274,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
     else if (o.isGmsView()) { // view event
       processView(o.gmsView.getViewId(), o.gmsView);
     }
-    else if (o.isDepartureEvent()) { // departure
-      removeMember(o.member, o.crashed, o.reason);
-    }
-    else if (o.isConnect()) { // connect
+    else if (o.isSurpriseConnect()) { // connect
       processSurpriseConnect(o.member, o.stub);
     }
     
@@ -1552,6 +1378,12 @@ public class GMSMembershipManager implements MembershipManager, Manager
     }
   }
 
+  /**
+   * for testing we need to validate the startup event list
+   */
+  public List<StartupEvent> getStartupEvents() {
+    return this.startupMessages;
+  }
 
   public ReadWriteLock getViewLock() {
     return this.latestViewLock;
@@ -1639,19 +1471,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
     return services;
   }
 
-  public void postConnect()
-  {
-    if (channelPause > 0) {
-      logger.info(LocalizedMessage.create(
-          LocalizedStrings.GroupMembershipService_MEMBERSHIP_PAUSING_TO_ALLOW_OTHER_CONCURRENT_PROCESSES_TO_JOIN_THE_DISTRIBUTED_SYSTEM));
-      try {
-        Thread.sleep(channelPause);
-      }
-      catch (InterruptedException ie) {
-        Thread.currentThread().interrupt();
-      }
-      channelPause = 0;
-    }
+  public void postConnect() {
   }
   
   /**
@@ -1936,7 +1756,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
    * all received it)
    * @throws NotSerializableException if the message is not serializable
    */
-  private Set<InternalDistributedMember> directChannelSend(InternalDistributedMember[] destinations,
+  protected Set<InternalDistributedMember> directChannelSend(InternalDistributedMember[] destinations,
       DistributionMessage content,
       DMStats theStats)
       throws NotSerializableException
@@ -2122,7 +1942,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
     
     if (msg instanceof AdminMessageType
         && this.shutdownInProgress) {
-      // no alerts while shutting down - this can cause threads to hang
+      // no admin messages while shutting down - this can cause threads to hang
       return new HashSet(Arrays.asList(msg.getRecipients()));
     }
 
@@ -2243,7 +2063,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
       if (result == null) {
         // it may have not been added to the stub->idm map yet, so check the current view
         for (InternalDistributedMember idm: latestView.getMembers()) {
-          if (idm.getInetAddress().equals(s.getInetAddress())
+          if (GMSUtil.compareAddresses(idm.getInetAddress(), s.getInetAddress()) == 0
               && idm.getDirectChannelPort() == s.getPort()) {
             addChannel(idm, s);
             return idm;
@@ -2298,8 +2118,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
    */
   protected void destroyMember(final InternalDistributedMember member,
       boolean crashed, final String reason) {
-    if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS))
-      logger.trace(LogMarker.DISTRIBUTION_VIEWS, "Membership: destroying < {} >", member);
     
     // Clean up the maps
     Stub theChannel = (Stub)memberToStubMap.remove(member);
@@ -2362,18 +2180,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
     }
   }
   
-  public Stub getDirectChannel()
-  {
-    Stub result;
-    latestViewLock.readLock().lock();
-    try {
-      result = (Stub)memberToStubMap.get(address);
-    } finally {
-      latestViewLock.readLock().unlock();
-    }
-    return result;
-  }
-
   /**
    * Indicate whether the given member is in the zombie list (dead or dying)
    * @param m the member in question
@@ -2398,9 +2204,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
         return true;
       
       // Oh, it _is_ stale.  Remove it while we're here.
-      if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS)) {
-        logger.debug("Membership: no longer shunning <  {} >", m);
-      }
       endShun(m);
       return false;
     } finally {
@@ -2459,14 +2262,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
     return this.surpriseMemberTimeout;
   }
   
-  /**
-   * returns the shunned member shunset interval, in milliseconds
-   */
-  public int getShunnedMemberTimeout() {
-    return SHUNNED_SUNSET * 1000;
-  }
-  
-
   private boolean endShun(DistributedMember m) {
     boolean wasShunned = (shunnedMembers.remove(m) != null);
     shunnedAndWarnedMembers.remove(m);
@@ -2490,8 +2285,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
     // Update the shunned set.
     if (!isShunned(m)) {
       shunnedMembers.put(m, Long.valueOf(System.currentTimeMillis()));
-      if (logger.isTraceEnabled(LogMarker.DISTRIBUTION_VIEWS))
-        logger.trace(LogMarker.DISTRIBUTION_VIEWS, "Membership: added shunned member < {} >", m);
     }
 
     // Remove really really old shunned members.
@@ -2535,13 +2328,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
   }
   
   /**
-   * Set thread-local data for hydra
-   */
-  public void setThreadLocalData(Object data) {
-    Map dataMap = (Map)data;
-  }
-  
-  /**
    * for testing verification purposes, this return the port for the
    * direct channel, or zero if there is no direct
    * channel
@@ -2550,6 +2336,14 @@ public class GMSMembershipManager implements MembershipManager, Manager
     return directChannel == null? 0 : directChannel.getPort();
   }
   
+  /**
+   * for mock testing this allows insertion of a DirectChannel mock
+   */
+  protected void setDirectChannel(DirectChannel dc) {
+    this.directChannel = dc;
+    this.tcpDisabled = false;
+  }
+  
   /* non-thread-owned serial channels and high priority channels are not
    * included
    */
@@ -2664,6 +2458,8 @@ public class GMSMembershipManager implements MembershipManager, Manager
   }
   
 
+  // TODO remove this overly complex method and replace its use with
+  // waitForViewChange using the remote member's view ID
   public boolean waitForMembershipCheck(InternalDistributedMember remoteId) {
     boolean foundRemoteId = false;
     CountDownLatch currentLatch = null;
@@ -2689,8 +2485,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
     }
 
     if (!foundRemoteId) {
-      // ARB: wait for hardcoded 1000 ms for latch to open.
-      // if-stmt precondition: currentLatch is non-null
       try {
         if (currentLatch.await(membershipCheckTimeout, TimeUnit.MILLISECONDS)) {
           foundRemoteId = true;
@@ -2783,9 +2577,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
   public synchronized void beSick() {
     if (!beingSick) {
       beingSick = true;
-      if (logger.isInfoEnabled()) {
-        logger.info("GroupMembershipService.beSick invoked for {} - simulating sickness", this.address);
-      }
+      logger.info("GroupMembershipService.beSick invoked for {} - simulating sickness", this.address);
       services.getJoinLeave().beSick();
       services.getHealthMonitor().beSick();
       if (directChannel != null) {
@@ -2800,9 +2592,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
   public synchronized void playDead() {
     if (!playingDead) {
       playingDead = true;
-      if (logger.isDebugEnabled()) {
-        logger.debug("GroupMembershipService.playDead invoked for {}", this.address);
-      }
+      logger.info("GroupMembershipService.playDead invoked for {}", this.address);
       services.getJoinLeave().playDead();
       services.getHealthMonitor().playDead();
       services.getMessenger().playDead();
@@ -2816,9 +2606,7 @@ public class GMSMembershipManager implements MembershipManager, Manager
     if (beingSick || playingDead) {
       beingSick = false;
       playingDead = false;
-      if (logger.isDebugEnabled()) {
-        logger.debug("GroupMembershipService.beHealthy invoked for {} - recovering health now", this.address);
-      }
+      logger.info("GroupMembershipService.beHealthy invoked for {} - recovering health now", this.address);
       if (directChannel != null) {
         directChannel.beHealthy();
       }
@@ -2955,11 +2743,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
     services.getJoinLeave().disableDisconnectOnQuorumLossForTesting();
   }
 
-  @Override
-  public void setSecurityLogWriter(InternalLogWriter writer) {
-    Services.setSecurityLogWriter(writer);
-  }
-
 
   /**
    * Class <code>BoundedLinkedHashMap</code> is a bounded
@@ -2980,29 +2763,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
     /**
      * Constructor.
      *
-     * @param initialCapacity The initial capacity.
-     * @param loadFactor The load factor
-     * @param maximumNumberOfEntries The maximum number of allowed entries
-     */
-    public BoundedLinkedHashMap(int initialCapacity, float loadFactor, int maximumNumberOfEntries) {
-      super(initialCapacity, loadFactor);
-      this._maximumNumberOfEntries = maximumNumberOfEntries;
-    }
-
-    /**
-     * Constructor.
-     *
-     * @param initialCapacity The initial capacity.
-     * @param maximumNumberOfEntries The maximum number of allowed entries
-     */
-    public BoundedLinkedHashMap(int initialCapacity, int maximumNumberOfEntries) {
-      super(initialCapacity);
-      this._maximumNumberOfEntries = maximumNumberOfEntries;
-    }
-
-    /**
-     * Constructor.
-     *
      * @param maximumNumberOfEntries The maximum number of allowed entries
      */
     public BoundedLinkedHashMap(int maximumNumberOfEntries) {
@@ -3010,14 +2770,6 @@ public class GMSMembershipManager implements MembershipManager, Manager
       this._maximumNumberOfEntries = maximumNumberOfEntries;
     }
 
-    /**
-     * Returns the maximum number of entries.
-     * @return the maximum number of entries
-     */
-    public int getMaximumNumberOfEntries(){
-      return this._maximumNumberOfEntries;
-    }
-
     @Override
     protected boolean removeEldestEntry(Map.Entry entry) {
       return size() > this._maximumNumberOfEntries;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogMarker.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogMarker.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogMarker.java
index 04b4223..3b95ca6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogMarker.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/logging/log4j/LogMarker.java
@@ -73,7 +73,6 @@ public interface LogMarker {
   public static final Marker DISTRIBUTION_BRIDGE_SERVER = MarkerManager.getMarker("DISTRIBUTION_BRIDGE_SERVER").addParents(DISTRIBUTION, BRIDGE_SERVER);
   public static final Marker DISTRIBUTION_VIEWS = MarkerManager.getMarker("DISTRIBUTION_VIEWS").addParents(DISTRIBUTION);
   public static final Marker DM = MarkerManager.getMarker("DM").addParents(DISTRIBUTION);
-  public static final Marker DM_VIEWS = MarkerManager.getMarker("DM_VIEWS").addParents(DM, DISTRIBUTION_VIEWS);
   public static final Marker DM_BRIDGE_SERVER = MarkerManager.getMarker("DM_BRIDGE").addParents(BRIDGE_SERVER, DM);
   public static final Marker DA = MarkerManager.getMarker("DA").addParents(DISTRIBUTION);
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
index c592133..30962e7 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/Connection.java
@@ -771,6 +771,13 @@ public class Connection implements Runnable {
             String peerName;
             if (this.remoteAddr != null) {
               peerName = this.remoteAddr.toString();
+              // late in the life of jdk 1.7 we started seeing connections accepted
+              // when accept() was not even being called.  This started causing timeouts
+              // to occur in the handshake threads instead of causing failures in
+              // connection-formation.  So, we need to initiate suspect processing here
+              owner.getDM().getMembershipManager().suspectMember(this.remoteAddr,
+                  LocalizedStrings.Connection_CONNECTION_HANDSHAKE_WITH_0_TIMED_OUT_AFTER_WAITING_1_MILLISECONDS.toLocalizedString(
+                      new Object[] {peerName, Integer.valueOf(HANDSHAKE_TIMEOUT_MS)}));
             }
             else {
               peerName = "socket " + this.socket.getRemoteSocketAddress().toString()

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
index f4fab74..12a03fd 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/tcp/TCPConduit.java
@@ -645,9 +645,9 @@ public class TCPConduit implements Runnable {
           continue;
         }
         if (inhibitNewConnections) {
-          if (logger.isTraceEnabled(LogMarker.QA)) {
-            logger.trace(LogMarker.QA, "Test hook: inhibiting acceptance of connection {}", othersock);
-          }
+//          if (logger.isTraceEnabled(LogMarker.QA)) {
+            logger.info("Test hook: inhibiting acceptance of connection {}", othersock);
+//          }
           othersock.close();
           while (inhibitNewConnections && !stopped) {
             this.stopper.checkCancelInProgress(null);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
index fd5aaa7..91889df 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/MembershipJUnitTest.java
@@ -19,6 +19,10 @@ package com.gemstone.gemfire.distributed.internal.membership;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertEquals;
+
 import java.io.File;
 import java.net.InetAddress;
 import java.util.ArrayList;
@@ -43,6 +47,7 @@ import com.gemstone.gemfire.distributed.internal.DistributionConfig;
 import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
 import com.gemstone.gemfire.distributed.internal.DistributionManager;
 import com.gemstone.gemfire.distributed.internal.InternalLocator;
+import com.gemstone.gemfire.distributed.internal.membership.gms.GMSUtil;
 import com.gemstone.gemfire.distributed.internal.membership.gms.ServiceConfig;
 import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
 import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.JoinLeave;
@@ -54,13 +59,9 @@ import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
 import com.gemstone.gemfire.test.junit.categories.IntegrationTest;
 
 @Category(IntegrationTest.class)
-public class MembershipJUnitTest extends TestCase {
+public class MembershipJUnitTest {
   static Level baseLogLevel;
   
-  public MembershipJUnitTest(String name) {
-    super(name);
-  }
-
   @BeforeClass
   public static void setupClass() {
 //    baseLogLevel = LogService.getBaseLogLevel();
@@ -68,7 +69,7 @@ public class MembershipJUnitTest extends TestCase {
   }
   
   @AfterClass
-  protected void tearDown() throws Exception {
+  public static void tearDown() throws Exception {
 //    LogService.setBaseLogLevel(baseLogLevel);
   }
   
@@ -263,11 +264,25 @@ public class MembershipJUnitTest extends TestCase {
     GMSJoinLeave joinLeave = new GMSJoinLeave();
     try {
       joinLeave.init(services);
-      fail("expected a GemFireConfigException to be thrown because no locators are configured");
+      throw new Error("expected a GemFireConfigException to be thrown because no locators are configured");
     } catch (GemFireConfigException e) {
       // expected
     }
   }
   
+  /**
+   * test the GMSUtil.formatBytes() method
+   */
+  @Test
+  public void testFormatBytes() throws Exception {
+    byte[] bytes = new byte[200];
+    for (int i=0; i<bytes.length; i++) {
+      bytes[i] = (byte)(i%255);
+    }
+    String str = GMSUtil.formatBytes(bytes, 0, bytes.length);
+    System.out.println(str);
+    assertEquals(600+4, str.length());
+  }
+  
   
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
index 2d042fc..7badce6 100644
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/locator/GMSLocatorRecoveryJUnitTest.java
@@ -152,8 +152,8 @@ public class GMSLocatorRecoveryJUnitTest {
       nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "0");
       nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
       nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
-      nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostAddress()+'['+port+']');
-      nonDefault.put(DistributionConfig.BIND_ADDRESS_NAME, localHost.getHostAddress());
+      nonDefault.put(DistributionConfig.LOCATORS_NAME, localHost.getHostName()+'['+port+']');
+      nonDefault.put(DistributionConfig.BIND_ADDRESS_NAME, localHost.getHostName());
       DistributionConfigImpl config = new DistributionConfigImpl(nonDefault);
       RemoteTransportConfig transport = new RemoteTransportConfig(config,
           DistributionManager.NORMAL_DM_TYPE);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/38dd3ed8/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
new file mode 100755
index 0000000..2b59ca5
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/mgr/GMSMembershipManagerJUnitTest.java
@@ -0,0 +1,370 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.distributed.internal.membership.gms.mgr;
+
+import static org.mockito.Mockito.*;
+import static org.junit.Assert.*;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Properties;
+import java.util.Set;
+import java.util.Timer;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.distributed.DistributedSystemDisconnectedException;
+import com.gemstone.gemfire.distributed.internal.AdminMessageType;
+import com.gemstone.gemfire.distributed.internal.DistributionConfig;
+import com.gemstone.gemfire.distributed.internal.DistributionConfigImpl;
+import com.gemstone.gemfire.distributed.internal.DistributionManager;
+import com.gemstone.gemfire.distributed.internal.DistributionMessage;
+import com.gemstone.gemfire.distributed.internal.HighPriorityAckedMessage;
+import com.gemstone.gemfire.distributed.internal.HighPriorityDistributionMessage;
+import com.gemstone.gemfire.distributed.internal.direct.DirectChannel;
+import com.gemstone.gemfire.distributed.internal.membership.DistributedMembershipListener;
+import com.gemstone.gemfire.distributed.internal.membership.InternalDistributedMember;
+import com.gemstone.gemfire.distributed.internal.membership.NetView;
+import com.gemstone.gemfire.distributed.internal.membership.gms.ServiceConfig;
+import com.gemstone.gemfire.distributed.internal.membership.gms.Services;
+import com.gemstone.gemfire.distributed.internal.membership.gms.Services.Stopper;
+import com.gemstone.gemfire.distributed.internal.membership.gms.SuspectMember;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Authenticator;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.HealthMonitor;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.JoinLeave;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Manager;
+import com.gemstone.gemfire.distributed.internal.membership.gms.interfaces.Messenger;
+import com.gemstone.gemfire.distributed.internal.membership.gms.membership.GMSJoinLeave;
+import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager;
+import com.gemstone.gemfire.distributed.internal.membership.gms.mgr.GMSMembershipManager.StartupEvent;
+import com.gemstone.gemfire.internal.AvailablePortHelper;
+import com.gemstone.gemfire.internal.Version;
+import com.gemstone.gemfire.internal.admin.remote.AdminRequest;
+import com.gemstone.gemfire.internal.admin.remote.AdminResponse;
+import com.gemstone.gemfire.internal.admin.remote.AlertListenerMessage;
+import com.gemstone.gemfire.internal.admin.remote.RemoteTransportConfig;
+import com.gemstone.gemfire.internal.tcp.ConnectExceptions;
+import com.gemstone.gemfire.internal.tcp.Stub;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class GMSMembershipManagerJUnitTest {
+  private Services services;
+  private ServiceConfig mockConfig;
+  private DistributionConfig distConfig;
+  private Authenticator authenticator;
+  private HealthMonitor healthMonitor;
+  private InternalDistributedMember myMemberId;
+  private InternalDistributedMember[] mockMembers;
+  private Messenger messenger;
+  private JoinLeave joinLeave;
+  private Stopper stopper;
+  DistributedMembershipListener listener;
+  private GMSMembershipManager manager;
+  private List<InternalDistributedMember> members;
+  private Set<InternalDistributedMember> emptyMembersSet = new HashSet<>();
+  private DirectChannel dc;
+
+  @Before
+  public void initMocks() throws Exception {
+    Properties nonDefault = new Properties();
+    nonDefault.put(DistributionConfig.DISABLE_TCP_NAME, "true");
+    nonDefault.put(DistributionConfig.MCAST_PORT_NAME, "0");
+    nonDefault.put(DistributionConfig.MCAST_TTL_NAME, "0");
+    nonDefault.put(DistributionConfig.LOG_FILE_NAME, "");
+    nonDefault.put(DistributionConfig.LOG_LEVEL_NAME, "fine");
+    nonDefault.put(DistributionConfig.MEMBER_TIMEOUT_NAME, "2000");
+    nonDefault.put(DistributionConfig.LOCATORS_NAME, "localhost[10344]");
+    distConfig = new DistributionConfigImpl(nonDefault);
+    RemoteTransportConfig tconfig = new RemoteTransportConfig(distConfig,
+        DistributionManager.NORMAL_DM_TYPE);
+    
+
+    mockConfig = mock(ServiceConfig.class);
+    when(mockConfig.getDistributionConfig()).thenReturn(distConfig);
+    when(mockConfig.getTransport()).thenReturn(tconfig);
+    
+    authenticator = mock(Authenticator.class);
+    myMemberId = new InternalDistributedMember("localhost", 8887);
+    
+    messenger = mock(Messenger.class);
+    when(messenger.getMemberID()).thenReturn(myMemberId);
+
+    stopper = mock(Stopper.class);
+    when(stopper.isCancelInProgress()).thenReturn(false);
+    
+    healthMonitor = mock(HealthMonitor.class);
+    when(healthMonitor.getFailureDetectionPort()).thenReturn(Integer.valueOf(-1));
+    
+    joinLeave = mock(JoinLeave.class);
+    
+    services = mock(Services.class);
+    when(services.getAuthenticator()).thenReturn(authenticator);
+    when(services.getConfig()).thenReturn(mockConfig);
+    when(services.getMessenger()).thenReturn(messenger);
+    when(services.getCancelCriterion()).thenReturn(stopper);
+    when(services.getHealthMonitor()).thenReturn(healthMonitor);
+    when(services.getJoinLeave()).thenReturn(joinLeave);
+    
+    Timer t = new Timer(true);
+    when(services.getTimer()).thenReturn(t);
+    
+    mockMembers = new InternalDistributedMember[5];
+    for (int i = 0; i < mockMembers.length; i++) {
+      mockMembers[i] = new InternalDistributedMember("localhost", 8888 + i);
+    }
+    members = new ArrayList<>(Arrays.asList(mockMembers));
+
+    listener = mock(DistributedMembershipListener.class);
+    
+    manager = new GMSMembershipManager(listener);
+    manager.init(services);
+    when(services.getManager()).thenReturn(manager);
+  }
+  
+  @After
+  public void tearDown() throws Exception {
+    if (manager != null) {
+      manager.stop();
+      manager.stopped();
+    }
+  }
+  
+  @Test
+  public void testSendMessage() throws Exception {
+    HighPriorityAckedMessage m = new HighPriorityAckedMessage();
+    m.setRecipient(mockMembers[0]);
+    manager.start();
+    manager.started();
+    manager.installView(new NetView(myMemberId, 1, members, emptyMembersSet, emptyMembersSet));
+    Set<InternalDistributedMember> failures = manager.send(m);
+    verify(messenger).send(m);
+    if (failures != null) {
+      assertEquals(0, failures.size());
+    }
+  }
+  
+  @Test
+  public void testSendAdminMessageFailsDuringShutdown() throws Exception {
+    AlertListenerMessage m = AlertListenerMessage.create(mockMembers[0], 1, 
+       new Date(System.currentTimeMillis()), "thread", "", 1L, "", "");
+    manager.start();
+    manager.started();
+    manager.installView(new NetView(myMemberId, 1, members, emptyMembersSet, emptyMembersSet));
+    manager.setShutdown();
+    Set<InternalDistributedMember> failures = manager.send(m);
+    verify(messenger, never()).send(m);
+    assertEquals(1, failures.size());
+    assertEquals(mockMembers[0], failures.iterator().next());
+  }
+  
+  @Test
+  public void testSendToEmptyListIsRejected() throws Exception {
+    InternalDistributedMember[] emptyList = new InternalDistributedMember[0];
+    HighPriorityAckedMessage m = new HighPriorityAckedMessage();
+    m.setRecipient(mockMembers[0]);
+    manager.start();
+    manager.started();
+    manager.installView(new NetView(myMemberId, 1, members, emptyMembersSet, emptyMembersSet));
+    Set<InternalDistributedMember> failures = manager.send(null, m, null);
+    verify(messenger, never()).send(m);
+    reset(messenger);
+    failures = manager.send(emptyList, m, null);
+    verify(messenger, never()).send(m);
+  }
+  
+  @Test
+  public void testStartupEvents() throws Exception {
+    manager.start();
+    manager.started();
+    manager.isJoining = true;
+
+    List<InternalDistributedMember> viewmembers = Arrays.asList(new InternalDistributedMember[] {mockMembers[0], myMemberId});
+    manager.installView(new NetView(myMemberId, 2, viewmembers, emptyMembersSet, emptyMembersSet));
+
+    // add a surprise member that will be shunned due to it's having
+    // an old view ID
+    InternalDistributedMember surpriseMember = mockMembers[2];
+    surpriseMember.setVmViewId(1);
+    manager.handleOrDeferSurpriseConnect(surpriseMember);
+    assertEquals(1, manager.getStartupEvents().size());
+
+    // add a surprise member that will be accepted
+    InternalDistributedMember surpriseMember2 = mockMembers[3];
+    surpriseMember2.setVmViewId(3);
+    manager.handleOrDeferSurpriseConnect(surpriseMember2);
+    assertEquals(2, manager.getStartupEvents().size());
+
+    // suspect a member
+    InternalDistributedMember suspectMember = mockMembers[1];
+    manager.handleOrDeferSuspect(new SuspectMember(mockMembers[0], suspectMember));
+    // suspect messages aren't queued - they're ignored before joining the system
+    assertEquals(2, manager.getStartupEvents().size());
+    verify(listener, never()).memberSuspect(suspectMember, mockMembers[0]);
+
+    HighPriorityAckedMessage m = new HighPriorityAckedMessage();
+    mockMembers[0].setVmViewId(1);
+    m.setRecipient(mockMembers[0]);
+    m.setSender(mockMembers[1]);
+    manager.handleOrDeferMessage(m);
+    assertEquals(3, manager.getStartupEvents().size());
+
+    // this view officially adds surpriseMember2
+    viewmembers = Arrays.asList(
+        new InternalDistributedMember[] {mockMembers[0], myMemberId, surpriseMember2});
+    manager.handleOrDeferViewEvent(new NetView(myMemberId, 3, viewmembers, emptyMembersSet, emptyMembersSet));
+    assertEquals(4, manager.getStartupEvents().size());
+    
+    // add a surprise member that will be shunned due to it's having
+    // an old view ID
+    InternalDistributedMember surpriseMember3 = mockMembers[4];
+    surpriseMember.setVmViewId(1);
+    manager.handleOrDeferSurpriseConnect(surpriseMember);
+    assertEquals(5, manager.getStartupEvents().size());
+
+    
+    // process a new view after we finish joining but before event processing has started
+    manager.isJoining = false;
+    mockMembers[4].setVmViewId(4);
+    viewmembers = Arrays.asList(new InternalDistributedMember[] {mockMembers[0], myMemberId, surpriseMember2, mockMembers[4]});
+    manager.handleOrDeferViewEvent(new NetView(myMemberId, 4, viewmembers, emptyMembersSet, emptyMembersSet));
+    assertEquals(6, manager.getStartupEvents().size());
+    
+    // exercise the toString methods for code coverage
+    for (StartupEvent ev: manager.getStartupEvents()) {
+      ev.toString();
+    }
+    
+    manager.startEventProcessing();
+
+    // all startup events should have been processed 
+    assertEquals(0, manager.getStartupEvents().size());
+    // the new view should have been installed
+    assertEquals(4, manager.getView().getViewId());
+    // supriseMember2 should have been announced
+    verify(listener).newMemberConnected(surpriseMember2);
+    // supriseMember should have been rejected (old view ID)
+    verify(listener, never()).newMemberConnected(surpriseMember);
+    
+    // for code coverage also install a view after we finish joining but before
+    // event processing has started.  This should notify the distribution manager
+    // with a LocalViewMessage to process the view
+    reset(listener);
+    manager.handleOrDeferViewEvent(new NetView(myMemberId, 5, viewmembers, emptyMembersSet, emptyMembersSet));
+    assertEquals(0, manager.getStartupEvents().size());
+    verify(listener).messageReceived(isA(LocalViewMessage.class));
+
+    // process a suspect now - it will be passed to the listener
+    reset(listener);
+    suspectMember = mockMembers[1];
+    manager.handleOrDeferSuspect(new SuspectMember(mockMembers[0], suspectMember));
+    verify(listener).memberSuspect(suspectMember, mockMembers[0]);
+    
+    InternalDistributedMember mbr = manager.getMemberForStub(new Stub(myMemberId.getInetAddress(), 2033, 20), false);
+    assertTrue(mbr == null);
+    myMemberId.setDirectChannelPort(2033);
+    mbr = manager.getMemberForStub(new Stub(myMemberId.getInetAddress(), 2033, 20), false);
+    assertTrue(mbr != null);
+    assertEquals(mbr, myMemberId);
+  }
+  
+  /**
+   * Some tests require a DirectChannel mock
+   */
+  private void setUpDirectChannelMock() throws Exception {
+    dc = mock(DirectChannel.class);
+    when(dc.send(any(GMSMembershipManager.class), any(mockMembers.getClass()), any(DistributionMessage.class), anyInt(), anyInt()))
+      .thenReturn(100);
+
+    manager.start();
+    manager.started();
+    
+    manager.setDirectChannel(dc);
+
+    NetView view = new NetView(myMemberId, 1, members, emptyMembersSet, emptyMembersSet);
+    manager.installView(view);
+    when(joinLeave.getView()).thenReturn(view);
+    
+    manager.startEventProcessing();
+  }
+
+  @Test
+  public void testDirectChannelSend() throws Exception {
+    setUpDirectChannelMock();
+    HighPriorityAckedMessage m = new HighPriorityAckedMessage();
+    InternalDistributedMember[] recipients = new InternalDistributedMember[] {mockMembers[2], mockMembers[3]};
+    m.setRecipients(Arrays.asList(recipients));
+    Set<InternalDistributedMember> failures = manager.directChannelSend(recipients, m, null);
+    assertTrue(failures == null);
+    verify(dc).send(isA(GMSMembershipManager.class), isA(mockMembers.getClass()), isA(DistributionMessage.class), anyInt(), anyInt());
+  }
+  
+  @Test
+  public void testDirectChannelSendFailureToOneRecipient() throws Exception {
+    setUpDirectChannelMock();
+    HighPriorityAckedMessage m = new HighPriorityAckedMessage();
+    InternalDistributedMember[] recipients = new InternalDistributedMember[] {mockMembers[2], mockMembers[3]};
+    m.setRecipients(Arrays.asList(recipients));
+    Set<InternalDistributedMember> failures = manager.directChannelSend(recipients, m, null);
+
+    ConnectExceptions exception = new ConnectExceptions();
+    exception.addFailure(recipients[0], new Exception("testing"));
+    when(dc.send(any(GMSMembershipManager.class), any(mockMembers.getClass()), any(DistributionMessage.class), anyInt(), anyInt()))
+      .thenThrow(exception);
+    failures = manager.directChannelSend(recipients, m, null);
+    assertTrue(failures != null);
+    assertEquals(1, failures.size());
+    assertEquals(recipients[0], failures.iterator().next()); 
+  }
+  
+  @Test
+  public void testDirectChannelSendFailureToAll() throws Exception {
+    setUpDirectChannelMock();
+    HighPriorityAckedMessage m = new HighPriorityAckedMessage();
+    InternalDistributedMember[] recipients = new InternalDistributedMember[] {mockMembers[2], mockMembers[3]};
+    m.setRecipients(Arrays.asList(recipients));
+    Set<InternalDistributedMember> failures = manager.directChannelSend(recipients, m, null);
+    when(dc.send(any(GMSMembershipManager.class), any(mockMembers.getClass()), any(DistributionMessage.class), anyInt(), anyInt()))
+      .thenReturn(0);
+    when(stopper.cancelInProgress()).thenReturn("stopping for test");
+    try {
+      manager.directChannelSend(recipients, m, null);
+      throw new RuntimeException("expected directChannelSend to throw an exception");
+    } catch (DistributedSystemDisconnectedException e) {
+      // expected
+    }
+  }
+  
+  @Test
+  public void testDirectChannelSendAllRecipients() throws Exception {
+    setUpDirectChannelMock();
+    HighPriorityAckedMessage m = new HighPriorityAckedMessage();
+    m.setRecipient(DistributionMessage.ALL_RECIPIENTS);
+    assertTrue(m.forAll());
+    Set<InternalDistributedMember> failures = manager.directChannelSend(null, m, null);
+    assertTrue(failures == null);
+    verify(dc).send(isA(GMSMembershipManager.class), isA(mockMembers.getClass()), isA(DistributionMessage.class), anyInt(), anyInt());
+  }
+  
+}
+


[20/50] [abbrv] incubator-geode git commit: Merge branch 'feature/GEODE-18' into develop

Posted by je...@apache.org.
Merge branch 'feature/GEODE-18' into develop


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

Branch: refs/heads/feature/GEODE-17
Commit: 360665f36c529eecb287b55dfd8176779a893ec0
Parents: 52f0a1d 4e4228e
Author: Dick Cavender <dc...@pivotal.io>
Authored: Tue Nov 24 12:56:45 2015 -0800
Committer: Dick Cavender <dc...@pivotal.io>
Committed: Tue Nov 24 12:56:45 2015 -0800

----------------------------------------------------------------------
 .../gemfire/annotations/Experimental.java       | 16 +++++++++++++++
 .../annotations/ExperimentalJUnitTest.java      | 16 +++++++++++++++
 .../ClassInExperimentalPackage.java             | 16 +++++++++++++++
 .../experimentalpackage/package-info.java       | 16 +++++++++++++++
 .../ClassInNonExperimentalPackage.java          | 16 +++++++++++++++
 .../nonexperimentalpackage/package-info.java    | 16 +++++++++++++++
 .../gemfire/admin/internal/package.html         | 16 +++++++++++++++
 .../gemfire/admin/jmx/internal/package.html     | 16 +++++++++++++++
 .../com/gemstone/gemfire/admin/jmx/package.html | 16 +++++++++++++++
 .../com/gemstone/gemfire/admin/package.html     | 16 +++++++++++++++
 .../gemfire/cache/client/internal/package.html  | 16 +++++++++++++++
 .../gemstone/gemfire/cache/client/package.html  | 15 ++++++++++++++
 .../gemstone/gemfire/cache/control/package.html | 16 +++++++++++++++
 .../gemstone/gemfire/cache/execute/package.html | 15 ++++++++++++++
 .../gemfire/cache/operations/package.html       | 16 +++++++++++++++
 .../com/gemstone/gemfire/cache/package.html     | 16 +++++++++++++++
 .../gemfire/cache/partition/package.html        | 16 +++++++++++++++
 .../cache/query/internal/index/package.html     | 16 +++++++++++++++
 .../gemfire/cache/query/internal/package.html   | 16 +++++++++++++++
 .../gemstone/gemfire/cache/query/package.html   | 16 +++++++++++++++
 .../gemstone/gemfire/cache/server/package.html  | 15 ++++++++++++++
 .../gemfire/cache/snapshot/package.html         | 17 +++++++++++++++-
 .../gemstone/gemfire/cache/util/package.html    | 15 ++++++++++++++
 .../internal/distribution-overview.html         | 16 +++++++++++++++
 .../distributed/internal/locks/package.html     | 16 +++++++++++++++
 .../internal/membership/gms/GMSMember.java      | 21 ++++++++++++++------
 .../internal/membership/gms/GMSUtil.java        | 16 +++++++++++++++
 .../internal/membership/gms/NetLocator.java     | 16 +++++++++++++++
 .../internal/membership/gms/ServiceConfig.java  | 16 +++++++++++++++
 .../internal/membership/gms/Services.java       | 16 +++++++++++++++
 .../membership/gms/auth/GMSAuthenticator.java   | 16 +++++++++++++++
 .../membership/gms/fd/GMSHealthMonitor.java     | 16 +++++++++++++++
 .../gms/interfaces/Authenticator.java           | 16 +++++++++++++++
 .../gms/interfaces/HealthMonitor.java           | 16 +++++++++++++++
 .../membership/gms/interfaces/JoinLeave.java    | 16 +++++++++++++++
 .../membership/gms/interfaces/Locator.java      | 16 +++++++++++++++
 .../membership/gms/interfaces/Manager.java      | 16 +++++++++++++++
 .../gms/interfaces/MessageHandler.java          | 16 +++++++++++++++
 .../membership/gms/interfaces/Messenger.java    | 16 +++++++++++++++
 .../membership/gms/interfaces/Service.java      | 16 +++++++++++++++
 .../gms/locator/FindCoordinatorRequest.java     | 16 +++++++++++++++
 .../gms/locator/FindCoordinatorResponse.java    | 16 +++++++++++++++
 .../membership/gms/locator/GMSLocator.java      | 16 +++++++++++++++
 .../membership/gms/locator/GetViewRequest.java  | 16 +++++++++++++++
 .../membership/gms/locator/GetViewResponse.java | 16 +++++++++++++++
 .../gms/locator/PeerLocatorRequest.java         | 16 +++++++++++++++
 .../membership/gms/membership/GMSJoinLeave.java | 16 +++++++++++++++
 .../membership/gms/messages/HasMemberID.java    | 16 +++++++++++++++
 .../gms/messages/HeartbeatMessage.java          | 16 +++++++++++++++
 .../gms/messages/HeartbeatRequestMessage.java   | 16 +++++++++++++++
 .../gms/messages/InstallViewMessage.java        | 16 +++++++++++++++
 .../gms/messages/JoinRequestMessage.java        | 16 +++++++++++++++
 .../gms/messages/JoinResponseMessage.java       | 16 +++++++++++++++
 .../gms/messages/LeaveRequestMessage.java       | 16 +++++++++++++++
 .../gms/messages/NetworkPartitionMessage.java   | 16 +++++++++++++++
 .../gms/messages/RemoveMemberMessage.java       | 16 +++++++++++++++
 .../gms/messages/SuspectMembersMessage.java     | 16 +++++++++++++++
 .../membership/gms/messages/SuspectRequest.java | 18 ++++++++++++++++-
 .../membership/gms/messages/ViewAckMessage.java | 16 +++++++++++++++
 .../gms/messenger/AddressManager.java           | 16 +++++++++++++++
 .../membership/gms/messenger/GMSPingPonger.java | 16 +++++++++++++++
 .../gms/messenger/GMSQuorumChecker.java         | 16 +++++++++++++++
 .../membership/gms/messenger/JGAddress.java     | 16 +++++++++++++++
 .../gms/messenger/JGroupsMessenger.java         | 16 +++++++++++++++
 .../membership/gms/messenger/StatRecorder.java  | 16 +++++++++++++++
 .../membership/gms/messenger/Transport.java     | 16 +++++++++++++++
 .../gms/mgr/GMSMembershipManager.java           | 21 ++++++++++++++------
 .../internal/membership/gms/package.html        | 16 +++++++++++++++
 .../gemfire/distributed/internal/package.html   | 16 +++++++++++++++
 .../gemstone/gemfire/distributed/package.html   | 16 +++++++++++++++
 .../gemfire/internal/admin/package.html         | 16 +++++++++++++++
 .../gemfire/internal/admin/remote/package.html  | 16 +++++++++++++++
 .../gemfire/internal/cache/CacheService.java    | 16 +++++++++++++++
 .../gemfire/internal/cache/RegionListener.java  | 16 +++++++++++++++
 .../internal/cache/doc-files/properties.html    | 16 +++++++++++++++
 .../gemfire/internal/cache/package.html         | 16 +++++++++++++++
 .../gemfire/internal/cache/tier/package.html    | 16 +++++++++++++++
 .../internal/cache/tier/sockets/package.html    | 16 +++++++++++++++
 .../cache/xmlcache/GeodeEntityResolver.java     | 21 ++++++++++++++------
 .../internal/cache/xmlcache/package.html        | 16 +++++++++++++++
 .../com/gemstone/gemfire/internal/package.html  | 16 +++++++++++++++
 .../gemfire/internal/security/package.html      | 16 +++++++++++++++
 .../gemfire/internal/statistics/package.html    | 16 +++++++++++++++
 .../gemstone/gemfire/internal/tcp/package.html  | 16 +++++++++++++++
 .../gemfire/management/cli/package.html         | 16 +++++++++++++++
 .../gemstone/gemfire/management/package.html    | 16 +++++++++++++++
 .../main/java/com/gemstone/gemfire/package.html | 16 +++++++++++++++
 .../java/com/gemstone/gemfire/pdx/package.html  | 15 ++++++++++++++
 .../com/gemstone/gemfire/security/package.html  | 16 +++++++++++++++
 .../src/main/java/external-overview.html        | 16 +++++++++++++++
 .../src/main/java/internal-overview.html        | 16 +++++++++++++++
 .../gemfire/cache/cache-8.1.xsd                 | 16 +++++++++++++++
 .../gemfire/cache/cache-9.0.xsd                 | 16 +++++++++++++++
 .../gemstone/gemfire/admin/doc-files/ds4_0.dtd  | 15 ++++++++++++++
 .../gemstone/gemfire/admin/doc-files/ds5_0.dtd  | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache3_0.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache4_0.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache4_1.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache5_0.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache5_1.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache5_5.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache5_7.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache5_8.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache6_0.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache6_1.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache6_5.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache6_6.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache7_0.dtd        | 15 ++++++++++++++
 .../gemfire/cache/doc-files/cache8_0.dtd        | 15 ++++++++++++++
 .../membership/gms/messenger/jgroups-config.xml | 16 +++++++++++++++
 .../membership/gms/messenger/jgroups-mcast.xml  | 16 +++++++++++++++
 .../internal/cli/commands/support/gfmon.html    | 20 +++++++++++++------
 .../com/gemstone/gemfire/statisticsType.dtd     | 17 +++++++++++++++-
 .../SerialAsyncEventQueueImplJUnitTest.java     | 16 +++++++++++++++
 .../gms/auth/GMSAuthenticatorJUnitTest.java     | 16 +++++++++++++++
 .../locator/GMSLocatorRecoveryJUnitTest.java    | 16 +++++++++++++++
 .../gms/membership/GMSJoinLeaveJUnitTest.java   | 16 +++++++++++++++
 .../gms/membership/StatRecorderJUnitTest.java   | 16 +++++++++++++++
 .../fd/GMSHealthMonitorJUnitTest.java           | 16 +++++++++++++++
 .../messenger/GMSQuorumCheckerJUnitTest.java    | 16 +++++++++++++++
 .../membership/gms/messenger/InterceptUDP.java  | 18 ++++++++++++++++-
 .../messenger/JGroupsMessengerJUnitTest.java    | 16 +++++++++++++++
 .../internal/cache/CacheServiceJUnitTest.java   | 16 +++++++++++++++
 .../internal/cache/MockCacheService.java        | 16 +++++++++++++++
 .../internal/cache/MockCacheServiceImpl.java    | 16 +++++++++++++++
 .../internal/cache/RegionListenerJUnitTest.java | 16 +++++++++++++++
 .../tier/sockets/command/CommitCommandTest.java | 16 +++++++++++++++
 .../internal/tcp/ConnectionJUnitTest.java       | 16 +++++++++++++++
 .../concurrent/CopyOnWriteHashMapJUnitTest.java | 21 ++++++++++++++------
 .../resources/templates/security/authz5_5.dtd   | 16 +++++++++++++++
 .../resources/templates/security/authz6_0.dtd   | 16 +++++++++++++++
 .../lucene/lucene-1.0.xsd                       | 16 +++++++++++++++
 .../util/AutoBalancerIntegrationJUnitTest.java  | 16 +++++++++++++++
 .../main/webapp/WEB-INF/gemfire-api-servlet.xml | 16 +++++++++++++++
 gemfire-web-api/src/main/webapp/WEB-INF/web.xml | 16 +++++++++++++++
 .../src/main/webapp/WEB-INF/gemfire-servlet.xml | 16 +++++++++++++++
 gemfire-web/src/main/webapp/WEB-INF/web.xml     | 16 +++++++++++++++
 137 files changed, 2167 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/360665f3/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/360665f3/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/membership/fd/GMSHealthMonitorJUnitTest.java
----------------------------------------------------------------------


[37/50] [abbrv] incubator-geode git commit: [GEODE-619]: Add GMSMemberJUnitTest Adding unit tests that should improve code coverage of GMSMember to ~90% Fixing array index out of bounds issue when one address is longer than the other

Posted by je...@apache.org.
[GEODE-619]: Add GMSMemberJUnitTest
Adding unit tests that should improve code coverage of GMSMember to ~90%
Fixing array index out of bounds issue when one address is longer than the other


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

Branch: refs/heads/feature/GEODE-17
Commit: 2258d74cac3e13a162a06079b78eb83141eaa641
Parents: 442faa0
Author: Jason Huynh <hu...@gmail.com>
Authored: Tue Dec 1 14:01:53 2015 -0800
Committer: Jason Huynh <hu...@gmail.com>
Committed: Tue Dec 1 14:06:15 2015 -0800

----------------------------------------------------------------------
 .../internal/membership/gms/GMSMember.java      |  20 +--
 .../membership/gms/GMSMemberJUnitTest.java      | 148 +++++++++++++++++++
 2 files changed, 159 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2258d74c/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
index f4784ed..05b3aee 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMember.java
@@ -211,7 +211,7 @@ public class GMSMember implements NetMember, DataSerializableFixedID {
     byte[] hisAddr = his.inetAddr.getAddress();
     if (myAddr != hisAddr) {
       for (int idx=0; idx < myAddr.length; idx++) {
-        if (idx > hisAddr.length) {
+        if (idx >= hisAddr.length) {
           return 1;
         } else if (myAddr[idx] > hisAddr[idx]) {
           return 1;
@@ -219,6 +219,10 @@ public class GMSMember implements NetMember, DataSerializableFixedID {
           return -1;
         }
       }
+      //After checking both addresses we have only gone up to myAddr.length, their address could be longer
+      if (hisAddr.length > myAddr.length) {
+        return -1;
+      }
     }
     if (udpPort < his.udpPort) return -1;
     if (his.udpPort < udpPort) return 1;
@@ -226,16 +230,14 @@ public class GMSMember implements NetMember, DataSerializableFixedID {
 
     // bug #41983, address of kill-9'd member is reused
     // before it can be ejected from membership
-    if (result == 0) {
-      if (this.vmViewId >= 0 && his.vmViewId >= 0) {
-        if (this.vmViewId < his.vmViewId) {
-          result = -1;
-        } else if (his.vmViewId < this.vmViewId) {
-          result = 1;
-        }
+    if (this.vmViewId >= 0 && his.vmViewId >= 0) {
+      if (this.vmViewId < his.vmViewId) {
+        result = -1;
+      } else if (his.vmViewId < this.vmViewId) {
+        result = 1;
       }
     }
-    if (result == 0 && this.uuidMSBs != 0 && his.uuidMSBs != 0) {
+    if (result == 0 && this.uuidMSBs != 0 && his.uuidMSBs != 0) { 
       if (this.uuidMSBs < his.uuidMSBs) {
         result = -1;
       } else if (his.uuidMSBs < this.uuidMSBs) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/2258d74c/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java
new file mode 100644
index 0000000..0b75d3d
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/distributed/internal/membership/gms/GMSMemberJUnitTest.java
@@ -0,0 +1,148 @@
+package com.gemstone.gemfire.distributed.internal.membership.gms;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+import java.net.InetAddress;
+
+import org.jgroups.util.UUID;
+import org.junit.Assert;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+
+import com.gemstone.gemfire.distributed.internal.membership.MemberAttributes;
+import com.gemstone.gemfire.test.junit.categories.UnitTest;
+
+@Category(UnitTest.class)
+public class GMSMemberJUnitTest {
+
+  @Test
+  public void testEqualsNotSameType() {
+    GMSMember member = new GMSMember();
+    Assert.assertFalse(member.equals("Not a GMSMember"));
+  }
+  
+  @Test
+  public void testEqualsIsSame() {
+    GMSMember member = new GMSMember();
+    Assert.assertTrue(member.equals(member));
+  }
+  
+  @Test
+  public void testCompareToIsSame() {
+    GMSMember member = new GMSMember();
+    UUID uuid = new UUID(0, 0);
+    member.setUUID(uuid);
+    Assert.assertEquals(0, member.compareTo(member));
+  }
+  
+  private GMSMember createGMSMember(byte[] inetAddress, int viewId, long msb, long lsb) {
+    GMSMember member = new GMSMember();
+    InetAddress addr1 = mock(InetAddress.class);
+    when(addr1.getAddress()).thenReturn(inetAddress);
+    member.setInetAddr(addr1);
+    member.setBirthViewId(viewId);
+    member.setUUID(new UUID(msb, lsb));
+    return member;
+  }
+  
+  @Test
+  public void testCompareToInetAddressIsLongerThan() {
+    GMSMember member1 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1, 1, 1, 1}, 1, 1, 1);
+    Assert.assertEquals(1, member1.compareTo(member2));
+  }
+  
+  @Test
+  public void testCompareToInetAddressIsShorterThan() {
+    GMSMember member1 = createGMSMember(new byte[] {1, 1, 1, 1}, 1, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
+    Assert.assertEquals(-1, member1.compareTo(member2));
+  }
+  
+  @Test
+  public void testCompareToInetAddressIsGreater() {
+    GMSMember member1 = createGMSMember(new byte[] {1, 2, 1, 1, 1}, 1, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
+    Assert.assertEquals(1, member1.compareTo(member2));
+  }
+  
+  @Test
+  public void testCompareToInetAddressIsLessThan() {
+    GMSMember member1 = createGMSMember(new byte[] {1, 1, 1, 1, 1}, 1, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1, 2, 1, 1, 1}, 1, 1, 1);
+    Assert.assertEquals(-1, member1.compareTo(member2));
+  }
+  
+  @Test
+  public void testCompareToMyViewIdLarger() {
+    GMSMember member1 = createGMSMember(new byte[] {1}, 2, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 1);
+    Assert.assertEquals(1, member1.compareTo(member2));
+  }
+  
+  @Test
+  public void testCompareToTheirViewIdLarger() {
+    GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1}, 2, 1, 1);
+    Assert.assertEquals(-1, member1.compareTo(member2));
+  }
+  
+  @Test
+  public void testCompareToMyMSBLarger() {
+    GMSMember member1 = createGMSMember(new byte[] {1}, 1, 2, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 1);
+    Assert.assertEquals(1, member1.compareTo(member2));
+  }
+
+  @Test
+  public void testCompareToTheirMSBLarger() {
+    GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1}, 1, 2, 1);
+    Assert.assertEquals(-1, member1.compareTo(member2));
+  }
+
+  @Test
+  public void testCompareToMyLSBLarger() {
+    GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 2);
+    GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 1);
+    Assert.assertEquals(1, member1.compareTo(member2));
+  }
+  
+  @Test
+  public void testCompareToTheirLSBLarger() {
+    GMSMember member1 = createGMSMember(new byte[] {1}, 1, 1, 1);
+    GMSMember member2 = createGMSMember(new byte[] {1}, 1, 1, 2);
+    Assert.assertEquals(-1, member1.compareTo(member2));
+  }
+
+  
+  //Makes sure a NPE is not thrown
+  @Test
+  public void testNoNPEWhenSetAttributesWithNull() {
+    GMSMember member = new GMSMember();
+    member.setAttributes(null);
+    MemberAttributes attrs = member.getAttributes(); 
+    MemberAttributes invalid = MemberAttributes.INVALID;
+    Assert.assertEquals(attrs.getVmKind(), invalid.getVmKind());
+    Assert.assertEquals(attrs.getPort(), invalid.getPort());
+    Assert.assertEquals(attrs.getVmViewId(), invalid.getVmViewId());
+    Assert.assertEquals(attrs.getName(), invalid.getName());
+  }
+  
+  @Test
+  public void testGetUUIDReturnsNullWhenUUIDIs0() {
+    GMSMember member = new GMSMember();
+    UUID uuid = new UUID(0, 0);
+    member.setUUID(uuid);
+    Assert.assertNull(member.getUUID());
+  }
+  
+  @Test
+  public void testGetUUID() {
+    GMSMember member = new GMSMember();
+    UUID uuid = new UUID(1, 1);
+    member.setUUID(uuid);
+    Assert.assertNotNull(member.getUUID());
+  }
+}


[13/50] [abbrv] incubator-geode git commit: GEODE-580: cleanup off-heap code

Posted by je...@apache.org.
GEODE-580: cleanup off-heap code

Unused dead code and classes have been removed.
The following inner classes have been moved to their own class files:
LifeCycleListener, Chunk, ChunkFactory, GemFireChunkFactory,
GemFireChunk, GemFireChunkSlice, ChunkWithHeapForm,
DataAsAddress, Fragment, RefCountChangeInfo, MemoryBlockNode,
SyncChunkStack, and FreeListManager.

The reference count debugging code has all been moved
to a new class named ReferenceCountHelper.


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

Branch: refs/heads/feature/GEODE-17
Commit: 4b0925e30a2b22173bfb974d8fe60c569663be9d
Parents: e3d5ebe
Author: Darrel Schneider <ds...@pivotal.io>
Authored: Thu Nov 19 15:13:01 2015 -0800
Committer: Darrel Schneider <ds...@pivotal.io>
Committed: Tue Nov 24 09:57:05 2015 -0800

----------------------------------------------------------------------
 .../internal/GetOperationContextImpl.java       |    2 +-
 .../query/internal/index/AbstractIndex.java     |    2 +-
 .../query/internal/index/DummyQRegion.java      |    2 +-
 .../cache/query/internal/index/HashIndex.java   |    2 +-
 .../internal/cache/AbstractRegionEntry.java     |   29 +-
 .../internal/cache/AbstractRegionMap.java       |   16 +-
 .../cache/BytesAndBitsForCompactor.java         |    2 +-
 .../gemfire/internal/cache/DiskEntry.java       |    8 +-
 .../internal/cache/DistributedRegion.java       |    2 +-
 .../gemfire/internal/cache/EntryEventImpl.java  |   45 +-
 .../gemfire/internal/cache/LocalRegion.java     |   10 +-
 .../gemstone/gemfire/internal/cache/Oplog.java  |    6 +-
 .../internal/cache/PartitionedRegion.java       |    2 +-
 .../internal/cache/VMThinRegionEntry.java       |    5 -
 .../internal/cache/tier/sockets/Part.java       |    4 +-
 .../cache/wan/GatewaySenderEventImpl.java       |   10 +-
 .../gemfire/internal/offheap/Chunk.java         |  793 +++++
 .../gemfire/internal/offheap/ChunkFactory.java  |   51 +
 .../gemfire/internal/offheap/ChunkType.java     |   26 +
 .../internal/offheap/ChunkWithHeapForm.java     |   40 +
 .../gemfire/internal/offheap/DataAsAddress.java |  205 ++
 .../gemfire/internal/offheap/Fragment.java      |  125 +
 .../internal/offheap/FreeListManager.java       |  807 +++++
 .../gemfire/internal/offheap/GemFireChunk.java  |   55 +
 .../internal/offheap/GemFireChunkFactory.java   |   52 +
 .../internal/offheap/GemFireChunkSlice.java     |   44 +
 .../internal/offheap/LifecycleListener.java     |   98 +
 .../internal/offheap/MemoryAllocator.java       |    1 -
 .../gemfire/internal/offheap/MemoryBlock.java   |    1 -
 .../internal/offheap/MemoryBlockNode.java       |  158 +
 .../offheap/OffHeapCachedDeserializable.java    |    1 -
 .../gemfire/internal/offheap/OffHeapHelper.java |    8 +-
 .../offheap/OffHeapRegionEntryHelper.java       |    8 +-
 .../internal/offheap/RefCountChangeInfo.java    |  112 +
 .../internal/offheap/ReferenceCountHelper.java  |  235 ++
 .../offheap/SimpleMemoryAllocatorImpl.java      | 3242 +-----------------
 .../internal/offheap/SyncChunkStack.java        |  130 +
 .../internal/tcp/ByteBufferInputStream.java     |    2 +-
 .../tcp/ImmutableByteBufferInputStream.java     |    2 +-
 .../gemfire/internal/util/BlobHelper.java       |    2 +-
 .../gemfire/pdx/internal/PdxInputStream.java    |    2 +-
 .../cache/ChunkValueWrapperJUnitTest.java       |    2 +-
 .../gemfire/internal/cache/OffHeapTestUtil.java |    5 +-
 .../cache/OldValueImporterTestBase.java         |    4 +-
 .../offheap/ConcurrentBagJUnitTest.java         |  130 -
 .../offheap/FreeListOffHeapRegionJUnitTest.java |    2 +-
 .../internal/offheap/OffHeapRegionBase.java     |    1 -
 .../offheap/OffHeapValidationJUnitTest.java     |    1 -
 .../OffHeapWriteObjectAsByteArrayJUnitTest.java |    2 -
 .../OldFreeListOffHeapRegionJUnitTest.java      |    2 +-
 ...mpleMemoryAllocatorFillPatternJUnitTest.java |    2 -
 .../offheap/SimpleMemoryAllocatorJUnitTest.java |    9 +-
 ...moryAllocatorLifecycleListenerJUnitTest.java |    9 +-
 .../OffHeapByteBufferByteSourceJUnitTest.java   |    2 +-
 .../gemfire/pdx/OffHeapByteSourceJUnitTest.java |    2 +-
 .../gemfire/codeAnalysis/excludedClasses.txt    |    1 +
 .../codeAnalysis/sanctionedSerializables.txt    |    1 -
 57 files changed, 3100 insertions(+), 3422 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
index fd2a944..d973cd7 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/operations/internal/GetOperationContextImpl.java
@@ -18,8 +18,8 @@ package com.gemstone.gemfire.cache.operations.internal;
 
 import com.gemstone.gemfire.SerializationException;
 import com.gemstone.gemfire.cache.operations.GetOperationContext;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.Releasable;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
index 7ddacde..b65dc7e 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/AbstractIndex.java
@@ -74,7 +74,7 @@ import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.pdx.PdxInstance;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
index 1e1da4b..3577e38 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/DummyQRegion.java
@@ -41,7 +41,7 @@ import com.gemstone.gemfire.internal.cache.LocalRegion;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.cache.RegionEntryContext;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
index dd9cffd..911fd6e 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
@@ -79,7 +79,7 @@ import com.gemstone.gemfire.internal.cache.Token;
 import com.gemstone.gemfire.internal.cache.persistence.query.CloseableIterator;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.pdx.internal.PdxString;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
index f250bd2..dd33b15 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionEntry.java
@@ -21,6 +21,7 @@ import java.io.IOException;
 import java.util.Arrays;
 
 import org.apache.logging.log4j.Logger;
+
 import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ABSTRACT_REGION_ENTRY_FILL_IN_VALUE;
 import static com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier.ABSTRACT_REGION_ENTRY_PREPARE_VALUE_FOR_CACHE;
 
@@ -60,14 +61,14 @@ import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import com.gemstone.gemfire.internal.offheap.Chunk;
+import com.gemstone.gemfire.internal.offheap.ChunkWithHeapForm;
+import com.gemstone.gemfire.internal.offheap.GemFireChunk;
 import com.gemstone.gemfire.internal.offheap.MemoryAllocator;
 import com.gemstone.gemfire.internal.offheap.OffHeapCachedDeserializable;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ChunkType;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.GemFireChunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.GemFireChunkType;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
@@ -415,7 +416,7 @@ public abstract class AbstractRegionEntry implements RegionEntry,
 
   @Override
   public Object getValue(RegionEntryContext context) {
-    SimpleMemoryAllocatorImpl.createReferenceCountOwner();
+    ReferenceCountHelper.createReferenceCountOwner();
     @Retained Object result = _getValueRetain(context, true);
     //Asif: If the thread is an Index Creation Thread & the value obtained is 
     //Token.REMOVED , we can skip  synchronization block. This is required to prevent
@@ -431,11 +432,11 @@ public abstract class AbstractRegionEntry implements RegionEntry,
 //    }
     
     if (Token.isRemoved(result)) {
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+      ReferenceCountHelper.setReferenceCountOwner(null);
       return null;
     } else {
       result = OffHeapHelper.copyAndReleaseIfNeeded(result); // sqlf does not dec ref count in this call
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+      ReferenceCountHelper.setReferenceCountOwner(null);
       setRecentlyUsed();
       return result;
     }
@@ -564,14 +565,14 @@ public abstract class AbstractRegionEntry implements RegionEntry,
   
   @Retained
   public final Object getValueInVM(RegionEntryContext context) {
-    SimpleMemoryAllocatorImpl.createReferenceCountOwner();
+    ReferenceCountHelper.createReferenceCountOwner();
     @Retained Object v = _getValueRetain(context, true);
     
     if (v == null) { // should only be possible if disk entry
       v = Token.NOT_AVAILABLE;
     }
     @Retained Object result = OffHeapHelper.copyAndReleaseIfNeeded(v); // TODO OFFHEAP keep it offheap?
-    SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+    ReferenceCountHelper.setReferenceCountOwner(null);
     return result;
   }
   
@@ -758,9 +759,9 @@ public abstract class AbstractRegionEntry implements RegionEntry,
     // :ezoerner:20080814 We also read old value from disk or buffer
     // in the case where there is a non-null expectedOldValue
     // see PartitionedRegion#remove(Object key, Object value)
-    SimpleMemoryAllocatorImpl.skipRefCountTracking();
+    ReferenceCountHelper.skipRefCountTracking();
     @Retained @Released Object curValue = _getValueRetain(region, true);
-    SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+    ReferenceCountHelper.unskipRefCountTracking();
     try {
     if (curValue == null) curValue = Token.NOT_AVAILABLE;
     
@@ -1343,12 +1344,12 @@ public abstract class AbstractRegionEntry implements RegionEntry,
         }
         byte[] compressedData = compressBytes(r, data);
         boolean isCompressed = compressedData != data;
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(this);
+        ReferenceCountHelper.setReferenceCountOwner(this);
         MemoryAllocator ma = SimpleMemoryAllocatorImpl.getAllocator(); // fix for bug 47875
         val = ma.allocateAndInitialize(compressedData, isSerialized, isCompressed, GemFireChunk.TYPE); // TODO:KIRK:48068 race happens right after this line
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+        ReferenceCountHelper.setReferenceCountOwner(null);
         if (val instanceof GemFireChunk) {
-          val = new com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ChunkWithHeapForm((GemFireChunk)val, data);
+          val = new com.gemstone.gemfire.internal.offheap.ChunkWithHeapForm((GemFireChunk)val, data);
         }
 //        if (val instanceof Chunk && r instanceof LocalRegion) {
 //          Chunk c = (Chunk) val;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
index 80b55d5..6d49d74 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/AbstractRegionMap.java
@@ -74,10 +74,10 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
@@ -3357,11 +3357,11 @@ RETRY_LOOP:
     // replace is propagated to server, so no need to check
     // satisfiesOldValue on client
     if (expectedOldValue != null && !replaceOnClient) {
-      SimpleMemoryAllocatorImpl.skipRefCountTracking();
+      ReferenceCountHelper.skipRefCountTracking();
       
       @Retained @Released Object v = re._getValueRetain(event.getLocalRegion(), true);
       
-      SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+      ReferenceCountHelper.unskipRefCountTracking();
       try {
         if (!AbstractRegionEntry.checkExpectedOldValue(expectedOldValue, v, event.getLocalRegion())) {
           return false;
@@ -3392,9 +3392,9 @@ RETRY_LOOP:
       if (event.hasDelta() || event.getOperation().guaranteesOldValue()
           || GemFireCacheImpl.sqlfSystem()) {
         // In these cases we want to even get the old value from disk if it is not in memory
-        SimpleMemoryAllocatorImpl.skipRefCountTracking();
+        ReferenceCountHelper.skipRefCountTracking();
         @Released Object oldValueInVMOrDisk = re.getValueOffHeapOrDiskWithoutFaultIn(event.getLocalRegion());
-        SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+        ReferenceCountHelper.unskipRefCountTracking();
         try {
           event.setOldValue(oldValueInVMOrDisk, requireOldValue
               || GemFireCacheImpl.sqlfSystem());
@@ -3403,11 +3403,11 @@ RETRY_LOOP:
         }
       } else {
         // In these cases only need the old value if it is in memory
-        SimpleMemoryAllocatorImpl.skipRefCountTracking();
+        ReferenceCountHelper.skipRefCountTracking();
         
         @Retained @Released Object oldValueInVM = re._getValueRetain(event.getLocalRegion(), true); // OFFHEAP: re synced so can use its ref.
         
-        SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+        ReferenceCountHelper.unskipRefCountTracking();
         try {
           event.setOldValue(oldValueInVM,
               requireOldValue || GemFireCacheImpl.sqlfSystem());

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
index 8e46605..3a3b5a1 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/BytesAndBitsForCompactor.java
@@ -16,7 +16,7 @@
  */
 package com.gemstone.gemfire.internal.cache;
 
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 
 /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
index 3973556..c855cca 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DiskEntry.java
@@ -40,11 +40,11 @@ import com.gemstone.gemfire.internal.cache.versions.VersionStamp;
 import com.gemstone.gemfire.internal.cache.versions.VersionTag;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.Releasable;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
@@ -340,9 +340,9 @@ public interface DiskEntry extends RegionEntry {
       synchronized (syncObj) {
         entry.setLastModified(mgr, de.getLastModified());
                               
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(entry);
+        ReferenceCountHelper.setReferenceCountOwner(entry);
         v = de._getValueRetain(context, true); // OFFHEAP copied to heap entry; todo allow entry to refer to offheap since it will be copied to network.
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+        ReferenceCountHelper.setReferenceCountOwner(null);
         if (v == null) {
           if (did == null) {
             // fix for bug 41449

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
index daf4c8d..5d263a6 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/DistributedRegion.java
@@ -121,8 +121,8 @@ import com.gemstone.gemfire.internal.cache.wan.parallel.ConcurrentParallelGatewa
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.internal.sequencelog.RegionLogger;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
index 0786a69..9cf2f13 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/EntryEventImpl.java
@@ -22,6 +22,7 @@ import java.io.DataInput;
 import java.io.DataInputStream;
 import java.io.DataOutput;
 import java.io.IOException;
+
 import org.apache.logging.log4j.Logger;
 
 import com.gemstone.gemfire.CopyHelper;
@@ -72,11 +73,11 @@ import com.gemstone.gemfire.internal.lang.StringUtils;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
 import com.gemstone.gemfire.internal.offheap.OffHeapRegionEntryHelper;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.Releasable;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
@@ -930,13 +931,13 @@ public class EntryEventImpl
       OffHeapHelper.releaseAndTrackOwner(this.newValue, this);
     }
     if (v instanceof Chunk) {
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(this);
+      ReferenceCountHelper.setReferenceCountOwner(this);
       if (!((Chunk) v).retain()) {
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+        ReferenceCountHelper.setReferenceCountOwner(null);
         this.newValue = null;
         return;
       }
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+      ReferenceCountHelper.setReferenceCountOwner(null);
     }
     this.newValue = v;
     this.cachedSerializedNewValue = null;
@@ -992,7 +993,7 @@ public class EntryEventImpl
     if (v == curOldValue) return;
     if (this.offHeapOk) {
       if (curOldValue instanceof Chunk) {
-        if (SimpleMemoryAllocatorImpl.trackReferenceCounts()) {
+        if (ReferenceCountHelper.trackReferenceCounts()) {
           OffHeapHelper.releaseAndTrackOwner(curOldValue, new OldValueOwner());
         } else {
           OffHeapHelper.release(curOldValue);
@@ -1008,10 +1009,10 @@ public class EntryEventImpl
     if (v == this.oldValue) return;
     
     if (v instanceof Chunk) {
-      if (SimpleMemoryAllocatorImpl.trackReferenceCounts()) {
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(new OldValueOwner());
+      if (ReferenceCountHelper.trackReferenceCounts()) {
+        ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
         boolean couldNotRetain = (!((Chunk) v).retain());
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+        ReferenceCountHelper.setReferenceCountOwner(null);
         if (couldNotRetain) {
           this.oldValue = null;
           return;
@@ -1737,14 +1738,14 @@ public class EntryEventImpl
             || GemFireCacheImpl.sqlfSystem()
             ) {
           @Retained Object ov;
-          if (SimpleMemoryAllocatorImpl.trackReferenceCounts()) {
-            SimpleMemoryAllocatorImpl.setReferenceCountOwner(new OldValueOwner());
+          if (ReferenceCountHelper.trackReferenceCounts()) {
+            ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
             if (GemFireCacheImpl.sqlfSystem()) {
               ov = reentry.getValueOffHeapOrDiskWithoutFaultIn(this.region);
             } else {
               ov = reentry._getValueRetain(owner, true);
             }
-            SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+            ReferenceCountHelper.setReferenceCountOwner(null);
           } else {
             if (GemFireCacheImpl.sqlfSystem()) {
               ov = reentry.getValueOffHeapOrDiskWithoutFaultIn(this.region);
@@ -2087,9 +2088,9 @@ public class EntryEventImpl
     try {
       RegionEntry re = this.region.getRegionEntry(getKey());
       if (re == null) return false;
-      SimpleMemoryAllocatorImpl.skipRefCountTracking();
+      ReferenceCountHelper.skipRefCountTracking();
       Object v = re._getValueRetain(this.region, true);
-      SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+      ReferenceCountHelper.unskipRefCountTracking();
       try {
         return setOldValue(v);
       } finally {
@@ -3054,10 +3055,10 @@ public class EntryEventImpl
     
     if (ov instanceof Chunk) {
       //this.region.getCache().getLogger().info("DEBUG freeing ref to old value on " + System.identityHashCode(ov));
-      if (SimpleMemoryAllocatorImpl.trackReferenceCounts()) {
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(new OldValueOwner());
+      if (ReferenceCountHelper.trackReferenceCounts()) {
+        ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
         ((Chunk) ov).release();
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+        ReferenceCountHelper.setReferenceCountOwner(null);
       } else {
         ((Chunk) ov).release();
       }
@@ -3085,19 +3086,19 @@ public class EntryEventImpl
   public void copyOffHeapToHeap() {
     Object ov = basicGetOldValue();
     if (ov instanceof Chunk) {
-      if (SimpleMemoryAllocatorImpl.trackReferenceCounts()) {
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(new OldValueOwner());
+      if (ReferenceCountHelper.trackReferenceCounts()) {
+        ReferenceCountHelper.setReferenceCountOwner(new OldValueOwner());
         this.oldValue = OffHeapHelper.copyAndReleaseIfNeeded(ov);
-        SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+        ReferenceCountHelper.setReferenceCountOwner(null);
       } else {
         this.oldValue = OffHeapHelper.copyAndReleaseIfNeeded(ov);
       }
     }
     Object nv = basicGetNewValue();
     if (nv instanceof Chunk) {
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(this);
+      ReferenceCountHelper.setReferenceCountOwner(this);
       this.newValue = OffHeapHelper.copyAndReleaseIfNeeded(nv);
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);
+      ReferenceCountHelper.setReferenceCountOwner(null);
     }
     if (this.newValue instanceof Chunk || this.oldValue instanceof Chunk) {
       throw new IllegalStateException("event's old/new value still off-heap after calling copyOffHeapToHeap");

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
index c17caa2..caf07ce 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/LocalRegion.java
@@ -203,9 +203,9 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
 import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
@@ -2178,14 +2178,14 @@ public class LocalRegion extends AbstractRegion
       RegionEntry entry = this.entries.getEntry(keyInfo.getKey());
       boolean result = entry != null;
       if (result) {
-        SimpleMemoryAllocatorImpl.skipRefCountTracking();
+        ReferenceCountHelper.skipRefCountTracking();
         Object val = entry.getTransformedValue(); // no need to decompress since we only want to know if we have an existing value 
         if (val instanceof StoredObject) {
           OffHeapHelper.release(val);
-          SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+          ReferenceCountHelper.unskipRefCountTracking();
           return true;
         }
-        SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+        ReferenceCountHelper.unskipRefCountTracking();
         // No need to to check CachedDeserializable because of Bruce's fix in r30960 for bug 42162. See bug 42732.
         // this works because INVALID and LOCAL_INVALID will never be faulted out of mem
         // If val is NOT_AVAILABLE that means we have a valid value on disk.

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
index cd197f2..3a2d1ed 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java
@@ -108,7 +108,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
 import com.gemstone.gemfire.internal.offheap.annotations.Retained;
@@ -4310,10 +4310,10 @@ public final class Oplog implements CompactableOplog, Flushable {
     DiskId did = entry.getDiskId();
     byte userBits = 0;
     long oplogOffset = did.getOffsetInOplog();
-    SimpleMemoryAllocatorImpl.skipRefCountTracking();
+    ReferenceCountHelper.skipRefCountTracking();
     // TODO OFFHEAP: no need to retain. We just use it while we have the RegionEntry synced.
     @Retained @Released Object value = entry._getValueRetain(dr, true);
-    SimpleMemoryAllocatorImpl.unskipRefCountTracking();
+    ReferenceCountHelper.unskipRefCountTracking();
     // TODO:KIRK:OK Object value = entry.getValueWithContext(dr);
     boolean foundData = false;
     if (value == null) {

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
index 399700d..48f4787 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/PartitionedRegion.java
@@ -252,7 +252,7 @@ import com.gemstone.gemfire.internal.logging.LogService;
 import com.gemstone.gemfire.internal.logging.LoggingThreadGroup;
 import com.gemstone.gemfire.internal.logging.log4j.LocalizedMessage;
 import com.gemstone.gemfire.internal.logging.log4j.LogMarker;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
+import com.gemstone.gemfire.internal.offheap.Chunk;
 import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
 import com.gemstone.gemfire.internal.sequencelog.RegionLogger;
 import com.gemstone.gemfire.internal.util.TransformUtils;

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntry.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntry.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntry.java
index 6317fbc..bdc05c3 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntry.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/VMThinRegionEntry.java
@@ -17,11 +17,6 @@
 
 package com.gemstone.gemfire.internal.cache;
 
-import java.util.UUID;
-
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ConcurrentBag;
-
-
 /**
  * Implementation class of RegionEntry interface.
  * VM -> entries stored in VM memory

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
index 6af005e..5418c68 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/tier/sockets/Part.java
@@ -18,8 +18,8 @@ package com.gemstone.gemfire.internal.cache.tier.sockets;
 
 import com.gemstone.gemfire.internal.*;
 import com.gemstone.gemfire.internal.cache.CachedDeserializable;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.DataAsAddress;
+import com.gemstone.gemfire.internal.offheap.Chunk;
+import com.gemstone.gemfire.internal.offheap.DataAsAddress;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.UnsafeMemoryChunk;
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
index c4f0c87..4df8f35 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/wan/GatewaySenderEventImpl.java
@@ -50,11 +50,11 @@ import com.gemstone.gemfire.internal.cache.WrappedCallbackArgument;
 import com.gemstone.gemfire.internal.cache.lru.Sizeable;
 import com.gemstone.gemfire.internal.cache.tier.sockets.CacheServerHelper;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.offheap.Chunk;
+import com.gemstone.gemfire.internal.offheap.ChunkWithHeapForm;
 import com.gemstone.gemfire.internal.offheap.OffHeapHelper;
+import com.gemstone.gemfire.internal.offheap.ReferenceCountHelper;
 import com.gemstone.gemfire.internal.offheap.Releasable;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.Chunk;
-import com.gemstone.gemfire.internal.offheap.SimpleMemoryAllocatorImpl.ChunkWithHeapForm;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
 import com.gemstone.gemfire.internal.offheap.annotations.OffHeapIdentifier;
 import com.gemstone.gemfire.internal.offheap.annotations.Released;
@@ -935,9 +935,9 @@ public class GatewaySenderEventImpl implements
     if (event.hasDelta()) {
       this.valueIsObject = 0x02;
     } else {
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(this);
+      ReferenceCountHelper.setReferenceCountOwner(this);
       so = event.getOffHeapNewValue();
-      SimpleMemoryAllocatorImpl.setReferenceCountOwner(null);      
+      ReferenceCountHelper.setReferenceCountOwner(null);      
         // TODO OFFHEAP MERGE: check for a cached serialized value first
         // so we can use it instead of reading offheap
         // If we do read offheap then add the serialize new value to the event cache

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java
new file mode 100644
index 0000000..e32a1c6
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/Chunk.java
@@ -0,0 +1,793 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.io.DataOutput;
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.nio.ByteBuffer;
+
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.internal.DSCODE;
+import com.gemstone.gemfire.internal.HeapDataOutputStream;
+import com.gemstone.gemfire.internal.InternalDataSerializer;
+import com.gemstone.gemfire.internal.cache.EntryEventImpl;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.internal.cache.RegionEntryContext;
+import com.gemstone.gemfire.internal.offheap.annotations.Unretained;
+
+/**
+   * Note: this class has a natural ordering that is inconsistent with equals.
+   * Instances of this class should have a short lifetime. We do not store references
+   * to it in the cache. Instead the memoryAddress is stored in a primitive field in
+   * the cache and if used it will then, if needed, create an instance of this class.
+   */
+  public abstract class Chunk extends OffHeapCachedDeserializable implements Comparable<Chunk>, MemoryBlock {
+    /**
+     * The unsafe memory address of the first byte of this chunk
+     */
+    private final long memoryAddress;
+    
+    /**
+     * The useCount, chunkSize, dataSizeDelta, isSerialized, and isCompressed
+     * are all stored in off heap memory in a HEADER. This saves heap memory
+     * by using off heap.
+     */
+    public final static int OFF_HEAP_HEADER_SIZE = 4 + 4;
+    /**
+     * We need to smallest chunk to at least have enough room for a hdr
+     * and for an off heap ref (which is a long).
+     */
+    public final static int MIN_CHUNK_SIZE = OFF_HEAP_HEADER_SIZE + 8;
+    /**
+     * int field.
+     * The number of bytes in this chunk.
+     */
+    private final static int CHUNK_SIZE_OFFSET = 0;
+    /**
+     * Volatile int field
+     * The upper two bits are used for the isSerialized
+     * and isCompressed flags.
+     * The next three bits are used to encode the SRC_TYPE enum.
+     * The lower 3 bits of the most significant byte contains a magic number to help us detect
+     * if we are changing the ref count of an object that has been released.
+     * The next byte contains the dataSizeDelta.
+     * The number of bytes of logical data in this chunk.
+     * Since the number of bytes of logical data is always <= chunkSize
+     * and since chunkSize never changes, we have dataSize be
+     * a delta whose max value would be HUGE_MULTIPLE-1.
+     * The lower two bytes contains the use count.
+     */
+    private final static int REF_COUNT_OFFSET = 4;
+    /**
+     * The upper two bits are used for the isSerialized
+     * and isCompressed flags.
+     */
+    private final static int IS_SERIALIZED_BIT =    0x80000000;
+    private final static int IS_COMPRESSED_BIT =    0x40000000;
+    private final static int SRC_TYPE_MASK = 0x38000000;
+    private final static int SRC_TYPE_SHIFT = 16/*refCount*/+8/*dataSize*/+3/*magicSize*/;
+    private final static int MAGIC_MASK = 0x07000000;
+    private final static int MAGIC_NUMBER = 0x05000000;
+    private final static int DATA_SIZE_DELTA_MASK = 0x00ff0000;
+    private final static int DATA_SIZE_SHIFT = 16;
+    private final static int REF_COUNT_MASK =       0x0000ffff;
+    private final static int MAX_REF_COUNT = 0xFFFF;
+    final static long FILL_PATTERN = 0x3c3c3c3c3c3c3c3cL;
+    final static byte FILL_BYTE = 0x3c;
+    
+    // The 8 bits reserved for SRC_TYPE are basically no longer used.
+    // So we could free up these 8 bits for some other use or we could
+    // keep them for future extensions.
+    // If we ever want to allocate other "types" into a chunk of off-heap
+    // memory then the SRC_TYPE would be the way to go.
+    // For example we may want to allocate the memory for the off-heap
+    // RegionEntry in off-heap memory without it being of type GFE.
+    // When it is of type GFE then it either needs to be the bytes
+    // of a byte array or it needs to be a serialized java object.
+    // For the RegionEntry we may want all the primitive fields of
+    // the entry at certain offsets in the off-heap memory so we could
+    // access them directly in native byte format (i.e. no serialization).
+    // Note that for every SRC_TYPE we should have a ChunkType subclass.
+    public final static int SRC_TYPE_UNUSED0 = 0 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED1 = 1 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED2 = 2 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED3 = 3 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_GFE = 4 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED5 = 5 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED6 = 6 << SRC_TYPE_SHIFT;
+    public final static int SRC_TYPE_UNUSED7 = 7 << SRC_TYPE_SHIFT;
+    
+    protected Chunk(long memoryAddress, int chunkSize, ChunkType chunkType) {
+      SimpleMemoryAllocatorImpl.validateAddressAndSize(memoryAddress, chunkSize);
+      this.memoryAddress = memoryAddress;
+      setSize(chunkSize);
+      UnsafeMemoryChunk.writeAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET, MAGIC_NUMBER|chunkType.getSrcType());
+    }
+    public void readyForFree() {
+      UnsafeMemoryChunk.writeAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET, 0);
+    }
+    public void readyForAllocation(ChunkType chunkType) {
+      if (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET, 0, MAGIC_NUMBER|chunkType.getSrcType())) {
+        throw new IllegalStateException("Expected 0 but found " + Integer.toHexString(UnsafeMemoryChunk.readAbsoluteIntVolatile(getMemoryAddress()+REF_COUNT_OFFSET)));
+      }
+    }
+    /**
+     * Should only be used by FakeChunk subclass
+     */
+    protected Chunk() {
+      this.memoryAddress = 0L;
+    }
+    
+    /**
+     * Used to create a Chunk given an existing, already allocated,
+     * memoryAddress. The off heap header has already been initialized.
+     */
+    protected Chunk(long memoryAddress) {
+      SimpleMemoryAllocatorImpl.validateAddress(memoryAddress);
+      this.memoryAddress = memoryAddress;
+    }
+    
+    protected Chunk(Chunk chunk) {
+      this.memoryAddress = chunk.memoryAddress;
+    }
+    
+    /**
+     * Throw an exception if this chunk is not allocated
+     */
+    public void checkIsAllocated() {
+      int originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
+      if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
+        throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
+      }
+    }
+    
+    public void incSize(int inc) {
+      setSize(getSize()+inc);
+    }
+    
+    protected void beforeReturningToAllocator() {
+      
+    }
+
+    @Override
+    public int getSize() {
+      return getSize(this.memoryAddress);
+    }
+
+    public void setSize(int size) {
+      setSize(this.memoryAddress, size);
+    }
+
+    public long getMemoryAddress() {
+      return this.memoryAddress;
+    }
+    
+    public int getDataSize() {
+      /*int dataSizeDelta = UnsafeMemoryChunk.readAbsoluteInt(this.memoryAddress+REF_COUNT_OFFSET);
+      dataSizeDelta &= DATA_SIZE_DELTA_MASK;
+      dataSizeDelta >>= DATA_SIZE_SHIFT;
+      return getSize() - dataSizeDelta;*/
+      return getDataSize(this.memoryAddress);
+    }
+    
+    protected static int getDataSize(long memoryAdress) {
+      int dataSizeDelta = UnsafeMemoryChunk.readAbsoluteInt(memoryAdress+REF_COUNT_OFFSET);
+      dataSizeDelta &= DATA_SIZE_DELTA_MASK;
+      dataSizeDelta >>= DATA_SIZE_SHIFT;
+      return getSize(memoryAdress) - dataSizeDelta;
+    }
+    
+    protected long getBaseDataAddress() {
+      return this.memoryAddress+OFF_HEAP_HEADER_SIZE;
+    }
+    protected int getBaseDataOffset() {
+      return 0;
+    }
+    
+    /**
+     * Creates and returns a direct ByteBuffer that contains the contents of this Chunk.
+     * Note that the returned ByteBuffer has a reference to this chunk's
+     * off-heap address so it can only be used while this Chunk is retained.
+     * @return the created direct byte buffer or null if it could not be created.
+     */
+    @Unretained
+    public ByteBuffer createDirectByteBuffer() {
+      return basicCreateDirectByteBuffer(getBaseDataAddress(), getDataSize());
+    }
+    @Override
+    public void sendTo(DataOutput out) throws IOException {
+      if (!this.isCompressed() && out instanceof HeapDataOutputStream) {
+        ByteBuffer bb = createDirectByteBuffer();
+        if (bb != null) {
+          HeapDataOutputStream hdos = (HeapDataOutputStream) out;
+          if (this.isSerialized()) {
+            hdos.write(bb);
+          } else {
+            hdos.writeByte(DSCODE.BYTE_ARRAY);
+            InternalDataSerializer.writeArrayLength(bb.remaining(), hdos);
+            hdos.write(bb);
+          }
+          return;
+        }
+      }
+      super.sendTo(out);
+    }
+    
+    @Override
+    public void sendAsByteArray(DataOutput out) throws IOException {
+      if (!isCompressed() && out instanceof HeapDataOutputStream) {
+        ByteBuffer bb = createDirectByteBuffer();
+        if (bb != null) {
+          HeapDataOutputStream hdos = (HeapDataOutputStream) out;
+          InternalDataSerializer.writeArrayLength(bb.remaining(), hdos);
+          hdos.write(bb);
+          return;
+        }
+      }
+      super.sendAsByteArray(out);
+    }
+       
+    private static volatile Class dbbClass = null;
+    private static volatile Constructor dbbCtor = null;
+    private static volatile boolean dbbCreateFailed = false;
+    
+    /**
+     * @return the created direct byte buffer or null if it could not be created.
+     */
+    private static ByteBuffer basicCreateDirectByteBuffer(long baseDataAddress, int dataSize) {
+      if (dbbCreateFailed) {
+        return null;
+      }
+      Constructor ctor = dbbCtor;
+      if (ctor == null) {
+        Class c = dbbClass;
+        if (c == null) {
+          try {
+            c = Class.forName("java.nio.DirectByteBuffer");
+          } catch (ClassNotFoundException e) {
+            //throw new IllegalStateException("Could not find java.nio.DirectByteBuffer", e);
+            dbbCreateFailed = true;
+            dbbAddressFailed = true;
+            return null;
+          }
+          dbbClass = c;
+        }
+        try {
+          ctor = c.getDeclaredConstructor(long.class, int.class);
+        } catch (NoSuchMethodException | SecurityException e) {
+          //throw new IllegalStateException("Could not get constructor DirectByteBuffer(long, int)", e);
+          dbbClass = null;
+          dbbCreateFailed = true;
+          return null;
+        }
+        ctor.setAccessible(true);
+        dbbCtor = ctor;
+      }
+      try {
+        return (ByteBuffer)ctor.newInstance(baseDataAddress, dataSize);
+      } catch (InstantiationException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+        //throw new IllegalStateException("Could not create an instance using DirectByteBuffer(long, int)", e);
+        dbbClass = null;
+        dbbCtor = null;
+        dbbCreateFailed = true;
+        return null;
+      }
+    }
+    private static volatile Method dbbAddressMethod = null;
+    private static volatile boolean dbbAddressFailed = false;
+    
+    /**
+     * Returns the address of the Unsafe memory for the first byte of a direct ByteBuffer.
+     * If the buffer is not direct or the address can not be obtained return 0.
+     */
+    public static long getDirectByteBufferAddress(ByteBuffer bb) {
+      if (!bb.isDirect()) {
+        return 0L;
+      }
+      if (dbbAddressFailed) {
+        return 0L;
+      }
+      Method m = dbbAddressMethod;
+      if (m == null) {
+        Class c = dbbClass;
+        if (c == null) {
+          try {
+            c = Class.forName("java.nio.DirectByteBuffer");
+          } catch (ClassNotFoundException e) {
+            //throw new IllegalStateException("Could not find java.nio.DirectByteBuffer", e);
+            dbbCreateFailed = true;
+            dbbAddressFailed = true;
+            return 0L;
+          }
+          dbbClass = c;
+        }
+        try {
+          m = c.getDeclaredMethod("address");
+        } catch (NoSuchMethodException | SecurityException e) {
+          //throw new IllegalStateException("Could not get method DirectByteBuffer.address()", e);
+          dbbClass = null;
+          dbbAddressFailed = true;
+          return 0L;
+        }
+        m.setAccessible(true);
+        dbbAddressMethod = m;
+      }
+      try {
+        return (Long)m.invoke(bb);
+      } catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {
+        //throw new IllegalStateException("Could not create an invoke DirectByteBuffer.address()", e);
+        dbbClass = null;
+        dbbAddressMethod = null;
+        dbbAddressFailed = true;
+        return 0L;
+      }
+    }
+    /**
+     * Returns an address that can be used with unsafe apis to access this chunks memory.
+     * @param offset the offset from this chunk's first byte of the byte the returned address should point to. Must be >= 0.
+     * @param size the number of bytes that will be read using the returned address. Assertion will use this to verify that all the memory accessed belongs to this chunk. Must be > 0.
+     * @return a memory address that can be used with unsafe apis
+     */
+    public long getUnsafeAddress(int offset, int size) {
+      assert offset >= 0 && offset + size <= getDataSize(): "Offset=" + offset + ",size=" + size + ",dataSize=" + getDataSize() + ", chunkSize=" + getSize() + ", but offset + size must be <= " + getDataSize();
+      assert size > 0;
+      long result = getBaseDataAddress() + offset;
+      // validateAddressAndSizeWithinSlab(result, size);
+      return result;
+    }
+    
+    @Override
+    public byte readByte(int offset) {
+      assert offset < getDataSize();
+      return UnsafeMemoryChunk.readAbsoluteByte(getBaseDataAddress() + offset);
+    }
+
+    @Override
+    public void writeByte(int offset, byte value) {
+      assert offset < getDataSize();
+      UnsafeMemoryChunk.writeAbsoluteByte(getBaseDataAddress() + offset, value);
+    }
+
+    @Override
+    public void readBytes(int offset, byte[] bytes) {
+      readBytes(offset, bytes, 0, bytes.length);
+    }
+
+    @Override
+    public void writeBytes(int offset, byte[] bytes) {
+      writeBytes(offset, bytes, 0, bytes.length);
+    }
+
+    public long getAddressForReading(int offset, int size) {
+      assert offset+size <= getDataSize();
+      return getBaseDataAddress() + offset;
+    }
+    
+    @Override
+    public void readBytes(int offset, byte[] bytes, int bytesOffset, int size) {
+      assert offset+size <= getDataSize();
+      UnsafeMemoryChunk.readAbsoluteBytes(getBaseDataAddress() + offset, bytes, bytesOffset, size);
+    }
+
+    @Override
+    public void writeBytes(int offset, byte[] bytes, int bytesOffset, int size) {
+      assert offset+size <= getDataSize();
+      SimpleMemoryAllocatorImpl.validateAddressAndSizeWithinSlab(getBaseDataAddress() + offset, size);
+      UnsafeMemoryChunk.writeAbsoluteBytes(getBaseDataAddress() + offset, bytes, bytesOffset, size);
+    }
+    
+    @Override
+    public void release() {
+      release(this.memoryAddress, true);
+     }
+
+    @Override
+    public int compareTo(Chunk o) {
+      int result = Integer.signum(getSize() - o.getSize());
+      if (result == 0) {
+        // For the same sized chunks we really don't care about their order
+        // but we need compareTo to only return 0 if the two chunks are identical
+        result = Long.signum(getMemoryAddress() - o.getMemoryAddress());
+      }
+      return result;
+    }
+    
+    @Override
+    public boolean equals(Object o) {
+      if (o instanceof Chunk) {
+        return getMemoryAddress() == ((Chunk) o).getMemoryAddress();
+      }
+      return false;
+    }
+    
+    @Override
+    public int hashCode() {
+      long value = this.getMemoryAddress();
+      return (int)(value ^ (value >>> 32));
+    }
+
+    // OffHeapCachedDeserializable methods 
+    
+    @Override
+    public void setSerializedValue(byte[] value) {
+      writeBytes(0, value);
+    }
+    
+    public byte[] getDecompressedBytes(RegionEntryContext context) {
+      byte[] result = getCompressedBytes();
+      long time = context.getCachePerfStats().startDecompression();
+      result = context.getCompressor().decompress(result);
+      context.getCachePerfStats().endDecompression(time);      
+      return result;
+    }
+    
+    /**
+     * Returns the raw possibly compressed bytes of this chunk
+     */
+    public byte[] getCompressedBytes() {
+      byte[] result = new byte[getDataSize()];
+      readBytes(0, result);
+      //debugLog("reading", true);
+      SimpleMemoryAllocatorImpl.getAllocator().getStats().incReads();
+      return result;
+    }
+    protected byte[] getRawBytes() {
+      byte[] result = getCompressedBytes();
+      // TODO OFFHEAP: change the following to assert !isCompressed();
+      if (isCompressed()) {
+        throw new UnsupportedOperationException();
+      }
+      return result;
+    }
+
+    @Override
+    public byte[] getSerializedValue() {
+      byte [] result = getRawBytes();
+      if (!isSerialized()) {
+        // The object is a byte[]. So we need to make it look like a serialized byte[] in our result
+        result = EntryEventImpl.serialize(result);
+      }
+      return result;
+    }
+    
+    @Override
+    public Object getDeserializedValue(Region r, RegionEntry re) {
+      if (isSerialized()) {
+        // TODO OFFHEAP: debug deserializeChunk
+        return EntryEventImpl.deserialize(getRawBytes());
+        //assert !isCompressed();
+        //return EntryEventImpl.deserializeChunk(this);
+      } else {
+        return getRawBytes();
+      }
+    }
+    
+    /**
+     * We want this to include memory overhead so use getSize() instead of getDataSize().
+     */
+    @Override
+    public int getSizeInBytes() {
+      // Calling getSize includes the off heap header size.
+      // We do not add anything to this since the size of the reference belongs to the region entry size
+      // not the size of this object.
+      return getSize();
+    }
+
+    @Override
+    public int getValueSizeInBytes() {
+      return getDataSize();
+    }
+
+    @Override
+    public void copyBytes(int src, int dst, int size) {
+      throw new UnsupportedOperationException("Implement if used");
+//      assert src+size <= getDataSize();
+//      assert dst+size < getDataSize();
+//      getSlabs()[this.getSlabIdx()].copyBytes(getBaseDataAddress()+src, getBaseDataAddress()+dst, size);
+    }
+
+    @Override
+    public boolean isSerialized() {
+      return (UnsafeMemoryChunk.readAbsoluteInt(this.memoryAddress+REF_COUNT_OFFSET) & IS_SERIALIZED_BIT) != 0;
+    }
+
+    @Override
+    public boolean isCompressed() {
+      return (UnsafeMemoryChunk.readAbsoluteInt(this.memoryAddress+REF_COUNT_OFFSET) & IS_COMPRESSED_BIT) != 0;
+    }
+
+    @Override
+    public boolean retain() {
+      return retain(this.memoryAddress);
+    }
+
+    @Override
+    public int getRefCount() {
+      return getRefCount(this.memoryAddress);
+    }
+
+    public static int getSize(long memAddr) {
+      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      return UnsafeMemoryChunk.readAbsoluteInt(memAddr+CHUNK_SIZE_OFFSET);
+    }
+    public static void setSize(long memAddr, int size) {
+      SimpleMemoryAllocatorImpl.validateAddressAndSize(memAddr, size);
+      UnsafeMemoryChunk.writeAbsoluteInt(memAddr+CHUNK_SIZE_OFFSET, size);
+    }
+    public static long getNext(long memAddr) {
+      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      return UnsafeMemoryChunk.readAbsoluteLong(memAddr+OFF_HEAP_HEADER_SIZE);
+    }
+    public static void setNext(long memAddr, long next) {
+      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      UnsafeMemoryChunk.writeAbsoluteLong(memAddr+OFF_HEAP_HEADER_SIZE, next);
+    }
+    @Override
+    public ChunkType getChunkType() {
+      return SimpleMemoryAllocatorImpl.getAllocator().getChunkFactory().getChunkTypeForAddress(getMemoryAddress());
+    }
+    public static int getSrcTypeOrdinal(long memAddr) {
+      return getSrcType(memAddr) >> SRC_TYPE_SHIFT;
+    }
+    public static int getSrcType(long memAddr) {
+      return getSrcTypeFromRawBits(UnsafeMemoryChunk.readAbsoluteInt(memAddr+REF_COUNT_OFFSET));
+    }
+    public static int getSrcTypeFromRawBits(int rawBits) {
+      return rawBits & SRC_TYPE_MASK;
+    }
+    public static int getSrcTypeOrdinalFromRawBits(int rawBits) {
+      return getSrcTypeFromRawBits(rawBits) >> SRC_TYPE_SHIFT;
+    }
+    
+    /**
+     * Fills the chunk with a repeated byte fill pattern.
+     * @param baseAddress the starting address for a {@link Chunk}.
+     */
+    public static void fill(long baseAddress) {
+      long startAddress = baseAddress + MIN_CHUNK_SIZE;
+      int size = getSize(baseAddress) - MIN_CHUNK_SIZE;
+      
+      UnsafeMemoryChunk.fill(startAddress, size, FILL_BYTE);
+    }
+    
+    /**
+     * Validates that the fill pattern for this chunk has not been disturbed.  This method
+     * assumes the TINY_MULTIPLE is 8 bytes.
+     * @throws IllegalStateException when the pattern has been violated.
+     */
+    public void validateFill() {
+      assert SimpleMemoryAllocatorImpl.TINY_MULTIPLE == 8;
+      
+      long startAddress = getMemoryAddress() + MIN_CHUNK_SIZE;
+      int size = getSize() - MIN_CHUNK_SIZE;
+      
+      for(int i = 0;i < size;i += SimpleMemoryAllocatorImpl.TINY_MULTIPLE) {
+        if(UnsafeMemoryChunk.readAbsoluteLong(startAddress + i) != FILL_PATTERN) {
+          throw new IllegalStateException("Fill pattern violated for chunk " + getMemoryAddress() + " with size " + getSize());
+        }        
+      }
+    }
+
+    public void setSerialized(boolean isSerialized) {
+      if (isSerialized) {
+        int bits;
+        int originalBits;
+        do {
+          originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
+          if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
+            throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
+          }
+          bits = originalBits | IS_SERIALIZED_BIT;
+        } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, originalBits, bits));
+      }
+    }
+    public void setCompressed(boolean isCompressed) {
+      if (isCompressed) {
+        int bits;
+        int originalBits;
+        do {
+          originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
+          if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
+            throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
+          }
+          bits = originalBits | IS_COMPRESSED_BIT;
+        } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, originalBits, bits));
+      }
+    }
+    public void setDataSize(int dataSize) { // KIRK
+      assert dataSize <= getSize();
+      int delta = getSize() - dataSize;
+      assert delta <= (DATA_SIZE_DELTA_MASK >> DATA_SIZE_SHIFT);
+      delta <<= DATA_SIZE_SHIFT;
+      int bits;
+      int originalBits;
+      do {
+        originalBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
+        if ((originalBits&MAGIC_MASK) != MAGIC_NUMBER) {
+          throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(originalBits));
+        }
+        bits = originalBits;
+        bits &= ~DATA_SIZE_DELTA_MASK; // clear the old dataSizeDelta bits
+        bits |= delta; // set the dataSizeDelta bits to the new delta value
+      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, originalBits, bits));
+    }
+    
+    public void initializeUseCount() {
+      int rawBits;
+      do {
+        rawBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET);
+        if ((rawBits&MAGIC_MASK) != MAGIC_NUMBER) {
+          throw new IllegalStateException("It looks like this off heap memory was already freed. rawBits=" + Integer.toHexString(rawBits));
+        }
+        int uc = rawBits & REF_COUNT_MASK;
+        if (uc != 0) {
+          throw new IllegalStateException("Expected use count to be zero but it was: " + uc + " rawBits=0x" + Integer.toHexString(rawBits));
+        }
+      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(this.memoryAddress+REF_COUNT_OFFSET, rawBits, rawBits+1));
+    }
+
+    public static int getRefCount(long memAddr) {
+      return UnsafeMemoryChunk.readAbsoluteInt(memAddr+REF_COUNT_OFFSET) & REF_COUNT_MASK;
+    }
+
+    public static boolean retain(long memAddr) {
+      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      int uc;
+      int rawBits;
+      int retryCount = 0;
+      do {
+        rawBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET);
+        if ((rawBits&MAGIC_MASK) != MAGIC_NUMBER) {
+          // same as uc == 0
+          // TODO MAGIC_NUMBER rethink its use and interaction with compactor fragments
+          return false;
+        }
+        uc = rawBits & REF_COUNT_MASK;
+        if (uc == MAX_REF_COUNT) {
+          throw new IllegalStateException("Maximum use count exceeded. rawBits=" + Integer.toHexString(rawBits));
+        } else if (uc == 0) {
+          return false;
+        }
+        retryCount++;
+        if (retryCount > 1000) {
+          throw new IllegalStateException("tried to write " + (rawBits+1) + " to @" + Long.toHexString(memAddr) + " 1,000 times.");
+        }
+      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET, rawBits, rawBits+1));
+      //debugLog("use inced ref count " + (uc+1) + " @" + Long.toHexString(memAddr), true);
+      if (ReferenceCountHelper.trackReferenceCounts()) {
+        ReferenceCountHelper.refCountChanged(memAddr, false, uc+1);
+      }
+
+      return true;
+    }
+    public static void release(final long memAddr, boolean issueOnReturnCallback) {
+      SimpleMemoryAllocatorImpl.validateAddress(memAddr);
+      int newCount;
+      int rawBits;
+      boolean returnToAllocator;
+      do {
+        returnToAllocator = false;
+        rawBits = UnsafeMemoryChunk.readAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET);
+        if ((rawBits&MAGIC_MASK) != MAGIC_NUMBER) {
+          String msg = "It looks like off heap memory @" + Long.toHexString(memAddr) + " was already freed. rawBits=" + Integer.toHexString(rawBits) + " history=" + ReferenceCountHelper.getFreeRefCountInfo(memAddr);
+          //debugLog(msg, true);
+          throw new IllegalStateException(msg);
+        }
+        int curCount = rawBits&REF_COUNT_MASK;
+        if ((curCount) == 0) {
+          //debugLog("too many frees @" + Long.toHexString(memAddr), true);
+          throw new IllegalStateException("Memory has already been freed." + " history=" + ReferenceCountHelper.getFreeRefCountInfo(memAddr) /*+ System.identityHashCode(this)*/);
+        }
+        if (curCount == 1) {
+          newCount = 0; // clear the use count, bits, and the delta size since it will be freed.
+          returnToAllocator = true;
+        } else {
+          newCount = rawBits-1;
+        }
+      } while (!UnsafeMemoryChunk.writeAbsoluteIntVolatile(memAddr+REF_COUNT_OFFSET, rawBits, newCount));
+      //debugLog("free deced ref count " + (newCount&USE_COUNT_MASK) + " @" + Long.toHexString(memAddr), true);
+      if (returnToAllocator ) {
+        /*
+        if(issueOnReturnCallback) {
+         final GemFireCacheImpl.StaticSystemCallbacks sysCb =
+              GemFireCacheImpl.FactoryStatics.systemCallbacks;
+          if(sysCb != null ) {
+            ChunkType ct = SimpleMemoryAllocatorImpl.getAllocator().getChunkFactory().getChunkTypeForRawBits(rawBits);
+            int dataSizeDelta = computeDataSizeDelta(rawBits);
+            sysCb.beforeReturningOffHeapMemoryToAllocator(memAddr, ct, dataSizeDelta);
+          }
+        }
+        */
+       
+        if (ReferenceCountHelper.trackReferenceCounts()) {
+          if (ReferenceCountHelper.trackFreedReferenceCounts()) {
+            ReferenceCountHelper.refCountChanged(memAddr, true, newCount&REF_COUNT_MASK);
+          }
+          ReferenceCountHelper.freeRefCountInfo(memAddr);
+        }
+        
+        // Use fill pattern for free list data integrity check.
+        if(SimpleMemoryAllocatorImpl.getAllocator().validateMemoryWithFill) {
+          fill(memAddr);
+        }
+        
+        SimpleMemoryAllocatorImpl.getAllocator().freeChunk(memAddr);
+      } else {
+        if (ReferenceCountHelper.trackReferenceCounts()) {
+          ReferenceCountHelper.refCountChanged(memAddr, true, newCount&REF_COUNT_MASK);
+        }
+      }
+    }
+    
+    private static int computeDataSizeDelta(int rawBits) {
+      int dataSizeDelta = rawBits;
+      dataSizeDelta &= DATA_SIZE_DELTA_MASK;
+      dataSizeDelta >>= DATA_SIZE_SHIFT;
+      return dataSizeDelta;
+    }
+    
+    @Override
+    public String toString() {
+      return toStringForOffHeapByteSource();
+      // This old impl is not safe because it calls getDeserializedForReading and we have code that call toString that does not inc the refcount.
+      // Also if this Chunk is compressed we don't know how to decompress it.
+      //return super.toString() + ":<dataSize=" + getDataSize() + " refCount=" + getRefCount() + " addr=" + getMemoryAddress() + " storedObject=" + getDeserializedForReading() + ">";
+    }
+    
+    protected String toStringForOffHeapByteSource() {
+      return super.toString() + ":<dataSize=" + getDataSize() + " refCount=" + getRefCount() + " addr=" + Long.toHexString(getMemoryAddress()) + ">";
+    }
+    
+    @Override
+    public State getState() {
+      if (getRefCount() > 0) {
+        return State.ALLOCATED;
+      } else {
+        return State.DEALLOCATED;
+      }
+    }
+    @Override
+    public MemoryBlock getNextBlock() {
+      throw new UnsupportedOperationException();
+    }
+    @Override
+    public int getBlockSize() {
+      return getSize();
+    }
+    @Override
+    public int getSlabId() {
+      throw new UnsupportedOperationException();
+    }
+    @Override
+    public int getFreeListId() {
+      return -1;
+    }
+    @Override
+    public String getDataType() {
+      return null;
+    }
+    @Override
+    public Object getDataValue() {
+      return null;
+    }
+    public Chunk slice(int position, int limit) {
+      throw new UnsupportedOperationException();
+    }
+  }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkFactory.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkFactory.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkFactory.java
new file mode 100644
index 0000000..f7d4ba8
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkFactory.java
@@ -0,0 +1,51 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+
+/**
+ * ChunkFactory can be used to create Chunk instances.
+ * It can also be used to determine the ChunkType given a Chunk address
+ * or the object header bits from an existing Chunk.
+ */
+public interface ChunkFactory  {
+  /**
+   * Create a new chunk of the given size and type at the given address.
+   */
+  Chunk newChunk(long address, int chunkSize, ChunkType chunkType);
+  /**
+   * Create a new chunk for a block of memory (identified by address)
+   * that has already been allocated.
+   * The size and type are derived from the existing object header.
+   */
+  Chunk newChunk(long address);
+  /**
+   * Create a new chunk of the given type for a block of memory (identified by address)
+   * that has already been allocated.
+   * The size is derived from the existing object header.
+   */
+  Chunk newChunk(long address, ChunkType chunkType);
+  /**
+   * Given the address of an existing chunk return its ChunkType.
+   */
+  ChunkType getChunkTypeForAddress(long address);
+  /**
+   * Given the rawBits from the object header of an existing chunk
+   * return its ChunkType.
+   */
+  ChunkType getChunkTypeForRawBits(int bits);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java
new file mode 100644
index 0000000..9841368
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkType.java
@@ -0,0 +1,26 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+/**
+ * Used to create new chunks of a certain type.
+ */
+public abstract class ChunkType {
+  public abstract int getSrcType();
+  public abstract Chunk newChunk(long memoryAddress);
+  public abstract Chunk newChunk(long memoryAddress, int chunkSize);
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java
new file mode 100644
index 0000000..d7e65f7
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/ChunkWithHeapForm.java
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+/**
+ * Used to keep the heapForm around while an operation is still in progress.
+ * This allows the operation to access the serialized heap form instead of copying
+ * it from offheap. See bug 48135.
+ */
+public class ChunkWithHeapForm extends GemFireChunk {
+  private final byte[] heapForm;
+  
+  public ChunkWithHeapForm(GemFireChunk chunk, byte[] heapForm) {
+    super(chunk);
+    this.heapForm = heapForm;
+  }
+
+  @Override
+  protected byte[] getRawBytes() {
+    return this.heapForm;
+  }
+  
+  public Chunk getChunkWithoutHeapForm() {
+    return new GemFireChunk(this);
+  }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/4b0925e3/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
new file mode 100644
index 0000000..61204ba
--- /dev/null
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/offheap/DataAsAddress.java
@@ -0,0 +1,205 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.offheap;
+
+import java.io.DataOutput;
+import java.io.IOException;
+
+import com.gemstone.gemfire.DataSerializer;
+import com.gemstone.gemfire.cache.Region;
+import com.gemstone.gemfire.internal.DataSerializableFixedID;
+import com.gemstone.gemfire.internal.InternalDataSerializer;
+import com.gemstone.gemfire.internal.cache.BytesAndBitsForCompactor;
+import com.gemstone.gemfire.internal.cache.EntryBits;
+import com.gemstone.gemfire.internal.cache.RegionEntry;
+import com.gemstone.gemfire.internal.cache.RegionEntryContext;
+import com.gemstone.gemfire.internal.lang.StringUtils;
+
+/**
+ * Used to represent offheap addresses whose
+ * value encodes actual data instead a memory
+ * location.
+ * Instances of this class have a very short lifetime.
+ */
+public class DataAsAddress implements StoredObject {
+  private final long address;
+  
+  public DataAsAddress(long addr) {
+    this.address = addr;
+  }
+  
+  public long getEncodedAddress() {
+    return this.address;
+  }
+
+  @Override
+  public boolean equals(Object o) {
+    if (o instanceof DataAsAddress) {
+      return getEncodedAddress() == ((DataAsAddress) o).getEncodedAddress();
+    }
+    return false;
+  }
+  
+  @Override
+  public int hashCode() {
+    long value = getEncodedAddress();
+    return (int)(value ^ (value >>> 32));
+  }
+
+  @Override
+  public int getSizeInBytes() {
+    return 0;
+  }
+
+  public byte[] getDecompressedBytes(RegionEntryContext r) {
+    return OffHeapRegionEntryHelper.encodedAddressToBytes(this.address, true, r);
+  }
+
+  /**
+   * If we contain a byte[] return it.
+   * Otherwise return the serialize bytes in us in a byte array.
+   */
+  public byte[] getRawBytes() {
+    return OffHeapRegionEntryHelper.encodedAddressToRawBytes(this.address);
+  }
+  
+  @Override
+  public byte[] getSerializedValue() {
+    return OffHeapRegionEntryHelper.encodedAddressToBytes(this.address);
+  }
+
+  @Override
+  public Object getDeserializedValue(Region r, RegionEntry re) {
+    return OffHeapRegionEntryHelper.encodedAddressToObject(this.address);
+  }
+
+  @Override
+  public Object getDeserializedForReading() {
+    return getDeserializedValue(null,null);
+  }
+  
+  @Override
+  public Object getValueAsDeserializedHeapObject() {
+    return getDeserializedValue(null,null);
+  }
+  
+  @Override
+  public byte[] getValueAsHeapByteArray() {
+    if (isSerialized()) {
+      return getSerializedValue();
+    } else {
+      return (byte[])getDeserializedForReading();
+    }
+  }
+
+  @Override
+  public String getStringForm() {
+    try {
+      return StringUtils.forceToString(getDeserializedForReading());
+    } catch (RuntimeException ex) {
+      return "Could not convert object to string because " + ex;
+    }
+  }
+
+  @Override
+  public Object getDeserializedWritableCopy(Region r, RegionEntry re) {
+    return getDeserializedValue(null,null);
+  }
+
+  @Override
+  public Object getValue() {
+    if (isSerialized()) {
+      return getSerializedValue();
+    } else {
+      throw new IllegalStateException("Can not call getValue on StoredObject that is not serialized");
+    }
+  }
+
+  @Override
+  public void writeValueAsByteArray(DataOutput out) throws IOException {
+    DataSerializer.writeByteArray(getSerializedValue(), out);
+  }
+
+  @Override
+  public void fillSerializedValue(BytesAndBitsForCompactor wrapper,
+      byte userBits) {
+    byte[] value;
+    if (isSerialized()) {
+      value = getSerializedValue();
+      userBits = EntryBits.setSerialized(userBits, true);
+    } else {
+      value = (byte[]) getDeserializedForReading();
+    }
+    wrapper.setData(value, userBits, value.length, true);
+  }
+
+  @Override
+  public int getValueSizeInBytes() {
+    return 0;
+  }
+  
+  @Override
+  public void sendTo(DataOutput out) throws IOException {
+    if (isSerialized()) {
+      out.write(getSerializedValue());
+    } else {
+      Object objToSend = (byte[]) getDeserializedForReading(); // deserialized as a byte[]
+      DataSerializer.writeObject(objToSend, out);
+    }
+  }
+
+  @Override
+  public void sendAsByteArray(DataOutput out) throws IOException {
+    byte[] bytes;
+    if (isSerialized()) {
+      bytes = getSerializedValue();
+    } else {
+      bytes = (byte[]) getDeserializedForReading();
+    }
+    DataSerializer.writeByteArray(bytes, out);
+    
+  }
+  
+  @Override
+  public void sendAsCachedDeserializable(DataOutput out) throws IOException {
+    if (!isSerialized()) {
+      throw new IllegalStateException("sendAsCachedDeserializable can only be called on serialized StoredObjects");
+    }
+    InternalDataSerializer.writeDSFIDHeader(DataSerializableFixedID.VM_CACHED_DESERIALIZABLE, out);
+    sendAsByteArray(out);
+  }
+
+  @Override
+  public boolean isSerialized() {
+    return OffHeapRegionEntryHelper.isSerialized(this.address);
+  }
+
+  @Override
+  public boolean isCompressed() {
+    return OffHeapRegionEntryHelper.isCompressed(this.address);
+  }
+  
+  @Override
+  public boolean retain() {
+    // nothing needed
+    return true;
+  }
+  @Override
+  public void release() {
+    // nothing needed
+  }
+}
\ No newline at end of file


[27/50] [abbrv] incubator-geode git commit: GEODE-578: Allow cluster-config to work with cache.xml

Posted by je...@apache.org.
GEODE-578: Allow cluster-config to work with cache.xml

Before starting a cache-server, verify that one has
not been created by cluster config. skip if already created.


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

Branch: refs/heads/feature/GEODE-17
Commit: 6e252309ed86add5b89e7d3eb6d8d950ff7db08e
Parents: 1b0905c
Author: Swapnil Bawaskar <sb...@pivotal.io>
Authored: Wed Nov 25 11:43:16 2015 -0800
Committer: Swapnil Bawaskar <sb...@pivotal.io>
Committed: Wed Nov 25 11:45:37 2015 -0800

----------------------------------------------------------------------
 .../internal/cache/xmlcache/CacheCreation.java  |  72 ++++---
 .../cache/xmlcache/CacheCreationJUnitTest.java  | 207 +++++++++++++++++++
 2 files changed, 256 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6e252309/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
index 14076b5..ed67ca4 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreation.java
@@ -547,11 +547,7 @@ public class CacheCreation implements InternalCache {
       cache.setRegionAttributes(id, attrs);
     }
 
-    Iterator it = this.roots.values().iterator();
-    while (it.hasNext()) {
-      RegionCreation r = (RegionCreation)it.next();
-      r.createRoot(cache);
-    }
+    initializeRegions(this.roots, cache);
 
     cache.readyDynamicRegionFactory();
 
@@ -563,38 +559,76 @@ public class CacheCreation implements InternalCache {
     Integer serverPort = CacheServerLauncher.getServerPort();
     String serverBindAdd = CacheServerLauncher.getServerBindAddress();
     Boolean disableDefaultServer = CacheServerLauncher.disableDefaultServer.get();
+    startCacheServers(this.getCacheServers(), cache, serverPort, serverBindAdd, disableDefaultServer);
+    cache.setBackupFiles(this.backups);
+    cache.addDeclarableProperties(this.declarablePropertiesMap);
+    runInitializer();
+    cache.setInitializer(getInitializer(), getInitializerProps());
     
-    if (this.getCacheServers().size() > 1
+    // UnitTest CacheXml81Test.testCacheExtension
+    // Create all extensions
+    extensionPoint.fireCreate(cache);
+  }
+
+  protected void initializeRegions(Map declarativeRegions, Cache cache) {
+    Iterator it = declarativeRegions.values().iterator();
+    while (it.hasNext()) {
+      RegionCreation r = (RegionCreation)it.next();
+      r.createRoot(cache);
+    }
+  }
+
+  /**
+   * starts declarative cache servers if a server is not running on the port already.
+   * Also adds a default server to the param declarativeCacheServers if a serverPort is specified.
+   */
+  protected void startCacheServers(List declarativeCacheServers, Cache cache, Integer serverPort, String serverBindAdd, Boolean disableDefaultServer) {
+
+    if (declarativeCacheServers.size() > 1
         && (serverPort != null || serverBindAdd != null)) {
       throw new RuntimeException(
           LocalizedStrings.CacheServerLauncher_SERVER_PORT_MORE_THAN_ONE_CACHE_SERVER
               .toLocalizedString());
     }
-    
-    if (this.getCacheServers().isEmpty()
+
+    if (declarativeCacheServers.isEmpty()
         && (serverPort != null || serverBindAdd != null)
         && (disableDefaultServer == null || !disableDefaultServer)) {
       boolean existingCacheServer = false;
-      
+
       List<CacheServer> cacheServers = cache.getCacheServers();
       if (cacheServers != null) {
         for(CacheServer cacheServer : cacheServers) {
-          if (serverPort == cacheServer.getPort() && cacheServer.getBindAddress().equals(serverBindAdd)) {
+          if (serverPort == cacheServer.getPort()) {
             existingCacheServer = true;
           }
         }
       }
       
       if (!existingCacheServer) {
-        this.getCacheServers().add(new CacheServerCreation(cache, false));
+        declarativeCacheServers.add(new CacheServerCreation((GemFireCacheImpl)cache, false));
       }
     }
     
-    for (Iterator iter = this.getCacheServers().iterator(); iter.hasNext();) {
-      CacheServerCreation bridge = (CacheServerCreation)iter.next();
-      
+    for (Iterator iter = declarativeCacheServers.iterator(); iter.hasNext();) {
+      CacheServerCreation declaredCacheServer = (CacheServerCreation)iter.next();
+
+      boolean startServer = true;
+      List<CacheServer> cacheServers = cache.getCacheServers();
+      if (cacheServers != null) {
+        for (CacheServer cacheServer : cacheServers) {
+          if (declaredCacheServer.getPort() == cacheServer.getPort()) {
+            startServer = false;
+          }
+        }
+      }
+
+      if (!startServer) {
+        continue;
+      }
+
       CacheServerImpl impl = (CacheServerImpl)cache.addCacheServer();
-      impl.configureFrom(bridge);
+      impl.configureFrom(declaredCacheServer);
 
       if (serverPort != null && serverPort != CacheServer.DEFAULT_PORT) {
         impl.setPort(serverPort);
@@ -614,14 +648,6 @@ public class CacheCreation implements InternalCache {
                 .toLocalizedString(impl), ex);
       }
     }
-    cache.setBackupFiles(this.backups);
-    cache.addDeclarableProperties(this.declarablePropertiesMap);
-    runInitializer();
-    cache.setInitializer(getInitializer(), getInitializerProps());
-    
-    // UnitTest CacheXml81Test.testCacheExtension
-    // Create all extensions
-    extensionPoint.fireCreate(cache);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/6e252309/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
new file mode 100644
index 0000000..2cdf80c
--- /dev/null
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/internal/cache/xmlcache/CacheCreationJUnitTest.java
@@ -0,0 +1,207 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.gemstone.gemfire.internal.cache.xmlcache;
+
+import com.gemstone.gemfire.cache.server.CacheServer;
+import com.gemstone.gemfire.internal.cache.CacheServerImpl;
+import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
+
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static org.mockito.Mockito.*;
+
+
+/**
+ * Created by pivotal on 11/19/15.
+ */
+public class CacheCreationJUnitTest {
+
+  @Mock
+  GemFireCacheImpl cache;
+
+  @Before
+  public void setUp() {
+    MockitoAnnotations.initMocks(this);
+  }
+
+  @Test
+  public void declarativeRegionIsCreated() {
+    CacheCreation cacheCreation = new CacheCreation();
+
+    RegionCreation declarativeRegion = mock(RegionCreation.class);
+    when(declarativeRegion.getName()).thenReturn("testRegion");
+
+    Map declarativeRegions = new HashMap();
+    declarativeRegions.put("testRegion", declarativeRegion);
+
+    when(cache.getRegion("testRegion")).thenReturn(null);
+
+    cacheCreation.initializeRegions(declarativeRegions, cache);
+
+    verify(declarativeRegion, times(1)).createRoot(cache);
+  }
+
+  @Test
+  public void defaultCacheServerIsNotCreatedWithDefaultPortWhenNoDeclarativeServerIsConfigured() {
+    Boolean disableDefaultCacheServer = false;
+    Integer configuredServerPort = null;
+    String configuredServerBindAddress = null;
+
+    CacheCreation cacheCreation = new CacheCreation();
+
+    CacheServerImpl mockServer = mock(CacheServerImpl.class);
+    when(cache.addCacheServer()).thenReturn(mockServer);
+
+    List<CacheServer> cacheServers = new ArrayList<>();
+    when(cache.getCacheServers()).thenReturn(cacheServers);
+
+    cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
+
+    verify(cache, never()).addCacheServer();
+  }
+
+  @Test
+  public void defaultCacheServerIsNotCreatedWhenDisableDefaultCacheServerIsTrue() {
+    Boolean disableDefaultCacheServer = true;
+    Integer configuredServerPort = null;
+    String configuredServerBindAddress = null;
+
+    CacheCreation cacheCreation = new CacheCreation();
+
+    CacheServerImpl mockServer = mock(CacheServerImpl.class);
+    when(cache.addCacheServer()).thenReturn(mockServer);
+
+    List<CacheServer> cacheServers = new ArrayList<>();
+    when(cache.getCacheServers()).thenReturn(cacheServers);
+
+    cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
+
+    verify(cache, never()).addCacheServer();
+  }
+
+  @Test
+  public void defaultCacheServerIsCreatedWithConfiguredPortWhenNoDeclarativeServerIsConfigured() {
+    Boolean disableDefaultCacheServer = false;
+    Integer configuredServerPort = 9999;
+    String configuredServerBindAddress = null;
+
+    CacheCreation cacheCreation = new CacheCreation();
+
+    CacheServerImpl mockServer = mock(CacheServerImpl.class);
+    when(cache.addCacheServer()).thenReturn(mockServer);
+
+    List<CacheServer> cacheServers = new ArrayList<>();
+    when(cache.getCacheServers()).thenReturn(cacheServers);
+
+    cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
+
+    verify(cache, times(1)).addCacheServer();
+    verify(mockServer).setPort(9999);
+  }
+
+  @Test
+  public void declarativeCacheServerIsCreatedWithConfiguredServerPort() {
+    Integer configuredServerPort = 9999;
+    String configuredServerBindAddress = null;
+    Boolean disableDefaultCacheServer = false;
+
+    CacheCreation cacheCreation = new CacheCreation();
+    CacheServerCreation br1 = new CacheServerCreation(cacheCreation, false);
+    br1.setPort(8888);
+    cacheCreation.getCacheServers().add(br1);
+
+    CacheServerImpl mockServer = mock(CacheServerImpl.class);
+    when(cache.addCacheServer()).thenReturn(mockServer);
+
+    cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
+
+    verify(cache, times(1)).addCacheServer();
+    verify(mockServer).setPort(configuredServerPort);
+  }
+
+  @Test
+  public void cacheServerCreationIsSkippedWhenAServerExistsForAGivenPort() {
+    Integer configuredServerPort = null;
+    String configuredServerBindAddress = null;
+    Boolean disableDefaultCacheServer = false;
+
+    CacheCreation cacheCreation = new CacheCreation();
+    CacheServerCreation br1 = new CacheServerCreation(cacheCreation, false);
+    br1.setPort(40406);
+    cacheCreation.getCacheServers().add(br1);
+
+    CacheServerImpl mockServer = mock(CacheServerImpl.class);
+    when(cache.addCacheServer()).thenReturn(mockServer);
+    when(mockServer.getPort()).thenReturn(40406);
+
+    List<CacheServer> cacheServers = new ArrayList<>();
+    cacheServers.add(mockServer);
+
+    when(cache.getCacheServers()).thenReturn(cacheServers);
+
+    cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
+
+    verify(cache, never()).addCacheServer();
+
+  }
+
+  @Test
+  public void userCanCreateMultipleCacheServersDeclaratively() {
+    Integer configuredServerPort = null;
+    String configuredServerBindAddress = null;
+    Boolean disableDefaultCacheServer = false;
+
+    CacheCreation cacheCreation = new CacheCreation();
+    CacheServerCreation br1 = new CacheServerCreation(cacheCreation, false);
+    br1.setPort(40406);
+    CacheServerCreation br2 = new CacheServerCreation(cacheCreation, false);
+    br1.setPort(40407);
+    cacheCreation.getCacheServers().add(br1);
+    cacheCreation.getCacheServers().add(br2);
+
+    CacheServerImpl mockServer = mock(CacheServerImpl.class);
+    when(cache.addCacheServer()).thenReturn(mockServer);
+
+    cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
+
+    verify(cache, times(2)).addCacheServer();
+    verify(mockServer).configureFrom(br1);
+    verify(mockServer).configureFrom(br2);
+  }
+
+  @Test(expected = RuntimeException.class)
+  public void shouldThrowExceptionWhenUserTriesToDeclareMultipleCacheServersWithPort() {
+    Integer configuredServerPort = 50505;
+    String configuredServerBindAddress = "localhost[50505]";
+    Boolean disableDefaultCacheServer = false;
+
+    CacheCreation cacheCreation = new CacheCreation();
+    cacheCreation.getCacheServers().add(new CacheServerCreation(cacheCreation, false));
+    cacheCreation.getCacheServers().add(new CacheServerCreation(cacheCreation, false));
+
+    cacheCreation.startCacheServers(cacheCreation.getCacheServers(), cache, configuredServerPort, configuredServerBindAddress, disableDefaultCacheServer);
+  }
+}


[15/50] [abbrv] incubator-geode git commit: [GEODE-585]: Simplify hash index code Refactored hash index and hash index set Using modified versions of the fastutil methods for adding and finding index positions for objects Added hash index set unit tests

Posted by je...@apache.org.
[GEODE-585]: Simplify hash index code
Refactored hash index and hash index set
Using modified versions of the fastutil methods for adding and finding index positions for objects
Added hash index set unit tests
Removes PrimeFinder, ObjectProcedure, and HashIndexStrategy


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

Branch: refs/heads/feature/GEODE-17
Commit: abad018a944e870b418de81ebefad0524010f225
Parents: 4b0925e
Author: Jason Huynh <hu...@gmail.com>
Authored: Fri Nov 20 16:03:33 2015 -0800
Committer: Jason Huynh <hu...@gmail.com>
Committed: Tue Nov 24 10:18:31 2015 -0800

----------------------------------------------------------------------
 .../cache/query/internal/index/HashIndex.java   |  176 ++-
 .../query/internal/index/HashIndexSet.java      | 1086 ++++++------------
 .../query/internal/index/HashIndexStrategy.java |   90 --
 .../gemfire/internal/util/ObjectProcedure.java  |   30 -
 .../gemfire/internal/util/PrimeFinder.java      |  159 ---
 .../internal/index/HashIndexJUnitTest.java      |   23 +-
 .../internal/index/HashIndexSetJUnitTest.java   |  504 ++++++++
 7 files changed, 922 insertions(+), 1146 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/abad018a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
index 911fd6e..465c038 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndex.java
@@ -160,7 +160,7 @@ public class HashIndex extends AbstractIndex {
       }
     }
     
-    entriesSet = new HashIndexSet(entryToValuesMap, entryToOldKeysMap, internalIndexStats);
+    entriesSet = new HashIndexSet();
   }
 
   /**
@@ -233,17 +233,49 @@ public class HashIndex extends AbstractIndex {
             if (logger.isDebugEnabled()) { 
               logger.debug("A removed or invalid token was being added, and we had an old mapping.");
             }
-            entriesSet.remove(oldKey, entry, true);
+            removeFromEntriesSet(oldKey, entry, true);
           }
           return;
         }
       }
-      this.entriesSet.add(newKey, entry);
+      
+      // Before adding the entry with new value, remove it from reverse map and
+      // using the oldValue remove entry from the forward map.
+      // Reverse-map is used based on the system property
+      Object oldKey = getOldKey(entry);
+      
+      int indexSlot = this.entriesSet.add(newKey, entry);
+      
+      if (indexSlot >= 0) {
+        // Update the reverse map
+        if (IndexManager.isObjectModificationInplace()) {
+          this.entryToValuesMap.put(entry, newKey);
+        }
+        if (newKey != null && oldKey != null) {
+          removeFromEntriesSet(oldKey, entry, false, indexSlot);
+        }
+        // Update Stats after real addition
+        internalIndexStats.incNumValues(1);
+
+      }
     } catch (TypeMismatchException ex) {
       throw new IMQException("Could not add object of type "
           + key.getClass().getName(), ex);
     }
   }
+  
+  private Object getOldKey(RegionEntry entry) throws TypeMismatchException {
+    Object oldKey = null;
+    if (IndexManager.isObjectModificationInplace() && this.entryToValuesMap.containsKey(entry)) {
+      oldKey = this.entryToValuesMap.get(entry);
+    } else if (!IndexManager.isObjectModificationInplace() && this.entryToOldKeysMap != null) {
+      Map oldKeyMap = this.entryToOldKeysMap.get();
+      if (oldKeyMap != null) {
+        oldKey = TypeUtils.indexKeyFor(oldKeyMap.get(entry));
+      }
+    }
+    return oldKey;
+  }
 
   /**
    * @param opCode
@@ -293,15 +325,27 @@ public class HashIndex extends AbstractIndex {
     // space, but there is no way to ask an ArrayList what
     // it's current capacity is..so we trim after every
     // removal
-    boolean found = false;
     try {
       Object newKey = TypeUtils.indexKeyFor(key);
-      found = this.entriesSet.remove(newKey, entry, updateReverseMap);       
+      removeFromEntriesSet(newKey, entry, updateReverseMap);
     } catch (TypeMismatchException ex) {
       throw new IMQException("Could not add object of type "
           + key.getClass().getName(), ex);
     }
   }
+  
+  private void removeFromEntriesSet(Object newKey, RegionEntry entry, boolean updateReverseMap) {
+    removeFromEntriesSet(newKey, entry, updateReverseMap, -1);
+  }
+  
+  private void removeFromEntriesSet(Object newKey, RegionEntry entry, boolean updateReverseMap, int ignoreThisSlot) {
+    if (this.entriesSet.remove(newKey, entry, ignoreThisSlot)) {
+      if (updateReverseMap && IndexManager.isObjectModificationInplace()) {
+        entryToValuesMap.remove(entry);
+      }
+      internalIndexStats.incNumValues(-1);
+    }
+  }
 
   // // IndexProtocol interface implementation
   public boolean clear() throws QueryException {
@@ -628,8 +672,7 @@ public class HashIndex extends AbstractIndex {
   @Override
   void instantiateEvaluator(IndexCreationHelper ich) {
     this.evaluator = new IMQEvaluator(ich);
-    this.entriesSet.setHashIndexStrategy(new HashStrategy(
-        (IMQEvaluator) evaluator));
+    this.entriesSet.setEvaluator((HashIndex.IMQEvaluator)evaluator);
     this.comparator = ((IMQEvaluator) evaluator).comparator;
   }
 
@@ -672,9 +715,9 @@ public class HashIndex extends AbstractIndex {
       Object obj = entriesIter.next();
       Object key = null;
       if (obj != null && obj != HashIndexSet.REMOVED) {
-        
         RegionEntry re = (RegionEntry) obj;
         if (applyOrderBy) {
+          key = ((HashIndex.IMQEvaluator)evaluator).evaluateKey(obj);
           orderedKeys.add(new Object[]{key,i++});
           addValueToResultSet(re, orderedResults, iterOps, runtimeItr, context, projAttrib, intermediateResults, isIntersection, limit, observer, iteratorCreationTime);
         } else {
@@ -856,19 +899,22 @@ public class HashIndex extends AbstractIndex {
   void recreateIndexData() throws IMQException {
     // Mark the data maps to null & call the initialization code of index
     this.entriesSet.clear();
-	int numKeys = (int) this.internalIndexStats.getNumberOfKeys();
-	if (numKeys > 0) {
-		this.internalIndexStats.incNumKeys(-numKeys);
-	}
-	int numValues = (int) this.internalIndexStats.getNumberOfValues();
-	if (numValues > 0) {
-		this.internalIndexStats.incNumValues(-numValues);
-	}
-	int updates = (int) this.internalIndexStats.getNumUpdates();
-	if (updates > 0) {
-		this.internalIndexStats.incNumUpdates(updates);
-	}
-	this.initializeIndex(true);
+    if (IndexManager.isObjectModificationInplace()) {
+      entryToValuesMap.clear();
+    }
+    int numKeys = (int) this.internalIndexStats.getNumberOfKeys();
+    if (numKeys > 0) {
+      this.internalIndexStats.incNumKeys(-numKeys);
+    }
+    int numValues = (int) this.internalIndexStats.getNumberOfValues();
+    if (numValues > 0) {
+      this.internalIndexStats.incNumValues(-numValues);
+    }
+    int updates = (int) this.internalIndexStats.getNumUpdates();
+    if (updates > 0) {
+      this.internalIndexStats.incNumUpdates(updates);
+    }
+    this.initializeIndex(true);
   }
 
   public String dump() {
@@ -1435,7 +1481,7 @@ public class HashIndex extends AbstractIndex {
       return context;
     }
 
-    Object evaluateKey(Object object) {
+    public Object evaluateKey(Object object) {
       Object value = object;
       
       ExecutionContext newContext = null;
@@ -1459,6 +1505,10 @@ public class HashIndex extends AbstractIndex {
           logger.debug("Could not reevaluate key for hash index");
         }
       }
+      
+      if (key == null) {
+        key = IndexManager.NULL;
+      }
       return key;
     }
 
@@ -1471,8 +1521,8 @@ public class HashIndex extends AbstractIndex {
         //We check to see if an update was in progress.  If so (and is the way these turn to undefined),
         //the value is reevaluated and removed from the result set if it does not match the 
         //search criteria.  This occurs in addToResultsFromEntries()
-        Object key0 = ((Object[])arg0)[1];
-        Object key1 = ((Object[])arg1)[1];
+        Object key0 = ((Object[])arg0)[0];
+        Object key1 = ((Object[])arg1)[0];
       
         Comparable comp0 = (Comparable) key0;
         Comparable comp1 = (Comparable) key1;
@@ -1512,82 +1562,12 @@ public class HashIndex extends AbstractIndex {
       throws IMQException {
     // TODO Auto-generated method stub
   }
-
-  private class HashStrategy implements HashIndexStrategy {
-
-    private AttributeDescriptor attDesc;
-
-    private IMQEvaluator evaluator;
-    
-    public HashStrategy(IMQEvaluator evaluator) {
-      this.evaluator = evaluator;
-    }
-
-    public final int computeHashCode(Object o) {
-      return computeHashCode(o, false);
-    }
-
-    public final int computeHashCode(Object o, boolean reevaluateKey) {
-      if (reevaluateKey) {
-        return computeKey(o).hashCode();
-      }
-      return o.hashCode();
-    }
-
-    public final Object computeKey(Object o) {
-      Object key = evaluator.evaluateKey(o);
-      if (key == null) {
-        key = IndexManager.NULL;
-      }
-      return key;
-    }
-
-    public final boolean equalsOnAdd(Object o1, Object o2) {
-      if (o1 == null) {
-        return o2 == null;
-      }
-      try {
-        return TypeUtils.compare(o1, o2, OQLLexerTokenTypes.TOK_EQ).equals(Boolean.TRUE);
-      }
-      catch (TypeMismatchException e) {
-        return o1.equals(o2);
-      }
-    }
-
-    /*
-     * expects object o to be a region entry
-     */
-    public boolean equalsOnGet(Object indexKey, Object o) {
-      Object fieldValue = evaluator.evaluateKey(o);
-     
-      if (fieldValue == null && indexKey == IndexManager.NULL) {
-        return true;
-      } else {
-        try {
-          if (fieldValue instanceof PdxString) {
-           if (indexKey instanceof String) {
-             fieldValue = ((PdxString) fieldValue).toString(); 
-           }
-         }
-         else if (indexKey instanceof PdxString) {
-           if (fieldValue instanceof String) {
-             fieldValue = new PdxString((String)fieldValue);
-           }
-         }
-         return TypeUtils.compare(fieldValue, indexKey, OQLLexerTokenTypes.TOK_EQ).equals(Boolean.TRUE);
-        }
-        catch (TypeMismatchException e) {
-          return fieldValue.equals(indexKey);
-        }
-      }
-    }
-  }
-
+  
   public boolean isEmpty() {
     return entriesSet.isEmpty();
   }
   
-  public String printAll() {
-    return this.entriesSet.printAll();
-  }
+//  public String printAll() {
+//    return this.entriesSet.printAll();
+//  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/abad018a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSet.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSet.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSet.java
index 85887d4..2fa72d1 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSet.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexSet.java
@@ -14,8 +14,29 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
+/*           
+ * insertionIndex(), index(), trimToSize() are based on code provided by fastutil
+ * They are based from add(), contains() and other methods from ObjectOpenHashSet
+ * We have used the traversing mechanism and the HashCommon.mix()
+ * Copyright (C) 2002-2014 Sebastiano Vigna 
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License. 
+ */
 package com.gemstone.gemfire.cache.query.internal.index;
 
+import static it.unimi.dsi.fastutil.HashCommon.arraySize;
+import it.unimi.dsi.fastutil.HashCommon;
 import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap;
 
 import java.util.Collection;
@@ -24,27 +45,23 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
-import java.util.concurrent.ConcurrentMap;
 
 import com.gemstone.gemfire.cache.query.TypeMismatchException;
-import com.gemstone.gemfire.cache.query.internal.AttributeDescriptor;
 import com.gemstone.gemfire.cache.query.internal.index.AbstractIndex.InternalIndexStatistics;
+import com.gemstone.gemfire.cache.query.internal.parse.OQLLexerTokenTypes;
 import com.gemstone.gemfire.cache.query.internal.types.TypeUtils;
 import com.gemstone.gemfire.internal.cache.CachePerfStats;
 import com.gemstone.gemfire.internal.cache.CachedDeserializable;
 import com.gemstone.gemfire.internal.cache.RegionEntry;
 import com.gemstone.gemfire.internal.offheap.StoredObject;
-import com.gemstone.gemfire.internal.util.ObjectProcedure;
-import com.gemstone.gemfire.internal.util.PrimeFinder;
+import com.gemstone.gemfire.pdx.internal.PdxString;
 
 /**
- * An implementation of the <tt>Set</tt> interface that uses an open-addressed
- * hash table to store its contents.
- * 
- * On collisions, will store contents in an IndexElemArray and once a threshold
- * has been hit, will store in ConcurrentHashSets.
+ * An implementation of the <tt>Set</tt> interface for the HashIndex
+ * Not exactly a set as the hash keys can actually collide but will
+ * continue to look for an empty location to store the value
+ *
  */
-
 public class HashIndexSet implements Set {
 
   /**
@@ -53,113 +70,59 @@ public class HashIndexSet implements Set {
    */
   private transient CachePerfStats cacheStats;
 
-  /** the current number of occupied slots in the hash. */
+  /** the current number of entries in the set */
   protected transient int _size;
-  
-  /** the current number of free slots in the hash. */
+
+  /** the current number of open slots in the hash.
+   * Originally used when we collapsed collided keys into collections
+   * Not really used now */
   protected transient int _free;
-  
-  /** the current number of occupied slots in the hash. */
-  protected transient int _removedTokens;
+
+  /** number of removed tokens in the set, these are index positions that may be reused*/
+  transient int _removedTokens;
 
   /** the load above which rehashing occurs. */
   protected static final float DEFAULT_LOAD_FACTOR = 0.5f;
 
-  /**
-   * the default initial capacity for the hash table. This is one less than a
-   * prime value because one is added to it when searching for a prime capacity
-   * to account for the free slot required by open addressing. Thus, the real
-   * default capacity is 11.
-   */
-  protected static final int DEFAULT_INITIAL_CAPACITY = 100;
+  protected static final int DEFAULT_INITIAL_CAPACITY = 128;
 
-  /**
-   * Determines how full the internal table can become before rehashing is
-   * required. This must be a value in the range: 0.0 < loadFactor < 1.0. The
-   * default value is 0.5, which is about as large as you can get in open
-   * addressing without hurting performance. Cf. Knuth, Volume 3., Chapter 6.
-   */
   protected float _loadFactor;
+  
+  /** size of the backing table (-1)**/
+  protected int n;
+  
+  /** used for hashing into the table**/
+  protected int _mask;
 
   /**
-   * The maximum number of elements allowed without allocating more space.
+   * The maximum number of elements before rehashing
    */
   protected int _maxSize;
 
-  protected static final int CONDITIONAL_COMPACT_FACTOR = 2;
-  
-  //If after an update, the number of removed tokens X percent of the max size,
-  //we will compact and rehash to remove the tokens.
+  /** If after an update, the number of removed tokens X percent of the max size,
+    * we will compact and rehash to remove the tokens.
+    */
   protected static final float CONDITIONAL_REMOVED_TOKEN_REHASH_FACTOR = .7f;
 
   /** the set of Objects */
   protected transient Object[] _set;
 
-  /** the strategy used to hash objects in this collection. */
-  protected HashIndexStrategy _hashingStrategy;
+  protected HashIndex.IMQEvaluator _imqEvaluator;
 
+ /**
+  * The removed token
+  */
   protected static final Object REMOVED = new Object();
-  
+
   static boolean TEST_ALWAYS_REHASH = false;
 
   /**
-   * Map for RegionEntries=>value of indexedExpression (reverse map)
+   * This is used when inplace modification is off to detect old key
    */
-  private ConcurrentMap<Object, Object> entryToValuesMap;
-  protected ThreadLocal<Object2ObjectOpenHashMap> entryToOldKeysMap;
-  protected InternalIndexStatistics internalIndexStats;
-  
-  private AttributeDescriptor attDesc;
 
-  /**
-   * Creates a new <code>HashIndexSet</code> instance with the default capacity
-   * and load factor.
-   */
   public HashIndexSet() {
     this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
-  }
-
-  public HashIndexSet(ConcurrentMap reverseMap, ThreadLocal<Object2ObjectOpenHashMap> entryToOldKeysMap, InternalIndexStatistics internalIndexStats) {
-    this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
-    this.entryToValuesMap = reverseMap;
-    this.entryToOldKeysMap = entryToOldKeysMap;
-    this.internalIndexStats = internalIndexStats;
-  }
-  
-  /**
-   * Creates a new <code>HashIndexSet</code> instance with the default capacity
-   * and load factor.
-   * 
-   * @param strategy used to compute hash codes and to compare objects.
-   */
-  public HashIndexSet(HashIndexStrategy strategy) {
-    this(DEFAULT_INITIAL_CAPACITY, DEFAULT_LOAD_FACTOR);
-    this._hashingStrategy = strategy;
-  }
-
-  /**
-   * Creates a new <code>HashIndexSet</code> instance with a prime capacity
-   * equal to or greater than <tt>initialCapacity</tt> and with the default load
-   * factor.
-   * 
-   * @param initialCapacity
-   *          an <code>int</code> value
-   */
-  public HashIndexSet(int initialCapacity) {
-    this(initialCapacity, DEFAULT_LOAD_FACTOR);
-  }
 
-  /**
-   * Creates a new <code>HashIndexSet</code> instance with a prime capacity
-   * equal to or greater than <tt>initialCapacity</tt> and with the default load
-   * factor.
-   * 
-   * @param initialCapacity an <code>int</code> value
-   * @param strategy used to compute hash codes and to compare objects.
-   */
-  public HashIndexSet(int initialCapacity, HashIndexStrategy strategy) {
-    this(initialCapacity, DEFAULT_LOAD_FACTOR);
-    this._hashingStrategy = strategy;
   }
 
   /**
@@ -170,57 +133,12 @@ public class HashIndexSet implements Set {
    * @param initialCapacity an <code>int</code> value
    * @param loadFactor a <code>float</code> value
    */
-  public HashIndexSet(int initialCapacity, float loadFactor) {
-    _loadFactor = loadFactor;
-    setUp((int) Math.ceil(initialCapacity / loadFactor));
-  }
-
-  /**
-   * Creates a new <code>HashIndexSet</code> instance with a prime capacity
-   * equal to or greater than <tt>initialCapacity</tt> and with the specified
-   * load factor.
-   * 
-   * @param initialCapacity
-   *          an <code>int</code> value
-   * @param loadFactor
-   *          a <code>float</code> value
-   * @param strategy
-   *          used to compute hash codes and to compare objects.
-   */
-  public HashIndexSet(int initialCapacity, float loadFactor,
-      HashIndexStrategy strategy) {
-    this(initialCapacity, loadFactor);
-    this._hashingStrategy = strategy;
-  }
-
-  /**
-   * Creates a new <code>HashIndexSet</code> instance containing the elements of
-   * <tt>collection</tt>.
-   * 
-   * @param collection
-   *          a <code>Collection</code> value
-   */
-  public HashIndexSet(Collection collection) {
-    this(collection.size());
-    addAll(collection);
-  }
-
-  /**
-   * Creates a new <code>HashIndexSet</code> instance containing the elements of
-   * <tt>collection</tt>.
-   * 
-   * @param collection
-   *          a <code>Collection</code> value
-   * @param strategy
-   *          used to compute hash codes and to compare objects.
-   */
-  public HashIndexSet(Collection collection, HashIndexStrategy strategy) {
-    this(collection.size(), strategy);
-    addAll(collection);
+  private HashIndexSet(int initialCapacity, float loadFactor) {
+    setUp(initialCapacity , loadFactor);
   }
 
-  public void setHashIndexStrategy(HashIndexStrategy hashingStrategy) {
-    this._hashingStrategy = hashingStrategy;
+  public void setEvaluator(HashIndex.IMQEvaluator evaluator) {
+    this._imqEvaluator = evaluator;
   }
 
   /**
@@ -241,71 +159,62 @@ public class HashIndexSet implements Set {
   public boolean contains(Object obj) {
     return index(obj) >= 0;
   }
-  
+
   /**
-   * @param object can be either a region entry or index key
-   * @param recomputeKey
-              whether the object is a region entry and needs to have the key recomputed
+   * @param object is the index key
    * @return the hash key
    */
-  
-  private int computeHash(Object object, boolean recomputeKey) {
-    return _hashingStrategy.computeHashCode(object, recomputeKey) & 0x7fffffff;
+
+  private int computeHash(Object object) {
+    return object.hashCode();
   }
 
   /**
    * Locates the index of <tt>obj</tt>.
    * 
-   * @param obj an <code>Object</code> value, expected to be a
+   * @param obj an <code>Object</code> value, expected to be the value object
    * @return the index of <tt>obj</tt> or -1 if it isn't in the set.
    */
   protected int index(Object obj) {
-    return index(_hashingStrategy.computeKey(obj), obj);
+    return index(_imqEvaluator.evaluateKey(obj), obj);
   }
-  
+
   protected int index(Object key, Object obj) {
     return index(key, obj, -1);
   }
-  
+
   /**
    * Locates index slot of object using the provided key (in this case we are passing in old key)
+   * 
    * @param key
    * @param obj
    * @return the indexSlot of the given key/object combination
    */
   protected int index(Object key, Object obj, int ignoreThisSlot) {
-    int hash, probe, index, length;
+    int hash;
+    int pos;
     Object[] set;
-    Object cur;
-
+    int mask = _mask;
     set = _set;
-    length = set.length;
-    hash = computeHash(key, false);
-    index = hash % length;
-    cur = set[index];
-    
-    long start = -1L;
-    if (this.cacheStats != null) {
-      start = this.cacheStats.getStatTime();
-    }
-    //Find the correct collection that matches key of the object we are looking for
-    //if one exists, we then look to see if the element exists in the collection
-    //If a collection is not correct, we probe for the next collection until a null is found
-    while (cur != null) {
-      if (cur != REMOVED && index != ignoreThisSlot) {
-        if (cur instanceof RegionEntry) {
-          if (_hashingStrategy.equalsOnAdd(obj, cur)) {
-            return index;
-          }
-        }
-      }
-
-      probe = 1 + (hash % (length - 2));
-      index -= probe;
-      if (index < 0) {
-        index += length;
+    Object curr;
+    hash = computeHash(key);
+
+    /* Code originated from fastutils
+     * Copyright (C) 2002-2014 Sebastiano Vigna
+     * 
+     * Licensed under the Apache License, Version 2.0 (the "License");
+     * you may not use this file except in compliance with the License.
+     * You may obtain a copy of the License at
+     * 
+     * http://www.apache.org/licenses/LICENSE-2.0 
+     */
+    if (!((curr = set[pos = (it.unimi.dsi.fastutil.HashCommon.mix(hash)) & mask]) == null || curr == REMOVED)) {
+      if (((curr).equals(obj) && pos != ignoreThisSlot))
+        return pos;
+      while (!((curr = set[pos = (pos + 1) & mask]) == null || curr == REMOVED)) {
+        if (((curr).equals(obj)) && pos != ignoreThisSlot)
+          return pos;
       }
-      cur = set[index];
     }
     return -1;
   }
@@ -313,18 +222,17 @@ public class HashIndexSet implements Set {
   public Iterator getAll() {
     return getAllNotMatching(Collections.EMPTY_LIST);
   }
-  
+
   public Iterator getAllNotMatching(Collection keysToRemove) {
     return new HashIndexSetIterator(keysToRemove, _set);
   }
-  
+
   /**
    * Locates the index of <tt>obj</tt>.
    * 
    * @param indexKey
    *          an <code>Object</code> value that represents the index key
-   * @return the a collection of objects that match the index key or an empty
-   *         collection if none match
+   * @return Iterator over a collection of objects that match the key
    */
   public Iterator get(Object indexKey) {
     return new HashIndexSetIterator(indexKey, _set);
@@ -332,7 +240,7 @@ public class HashIndexSet implements Set {
 
   /**
    * 
-   * @param set the array that all elements are stored in
+   * @param set represents the array that all elements are stored in
    * @param index
    *          the array index location to store the object. This should be
    *          calculated by one of the insertionIndex methods
@@ -342,60 +250,36 @@ public class HashIndexSet implements Set {
   private boolean addObjectToSet(Object[] set, int index, Object newObject) {
     boolean added = true;
     if (index < 0) {
-      throwObjectContractViolation(set[(-index - 1)], newObject);
+      throw new ArrayIndexOutOfBoundsException("Cannot add:" + newObject + " into array position:" + index);
     }
     Object oldObject = set[index];
     if (oldObject == null || oldObject == REMOVED) {
       set[index] = newObject;
-    } else if (oldObject instanceof RegionEntry) {
-      IndexElemArray elemArray = new IndexElemArray();
-      elemArray.add(oldObject);
-      elemArray.add(newObject);
-      set[index] = elemArray;
-    } else if (oldObject instanceof IndexConcurrentHashSet) {
-      added = ((IndexConcurrentHashSet) oldObject).add(newObject);
-    } else if (oldObject instanceof IndexElemArray) {
-      IndexElemArray elemArray = (IndexElemArray) oldObject;
-      if (elemArray.size() >= IndexManager.INDEX_ELEMARRAY_THRESHOLD) {
-        IndexConcurrentHashSet newSet = new IndexConcurrentHashSet(
-            IndexManager.INDEX_ELEMARRAY_THRESHOLD + 20, 0.75f, 1);
-        newSet.addAll(elemArray);
-        newSet.add(newObject);
-        set[index] = newSet;
-      } else {
-        elemArray.add(newObject);
-      }
-    }
+    } 
 
     return added;
   }
 
   /**
-   * Inserts a value into the set.
-   * 
-   * @param obj an <code>Object</code> value
-   * @return true if the set was modified by the add operation
+   * Unsupported, we do not use HashIndexSet as a general all purpose set
    */
-  public synchronized boolean add(Object obj){
-    throw new UnsupportedOperationException(
-        "add(Object) not supported, try add(Object key, Object obj) instead");
+  public synchronized boolean add(Object obj) {
+    throw new UnsupportedOperationException("add(Object) not supported, try add(Object key, Object obj) instead");
   }
 
-  public synchronized boolean add(Object indexKey, Object obj) throws TypeMismatchException {   
-    // Before adding the entry with new value, remove it from reverse map and
-    // using the oldValue remove entry from the forward map.
-    // Reverse-map is used based on the system property
-    Object oldKey = null;
-    if (IndexManager.isObjectModificationInplace() && this.entryToValuesMap.containsKey(obj)){
-        oldKey = this.entryToValuesMap.get(obj);
-    }
-    else if (!IndexManager.isObjectModificationInplace() && this.entryToOldKeysMap != null) {
-      Map oldKeyMap = this.entryToOldKeysMap.get();
-      if (oldKeyMap != null) {
-        oldKey = TypeUtils.indexKeyFor(oldKeyMap.get(obj));        
-      }
+  /**
+   * Add an object using the hash value of the provided indexKey
+   * 
+   * @param indexKey 
+   * @param obj the object to add
+   * @return true if object has been added
+   * @throws TypeMismatchException
+   */
+  public synchronized int add(Object indexKey, Object obj) throws TypeMismatchException {
+    if (indexKey == null) {
+      indexKey = IndexManager.NULL;
     }
-    // Note we cannot make the optimization for hash index.  Due to in place modification
+    // Note we cannot make the below optimization for hash index. Due to in place modification
     // where old key == new key (when no reverse map) we end up not updating to the correct slot in this case
     // If oldKey and the newKey are same there is no need to update the
     // index-maps.
@@ -403,132 +287,70 @@ public class HashIndexSet implements Set {
     // || indexKey.equals(oldKey)) {
     // return false;
     // }
-    
-    //grow/shrink capacity if needed
+
+    // grow/shrink capacity if needed
     preInsertHook();
     int indexSlot = insertionIndex(indexKey, obj, _set);
-    if (indexSlot < 0) {
-      return false; // already present in set, nothing to add
-    }
 
     Object old = _set[indexSlot];
-    boolean added = addObjectToSet(_set, indexSlot, obj);
-    
-    if (added) {
-      //Update the reverse map
-      if ( IndexManager.isObjectModificationInplace()) {
-        this.entryToValuesMap.put(obj, indexKey);
-      }
-      if (indexKey != null && oldKey != null) {
-        remove(oldKey, obj, false, indexSlot);
-      }
-      // Update Stats after real addition
-      internalIndexStats.incNumValues(1);
-    }
-    
+    addObjectToSet(_set, indexSlot, obj);
+
     // only call this now if we are adding to an actual empty slot, otherwise we
     // have reused
     // and inserted into a set or array
     if (old == null) {
       postInsertHook(true);
-    }
-    else {
+    } else {
       postInsertHook(false);
     }
-    return added; // yes, we added something
+    return indexSlot; // yes, we added something
   }
 
   /**
-   * Locates the index at which <tt>obj</tt> can be inserted. if there is
-   * already a value equal()ing <tt>obj</tt> in the set, returns that value's
-   * index as <tt>-index - 1</tt>.
+   * Locates the next available insertion index for the provided indexKey and set
    * 
    * @param obj
    *          an <code>Object</code> value
-   * @return the index of a FREE slot at which obj can be inserted or, if obj is
-   *         already stored in the hash, the negative value of that index, minus
-   *         1: -index -1.
-   */
-  protected int insertionIndex(Object obj) {
-    return insertionIndex(_hashingStrategy.computeKey(obj), obj, _set);
-  }
-  
-  protected int insertionIndex(Object obj, Object[] set) {
-    return insertionIndex(_hashingStrategy.computeKey(obj), obj, set);
-  }
-  
-  
-  /**
-   * Locates the index at which <tt>obj</tt> can be inserted. if there is
-   * already a value equal()ing <tt>obj</tt> in the set, returns that value's
-   * index as <tt>-index - 1</tt>.
-   * 
-   * @param obj
-   *          an <code>Object</code> value
-   * @return the index of a FREE slot at which obj can be inserted or, if obj is
-   *         already stored in the hash, the negative value of that index, minus
-   *         1: -index -1.
+   * @return the index of an open or resused position
    */
   protected int insertionIndex(Object indexKey, Object obj, Object[] set) {
-    int hash, probe, indexSlot, length;
-    Object cur;
-
-    length = set.length;
-    hash = computeHash(indexKey, false);
-    indexSlot = hash % length;
-
-    cur = set[indexSlot];
+    int hash;
+    int pos;
+    int mask = _mask;
+    Object curr;
+    final Object[] array = set;
+    hash = computeHash(indexKey);
 
-    if (cur == null) {
-      return indexSlot; // empty, all done
-    }
-
-    // Getting here means we have yet to find the correct key collection
-    // so we must find the double hash
     long start = -1L;
     if (this.cacheStats != null) {
       start = this.cacheStats.getStatTime();
       this.cacheStats.incQueryResultsHashCollisions();
     }
     try {
-
-      // compute the double hash
-      probe = 1 + (hash % (length - 2));
-      // if the slot we landed on is FULL (but not removed), probe
-      // until we find an empty slot, a REMOVED slot, or an element
-      // equal to the one we are trying to insert.
-      // finding an empty slot means that the value is not present
-      // and that we should use that slot as the insertion point;
-      // finding a REMOVED slot means that we need to keep searching,
-      // however we want to remember the offset of that REMOVED slot
-      // so we can reuse it in case a "new" insertion (i.e. not an update)
-      // is possible.
-      // finding a matching value means that we've found that our desired
-      // key is already in the table
-      if (cur != REMOVED) {
-        // starting at the natural offset, probe until we find an
-        // offset that isn't full.
-        do {
-
-          indexSlot -= probe;
-          if (indexSlot < 0) {
-            indexSlot += length;
-          }
-          cur = set[indexSlot];
-        } while (cur != null && cur != REMOVED);
+      /* Code originated from fastutils
+       * Copyright (C) 2002-2014 Sebastiano Vigna
+       * 
+       * Licensed under the Apache License, Version 2.0 (the "License");
+       * you may not use this file except in compliance with the License.
+       * You may obtain a copy of the License at
+       * 
+       * http://www.apache.org/licenses/LICENSE-2.0 
+       */
+      if (!((curr = array[pos = (it.unimi.dsi.fastutil.HashCommon.mix(hash)) & mask]) == null || curr == REMOVED)) {
+        while (!((curr = array[pos = (pos + 1) & mask]) == null || curr == REMOVED)) {
+        }
       }
-      return indexSlot;
+      return pos;
     } finally {
       if (this.cacheStats != null) {
         this.cacheStats.endQueryResultsHashCollisionProbe(start);
       }
     }
   }
-
+  
   @Override
-  // GemStoneAddition
   public boolean equals(Object other) {
-    if (!(other instanceof Set)) {
+    if (!(other instanceof HashIndexSet)) {
       return false;
     }
     Set that = (Set) other;
@@ -539,164 +361,82 @@ public class HashIndexSet implements Set {
   }
 
   @Override
-  // GemStoneAddition
   public int hashCode() {
-    HashProcedure p = new HashProcedure();
-    forEach(p);
-    return p.getHashCode();
-  }
-
-  /**
-   * Executes <tt>procedure</tt> for each element in the set.
-   * 
-   * @param procedure
-   *          a <code>TObjectProcedure</code> value
-   * @return false if the loop over the set terminated because the procedure
-   *         returned false for some value.
-   */
-  public boolean forEach(ObjectProcedure procedure) {
+    int hash = 0;
     Object[] set = _set;
     for (int i = set.length; i-- > 0;) {
-      if (set[i] != null && set[i] != REMOVED && !procedure.executeWith(set[i])) {
-        return false;
+      if (set[i] != null && set[i] != REMOVED) {
+        hash += set[i].hashCode();
       }
     }
-    return true;
-  }
-
-  protected/* GemStoneAddition */final class HashProcedure implements
-      ObjectProcedure {
-    private int h = 0;
-
-    public int getHashCode() {
-      return h;
-    }
-
-    public final boolean executeWith(Object key) {
-      h += _hashingStrategy.computeHashCode(key);
-      return true;
-    }
+    return hash;
   }
 
   /**
-   * Expands the set to accomodate new values.
+   * Expands or contracts a set to the new specified n.
    * 
-   * @param newCapacity
-   *          an <code>int</code> value
+   * @param newN the expected size
    */
-  // GemStoneAddition
-  protected void rehash(int newCapacity) {
+  protected void rehash(int newN) {
     if (TEST_ALWAYS_REHASH) {
-        Thread.yield();
+      Thread.yield();
     }
     int oldCapacity = _set.length;
     Object[] oldSet = _set;
-    
-    Object[] newSet = new Object[newCapacity];
+
     _removedTokens = 0;
-    //adds/removes/rehash should all be synchronized by the hashindex
-    //we are ok to clear this map and repopulate
-    //we do not do this for _set because we could still be querying 
-    //but the reversemap is only used for adds/removes/rehash
-    if (IndexManager.isObjectModificationInplace()) {
-      entryToValuesMap.clear();
-    }
+    
+    n = newN;
+    _mask = n - 1;
+    _maxSize = computeMaxSize(n, _loadFactor);
+    _free = computeNumFree();
+    Object[] newSet = new Object[n + 1];
+    
     for (int i = oldCapacity; i-- > 0;) {
       if (oldSet[i] != null && oldSet[i] != REMOVED) {
         Object o = oldSet[i];
 
-        if (o instanceof RegionEntry) {
-          Object key = _hashingStrategy.computeKey(o);
-          if (key == null) {
-            key = IndexManager.NULL;
-          }
-          int index = insertionIndex(key, o, newSet);
-          if (index >= 0)
-            if (addObjectToSet(newSet, index, o)) {
-              updateReverseMap(o, key);
-            }
-        } 
+        Object key = _imqEvaluator.evaluateKey(o);
+        if (key == null) {
+          key = IndexManager.NULL;
+        }
+        int index = insertionIndex(key, o, newSet);
+        if (index >= 0) {
+          addObjectToSet(newSet, index, o);
+        }
       }
     }
     _set = newSet;
   }
-  
-  private void updateReverseMap(Object regionEntry, Object key) {
-    if (IndexManager.isObjectModificationInplace()) {
-      entryToValuesMap.put(regionEntry, key);
-    }
-  }
 
-  /**
-   * Convenience methods for subclasses to use in throwing exceptions about
-   * badly behaved user objects employed as keys. We have to throw an
-   * IllegalArgumentException with a rather verbose message telling the user
-   * that they need to fix their object implementation to conform to the general
-   * contract for java.lang.Object.
-   * 
-   * @param o1
-   *          the first of the equal elements with unequal hash codes.
-   * @param o2
-   *          the second of the equal elements with unequal hash codes.
-   * @exception IllegalArgumentException
-   *              the whole point of this method.
-   */
-  protected final void throwObjectContractViolation(Object o1, Object o2)
-      throws IllegalArgumentException {
-    throw new IllegalArgumentException(
-        "Equal objects must have equal hashcodes. "
-            + "During rehashing, Trove discovered that "
-            + "the following two objects claim to be "
-            + "equal (as in java.lang.Object.equals()) "
-            + "but their hashCodes (or those calculated by "
-            + "your HashIndexStrategy) are not equal."
-            + "This violates the general contract of "
-            + "java.lang.Object.hashCode().  See bullet point two "
-            + "in that method's documentation. " + "object #1 ="
-            + objToString(o1) + "; object #2 =" + objToString(o2));
-  }
-
-  private static String objToString(Object o) {
-    if (o instanceof Object[]) {
-      return java.util.Arrays.toString((Object[]) o);
-    } else {
-      return String.valueOf(o);
-    }
-  }
 
   /**
-   * Returns a new array containing the objects in the set.
+   * Unsupported as the hash index does not use this method call
    * 
    * @return an <code>Object[]</code> value
    */
   public Object[] toArray() {
-    throw new UnsupportedOperationException(
-        "toArray not yet supported");
+    throw new UnsupportedOperationException("toArray not yet supported");
   }
 
   /**
-   * Returns a typed array of the objects in the set.
-   * 
+   * Unsupported as the hash index does not use this method call
    * @param a
    *          an <code>Object[]</code> value
    * @return an <code>Object[]</code> value
    */
   public Object[] toArray(Object[] a) {
-    throw new UnsupportedOperationException(
-        "toArray(Object[] a) not yet supported");
+    throw new UnsupportedOperationException("toArray(Object[] a) not yet supported");
   }
 
   /**
    * Empties the set.
    */
-  // GemStoneAddition
   public void clear() {
     _size = 0;
     _free = capacity();
     _removedTokens = 0;
-    if (IndexManager.isObjectModificationInplace()) {
-      entryToValuesMap.clear();
-    }
+
     Object[] set = _set;
 
     for (int i = set.length; i-- > 0;) {
@@ -708,66 +448,58 @@ public class HashIndexSet implements Set {
     return _set.length;
   }
 
-  /**
-   * Removes <tt>obj</tt> from the set.  
-   * Currently not implemented correctly, use {@link HashIndexSet#remove(Object, Object, boolean)}
-   * 
-   * @param obj an <code>Object</code> value
-   * @return true if the set was modified by the remove operation.
-   */
-  public boolean remove(Object obj) {
 
-    throw new UnsupportedOperationException(
-        "remove(Object) not supported, try remove(Object key, Object obj) instead");
+  public boolean remove(Object obj) {
+    return remove(_imqEvaluator.evaluateKey(obj), obj);
   }
-  
-  
-  public synchronized boolean remove(Object key, Object obj, boolean updateReverseMap) {
-    return remove(key, obj, updateReverseMap, -1);
+
+  public synchronized boolean remove(Object key, Object obj) {
+    return remove(key, obj, -1);
   }
-  
+
   /**
    * 
    * @param key assumed to not be null, rather needs to be NULL token
    * @param obj
-   * @param updateReverseMap
    * @param newIndexSlot if inplace modification occurs with out having a reversemap
-   *  we end up scanning the entire index.  We want to remove the region entry from the index slot
-   *  but not the newly added (correct) slot.  Rather only the "old/wrong" slot
+   *          we end up scanning the entire index. We want to remove the region entry from the index slot
+   *          but not the newly added (correct) slot. Rather only the "old/wrong" slot
    * @return true if object was removed, false otherwise
    */
-  public synchronized boolean remove(Object key, Object obj, boolean updateReverseMap, int newIndexSlot) {
+  public synchronized boolean remove(Object key, Object obj, int newIndexSlot) {
     int indexSlot = index(key, obj, newIndexSlot);
     boolean removed = false;
-    //The check for newIndexSlot != indexSlot is incase of in place modification.
-    //When inplace occurs, oldkey == newkey and we end up wiping out the "new key" slow rather
-    //than the old key slot.  Instead let's get to the else portion
+    // The check for newIndexSlot != indexSlot is incase of in place modification.
+    // When inplace occurs, oldkey == newkey and we end up wiping out the "new key" slow rather
+    // than the old key slot. Instead let's get to the else portion
     if (indexSlot >= 0 && indexSlot != newIndexSlot) {
       removed = removeAt(indexSlot);
-      if (removed) {
-        if (updateReverseMap && IndexManager.isObjectModificationInplace()) {
-          entryToValuesMap.remove(obj);
-        }
-        internalIndexStats.incNumValues(-1);
-      }
       return removed;
-    }
-    else if (!IndexManager.isObjectModificationInplace()){
-      //object could not be found so it's possible there was an inplace modification
-        HashIndexSetIterator iterator = (HashIndexSetIterator)getAll();
-        while (iterator.hasNext()) {
-          Object indexedObject = iterator.next();
-          if (_hashingStrategy.equalsOnAdd(indexedObject, obj) && iterator.currentObjectIndex() != newIndexSlot) {
-            iterator.remove();
-            internalIndexStats.incNumValues(-1);
-            return true;
-          }
+    } else if (!IndexManager.isObjectModificationInplace()) {
+      // object could not be found so it's possible there was an inplace modification
+      HashIndexSetIterator iterator = (HashIndexSetIterator) getAll();
+      while (iterator.hasNext()) {
+        Object indexedObject = iterator.next();
+        if (areObjectsEqual(indexedObject, obj) && iterator.currentObjectIndex() != newIndexSlot) {
+          iterator.remove();
+          return true;
         }
+      }
     }
     return false;
   }
   
-  
+  public final boolean areObjectsEqual(Object o1, Object o2) {
+    if (o1 == null) {
+      return o2 == null;
+    }
+    try {
+      return TypeUtils.compare(o1, o2, OQLLexerTokenTypes.TOK_EQ).equals(Boolean.TRUE);
+    }
+    catch (TypeMismatchException e) {
+      return o1.equals(o2);
+    }
+  }
 
   /**
    * Creates an iterator over the values of the set. The iterator supports
@@ -780,11 +512,10 @@ public class HashIndexSet implements Set {
   }
 
   /**
-   * Tests the set to determine if all of the elements in <tt>collection</tt>
-   * are present.
+   * Determine if all of the elements in <tt>collection</tt> are present.
    * 
    * @param collection a <code>Collection</code> value
-   * @return true if all elements were present in the set.
+   * @return true if all elements are present.
    */
   public boolean containsAll(Collection collection) {
     for (Iterator i = collection.iterator(); i.hasNext();) {
@@ -796,25 +527,10 @@ public class HashIndexSet implements Set {
   }
 
   /**
-   * Adds all of the elements in <tt>collection</tt> to the set.
-   * 
-   * @param collection a <code>Collection</code> value
-   * @return true if the set was modified by the add all operation.
+   * Unsupported because type mismatch exception cannot be thrown from Set interface
    */
   public boolean addAll(Collection collection) {
-    boolean changed = false;
-    int size = collection.size();
-    Iterator it;
-
-    ensureCapacity(size);
-    it = collection.iterator();
-    while (size-- > 0) {
-      Object obj = it.next();
-      if (obj != null && add(obj)) {
-        changed = true;
-      }
-    }
-    return changed;
+    throw new UnsupportedOperationException("Add all not implemented");
   }
 
   /**
@@ -826,9 +542,8 @@ public class HashIndexSet implements Set {
   public boolean removeAll(Collection collection) {
     boolean changed = false;
     int size = collection.size();
-    Iterator it;
 
-    it = collection.iterator();
+    Iterator it = collection.iterator();
     while (size-- > 0) {
       if (remove(it.next())) {
         changed = true;
@@ -838,8 +553,7 @@ public class HashIndexSet implements Set {
   }
 
   /**
-   * Removes any values in the set which are not contained in
-   * <tt>collection</tt>.
+   * Removes any values in the set which are not contained in <tt>collection</tt>.
    * 
    * @param collection a <code>Collection</code> value
    * @return true if the set was modified by the retain all operation
@@ -847,11 +561,11 @@ public class HashIndexSet implements Set {
   public boolean retainAll(Collection collection) {
     boolean changed = false;
     int size = size();
-    Iterator it;
 
-    it = iterator();
-    while (size-- > 0) {
-      if (!collection.contains(it.next())) {
+    Iterator it = iterator();
+    while (it.hasNext()) {
+      Object object = it.next();
+      if (!collection.contains(object)) {
         it.remove();
         changed = true;
       }
@@ -859,133 +573,54 @@ public class HashIndexSet implements Set {
     return changed;
   }
 
-
   @Override
-  // GemStoneAddition
-
   /**
-   * Tells whether this set is currently holding any elements.
-   * 
-   * @return a <code>boolean</code> value
+   * return true if no elements exist in the array that are non null or REMOVED tokens
    */
   public boolean isEmpty() {
     return 0 == _size;
   }
 
   /**
-   * Returns the number of slots used in the backing array
+   * Returns the number of positions used in the backing array
    * Is not a true representation of the number of elements in the array
+   * as the array may contain REMOVED tokens
    * 
    * @return an <code>int</code> value
    */
   public int size() {
     return _size;
   }
-  
-  public int size(Object indexKey) {
-    int hash, probe, index, length;
-    Object[] set;
-    Object cur;
-    int size = 0;
 
-    //find the first array index location
-    set = _set;
-    length = set.length;
-    hash = computeHash(indexKey, false);
-    index = hash % length;
-    cur = set[index];
-
-    if (cur == null) {
-      // return
-      return 0;
-    }
-
-    while (cur != null) {
-      if (cur != REMOVED) {
-        if (cur instanceof RegionEntry) {
-          if (_hashingStrategy.equalsOnGet(indexKey, cur)) {
-            size++;
-          }
-        }
-        break;
-      }
-      //If this is not the correct collection, one that does not match the key
-      //we are looking for, then continue our search
-      probe = 1 + (hash % (length - 2));
-      index -= probe;
-      if (index < 0) {
-        index += length;
-      }
-      cur = set[index];
-    }
-    return size;
-  }
-  
   /**
-   * Ensure that this hashtable has sufficient capacity to hold
-   * <tt>desiredCapacity<tt> <b>additional</b> elements without
-   * requiring a rehash.  This is a tuning method you can call
-   * before doing a large insert.
-   * 
-   * @param desiredCapacity an <code>int</code> value
+   * only used for query optimization.  Instead of crawling the entire array doing matches
+   * let's just return the size of the array as that is the worst case size
    */
-  public void ensureCapacity(int desiredCapacity) {
-    if (desiredCapacity > (_maxSize - size())) {
-      rehash(PrimeFinder.nextPrime((int) Math.ceil(desiredCapacity + size()
-          / _loadFactor) + 1));
-      computeMaxSize(capacity());
-    }
+  public int size(Object indexKey) {
+    return _size;
   }
 
   /**
-   * Compresses the hashtable to the minimum prime size (as defined by
-   * PrimeFinder) that will hold all of the elements currently in the table. If
-   * you have done a lot of <tt>remove</tt> operations and plan to do a lot of
-   * queries or insertions or iteration, it is a good idea to invoke this
-   * method. Doing so will accomplish two things:
-   * 
-   * <ol>
-   * <li>You'll free memory allocated to the table but no longer needed because
-   * of the remove()s.</li>
-   * 
-   * <li>You'll get better query/insert/iterator performance because there won't
-   * be any <tt>REMOVED</tt> slots to skip over when probing for indices in the
-   * table.</li>
-   * </ol>
+   * Compress the backing array if possible
    */
   public void compact() {
-    // need at least one free spot for open addressing
-    rehash(PrimeFinder.nextPrime((int) Math.ceil(size() / _loadFactor) + 1));
-    computeMaxSize(capacity());
+    trimToSize(_size);
   }
-
-  // GemStoneAddition
-  /**
-   * Calls compact by taking next set expansion into account. The set is
-   * expanded based on the capacity and load factor (default .5) this method
-   * calls the compact if the size is well below next expansion.
-   */
-  public void conditionalCompact() {
-    if (_size < (capacity() * (_loadFactor / CONDITIONAL_COMPACT_FACTOR))) {
-      compact();
+  
+  public boolean trimToSize( final int n ) {
+    final int l = HashCommon.nextPowerOfTwo( (int)Math.ceil( n / _loadFactor ) );
+    if ( this.n <= l ) return true;
+    try {
+            rehash( l );
     }
-  }
-
-  /**
-   * This simply calls {@link #compact compact}. It is included for symmetry
-   * with other collection classes. Note that the name of this method is
-   * somewhat misleading (which is why we prefer <tt>compact</tt>) as the load
-   * factor may require capacity above and beyond the size of this collection.
-   * 
-   * @see #compact
-   */
-  public final void trimToSize() {
-    compact();
-  }
+    catch ( OutOfMemoryError cantDoIt ) {
+            return false;
+    }
+    return true;
+}
 
   /**
-   * Delete the record at <tt>index</tt>. Reduces the size of the collection by
-   * one.
+   * Remove the object at <tt>index</tt>.
    * 
    * @param index an <code>int</code> value
    */
@@ -994,210 +629,136 @@ public class HashIndexSet implements Set {
     cur = _set[index];
 
     if (cur == null || cur == REMOVED) {
-      //nothing removed
+      // nothing removed
       return false;
     } else {
       _set[index] = REMOVED;
       _size--;
-      _removedTokens ++;
+      _removedTokens++;
       return true;
-    } 
+    }
   }
 
   /**
-   * initializes the hashtable to a prime capacity which is at least
-   * <tt>initialCapacity + 1</tt>.
-   * 
-   * @param initialCapacity an <code>int</code> value
-   * @return the actual capacity chosen
+   * initializes this index set
    */
-  protected int setUp(int initialCapacity) {
-    int capacity;
-    capacity = PrimeFinder.nextPrime(initialCapacity);
-    computeMaxSize(capacity);
-    _set = new Object[capacity];
-    return capacity;
+  protected int setUp(final int expectedCapacity, final float loadFactor) {
+    n = arraySize( expectedCapacity, loadFactor );
+    this._loadFactor = loadFactor;
+    _maxSize = computeMaxSize(n, loadFactor);
+    _mask = n - 1;
+    _free = computeNumFree();
+    _set = new Object[n + 1];
+    return n;
   }
-
-  /**
-   * Computes the values of maxSize. There will always be at least one free slot
-   * required.
-   * 
-   * @param capacity an <code>int</code> value
-   */
-  private final void computeMaxSize(int capacity) {
-    // need at least one free slot for open addressing
-    _maxSize = Math.min(capacity - 1, (int) Math.floor(capacity * _loadFactor));
-    _free = capacity - _size; // reset the free element count
+  
+  private int computeNumFree() {
+    return n - _size;
+  }
+  
+  private int computeMaxSize(int n, float loadFactor) {
+    return Math.min( (int)Math.ceil( n * loadFactor ), n - 1 );
   }
 
   /**
-   * After an insert, this hook is called to adjust the size/free values of the
-   * set and to perform rehashing if necessary.
+   * After insert, allows for calculating metadata
    */
   protected final void postInsertHook(boolean usedFreeSlot) {
     if (usedFreeSlot) {
       _free--;
-    }
-    else {
-      //we used a removeToken
+    } else {
+      // we used a removeToken
       _removedTokens--;
     }
     _size++;
   }
-  
+
+  /**
+   * Before inserting we can ensure we have capacity
+   */
   protected final void preInsertHook() {
- // rehash whenever we exhaust the available space in the table
     if (_size > _maxSize || _free == 0 || TEST_ALWAYS_REHASH) {
-      // choose a new capacity suited to the new state of the table
-      // if we've grown beyond our maximum size, double capacity;
-      // if we've exhausted the free spots, rehash to the same capacity,
-      // which will free up any stale removed slots for reuse.
-      int newCapacity = _size > _maxSize ? PrimeFinder
-          .nextPrime(capacity() << 1) : capacity();
-      rehash(newCapacity);
-      computeMaxSize(capacity());
-    }
-    else if (_removedTokens > _maxSize * CONDITIONAL_REMOVED_TOKEN_REHASH_FACTOR) {
+      rehash(arraySize(_size + 1, _loadFactor));
+      computeMaxSize(capacity(), _loadFactor);
+      _free = computeNumFree();
+    } else if (_removedTokens > _maxSize * CONDITIONAL_REMOVED_TOKEN_REHASH_FACTOR) {
       compact();
     }
   }
 
-  final class ToObjectArrayProcedure implements ObjectProcedure {
-    private final Object[] target;
-    private int pos = 0;
-
-    public ToObjectArrayProcedure(final Object[] target) {
-      this.target = target;
-    }
-
-    public final boolean executeWith(Object value) {
-      target[pos++] = value;
-      return true;
-    }
-  } // ToObjectArrayProcedure
-
-  public String printAll() {
-    StringBuffer s = new StringBuffer();
-    for (int i = 0; i < _set.length; i++) {
-      Object object = _set[i];
-      if (object != null && object != REMOVED) {
-        s.append("\n slot[" + i + "]:");
-        if (object instanceof Collection) {
-          for (Object o : ((Collection) object)) {
-            if (o != null) {
-              RegionEntry re = (RegionEntry) o;
-              Object val = re._getValue(); // OFFHEAP _getValue ok
-              if (val instanceof StoredObject) {
-                // We don't have enough info here to deserialize an off-heap value
-                // so we can't call getDeserializedForReading.
-                // Also we can't call _getValueRetain because we do not
-                // know what region to pass in to it.
-                // So for now we just convert it to a String which all StoredObject
-                // impls can do without needing a refcount or to decompress.
-                val = val.toString();
-              }
-              if (val instanceof CachedDeserializable) {
-                val = ((CachedDeserializable) val).getDeserializedForReading();
-              }
-              s.append(re.getKey() + " =>  " + val + " # ");
-            }
-          }
-        } else {
-          RegionEntry re = (RegionEntry) object;
-          Object val = re._getValue(); // OFFHEAP _getValue ok
-          if (val instanceof StoredObject) {
-            // We don't have enough info here to deserialize an off-heap value
-            // so we can't call getDeserializedForReading.
-            // Also we can't call _getValueRetain because we do not
-            // know what region to pass in to it.
-            // So for now we just convert it to a String which all StoredObject
-            // impls can do without needing a refcount or to decompress.
-            val = val.toString();
-          }
-          if (val instanceof CachedDeserializable) {
-            val = ((CachedDeserializable) val).getDeserializedForReading();
-          }
-          s.append(re.getKey() + " =>  " + val);
-        }
-      }
-    }
-    return s.toString();
-     }
-     
-  
   private class HashIndexSetIterator implements Iterator {
     private Object keyToMatch;
-    //objects at time of iterator creation
+    // objects at time of iterator creation
     private final Object[] objects;
-    private int indexSlot;
+    private int pos;
+    private int prevPos;
     private Collection keysToRemove;
     private Object current;
     private int hash;
-    private int length;
+    private int mask;
     private int probe;
-    
-    private HashIndexSetIterator(Collection keysToRemove, Object[] objects ) {
+
+    private HashIndexSetIterator(Collection keysToRemove, Object[] objects) {
       this.keysToRemove = keysToRemove;
-      this.indexSlot = 0;
+      this.pos = 0;
+      this.prevPos = 0;
       this.objects = objects;
-      current = objects[indexSlot];
+      current = objects[pos];
     }
-    
+
     private HashIndexSetIterator(Object keyToMatch, Object[] objects) {
       this.keyToMatch = keyToMatch;
       this.objects = objects;
-      
-      length = objects.length;
-      hash = computeHash(keyToMatch, false);
-      probe = 1 + (hash % (length - 2));
-      indexSlot = hash % length;
-      current = objects[indexSlot];
+
+      mask = _mask;
+      hash = computeHash(keyToMatch);
+      pos = (it.unimi.dsi.fastutil.HashCommon.mix(hash)) & mask;
+      prevPos = pos;
+      current = objects[pos];
     }
     
+    private void setPos(int pos) {
+      this.prevPos = this.pos;
+      this.pos = pos;
+    }
+
     @Override
     public boolean hasNext() {
       // For Not Equals we need to look in the entire set
       if (keysToRemove != null) {
-        while (indexSlot < objects.length) {
-          current = objects[indexSlot];
+        while (pos < objects.length) {
+          current = objects[pos];
           if (current == null || current.equals(REMOVED)) {
-            //continue searching
-          }
-          else if (notMatchingAnyKeyToRemove(keysToRemove, current)) {
+            // continue searching
+          } else if (notMatchingAnyKeyToRemove(keysToRemove, current)) {
             return true;
           }
-     
-          indexSlot++;
+          setPos(pos+1);
         }
         return false;
       } else {
-
-        current = objects[indexSlot];
+        current = objects[pos];
         // For Equals query
         while (current != null) {
           if (current != REMOVED) {
-            if (_hashingStrategy.equalsOnGet(keyToMatch, current)) {
+            if (objectMatchesIndexKey(keyToMatch, current)) {
               return true;
             }
           }
           // If this is not the correct collection, one that does not match the
           // key we are looking for, then continue our search
-          indexSlot -= probe;
-          if (indexSlot < 0) {
-            indexSlot += length;
-          }
-          
-          current = objects[indexSlot];
-        } 
+          setPos((pos + 1) & mask);
+          current = objects[pos];
+        }
       }
       return false;
     }
+
     private boolean notMatchingAnyKeyToRemove(Collection keysToRemove, Object current) {
       Iterator keysToRemoveIterator = keysToRemove.iterator();
       while (keysToRemoveIterator.hasNext()) {
         Object keyToMatch = keysToRemoveIterator.next();
-        if (_hashingStrategy.equalsOnGet(keyToMatch, current)) {
+        if (objectMatchesIndexKey(keyToMatch, current)) {
           return false;
         }
       }
@@ -1206,43 +767,52 @@ public class HashIndexSet implements Set {
 
     @Override
     public Object next() throws NoSuchElementException {
-        Object obj = current;
-        if (keysToRemove != null) {
-          // for Not equals we need to continue looking
-          // so increment the index here
-          indexSlot++;
-        } else {
-          //advance the pointer
-          indexSlot -= probe;
-          if (indexSlot < 0) {
-            indexSlot += length;
-          }
-        }
-        return obj;
-    }
-
-    int currentObjectIndex() {
-      int indexToRemove = 0;
-      //Because we advanced on the next() call, we need to get the indexSlot prior to advancing
+      Object obj = current;
       if (keysToRemove != null) {
         // for Not equals we need to continue looking
         // so increment the index here
-        indexToRemove = indexSlot - 1;
+        setPos(pos+1);
       } else {
-        //move back the pointer
-        indexToRemove = indexSlot + probe;
-        if (indexSlot >= objects.length) {
-          indexToRemove = indexSlot - length;
-        }
+        // advance the pointer
+        setPos((pos + 1) & mask);
       }
-      return indexToRemove;
+      return obj;
     }
-    
+
+    int currentObjectIndex() {
+      return prevPos;
+    }
+
     @Override
     public void remove() {
       removeAt(currentObjectIndex());
     }
     
+    
+    public boolean objectMatchesIndexKey(Object indexKey, Object o) {
+      Object fieldValue = _imqEvaluator.evaluateKey(o);
+     
+      if (fieldValue == IndexManager.NULL && indexKey == IndexManager.NULL) {
+        return true;
+      } else {
+        try {
+          if (fieldValue instanceof PdxString) {
+           if (indexKey instanceof String) {
+             fieldValue = ((PdxString) fieldValue).toString(); 
+           }
+         }
+         else if (indexKey instanceof PdxString) {
+           if (fieldValue instanceof String) {
+             fieldValue = new PdxString((String)fieldValue);
+           }
+         }
+         return TypeUtils.compare(fieldValue, indexKey, OQLLexerTokenTypes.TOK_EQ).equals(Boolean.TRUE);
+        }
+        catch (TypeMismatchException e) {
+          return fieldValue.equals(indexKey);
+        }
+      }
+    }
   }
-} // HashIndexSet
+}
 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/abad018a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexStrategy.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexStrategy.java b/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexStrategy.java
deleted file mode 100755
index 3ed0caf..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexStrategy.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-/*
- * IndexCreationHelper.java
- *
- * Created on March 16, 2005, 6:20 PM
- */
-package com.gemstone.gemfire.cache.query.internal.index;
-
-import com.gemstone.gemfire.cache.query.internal.ExecutionContext;
-
-
-/**
- * Interface to support plug-able hashing strategies in maps and sets.
- * Implementors can use this interface to make the hashing
- * algorithms use object values, values provided by the java runtime,
- * or a custom strategy when computing hash codes.
- *
- */
-
-public interface HashIndexStrategy {
-    
-    /**
-     * Computes a hash code for the specified object.  Implementors
-     * can use the object's own <tt>hashCode</tt> method, the Java
-     * runtime's <tt>identityHashCode</tt>, or a custom scheme.
-     * 
-     * @param o object for which the hashcode is to be computed
-     * @return the hashCode
-     */
-    public int computeHashCode(Object o);
-    
-
-    /**
-     * VMware Addition
-     * Computes a hash code for the specified object.  Implementors
-     * can use the object's own <tt>hashCode</tt> method, the Java
-     * runtime's <tt>identityHashCode</tt>, or a custom scheme.
-     * Used when resizing the internal set structure.  Due to not storing
-     * the indexKey, we have to recompute the indexKey from the object
-     * at this point.
-     * @param o object for which the hashcode is to be computed
-     * @param recomputeKey 
-     * @return the hashCode
-     */
-    public int computeHashCode(Object o, boolean recomputeKey);
-    
-    /**
-     * VMware Addition
-     * Computes the object's key
-     * @param o object for which the key is to be computed
-     * @return the key
-     */
-    public Object computeKey(Object o);
-
-    /**
-     * Compares o1 and o2 for equality.  Strategy implementors may use
-     * the objects' own equals() methods, compare object references,
-     * or implement some custom scheme.
-     *
-     * @param o1 an <code>Object</code> value
-     * @param o2 an <code>Object</code> value
-     * @return true if the objects are equal according to this strategy.
-     */
-    public boolean equalsOnAdd(Object o1, Object o2);
-    
-    /**
-     * Compares o1 and o2 for equality.  Strategy implementors may use
-     * the objects' own equals() methods, compare object references,
-     * or implement some custom scheme.
-     *
-     * @return true if the objects are equal according to this strategy.
-     */
-    public boolean equalsOnGet(Object getValue, Object o);
-    
-} 

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/abad018a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/ObjectProcedure.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/ObjectProcedure.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/ObjectProcedure.java
deleted file mode 100755
index 421b6c8..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/ObjectProcedure.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package com.gemstone.gemfire.internal.util;
-
-/**
- * Similar to the Trove TObjectProcedure, this is used in iterating over some
- * GemFire collections
- * 
- * @author bschuchardt
- *
- */
-public interface ObjectProcedure {
-
-  public boolean executeWith(Object entry);
-  
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/abad018a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PrimeFinder.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PrimeFinder.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PrimeFinder.java
deleted file mode 100644
index 529e5a2..0000000
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/util/PrimeFinder.java
+++ /dev/null
@@ -1,159 +0,0 @@
-//   Copyright (c) 1999 CERN - European Organization for Nuclear Research.
-//
-//   Permission to use, copy, modify, distribute and sell this software
-//   and its documentation for any purpose is hereby granted without fee,
-//   provided that the above copyright notice appear in all copies and
-//   that both that copyright notice and this permission notice appear in
-//   supporting documentation. CERN makes no representations about the
-//   suitability of this software for any purpose. It is provided "as is"
-//   without expressed or implied warranty.
-
-package com.gemstone.gemfire.internal.util;
-
-import java.util.Arrays;
-
-/*
- * Modified for Trove to use the java.util.Arrays sort/search
- * algorithms instead of those provided with colt.
- */
-
-/**
- * Used to keep hash table capacities prime numbers.
- * Not of interest for users; only for implementors of hashtables.
- *
- * <p>Choosing prime numbers as hash table capacities is a good idea
- * to keep them working fast, particularly under hash table
- * expansions.
- *
- * <p>However, JDK 1.2, JGL 3.1 and many other toolkits do nothing to
- * keep capacities prime.  This class provides efficient means to
- * choose prime capacities.
- *
- * <p>Choosing a prime is <tt>O(log 300)</tt> (binary search in a list
- * of 300 ints).  Memory requirements: 1 KB static memory.
- *
- * @author wolfgang.hoschek@cern.ch
- * @version 1.0, 09/24/99
- */
-public final class PrimeFinder {
-	/**
-	 * The largest prime this class can generate; currently equal to
-	 * <tt>Integer.MAX_VALUE</tt>.
-	 */
-	public static final int largestPrime = Integer.MAX_VALUE; //yes, it is prime.
-
-	/**
-	 * The prime number list consists of 11 chunks.
-     *
-	 * Each chunk contains prime numbers.
-     *
-	 * A chunk starts with a prime P1. The next element is a prime
-	 * P2. P2 is the smallest prime for which holds: P2 >= 2*P1.
-     *
-	 * The next element is P3, for which the same holds with respect
-	 * to P2, and so on.
-	 *
-	 * Chunks are chosen such that for any desired capacity >= 1000
-	 * the list includes a prime number <= desired capacity * 1.11.
-     *
-	 * Therefore, primes can be retrieved which are quite close to any
-	 * desired capacity, which in turn avoids wasting memory.
-     *
-	 * For example, the list includes
-	 * 1039,1117,1201,1277,1361,1439,1523,1597,1759,1907,2081.
-     *
-	 * So if you need a prime >= 1040, you will find a prime <=
-	 * 1040*1.11=1154.
-	 *	
-	 * Chunks are chosen such that they are optimized for a hashtable
-	 * growthfactor of 2.0;
-     *
-	 * If your hashtable has such a growthfactor then, after initially
-	 * "rounding to a prime" upon hashtable construction, it will
-	 * later expand to prime capacities such that there exist no
-	 * better primes.
-	 *
-	 * In total these are about 32*10=320 numbers -> 1 KB of static
-	 * memory needed.
-     *
-	 * If you are stingy, then delete every second or fourth chunk.
-	 */
-	
-	private static final int[] primeCapacities = {
-		//chunk #0
-		largestPrime,
-		
-		//chunk #1
-		5,11,23,47,97,197,397,797,1597,3203,6421,12853,25717,51437,102877,205759,
-        411527,823117,1646237,3292489,6584983,13169977,26339969,52679969,105359939,
-        210719881,421439783,842879579,1685759167,
-		  
-		//chunk #2
-		433,877,1759,3527,7057,14143,28289,56591,113189,226379,452759,905551,1811107,
-        3622219,7244441,14488931,28977863,57955739,115911563,231823147,463646329,927292699,
-        1854585413,
-		  
-		//chunk #3
-		953,1907,3821,7643,15287,30577,61169,122347,244703,489407,978821,1957651,3915341,
-        7830701,15661423,31322867,62645741,125291483,250582987,501165979,1002331963,
-        2004663929,
-		  
-		//chunk #4
-		1039,2081,4177,8363,16729,33461,66923,133853,267713,535481,1070981,2141977,4283963,
-        8567929,17135863,34271747,68543509,137087021,274174111,548348231,1096696463,
-		  
-		//chunk #5
-		31,67,137,277,557,1117,2237,4481,8963,17929,35863,71741,143483,286973,573953,
-        1147921,2295859,4591721,9183457,18366923,36733847,73467739,146935499,293871013,
-        587742049,1175484103,
-		  
-		//chunk #6
-		599,1201,2411,4831,9677,19373,38747,77509,155027,310081,620171,1240361,2480729,
-        4961459,9922933,19845871,39691759,79383533,158767069,317534141,635068283,1270136683,
-		  
-		//chunk #7
-		311,631,1277,2557,5119,10243,20507,41017,82037,164089,328213,656429,1312867,
-        2625761,5251529,10503061,21006137,42012281,84024581,168049163,336098327,672196673,
-        1344393353,
-		  
-		//chunk #8
-		3,7,17,37,79,163,331,673,1361,2729,5471,10949,21911,43853,87719,175447,350899,
-        701819,1403641,2807303,5614657,11229331,22458671,44917381,89834777,179669557,
-        359339171,718678369,1437356741,
-		  
-		//chunk #9
-		43,89,179,359,719,1439,2879,5779,11579,23159,46327,92657,185323,370661,741337,
-        1482707,2965421,5930887,11861791,23723597,47447201,94894427,189788857,379577741,
-        759155483,1518310967,
-		  
-		//chunk #10
-		379,761,1523,3049,6101,12203,24407,48817,97649,195311,390647,781301,1562611,
-        3125257,6250537,12501169,25002389,50004791,100009607,200019221,400038451,800076929,
-        1600153859
-    };
-
-	static { //initializer
-		// The above prime numbers are formatted for human readability.
-		// To find numbers fast, we sort them once and for all.
-		
-		Arrays.sort(primeCapacities);
-	}
-	
-    /**
-     * Returns a prime number which is <code>&gt;= desiredCapacity</code>
-     * and very close to <code>desiredCapacity</code> (within 11% if
-     * <code>desiredCapacity &gt;= 1000</code>).
-     *
-     * @param desiredCapacity the capacity desired by the user.
-     * @return the capacity which should be used for a hashtable.
-     */
-    public static final int nextPrime(int desiredCapacity) {
-        int i = Arrays.binarySearch(primeCapacities, desiredCapacity);
-        if (i<0) {
-            // desired capacity not found, choose next prime greater
-            // than desired capacity
-            i = -i -1; // remember the semantics of binarySearch...
-        }
-        return primeCapacities[i];
-    }
-}

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/abad018a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexJUnitTest.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexJUnitTest.java b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexJUnitTest.java
index e3247a7..e2a8643 100755
--- a/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexJUnitTest.java
+++ b/gemfire-core/src/test/java/com/gemstone/gemfire/cache/query/internal/index/HashIndexJUnitTest.java
@@ -189,6 +189,7 @@ public class HashIndexJUnitTest {
       }
       region.put("" + i, p);
     }
+    
     helpTestHashIndexForQuery("SELECT * FROM /portfolios p WHERE p.status = 'inactive'", "p.status", "/portfolios p");
     qs.removeIndexes();
     observer = new MyQueryObserverAdapter();
@@ -1382,17 +1383,17 @@ public class HashIndexJUnitTest {
   }
 
    
-  private void printIndex(Index index) {
-   if (index instanceof PartitionedIndex) {
-    Iterator it = ((PartitionedIndex)index).getBucketIndexes().iterator();
-    while (it.hasNext()) { 
-      ((HashIndex)it.next()).printAll();
-    }
-   }
-   else {
-     System.out.println(((HashIndex)index).printAll());
-   }
-  }
+//  private void printIndex(Index index) {
+//   if (index instanceof PartitionedIndex) {
+//    Iterator it = ((PartitionedIndex)index).getBucketIndexes().iterator();
+//    while (it.hasNext()) { 
+//      ((HashIndex)it.next()).printAll();
+//    }
+//   }
+//   else {
+//     System.out.println(((HashIndex)index).printAll());
+//   }
+//  }
   
   
   private class RelationshipKey implements Comparable {


[44/50] [abbrv] incubator-geode git commit: With disable tcp(udp) now we don't throttle serial executor queue

Posted by je...@apache.org.
With disable tcp(udp) now we don't throttle serial executor queue


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

Branch: refs/heads/feature/GEODE-17
Commit: fba68678d268cf6c142d2f9dc275a54c0d6974af
Parents: 74e1364
Author: Hitesh Khamesra <hi...@yahoo.com>
Authored: Fri Dec 4 09:02:17 2015 -0800
Committer: Hitesh Khamesra <hi...@yahoo.com>
Committed: Fri Dec 4 09:05:40 2015 -0800

----------------------------------------------------------------------
 .../distributed/internal/DistributionManager.java       | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/fba68678/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 5d3bdce..7a9f7c0 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
@@ -842,7 +842,10 @@ public class DistributionManager
             " SERIAL_QUEUE_SIZE_THROTTLE :" + SERIAL_QUEUE_SIZE_THROTTLE
         ); 
       }
-      this.serialQueuedExecutorPool = new SerialQueuedExecutorPool(this.threadGroup, this.stats);
+      //  when TCP/IP is disabled we can't throttle the serial queue or we run the risk of 
+      // distributed deadlock when we block the UDP reader thread
+      boolean throttlingDisabled = system.getConfig().getDisableTcp();
+      this.serialQueuedExecutorPool = new SerialQueuedExecutorPool(this.threadGroup, this.stats, throttlingDisabled);
     }
       
     {
@@ -4119,14 +4122,17 @@ public class DistributionManager
     DistributionStats stats;
     ThreadGroup threadGroup;
     
+    final boolean throttlingDisabled;
+    
     /**
      * Constructor.
      * @param group thread group to which the threads will belog to.
      * @param stats 
      */
-    SerialQueuedExecutorPool(ThreadGroup group, DistributionStats stats) {
+    SerialQueuedExecutorPool(ThreadGroup group, DistributionStats stats, boolean throttlingDisabled) {
       this.threadGroup = group;
       this.stats = stats;
+      this.throttlingDisabled = throttlingDisabled;
     }
 
     /*
@@ -4250,7 +4256,7 @@ public class DistributionManager
       
       BlockingQueue poolQueue;
       
-      if (SERIAL_QUEUE_BYTE_LIMIT == 0) {
+      if (SERIAL_QUEUE_BYTE_LIMIT == 0 || this.throttlingDisabled) {
         poolQueue = new OverflowQueueWithDMStats(stats.getSerialQueueHelper());
       } else {
         poolQueue = new ThrottlingMemLinkedQueueWithDMStats(SERIAL_QUEUE_BYTE_LIMIT, SERIAL_QUEUE_THROTTLE, SERIAL_QUEUE_SIZE_LIMIT, SERIAL_QUEUE_SIZE_THROTTLE, this.stats.getSerialQueueHelper());


[39/50] [abbrv] incubator-geode git commit: GEODE-621: failure in AnalyzeSerializablesJUnitTest

Posted by je...@apache.org.
GEODE-621: failure in AnalyzeSerializablesJUnitTest

fixed the entry for StartupMessage


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

Branch: refs/heads/feature/GEODE-17
Commit: b7030d1cd7bf5461889a8a2a0eb400796021c307
Parents: dce479e
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Dec 1 16:55:36 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Dec 1 16:58:03 2015 -0800

----------------------------------------------------------------------
 .../gemfire/codeAnalysis/sanctionedDataSerializables.txt       | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/b7030d1c/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
----------------------------------------------------------------------
diff --git a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
index 137850f..af0ee36 100644
--- a/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
+++ b/gemfire-core/src/test/resources/com/gemstone/gemfire/codeAnalysis/sanctionedDataSerializables.txt
@@ -243,9 +243,9 @@ fromData,27,2a2bb7000c2a2bb9000d0100b500032a2bb8000ec0000fb50002b1
 toData,24,2a2bb700092b2ab40003b9000a02002ab400022bb8000bb1
 
 com/gemstone/gemfire/distributed/internal/StartupMessage,3
-fromDataProblem,38,2ab4003ac7000e2abb006d59b7006eb5003a2ab4003a2bb6006f572ab4003a1270b6006f57b1
-fromData,354,2a2bb700712bb9007201003d1c99000e2a2bb80073b5000ca700082a01b5000c2bb80074b20051b600529c000704a70004033e1d9900082bb80075572a2bb80076b500092a2bb900770100b5000d2a2bb900720100b5000e2a2bb900720100b500122bb900770100360403360515051504a2003e2bb800783a062bb90077010036071906c6000d19060301011507b80079a700183a082ab2007a04bd00235903190853b60027b7007b840501a7ffc12bb900770100360503360615061505a200492bb800783a072bb800783a082bb90077010036091907c600121908c6000d19071908150903b8007ca700183a0a2ab2007d04bd00235903190a53b60027b7007b840601a7ffb62a2bb80075c0007eb500132a2bb900770100b500182a2bb80076b500192a2bb900720100b5001abb006659b700673a0619062bb6007f2a1906b60080b5000a2a1906b60081b5000b2a1906b60082b5000f2a1906b60083b50010b1
-toData,399,2a2bb7004d2b2ab4000cc6000704a7000403b9004e02002ab4000cc6000b2ab4000c2bb8004f2bb80050b20051b600529c000704a70004033d1c99000ebb005359b700542bb800552ab400092bb800562b2ab4000db9005702002b2ab4000eb9004e02002b2ab40012b9004e0200b800584e2b2dbeb90057020003360415042dbea200212d150432b600592bb8005a2b2d150432b6005bb900570200840401a7ffdeb8005c3a042b1904beb90057020003360515051904bea2007f1904150532c1005d9900331904150532c0005db6005eb6005f3a061904150532c0005db60060b6005f3a071904150532c0005db600613608a7002a1904150532c00062b600633a061904150532c00062b600643a071904150532c00062b60065360819062bb8005a19072bb8005a2b1508b900570200840501a7ff7f2ab400132bb800552b2ab40018b9005702002ab400192bb800562b2ab4001ab9004e0200bb006659b700673a0519052ab4000ab6006819052ab4000bb6006919052ab4000fb6006a19052ab40010b6006b19052bb6006cb1
+fromDataProblem,38,2ab40039c7000e2abb006b59b7006cb500392ab400392bb6006d572ab40039126eb6006d57b1
+fromData,325,2a2bb7006f2bb80070b2004eb6004f9c000704a70004033d1c9900082bb80071572a2bb80072b500092a2bb900730100b5000c2a2bb900740100b5000d2a2bb900740100b500112bb9007301003e03360415041da2003e2bb800753a052bb90073010036061905c6000d19050301011506b80076a700183a072ab2007704bd00225903190753b60026b70078840401a7ffc22bb900730100360403360515051504a200492bb800753a062bb800753a072bb90073010036081906c600121907c6000d19061907150803b80079a700183a092ab2007a04bd00225903190953b60026b70078840501a7ffb62a2bb80071c0007bb500122a2bb900730100b500172a2bb80072b500182a2bb900740100b50019bb006459b700653a0519052bb6007c2a1905b6007db5000a2a1905b6007eb5000b2a1905b6007fb5000e2a1905b60080b5000fb1
+toData,366,2a2bb7004c2bb8004db2004eb6004f9c000704a70004033d1c99000ebb005059b700512bb800522ab400092bb800532b2ab4000cb9005402002b2ab4000db9005502002b2ab40011b900550200b800564e2b2dbeb90054020003360415042dbea200212d150432b600572bb800582b2d150432b60059b900540200840401a7ffdeb8005a3a042b1904beb90054020003360515051904bea2007f1904150532c1005b9900331904150532c0005bb6005cb6005d3a061904150532c0005bb6005eb6005d3a071904150532c0005bb6005f3608a7002a1904150532c00060b600613a061904150532c00060b600623a071904150532c00060b60063360819062bb8005819072bb800582b1508b900540200840501a7ff7f2ab400122bb800522b2ab40017b9005402002ab400182bb800532b2ab40019b900550200bb006459b700653a0519052ab4000ab6006619052ab4000bb6006719052ab4000eb6006819052ab4000fb6006919052bb6006ab1
 
 com/gemstone/gemfire/distributed/internal/StartupResponseMessage,3
 fromDataProblem,43,2ab40026c7000e2abb003959b7003ab500262ab400262bb6003b572ab40026123c123db8003eb6003b57b1


[09/50] [abbrv] incubator-geode git commit: fixing GEODE-588 CI Failure: LocatorDUnitTest.testMultipleMcastLocators

Posted by je...@apache.org.
fixing GEODE-588 CI Failure: LocatorDUnitTest.testMultipleMcastLocators

forcing JGroups to use an IPv4 address for multicast unless the
PreferIPv6Addresses property is set to true.  Use of multicast is
also restricted to cache operations on regions with multicast enabled.
This avoids problems when multicast isn't properly set up and a user
enables use of multicast in the DistributedSystem config.


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

Branch: refs/heads/feature/GEODE-17
Commit: e3d5ebe11422f6245e3f4ee4a86ce76e60c57bef
Parents: c0d396a
Author: Bruce Schuchardt <bs...@pivotal.io>
Authored: Tue Nov 24 09:00:22 2015 -0800
Committer: Bruce Schuchardt <bs...@pivotal.io>
Committed: Tue Nov 24 09:00:22 2015 -0800

----------------------------------------------------------------------
 .../gemfire/distributed/internal/DistributionManager.java   | 2 +-
 .../distributed/internal/InternalDistributedSystem.java     | 8 +++++---
 .../internal/membership/gms/messenger/JGroupsMessenger.java | 9 ++++-----
 .../gemstone/gemfire/internal/cache/GemFireCacheImpl.java   | 4 ----
 4 files changed, 10 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e3d5ebe1/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 247775d..837194c 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
@@ -3383,7 +3383,7 @@ public class DistributionManager
     allOthers.remove(getDistributionManagerId());
 //    ReplyProcessor21 rp = new ReplyProcessor21(this, allOthers);
 //    m.setProcessorId(rp.getProcessorId());
-    m.setMulticast(system.getConfig().getMcastPort() != 0);
+//    m.setMulticast(system.getConfig().getMcastPort() != 0);
     m.setRecipients(allOthers);
 
     //Address recipient = (Address) m.getRecipient();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e3d5ebe1/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 956fe8b..261b8a9 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
@@ -2578,10 +2578,12 @@ public final class InternalDistributedSystem
     
 //    logger.info("reconnecting IDS@"+System.identityHashCode(this));
 
-    if (isDebugEnabled) {
-      logger.debug("changing thread name to ReconnectThread");
+    if (Thread.currentThread().getName().equals("DisconnectThread")) {
+      if (isDebugEnabled) {
+        logger.debug("changing thread name to ReconnectThread");
+      }
+      Thread.currentThread().setName("ReconnectThread");
     }
-    Thread.currentThread().setName("ReconnectThread");
     
     // get the membership manager for quorum checks
     MembershipManager mbrMgr = this.dm.getMembershipManager();

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e3d5ebe1/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
index 8ac8f77..889795d 100755
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/membership/gms/messenger/JGroupsMessenger.java
@@ -276,7 +276,7 @@ public class JGroupsMessenger implements Messenger {
       else {
         logger.debug("JGroups configuration: {}", properties);
         
-        checkForWindowsIPv6();
+        checkForIPv6();
         InputStream is = new ByteArrayInputStream(properties.getBytes("UTF-8"));
         myChannel = new JChannel(is);
       }
@@ -320,11 +320,10 @@ public class JGroupsMessenger implements Messenger {
    * and preferIPv6Addresses is not set or is true.  We want it to use an
    * IPv4 address for a dual-IP stack so that both IPv4 and IPv6 messaging work
    */
-  private void checkForWindowsIPv6() throws Exception {
-    boolean isWindows = ((String)System.getProperty("os.name")).indexOf("Windows") >= 0;
+  private void checkForIPv6() throws Exception {
     boolean preferIpV6Addr = Boolean.getBoolean("java.net.preferIPv6Addresses");
-    if (isWindows && !preferIpV6Addr) {
-      logger.debug("Windows detected - forcing JGroups to think IPv4 is being used so it will choose an IPv4 address");
+    if (!preferIpV6Addr) {
+      logger.debug("forcing JGroups to think IPv4 is being used so it will choose an IPv4 address");
       Field m = org.jgroups.util.Util.class.getDeclaredField("ip_stack_type");
       m.setAccessible(true);
       m.set(null, org.jgroups.util.StackType.IPv4);

http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/e3d5ebe1/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
----------------------------------------------------------------------
diff --git a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
index cd7376d..27bb813 100644
--- a/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
+++ b/gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/GemFireCacheImpl.java
@@ -2205,10 +2205,6 @@ public class GemFireCacheImpl implements InternalCache, ClientCache, HasCachePer
             Set otherMembers = dm.getOtherDistributionManagerIds();
             ReplyProcessor21 processor = new ReplyProcessor21(system, otherMembers);
             CloseCacheMessage msg = new CloseCacheMessage();
-            // [bruce] if multicast is available, use it to send the message to
-            // avoid race conditions with cache content operations that might
-            // also be multicast
-            msg.setMulticast(system.getConfig().getMcastPort() != 0);
             msg.setRecipients(otherMembers);
             msg.setProcessorId(processor.getProcessorId());
             dm.putOutgoing(msg);